mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: Bryan Quigley <gquigs@gmail.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: PROBLEM: Pulseaudio hung at schedule in 3.15-rc1
Date: Wed, 30 Apr 2014 18:36:12 +0200	[thread overview]
Message-ID: <s5h8uqmixkz.wl%tiwai@suse.de> (raw)
In-Reply-To: <CAAWf5=tzBW5pBNBnO1URoo1Z1O-rTnVOpeAyMs73tqYNyjF-_Q@mail.gmail.com>

At Wed, 30 Apr 2014 12:10:48 -0400,
Bryan Quigley wrote:
> 
> Still issues, on plugging it in after boot and running sudo lsusb -v
> Apr 30 11:53:30 dell-laptop kernel: [   54.320063] usb 6-2: new
> full-speed USB device number 2 using uhci_hcd
> Apr 30 11:53:30 dell-laptop kernel: [   54.680097] usb 6-2: not
> running at top speed; connect to a high speed hub
> Apr 30 11:53:30 dell-laptop kernel: [   54.822100] usb 6-2: New USB
> device found, idVendor=046d, idProduct=0825
> Apr 30 11:53:30 dell-laptop kernel: [   54.822106] usb 6-2: New USB
> device strings: Mfr=0, Product=0, SerialNumber=2
> Apr 30 11:53:30 dell-laptop kernel: [   54.822109] usb 6-2:
> SerialNumber: 0911F220
> Apr 30 11:53:30 dell-laptop kernel: [   54.825210] uvcvideo: Found UVC
> 1.00 device <unnamed> (046d:0825)
> Apr 30 11:53:30 dell-laptop kernel: [   54.925311] input: UVC Camera
> (046d:0825) as /devices/pci0000:00/0000:00:1d.0/usb6/6-2/6-2:1.0/input/input18
> Apr 30 11:53:31 dell-laptop kernel: [   56.107099] usb 6-2: set
> resolution quirk: cval->res = 384
> Apr 30 11:53:31 dell-laptop kernel: [   56.107353] usbcore: registered
> new interface driver snd-usb-audio
> Apr 30 11:53:36 dell-laptop kernel: [   60.869958] usb 6-2: 3:1:
> usb_set_interface failed (-113)
> Apr 30 11:53:36 dell-laptop kernel: [   60.869991] usb 6-2: 3:1:
> usb_set_interface failed (-113)
> (Repeats until device is reset)
> 
> The above also happens on bootup.  (No longer hangs pulseaudio because
> the device seems to fail..).

Hm, what about the one below instead?


Takashi

---
diff --git a/sound/usb/card.c b/sound/usb/card.c
index 893d5a1afc3c..2d49a7eeb7c7 100644
--- a/sound/usb/card.c
+++ b/sound/usb/card.c
@@ -653,7 +653,7 @@ int snd_usb_autoresume(struct snd_usb_audio *chip)
 	down_read(&chip->shutdown_rwsem);
 	if (chip->probing)
 		err = 0;
-	else if (!chip->shutdown)
+	else if (!chip->shutdown && !chip->in_pm)
 		err = usb_autopm_get_interface(chip->pm_intf);
 	up_read(&chip->shutdown_rwsem);
 
@@ -663,7 +663,7 @@ int snd_usb_autoresume(struct snd_usb_audio *chip)
 void snd_usb_autosuspend(struct snd_usb_audio *chip)
 {
 	down_read(&chip->shutdown_rwsem);
-	if (!chip->shutdown && !chip->probing)
+	if (!chip->shutdown && !chip->probing && !chip->in_pm)
 		usb_autopm_put_interface(chip->pm_intf);
 	up_read(&chip->shutdown_rwsem);
 }
@@ -695,8 +695,9 @@ static int usb_audio_suspend(struct usb_interface *intf, pm_message_t message)
 			chip->autosuspended = 1;
 	}
 
-	list_for_each_entry(mixer, &chip->mixer_list, list)
-		snd_usb_mixer_suspend(mixer);
+	if (chip->num_suspended_intf == 1)
+		list_for_each_entry(mixer, &chip->mixer_list, list)
+			snd_usb_mixer_suspend(mixer);
 
 	return 0;
 }
@@ -711,6 +712,8 @@ static int __usb_audio_resume(struct usb_interface *intf, bool reset_resume)
 		return 0;
 	if (--chip->num_suspended_intf)
 		return 0;
+
+	chip->in_pm = 1;
 	/*
 	 * ALSA leaves material resumption to user space
 	 * we just notify and restart the mixers
@@ -726,6 +729,7 @@ static int __usb_audio_resume(struct usb_interface *intf, bool reset_resume)
 	chip->autosuspended = 0;
 
 err_out:
+	chip->in_pm = 0;
 	return err;
 }
 
diff --git a/sound/usb/usbaudio.h b/sound/usb/usbaudio.h
index 25c4c7e217de..91d0380431b4 100644
--- a/sound/usb/usbaudio.h
+++ b/sound/usb/usbaudio.h
@@ -40,6 +40,7 @@ struct snd_usb_audio {
 	struct rw_semaphore shutdown_rwsem;
 	unsigned int shutdown:1;
 	unsigned int probing:1;
+	unsigned int in_pm:1;
 	unsigned int autosuspended:1;	
 	unsigned int txfr_quirk:1; /* Subframe boundaries on transfers */
 	

  reply	other threads:[~2014-04-30 16:36 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-19 17:20 Bryan Quigley
2014-04-20  6:08 ` Takashi Iwai
2014-04-20 18:50   ` Bryan Quigley
2014-04-29 14:21     ` Takashi Iwai
2014-04-29 18:04       ` Bryan Quigley
2014-04-30  6:42         ` Takashi Iwai
2014-04-30 16:10           ` Bryan Quigley
2014-04-30 16:36             ` Takashi Iwai [this message]
2014-04-30 17:40               ` Bryan Quigley
2014-05-02  7:36                 ` Takashi Iwai
2014-05-02 14:33                   ` Bryan Quigley
2014-05-07 21:15                   ` Ed Tomlinson
  -- strict thread matches above, loose matches on Subject: below --
2014-04-19  5:08 Bryan Quigley
2014-04-19  6:04 ` Bryan Quigley

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=s5h8uqmixkz.wl%tiwai@suse.de \
    --to=tiwai@suse.de \
    --cc=gquigs@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®