summaryrefslogtreecommitdiff
path: root/sound/usb/quirks.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2021-07-29 10:44:00 +0300
committerTakashi Iwai <tiwai@suse.de>2021-08-02 10:06:04 +0300
commit44e6fc64dfebf48811219a9c24666b4b87dc0ec5 (patch)
treea3c6b4286e337a99d43b3c3ce7717b155d16d8aa /sound/usb/quirks.c
parent8bfe17ad975ffbd0c7ce673993ed2242fbc4ad94 (diff)
downloadlinux-44e6fc64dfebf48811219a9c24666b4b87dc0ec5.tar.xz
ALSA: usb-audio: Move autosuspend quirk into quirk_flags
The auto-suspend suppression workaround for Lenovo machines are handled in quirks-table.h. Now it's more easier to handle with quirk_flags. Link: https://lore.kernel.org/r/20210729074404.19728-2-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/usb/quirks.c')
-rw-r--r--sound/usb/quirks.c14
1 files changed, 4 insertions, 10 deletions
diff --git a/sound/usb/quirks.c b/sound/usb/quirks.c
index dc667b8c92f2..1cffb87e5026 100644
--- a/sound/usb/quirks.c
+++ b/sound/usb/quirks.c
@@ -534,15 +534,6 @@ static int create_standard_mixer_quirk(struct snd_usb_audio *chip,
return snd_usb_create_mixer(chip, quirk->ifnum, 0);
}
-static int setup_disable_autosuspend(struct snd_usb_audio *chip,
- struct usb_interface *iface,
- struct usb_driver *driver,
- const struct snd_usb_audio_quirk *quirk)
-{
- usb_disable_autosuspend(interface_to_usbdev(iface));
- return 1; /* Continue with creating streams and mixer */
-}
-
/*
* audio-interface quirks
*
@@ -580,7 +571,6 @@ int snd_usb_create_quirk(struct snd_usb_audio *chip,
[QUIRK_AUDIO_FIXED_ENDPOINT] = create_fixed_stream_quirk,
[QUIRK_AUDIO_EDIROL_UAXX] = create_uaxx_quirk,
[QUIRK_AUDIO_STANDARD_MIXER] = create_standard_mixer_quirk,
- [QUIRK_SETUP_DISABLE_AUTOSUSPEND] = setup_disable_autosuspend,
};
if (quirk->type < QUIRK_TYPE_COUNT) {
@@ -1855,6 +1845,10 @@ static const struct usb_audio_quirk_flags_table quirk_flags_table[] = {
QUIRK_FLAG_IGNORE_CLOCK_SOURCE),
DEVICE_FLG(0x1686, 0x00dd, /* Zoom R16/24 */
QUIRK_FLAG_TX_LENGTH | QUIRK_FLAG_CTL_MSG_DELAY_1M),
+ DEVICE_FLG(0x17aa, 0x1046, /* Lenovo ThinkStation P620 Rear Line-in, Line-out and Microphone */
+ QUIRK_FLAG_DISABLE_AUTOSUSPEND),
+ DEVICE_FLG(0x17aa, 0x104d, /* Lenovo ThinkStation P620 Internal Speaker + Front Headset */
+ QUIRK_FLAG_DISABLE_AUTOSUSPEND),
DEVICE_FLG(0x1852, 0x5065, /* Luxman DA-06 */
QUIRK_FLAG_ITF_USB_DSD_DAC | QUIRK_FLAG_CTL_MSG_DELAY),
DEVICE_FLG(0x1901, 0x0191, /* GE B850V3 CP2114 audio interface */