ALSA: usb-audio: Add mute TLV for playback volumes on C-Media devices
authorTakashi Iwai <tiwai@suse.de>
Wed, 16 Aug 2017 12:18:37 +0000 (14:18 +0200)
committerBen Hutchings <ben@decadent.org.uk>
Sat, 11 Nov 2017 13:34:30 +0000 (13:34 +0000)
commit2d8d59253baf248b3aed6335fa3e17b233a44167
tree04bbaf54794b7180da49c9e646708c8147aa19b1
parent02b1ca57b42bd07c90e45ab507fadec0c808bb1d
ALSA: usb-audio: Add mute TLV for playback volumes on C-Media devices

commit 0f174b3525a43bd51f9397394763925e0ebe7bc7 upstream.

C-Media devices (at least some models) mute the playback stream when
volumes are set to the minimum value.  But this isn't informed via TLV
and the user-space, typically PulseAudio, gets confused as if it's
still played in a low volume.

This patch adds the new flag, min_mute, to struct usb_mixer_elem_info
for indicating that the mixer element is with the minimum-mute volume.
This flag is set for known C-Media devices in
snd_usb_mixer_fu_apply_quirk() in turn.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=196669
Signed-off-by: Takashi Iwai <tiwai@suse.de>
[bwh: Backported to 3.2: adjust context]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
sound/usb/mixer.c
sound/usb/mixer.h
sound/usb/mixer_quirks.c