]> git.karo-electronics.de Git - karo-tx-linux.git/commit
ALSA: usb-audio: Fix autopm error during probing
authorTakashi Iwai <tiwai@suse.de>
Thu, 25 Apr 2013 05:38:15 +0000 (07:38 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 8 May 2013 03:33:10 +0000 (20:33 -0700)
commit62d585f3410da7aa83b5cefdebb9eab3e64d739c
tree1535c8a10b8b743267603ff693ac1283ac868e72
parent166662b8fa587de70518c780427198bedb78474a
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: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
sound/usb/card.c