ALSA: usb-audio: Add "Keep Interface" control
authorTakashi Iwai <tiwai@suse.de>
Wed, 2 May 2018 09:52:55 +0000 (11:52 +0200)
committerTakashi Iwai <tiwai@suse.de>
Wed, 2 May 2018 14:02:34 +0000 (16:02 +0200)
commit4120fbedbb6c999686d03a9c74acc4f650ece8a2
tree9071fd54131328570871d82b6512a2c3026984de
parent8a463225b11047455b374729d18c8a371fe6e591
ALSA: usb-audio: Add "Keep Interface" control

This patch adds "Keep Interface" control for each USB-audio device.
The control element is with SND_CTL_IFACE_CARD, so that it won't
appear on any sane mixer applications.  For a device that is confirmed
to work well with "keep-interface" mode, user can flip the control via
amixer, e.g.
  % amixer -c1 cset iface=CARD,name='Keep Interface' on

and save/restore the state via alsactl.

The reason to provide this via control API is that the behavior must
be pretty depending on the device (and the firmware in it), so it's
not ideal to apply via module option.

For a device that certainly works, we may set it statically via a
quirk table entry.  But a device like Dell WD15 dock behaves so
differently depending on the firmware, and we can't set it
statically.  So leave this as a dynamic switch each user can adjust
freely.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/usb/mixer.c