diff options
author | Takashi Iwai <tiwai@suse.de> | 2013-04-25 07:38:15 +0200 |
---|---|---|
committer | Ben Hutchings <ben@decadent.org.uk> | 2013-05-13 15:02:26 +0100 |
commit | 42c72c8c4efa25812f711c96b0f04f7a1091a2b9 (patch) | |
tree | a3459d3e3c159c5a05cad931cbcdc4441fccae70 /sound/usb | |
parent | 25fd4d9121db99556a8c2bb0ba9ae93ac54c3a61 (diff) | |
download | lwn-42c72c8c4efa25812f711c96b0f04f7a1091a2b9.tar.gz lwn-42c72c8c4efa25812f711c96b0f04f7a1091a2b9.zip |
ALSA: usb-audio: Fix autopm error during probing
commit 60af3d037eb8c670dcce31401501d1271e7c5d95 upstream.
We've got strange errors in get_ctl_value() in mixer.c during
probing, e.g. on Hercules RMX2 DJ Controller:
ALSA mixer.c:352 cannot get ctl value: req = 0x83, wValue = 0x201, wIndex = 0xa00, type = 4
ALSA mixer.c:352 cannot get ctl value: req = 0x83, wValue = 0x200, wIndex = 0xa00, type = 4
....
It turned out that the culprit is autopm: snd_usb_autoresume() returns
-ENODEV when called during card->probing = 1.
Since the call itself during card->probing = 1 is valid, let's fix the
return value of snd_usb_autoresume() as success.
Reported-and-tested-by: Daniel Schürmann <daschuer@mixxx.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Diffstat (limited to 'sound/usb')
-rw-r--r-- | sound/usb/card.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sound/usb/card.c b/sound/usb/card.c index 566acb319581..acb7faceafa6 100644 --- a/sound/usb/card.c +++ b/sound/usb/card.c @@ -611,7 +611,9 @@ int snd_usb_autoresume(struct snd_usb_audio *chip) int err = -ENODEV; down_read(&chip->shutdown_rwsem); - if (!chip->shutdown && !chip->probing) + if (chip->probing) + err = 0; + else if (!chip->shutdown) err = usb_autopm_get_interface(chip->pm_intf); up_read(&chip->shutdown_rwsem); |