Re: was: Re: A reliable kernel panic (3.6.2) and system crash whenvisiting a particular website

From: Daniel Mack
Date: Sun Oct 21 2012 - 10:21:46 EST

[Cc: alsa-devel]

On 21.10.2012 14:30, Artem S. Tashkinov wrote:
> On Oct 21, 2012, Daniel Mack wrote:
>> A hint at least. How did you enable the audio record exactly? Can you
>> reproduce this with arecord?
>> What chipset are you on? Please provide both "lspci -v" and "lsusb -v"
>> dumps. As I said, I fail to reproduce that issue on any of my machines.
> All other applications can read from the USB audio without problems, it's
> just something in the way Adobe Flash polls my audio input which causes
> a crash.
> Just video capture (without audio) works just fine in Adobe Flash.

Ok, so that pretty much rules out the host controller. I just wonder why
I still don't see it here, and I haven't heard of any such problem from
anyone else.

Some more questions:

- Which version of Flash are you running?
- Does this also happen with Firefox?
- Does flash access the device directly or via PulseAudio?
- Could you please apply the attached patch and see what it spits out to
dmesg once Flash opens the device? It returns -EINVAL in the hw_params
callback to prevent the actual streaming. On my machine with Flash, I get values of 2/44800/1/32768/2048/0, which seems sane.
Or does your machine still crash before anything is written to the logs?

> Only and only when I choose to use
> USB Device 0x46d:0x81d my system crashes in Adobe Flash.
> See the screenshot:

When exactly does the crash happen? Right after you selected that entry
from the list? There's a little recording level meter in that dialog.
Does that show any input from the microphone?

> My hardware information can be fetched from here:
> On a second thought that can be even an ALSA crash or pretty much
> anything else.

We'll see. Thanks for your help to sort this out!


diff --git a/sound/usb/pcm.c b/sound/usb/pcm.c
index f782ce1..5664b45 100644
--- a/sound/usb/pcm.c
+++ b/sound/usb/pcm.c
@@ -453,6 +453,18 @@ static int snd_usb_hw_params(struct snd_pcm_substream *substream,
unsigned int channels, rate, format;
int ret, changed;

+ printk(">>> %s()\n", __func__);
+ printk("format: %d\n", params_format(hw_params));
+ printk("rate: %d\n", params_rate(hw_params));
+ printk("channels: %d\n", params_channels(hw_params));
+ printk("buffer bytes: %d\n", params_buffer_bytes(hw_params));
+ printk("period bytes: %d\n", params_period_bytes(hw_params));
+ printk("access: %d\n", params_access(hw_params));
+ return -EINVAL;
ret = snd_pcm_lib_alloc_vmalloc_buffer(substream,
if (ret < 0)