summaryrefslogtreecommitdiffstats
path: root/src/audiomixer.h
diff options
context:
space:
mode:
authorScott Murray <scott.murray@konsulko.com>2023-12-17 15:35:19 -0500
committerScott Murray <scott.murray@konsulko.com>2023-12-17 15:46:14 -0500
commit0ff3ef1b254364639fc42495bbcfb4760250990a (patch)
tree7a54eb69afa4bf11c54f3491ee1f69e2e1650873 /src/audiomixer.h
parent5567e12699dcc6584a620d2682430e3882dc0907 (diff)
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>
Diffstat (limited to 'src/audiomixer.h')
-rw-r--r--src/audiomixer.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/audiomixer.h b/src/audiomixer.h
index 1f089d1..941179f 100644
--- a/src/audiomixer.h
+++ b/src/audiomixer.h
@@ -26,15 +26,16 @@ struct mixer_control
bool mute;
};
+#define MIXER_CONTROL_CHANGE_FLAG_VOLUME (1<<0)
+#define MIXER_CONTROL_CHANGE_FLAG_CHANNEL_VOLUME (1<<1)
+#define MIXER_CONTROL_CHANGE_FLAG_MUTE (1<<2)
+#define MIXER_CONTROL_CHANGE_FLAG_GAIN (1<<3)
+
struct audiomixer_events
{
void (*controls_changed) (void *data);
void (*value_changed) (void *data,
-#define MIXER_CONTROL_CHANGE_FLAG_VOLUME (1<<0)
-#define MIXER_CONTROL_CHANGE_FLAG_CHANNEL_VOLUME (1<<0)
-#define MIXER_CONTROL_CHANGE_FLAG_MUTE (1<<1)
-#define MIXER_CONTROL_CHANGE_FLAG_GAIN (1<<2)
unsigned int change_mask,
const struct mixer_control *control);
};