[alsa-devel] USB sound auto-suspend not working
Hi Oliver and Takashi,
I've noticed that in the last couple kernel releases or so, I can't get USB webcams to suspend. It turns out that the USB sound interface is keeping the device active, even when the device is not playing sound. This goes back as far as 3.10, but I haven't tried older kernels. This is testing on Ubuntu 13.10.
Commit 88a8516a2128a6d078a106ead48092240e8a138f "ALSA: usbaudio: implement USB autosuspend" went into kernel 2.6.39. The commit message says the device is prevented from suspending if the pcm or midi channel files are open.
I plugged in a USB speaker, and ran lsof to see which files were open (output is attached). AFAICT, only the USB sound device's control files are open, and I don't have any midi files.
Any ideas as to why USB sound auto-suspend isn't working?
Sarah Sharp
On Tue, Dec 17, 2013 at 02:55:48PM -0800, Sarah Sharp wrote:
I plugged in a USB speaker, and ran lsof to see which files were open (output is attached). AFAICT, only the USB sound device's control files are open, and I don't have any midi files.
The attachment seems to have gone AWOL (at least on the list)?
On Tue, Dec 17, 2013 at 11:07:00PM +0000, Mark Brown wrote:
On Tue, Dec 17, 2013 at 02:55:48PM -0800, Sarah Sharp wrote:
I plugged in a USB speaker, and ran lsof to see which files were open (output is attached). AFAICT, only the USB sound device's control files are open, and I don't have any midi files.
The attachment seems to have gone AWOL (at least on the list)?
I forgot to include it. Now attached.
Sarah Sharp
On Tue, 2013-12-17 at 14:55 -0800, Sarah Sharp wrote:
Hi Oliver and Takashi,
I've noticed that in the last couple kernel releases or so, I can't get USB webcams to suspend. It turns out that the USB sound interface is keeping the device active, even when the device is not playing sound. This goes back as far as 3.10, but I haven't tried older kernels. This is testing on Ubuntu 13.10.
Commit 88a8516a2128a6d078a106ead48092240e8a138f "ALSA: usbaudio: implement USB autosuspend" went into kernel 2.6.39. The commit message says the device is prevented from suspending if the pcm or midi channel files are open.
I plugged in a USB speaker, and ran lsof to see which files were open (output is attached). AFAICT, only the USB sound device's control files are open, and I don't have any midi files.
Is that sensible? In case of a webcam the problem is input, not output.
Regards Oliver
At Tue, 17 Dec 2013 14:55:48 -0800, Sarah Sharp wrote:
Hi Oliver and Takashi,
I've noticed that in the last couple kernel releases or so, I can't get USB webcams to suspend. It turns out that the USB sound interface is keeping the device active, even when the device is not playing sound. This goes back as far as 3.10, but I haven't tried older kernels. This is testing on Ubuntu 13.10.
Commit 88a8516a2128a6d078a106ead48092240e8a138f "ALSA: usbaudio: implement USB autosuspend" went into kernel 2.6.39. The commit message says the device is prevented from suspending if the pcm or midi channel files are open.
I plugged in a USB speaker, and ran lsof to see which files were open (output is attached). AFAICT, only the USB sound device's control files are open, and I don't have any midi files.
Any ideas as to why USB sound auto-suspend isn't working?
I don't know of any intentional changes regarding autosuspend in usb-audio since years. The central points are snd_usb_autosuspend() and snd_usb_autoresume() in sound/usb/card.c, so you can try to add some debug prints there for tracking more deeply what's going wrong.
Takashi
participants (4)
-
Mark Brown
-
Oliver Neukum
-
Sarah Sharp
-
Takashi Iwai