apps/agl-service-audiomixer.git
7 months agoaudiomixertest: improve codebase to make it work correctly with wp 0.5 38/30238/1
George Kiagiadakis [Wed, 4 Sep 2024 08:05:52 +0000 (11:05 +0300)]
audiomixertest: improve codebase to make it work correctly with wp 0.5

- Replace g_warning() with fprintf(), so that we don't need to enable
  WIREPLUMBER_DEBUG to actually read those messages.
- Make it so that the help message can be printed before connecting
  to pipewire and waiting for controls.
- Remove the race condition mitigation hack that was previously there,
  in case ensure_controls() did not discover all controls initially.
- Lock the audiomixer properly when using its methods and structures.

Bug-AGL: SPEC-4934
Signed-off-by: George Kiagiadakis <george.kiagiadakis@collabora.com>
Change-Id: Ia4b9448dee83838858153f1c1c744e962294cd4e

7 months agoaudiomixer: update to work with WirePlumber 0.5 37/30237/1
George Kiagiadakis [Wed, 4 Sep 2024 08:01:39 +0000 (11:01 +0300)]
audiomixer: update to work with WirePlumber 0.5

This update also brings improvements to the initialization state
management, so that ensure_controls() is guaranteed to return after
all the relevant controls have been discovered. Previously there were
cases that ensure_controls() would return without having discovered
the role-based sinks or the equalizer sink.

Bug-AGL: SPEC-4934
Change-Id: If3acca37c98ae6ff5ef811b7634951d12bf1d030
Signed-off-by: George Kiagiadakis <george.kiagiadakis@collabora.com>
14 months agoAdd gitlab issue/merge request templates 17.90.0 18.90.0 ricefish/17.90.0 ricefish_17.90.0 salmon/18.90.0 salmon_18.90.0
Jan-Simon Moeller [Tue, 13 Feb 2024 21:35:28 +0000 (22:35 +0100)]
Add gitlab issue/merge request templates

Add template files for gitlab

Bug-AGL: SPEC-4474
Signed-off-by: Jan-Simon Moeller <jsmoeller@linuxfoundation.org>
Change-Id: I66e969af6dbf70341b53a5d8703fddba76643729

16 months agoAdd balance/fade/treble/bass support 31/29531/3 17.0.0 17.0.1 17.0.2 17.1.0 17.1.1 17.1.2 17.1.3 17.1.4 18.0.0 devtool-base devtool-patched quillback/17.0.0 quillback/17.0.1 quillback/17.0.2 quillback/17.1.0 quillback/17.1.1 quillback/17.1.2 quillback/17.1.3 quillback/17.1.4 quillback_17.0.0 quillback_17.0.1 quillback_17.0.2 quillback_17.1.0 quillback_17.1.1 quillback_17.1.2 quillback_17.1.3 quillback_17.1.4 ricefish/18.0.0 ricefish_18.0.0
Scott Murray [Sun, 17 Dec 2023 20:35:19 +0000 (15:35 -0500)]
Add balance/fade/treble/bass support

Changes:
- Add support for new VSS signals for balance/fade/treble/bass.
  Treble and bass drive the recently added equalizer controls,
  while balance and fade currently do simple linear scaling down
  of the non-emphasized direction.
- Add support for VSS 4.0 separate navigation volume and mute
  signals.
- Significant refactoring of the audiomixer API calling code in
  the AudioMixerService class to avoid code duplication.
- All pushes of the updated VSS values for volume and mute
  signals now are driven from the mixer API callback so that
  internal and external mixer changes are handled with less
  code duplication.  For now, gain changes have been kept as
  explicit VSS updates on set, this may change if handling
  external changes seems more worthwhile.  As well, initial
  master volume setting is a bit of a special case, see below.
- Setting the initial volume has been tweaked a bit to ensure
  that the value gets pushed out via VSS.  There currently seems
  to be an issue with the master playback sink mixer not taking
  changes until playback starts, so while the current code
  ensures that VSS subscribers see the value the daemon has set,
  it is likely that does not correspond to what's in WirePlumber
  until playback of some form happens and another volume change
  is made.  This will be addressed with upstream.
- Change flags in the mixer API have been updated to indicate
  overall and per-channel volume changes as separate flags.

Bug-AGL: SPEC-5001

Change-Id: I66585f573978989a0c281f060a667b4495e4bc0f
Signed-off-by: Scott Murray <scott.murray@konsulko.com>
16 months agoaudiomixer: add new channel volume API 32/29532/5
Ashok Sidipotu [Thu, 14 Dec 2023 10:49:21 +0000 (16:19 +0530)]
audiomixer: add new channel volume API

- Add API to control left and right channel volumes.
- Fix a bug in treble gain update. The changed gain value of Treble is
  not updated in the audiomixer as the gain changed
  callback(on_eq_params_changed) doesnt look beyond bass for gain
  controls. Fix this issue by continuing  to look beyond bass control.
- Adjust the floating point comparision epsilon value from 0.000001 to
  0.00001.

Bug-AGL: SPEC-4931
Change-Id: I2a242d08f194b66abd84bb31a97364884e8d2a1d
Signed-off-by: Ashok Sidipotu <ashok.sidipotu@collabora.com>
16 months agoaudiomixer: Add gain controls 12/29512/3
Ashok Sidipotu [Thu, 7 Dec 2023 13:14:01 +0000 (14:14 +0100)]
audiomixer: Add gain controls

- Add Equalizer gain controls.
- Add a simple app to test the controls.

Bug-AGL: SPEC-4931
Change-Id: Ib33eb0e829747c401861e99acd67291462ec6a97
Signed-off-by: Ashok Sidipotu <ashok.sidipotu@collabora.com>
20 months agoRework to switch to using KUKSA.val databroker 67/29167/1
Scott Murray [Thu, 24 Aug 2023 19:43:08 +0000 (15:43 -0400)]
Rework to switch to using KUKSA.val databroker

Rework to use the "VAL" gRPC API from the KUKSA.val databroker
instead of the older server's WebSocket interface.  Some source
files have been renamed to match the class naming to provide
a bit more consistency.

Bug-AGL: SPEC-4762

Signed-off-by: Scott Murray <scott.murray@konsulko.com>
Change-Id: I5ded74cfbd6987cd045b7b142fd9f38971aaef66

22 months agovis-config.cpp: define local load_string_file 02/29002/1
Denys Dmytriyenko [Wed, 7 Jun 2023 21:26:02 +0000 (21:26 +0000)]
vis-config.cpp: define local load_string_file

As boost has deprecated string_file helper functions since 1.81,
define one locally with minor changes to use std types where needed.

Bug-AGL: SPEC-4578

Signed-off-by: Denys Dmytriyenko <denys@konsulko.com>
Change-Id: I231ff70857e8d4ed827337a52c60e58d01ab6ea5

2 years agoaudiomixer: fix compilation issue 74/28574/3
Ashok Sidipotu [Thu, 16 Mar 2023 10:11:56 +0000 (15:41 +0530)]
audiomixer: fix compilation issue

Set _XOPEN_SOURCE=700 to fix the compilation error with pipewire headers.

Bug-AGL: SPEC-4732
Signed-off-by: Ashok Sidipotu <ashok.sidipotu@collabora.com>
Change-Id: Ib009c9ecb1828286fd83173ac5cb6ebba5c78b97

2 years agoUpdate message data type handling 23/28123/2
Scott Murray [Tue, 8 Nov 2022 16:06:01 +0000 (11:06 -0500)]
Update message data type handling

KUKSA.val 0.2.1 always returned numeric values as floating point, this
has changed with 0.2.5 and support is required to handle data points
actually having integer or unsigned integer types.

Bug-AGL: SPEC-4598

Signed-off-by: Scott Murray <scott.murray@konsulko.com>
Change-Id: Ica9b3e5fc27e110c02788dde6549e0bb194ffeb1

2 years agoRepurpose into VIS client 18/27718/1 13.93.0 needlefish/13.93.0 needlefish_13.93.0
Scott Murray [Sat, 18 Jun 2022 00:24:27 +0000 (20:24 -0400)]
Repurpose into VIS client

Repurpose repository for a spiritual successor of the previous
binding.  The replacement is a daemon that demonstrates servicing
the volume actuator from the VSS schema via VIS signals from
KUKSA.val.  Currently the connection to KUKSA.val is websocket based
using the boost::asio framework, but the plan is to migrate to gRPC
as that becomes more robust in KUKSA.val.  As well, this new code
will serve as the base for implementing a gRPC API to expose the full
set of WirePlumber controls as was done with the previous binding.

Notable changes:
- New code is completely C++, partly to leverage using Boost, but
  also to futureproof future work with gRPC.  The WirePlumber
  interfacing code that has been kept from the old binding is
  still C for now, converting it to C++ is a planned future
  rework.
- Switch from CMake to meson for ease of development and some
  degree of futureproofing.
- Use with systemd is assumed; behavior follows the systemd
  daemon guidelines barring the use of journald logging prefixes,
  which may be addressed with future work.  A systemd unit is
  also installed as part of the build.
- SPDX license headers using SPDX "short identifiers" are used in
  source files rather than the full copyright headers used in the
  previous codebase.  This follows the direction that projects such
  as the Linux kernel are going in.

Bug-AGL: SPEC-4409

Signed-off-by: Scott Murray <scott.murray@konsulko.com>
Change-Id: Ibb7091c4354432bb094147d1419ab475486a4abc
(cherry picked from commit 298bbf445a731b85cb8d5d19a3b595e8870d8701)

3 years agoaudiomixer: fix calls to g_variant_lookup() 54/26454/1 12.90.0 12.90.1 12.91.0 12.93.0 marlin/12.90.0 marlin/12.90.1 marlin/12.91.0 marlin/12.93.0 marlin_12.90.0 marlin_12.90.1 marlin_12.91.0 marlin_12.93.0
George Kiagiadakis [Thu, 24 Jun 2021 15:14:11 +0000 (18:14 +0300)]
audiomixer: fix calls to g_variant_lookup()

* actually get values instead of storing them into intermediate
  pointers on the stack
* fix crash on 32-bit architectures
* no need to use NULL sentinel

Bug-AGL: SPEC-3976
Signed-off-by: George Kiagiadakis <george.kiagiadakis@collabora.com>
Change-Id: I88647ae21405fe3bd7e57c82d3e953be2767c0c9

4 years agoaudiomixer: port to wireplumber 0.4 55/26255/2 11.92.0 lamprey/11.91.0 lamprey/11.92.0 lamprey_11.91.0 lamprey_11.92.0
George Kiagiadakis [Thu, 25 Feb 2021 19:55:58 +0000 (14:55 -0500)]
audiomixer: port to wireplumber 0.4

* use module-mixer-api and module-default-nodes-api
* use endpoints without endpoint streams (new design)
* improve thread safety a little bit

Bug-AGL: SPEC-3844
Signed-off-by: George Kiagiadakis <george.kiagiadakis@collabora.com>
Change-Id: Ia180d607698d7a8875c19cc48bd2b2c503772945

4 years agoFix build of audiomixer test wgt with SDK 96/25296/1 10.91.0 10.92.0 10.93.0 koi/10.91.0 koi/10.92.0 koi/10.93.0 koi_10.91.0 koi_10.92.0 koi_10.93.0
Jan-Simon Moeller [Fri, 18 Sep 2020 20:05:24 +0000 (22:05 +0200)]
Fix build of audiomixer test wgt with SDK

The build of the tests would fail with a parsing error. Fix it.

Bug-AGL: SPEC-3590
Signed-off-by: Jan-Simon Moeller <jsmoeller@linuxfoundation.org>
Change-Id: I3c257210cb2fb7031513e919750b369216de6f07

4 years agoStart on boot 70/25170/1 9.99.4 jellyfish/9.99.4 jellyfish_9.99.4
Scott Murray [Mon, 31 Aug 2020 22:32:41 +0000 (18:32 -0400)]
Start on boot

Update widget config.xml.in to add "run-by-default" permission.

Bug-AGL: SPEC-3558

Signed-off-by: Scott Murray <scott.murray@konsulko.com>
Change-Id: Ib59442b3ee318f47f8da4412691e29257eefc381

4 years agoAdd test bindings for agl-service-audiomixer 36/24936/1 9.99.2 9.99.3 jellyfish/9.99.2 jellyfish/9.99.3 jellyfish_9.99.2 jellyfish_9.99.3
Li, Xiaoming [Mon, 6 Jul 2020 07:21:55 +0000 (15:21 +0800)]
Add test bindings for agl-service-audiomixer

    - Create the file and folders structure required.
      for building test bindings. Add all required Cmake files.
    - Create aft-agl-audiomixer.json configuration file for
      testing binding.
    - Create audiomixer.lua for testing bindings.

Bug-AGL: SPEC-3458

Change-Id: I16d43abb29d4a124801c704b4080ba5cba16e1c8
Signed-off-by: Li, Xiaoming <lixm.fnst@cn.fujitsu.com>
4 years agoUpdate autobuild scripts 99/24699/1 9.99.1 jellyfish/9.99.1 jellyfish_9.99.1
Scott Murray [Tue, 9 Jun 2020 22:42:12 +0000 (18:42 -0400)]
Update autobuild scripts

Update autobuild scripts with reworked version that fixes building
outside of the source tree.

Bug-AGL: SPEC-2049, SPEC-3300

Signed-off-by: Scott Murray <scott.murray@konsulko.com>
Change-Id: Ic93266a0ad6d909fe4c19349d06102fa88f71612

5 years agoUpdate autobuild script to create new targets 99/23999/1
Frederic Marec [Tue, 18 Feb 2020 15:04:17 +0000 (16:04 +0100)]
Update autobuild script to create new targets

Update autobuild script to create multiple widget target debug, coverage and all

Bug-AGL: SPEC-2049

Signed-off-by: Frederic Marec <frederic.marec@iot.bzh>
Change-Id: I7340889e46b92b2a8cea2f3c243717e0aaaf0b8a

5 years agoUpdate .gitreview file 08/23808/1
Jan-Simon Möller [Tue, 11 Feb 2020 16:40:42 +0000 (17:40 +0100)]
Update .gitreview file

This updates the gitreview file in the project

.

Signed-off-by: Jan-Simon Möller <jsmoeller@linuxfoundation.org>
Change-Id: I172d215baca1f5ce186dc705409e02ea6fda169e

5 years agoaudiomixer: rework event handling to avoid race conditions 71/23471/1 8.99.5 icefish/8.99.5 icefish_8.99.5
George Kiagiadakis [Tue, 24 Dec 2019 09:36:06 +0000 (11:36 +0200)]
audiomixer: rework event handling to avoid race conditions

Previously there was a race condition that would happen when
audiomixer was the first client to connect to pipewire.
It would get a session first and then a default endpoint id
from the session, but at the time the default endpoint id
would be known, the WpProxyEndpoints would still not be ready.
This would cause the populate_controls() algorithm to end up
with no controls and the binding would therefore report that
no controls were exposed.

Now we also handle objects-changed from the endpoints object manager.
This is an additional trigger, so that when we end up in the
situation described above, the objects-changed from the endpoints om
will trigger the controls to be exposed eventually.

In order to avoid signalling control changes all the time,
there are now some checks to change controls only under
certain conditions.

Change-Id: Ied705592f889a0262465ed5efa711233a66d579b
Signed-off-by: George Kiagiadakis <george.kiagiadakis@collabora.com>
5 years agoaudiomixer: port to the new endpoints API 42/23342/2 8.99.3 8.99.4 icefish/8.99.3 icefish/8.99.4 icefish_8.99.3 icefish_8.99.4
George Kiagiadakis [Thu, 12 Dec 2019 19:22:55 +0000 (21:22 +0200)]
audiomixer: port to the new endpoints API

... using wireplumber API to access endpoint information instead
of the low-level pipewire API.

This exports only the master volume for the moment.

Signed-off-by: George Kiagiadakis <george.kiagiadakis@collabora.com>
Change-Id: I4fc78c4182259b6405c1eeaa1823c3bac83ba2ee

5 years agofix(confg.cmake): set PROJECT_URL to silence CMake warning 27/23027/2
Li Xiaoming [Fri, 22 Nov 2019 08:56:37 +0000 (09:56 +0100)]
fix(confg.cmake): set PROJECT_URL to silence CMake warning

No homepage url found.  Please set a PROJECT_URL cmake variable in
your config.cmake.

Bug-AGL: SPEC-2804

Change-Id: I6e135c06c6aa5315ffb9db3907bb20c533ddc79e
Signed-off-by: Li Xiaoming <lixm.fnst@cn.fujitsu.com>
5 years agoaudiomixer: add steering wheel event processing support 36/23336/1
Matt Ranostay [Thu, 5 Dec 2019 23:55:33 +0000 (15:55 -0800)]
audiomixer: add steering wheel event processing support

Subscribe to volume events from the agl-service-signal-composer
service, and enable up/down/mute event processing applied to the
Master mixer control.

Bug-AGL: SPEC-3024
Change-Id: I76bb66c7274875371a581568092c600dfd543e0f
Signed-off-by: Matt Ranostay <matt.ranostay@konsulko.com>
Signed-off-by: Scott Murray <scott.murray@konsulko.com>
5 years agofix API usage after changes 76/23276/1 8.99.2 icefish/8.99.2 icefish_8.99.2
George Kiagiadakis [Sun, 22 Sep 2019 14:43:58 +0000 (17:43 +0300)]
fix API usage after changes

Signed-off-by: George Kiagiadakis <george.kiagiadakis@collabora.com>
Change-Id: I4c00d355a2dc452ebae413f0abf39308ba314f56

5 years agodisable all usage of the endpoint extension to make this compile for now 75/23275/1
George Kiagiadakis [Sun, 22 Sep 2019 13:47:08 +0000 (16:47 +0300)]
disable all usage of the endpoint extension to make this compile for now

Signed-off-by: George Kiagiadakis <george.kiagiadakis@collabora.com>
Change-Id: Ieba770a3902fa4081ea4b9a1c9506b9abd82f35b

5 years agoaudiomixer: README.md: add API documentation 19/21919/1 8.0.0 8.0.1 8.0.2 8.0.3 8.99.1 halibut/8.0.0 halibut/8.0.1 halibut/8.0.2 halibut/8.0.3 halibut_8.0.0 halibut_8.0.1 halibut_8.0.2 halibut_8.0.3 icefish/8.99.1 icefish_8.99.1
George Kiagiadakis [Sat, 20 Jul 2019 04:09:12 +0000 (13:09 +0900)]
audiomixer: README.md: add API documentation

Bug-AGL: SPEC-2473

Signed-off-by: George Kiagiadakis <george.kiagiadakis@collabora.com>
Change-Id: Ic9fbbf6cc1f91f8699a3ba897b3984d8e4ddf244

5 years agobinding: use afb_api_queue_job to queue events to run async 93/21793/1 7.99.2 7.99.3 halibut/7.99.2 halibut/7.99.3 halibut_7.99.2 halibut_7.99.3
George Kiagiadakis [Fri, 28 Jun 2019 14:32:20 +0000 (17:32 +0300)]
binding: use afb_api_queue_job to queue events to run async

Apparently the binder does not like manual interventions to the
event loop and it has its own mechanism for queueing events
to run asynchronously.

Signed-off-by: George Kiagiadakis <george.kiagiadakis@collabora.com>
Change-Id: Iefef031b4ad8932bbf36a5213a119908de48b41f

5 years agoaudiomixer: use pipewire's debug system in the audiomixer thread 92/21792/1
George Kiagiadakis [Fri, 28 Jun 2019 14:29:49 +0000 (17:29 +0300)]
audiomixer: use pipewire's debug system in the audiomixer thread

Because the binder doesn't like printing messages with its own
mechanism from other threads.

Change-Id: I6fac81fc6de58f7cbbf2f93b9795c0833e44d85c
Signed-off-by: George Kiagiadakis <george.kiagiadakis@collabora.com>
5 years agoaudiomixer: fix a couple of stupid mistakes 91/21791/1
George Kiagiadakis [Fri, 28 Jun 2019 14:28:52 +0000 (17:28 +0300)]
audiomixer: fix a couple of stupid mistakes

This makes the code actually work now

Signed-off-by: George Kiagiadakis <george.kiagiadakis@collabora.com>
Change-Id: I8dad07fc463ca00d4f16be63f0ad73946f6da0bc

5 years agoInitial binding version 09/21709/1
George Kiagiadakis [Fri, 7 Jun 2019 14:44:35 +0000 (17:44 +0300)]
Initial binding version

Signed-off-by: George Kiagiadakis <george.kiagiadakis@collabora.com>
Change-Id: I89e493d88c7fa1309f1b2991d346fc496caa6898

5 years agoInitial empty repository
Jan-Simon Moeller [Sun, 19 May 2019 03:38:25 +0000 (03:38 +0000)]
Initial empty repository