]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blob - releases/3.7.4/alsa-usb-fix-race-in-creation-of-m-audio-fast-track-pro-driver.patch
4.9-stable patches
[thirdparty/kernel/stable-queue.git] / releases / 3.7.4 / alsa-usb-fix-race-in-creation-of-m-audio-fast-track-pro-driver.patch
1 From b98ae2729dea161edc96c9d177459b6c28bcbba5 Mon Sep 17 00:00:00 2001
2 From: David Henningsson <david.henningsson@canonical.com>
3 Date: Fri, 4 Jan 2013 17:02:18 +0100
4 Subject: ALSA: usb - fix race in creation of M-Audio Fast track pro driver
5
6 From: David Henningsson <david.henningsson@canonical.com>
7
8 commit b98ae2729dea161edc96c9d177459b6c28bcbba5 upstream.
9
10 A patch in the 3.2 kernel caused regression with hotplugging the
11 M-Audio Fast track pro, or sound after suspend. I don't have the
12 device so I haven't done a full analysis, but it seems userspace
13 (both udev and pulseaudio) got confused when a card was created,
14 immediately destroyed, and then created again.
15
16 However, at least one person in the bug report (martin djfun)
17 reports that this patch resolves the issue for him. It also leaves
18 a message in the log:
19 "snd-usb-audio: probe of 1-1.1:1.1 failed with error -5" which is
20 a bit misleading. It is better than non-working audio, but maybe
21 there's a more elegant solution?
22
23 BugLink: https://bugs.launchpad.net/bugs/1095315
24 Signed-off-by: David Henningsson <david.henningsson@canonical.com>
25 Signed-off-by: Takashi Iwai <tiwai@suse.de>
26 Cc: CAI Qian <caiqian@redhat.com>
27 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
28
29 ---
30 sound/usb/quirks.c | 8 +++++---
31 1 file changed, 5 insertions(+), 3 deletions(-)
32
33 --- a/sound/usb/quirks.c
34 +++ b/sound/usb/quirks.c
35 @@ -387,11 +387,13 @@ static int snd_usb_fasttrackpro_boot_qui
36 * rules
37 */
38 err = usb_driver_set_configuration(dev, 2);
39 - if (err < 0) {
40 + if (err < 0)
41 snd_printdd("error usb_driver_set_configuration: %d\n",
42 err);
43 - return -ENODEV;
44 - }
45 + /* Always return an error, so that we stop creating a device
46 + that will just be destroyed and recreated with a new
47 + configuration */
48 + return -ENODEV;
49 } else
50 snd_printk(KERN_INFO "usb-audio: Fast Track Pro config OK\n");
51