mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-05 13:29:57 -05:00
udev: allow passing of ignore_dB= parameter to alsa modules
This commit is contained in:
parent
24e582808c
commit
d6f598ab3e
4 changed files with 49 additions and 23 deletions
|
|
@ -1476,12 +1476,12 @@ static void sink_set_volume_cb(pa_sink *s) {
|
|||
if (u->profile != PROFILE_HSP)
|
||||
return;
|
||||
|
||||
gain = (pa_cvolume_max(&s->virtual_volume) * 15) / PA_VOLUME_NORM;
|
||||
gain = (pa_cvolume_max(&s->real_volume) * 15) / PA_VOLUME_NORM;
|
||||
|
||||
if (gain > 15)
|
||||
gain = 15;
|
||||
|
||||
pa_cvolume_set(&s->virtual_volume, u->sample_spec.channels, (pa_volume_t) (gain * PA_VOLUME_NORM / 15));
|
||||
pa_cvolume_set(&s->real_volume, u->sample_spec.channels, (pa_volume_t) (gain * PA_VOLUME_NORM / 15));
|
||||
|
||||
pa_assert_se(m = dbus_message_new_method_call("org.bluez", u->path, "org.bluez.Headset", "SetSpeakerGain"));
|
||||
pa_assert_se(dbus_message_append_args(m, DBUS_TYPE_UINT16, &gain, DBUS_TYPE_INVALID));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue