summaryrefslogtreecommitdiffstats
path: root/src/modules/bluetooth
diff options
context:
space:
mode:
authorColin Guthrie <colin@mageia.org>2011-05-17 22:31:10 +0100
committerColin Guthrie <colin@mageia.org>2011-06-22 22:45:27 +0100
commitdffc4d18d3a9f608f8b316f1e7057d13978ef44f (patch)
tree2967eec64a3884b1b2ae5b7e5f59fafc92097ebf /src/modules/bluetooth
parentfdf3a0881445560e962924a02319fc5cd2506231 (diff)
capture: Implement per-stream volume control for capture streams.
This piggy backs onto the previous changes for protocol 22 and thus does not bump the version. This and the previous commits should be seen as mostly atomic. Apologies for any bisecting issues this causes (although I would expect these to be minimal)
Diffstat (limited to 'src/modules/bluetooth')
-rw-r--r--src/modules/bluetooth/module-bluetooth-device.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/modules/bluetooth/module-bluetooth-device.c b/src/modules/bluetooth/module-bluetooth-device.c
index 1ff752a9..0639afd6 100644
--- a/src/modules/bluetooth/module-bluetooth-device.c
+++ b/src/modules/bluetooth/module-bluetooth-device.c
@@ -1868,7 +1868,7 @@ static void source_set_volume_cb(pa_source *s) {
pa_assert(u->source == s);
pa_assert(u->profile == PROFILE_HSP);
- gain = (pa_cvolume_max(&s->volume) * HSP_MAX_GAIN) / PA_VOLUME_NORM;
+ gain = (pa_cvolume_max(&s->real_volume) * HSP_MAX_GAIN) / PA_VOLUME_NORM;
if (gain > HSP_MAX_GAIN)
gain = HSP_MAX_GAIN;
@@ -1879,7 +1879,7 @@ static void source_set_volume_cb(pa_source *s) {
if (volume < PA_VOLUME_NORM)
volume++;
- pa_cvolume_set(&s->volume, u->sample_spec.channels, volume);
+ pa_cvolume_set(&s->real_volume, u->sample_spec.channels, volume);
pa_assert_se(m = dbus_message_new_method_call("org.bluez", u->path, "org.bluez.Headset", "SetMicrophoneGain"));
pa_assert_se(dbus_message_append_args(m, DBUS_TYPE_UINT16, &gain, DBUS_TYPE_INVALID));