Commit 60af3d03 authored by Takashi Iwai's avatar Takashi Iwai

ALSA: usb-audio: Fix autopm error during probing

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: default avatarDaniel Schürmann <>
Cc: <>
Signed-off-by: default avatarTakashi Iwai <>
parent ebfc594c
......@@ -631,7 +631,9 @@ int snd_usb_autoresume(struct snd_usb_audio *chip)
int err = -ENODEV;
if (!chip->shutdown && !chip->probing)
if (chip->probing)
err = 0;
else if (!chip->shutdown)
err = usb_autopm_get_interface(chip->pm_intf);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment