diff options
author | Takashi Iwai <tiwai@suse.de> | 2020-08-23 14:19:20 +0300 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2020-08-23 14:20:34 +0300 |
commit | ee15d9b84ccb1c66fd8616257eb2a03b3ec79540 (patch) | |
tree | c8d76be788741c5389fb6bb785507a1f35ac8e07 /sound/usb | |
parent | 51ab5d77dcb8a50283c0eded08c67a6d275cb910 (diff) | |
parent | 1965c4364bdd025e9e3142592edd76addcc4bab4 (diff) | |
download | linux-ee15d9b84ccb1c66fd8616257eb2a03b3ec79540.tar.xz |
Merge branch 'for-linus' into for-next
Correct quirk table entries for Lenovo ThinkStation P620, too.
The name and profile strings are now set from a different table, hence
removed.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/usb')
-rw-r--r-- | sound/usb/quirks-table.h | 17 | ||||
-rw-r--r-- | sound/usb/quirks.c | 10 | ||||
-rw-r--r-- | sound/usb/usbaudio.h | 1 |
3 files changed, 28 insertions, 0 deletions
diff --git a/sound/usb/quirks-table.h b/sound/usb/quirks-table.h index 7a80ef31bbe4..969c79d0c688 100644 --- a/sound/usb/quirks-table.h +++ b/sound/usb/quirks-table.h @@ -2707,6 +2707,23 @@ YAMAHA_DEVICE(0x7010, "UB99"), } }, +/* Lenovo ThinkStation P620 Rear Line-in, Line-out and Microphone */ +{ + USB_DEVICE(0x17aa, 0x1046), + .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) { + .ifnum = QUIRK_ANY_INTERFACE, + .type = QUIRK_SETUP_DISABLE_AUTOSUSPEND + } +}, +/* Lenovo ThinkStation P620 Internal Speaker + Front Headset */ +{ + USB_DEVICE(0x17aa, 0x104d), + .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) { + .ifnum = QUIRK_ANY_INTERFACE, + .type = QUIRK_SETUP_DISABLE_AUTOSUSPEND + } +}, + /* Native Instruments MK2 series */ { /* Komplete Audio 6 */ diff --git a/sound/usb/quirks.c b/sound/usb/quirks.c index abf99b814a0f..b800fd92106c 100644 --- a/sound/usb/quirks.c +++ b/sound/usb/quirks.c @@ -518,6 +518,15 @@ static int setup_fmt_after_resume_quirk(struct snd_usb_audio *chip, return 1; /* Continue with creating streams and mixer */ } +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) +{ + driver->supports_autosuspend = 0; + return 1; /* Continue with creating streams and mixer */ +} + /* * audio-interface quirks * @@ -557,6 +566,7 @@ int snd_usb_create_quirk(struct snd_usb_audio *chip, [QUIRK_AUDIO_ALIGN_TRANSFER] = create_align_transfer_quirk, [QUIRK_AUDIO_STANDARD_MIXER] = create_standard_mixer_quirk, [QUIRK_SETUP_FMT_AFTER_RESUME] = setup_fmt_after_resume_quirk, + [QUIRK_SETUP_DISABLE_AUTOSUSPEND] = setup_disable_autosuspend, }; if (quirk->type < QUIRK_TYPE_COUNT) { diff --git a/sound/usb/usbaudio.h b/sound/usb/usbaudio.h index 2275295fe71f..0805b7f21272 100644 --- a/sound/usb/usbaudio.h +++ b/sound/usb/usbaudio.h @@ -102,6 +102,7 @@ enum quirk_type { QUIRK_AUDIO_ALIGN_TRANSFER, QUIRK_AUDIO_STANDARD_MIXER, QUIRK_SETUP_FMT_AFTER_RESUME, + QUIRK_SETUP_DISABLE_AUTOSUSPEND, QUIRK_TYPE_COUNT }; |