From dffc4d18d3a9f608f8b316f1e7057d13978ef44f Mon Sep 17 00:00:00 2001 From: Colin Guthrie Date: Tue, 17 May 2011 22:31:10 +0100 Subject: 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) --- src/modules/bluetooth/module-bluetooth-device.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/modules/bluetooth') 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)); -- cgit