Skip to contentSkip to conversation

Finding xruun sources in cs46xx

DISCUSSION Florian Schmidt 2 participants 5 messages Nov 8, 2004

lore
Share & tools
lore
#0 lore raw

Hi,

although i am using Ingo Molnar's VP/RP patches i still experience some xruns with my cs46xx card. The amount of xruns has, of course, been dramatically decreased by using the VP/RP patched kernels. But some few remain. They appear regardless of the period size i use [the amount is roughly the same afaik]. There's no kernel latencies reported by the latency timing utilities provided by the RP/VP kernels corresponding to these xruns. They seem to just come out of the blue [even in an idle jackd]. So i suspect either the hardware to be faulty [soundcard or the PIC] or the alsa driver for this card [as my sis onboard soundcard [snd-intel8x0] doesn't seem to have this problem].

I wonder: how can i approach finding the source of these xruns? Would the xrun debugging messages of ALSA provide a starting point?

And one more question: what happens to an IRQ raised by a pci device which get's ignored [either due to a cli or because it's masked by another IRQ with a higher prio]?

flo

-------------------------------------------------------
This SF.Net email is sponsored by:
Sybase ASE Linux Express Edition - download now for FREE LinuxWorld Reader's Choice Award Winner for best database on Linux.
http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click

#1 lore raw
Quoted 2 lines · Florian Schmidt

I wonder: how can i approach finding the source of these xruns? Would the xrun debugging messages of ALSA provide a starting point?

Yes, they show the point where the interrupt finally occurred which should be immediately after the code that blocked interrupt for too long.

Quoted 3 lines

And one more question: what happens to an IRQ raised by a pci device which get's ignored [either due to a cli or because it's masked by another IRQ with a higher prio]?

PCI uses level-triggered interrupts, i.e., the interrupt line stays in raised state until the driver tells the device that the interrupt has been handled.

HTH
Clemens

-------------------------------------------------------
This SF.Net email is sponsored by:
Sybase ASE Linux Express Edition - download now for FREE LinuxWorld Reader's Choice Award Winner for best database on Linux.
http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click

#2 lore raw
Quoted 8 lines · On Mon, 8 Nov 2004 18:39:21 +0100 (MET) Clemens Ladisch <[email protected]>…
Quoted 2 lines · Florian Schmidt

I wonder: how can i approach finding the source of these xruns? Would the xrun debugging messages of ALSA provide a starting point?

Yes, they show the point where the interrupt finally occurred which should be immediately after the code that blocked interrupt for too long.

Ok, now when you want them to happen, they don't show up :)

Ah, ok, here we go. I sometimes see these:

Nov  8 18:27:29 mango kernel: Unexpected hw_pointer value [1] (stream = 0, delta: -48, max jitter = 64): wrong interrupt acknowledge?
Nov  8 18:27:29 mango kernel:  [<f088ea51>] snd_pcm_period_elapsed+0x1b1/0x3a0 [snd_pcm] (8)
Nov  8 18:27:29 mango kernel:  [<c0105d0a>] common_interrupt+0x1a/0x20 (4)
Nov  8 18:27:29 mango kernel:  [<f08cc831>] snd_cs46xx_interrupt+0x1d1/0x210 [snd_cs46xx] (48)
Nov  8 18:27:29 mango kernel:  [<c0132358>] handle_IRQ_event+0x38/0x80 (32)
Nov  8 18:27:29 mango kernel:  [<c0132a69>] do_hardirq+0x69/0x110 (36)
Nov  8 18:27:29 mango kernel:  [<c0132b10>] do_irqd+0x0/0xc0 (20)
Nov  8 18:27:29 mango kernel:  [<c0132ba7>] do_irqd+0x97/0xc0 (4)
Nov  8 18:27:29 mango kernel:  [<c012a053>] kthread+0xa3/0xb0 (20)
Nov  8 18:27:29 mango kernel:  [<c0129fb0>] kthread+0x0/0xb0 (20)
Nov  8 18:27:29 mango kernel: Unexpected hw_pointer value [1] (stream = 1, delta: -32, max jitter = 64): wrong interrupt acknowledge?
Nov  8 18:27:29 mango kernel:  [<f088ea51>] snd_pcm_period_elapsed+0x1b1/0x3a0 [snd_pcm] (8)
Nov  8 18:27:29 mango kernel:  [<c0105d0a>] common_interrupt+0x1a/0x20 (4)
Nov  8 18:27:29 mango kernel:  [<f08cc831>] snd_cs46xx_interrupt+0x1d1/0x210 [snd_cs46xx] (48)
Nov  8 18:27:29 mango kernel:  [<c0132358>] handle_IRQ_event+0x38/0x80 (32)
Nov  8 18:27:29 mango kernel:  [<c0132a69>] do_hardirq+0x69/0x110 (36)
Nov  8 18:27:29 mango kernel:  [<c0132b10>] do_irqd+0x0/0xc0 (20)
Nov  8 18:27:29 mango kernel:  [<c0132ba7>] do_irqd+0x97/0xc0 (4)
Nov  8 18:27:29 mango kernel:  [<c012a053>] kthread+0xa3/0xb0 (20)
Nov  8 18:27:29 mango kernel:  [<c0129fb0>] kthread+0x0/0xb0 (20)
Nov  8 18:27:29 mango kernel:  [<c0103e75>] kernel_thread_helper+0x5/0x10 (16)

This is a different kind:

Nov  8 18:42:10 mango kernel: XRUN: pcmC0D0p
Nov  8 18:42:10 mango kernel:  [<f088eb05>] snd_pcm_period_elapsed+0x265/0x3a0 [snd_pcm] (8)
Nov  8 18:42:10 mango kernel:  [<f08cc831>] snd_cs46xx_interrupt+0x1d1/0x210 [snd_cs46xx] (56)
Nov  8 18:42:10 mango kernel:  [<c0132358>] handle_IRQ_event+0x38/0x80 (32)
Nov  8 18:42:10 mango kernel:  [<c0132a69>] do_hardirq+0x69/0x110 (36)
Nov  8 18:42:10 mango kernel:  [<c0132b10>] do_irqd+0x0/0xc0 (20)
Nov  8 18:42:10 mango kernel:  [<c0132ba7>] do_irqd+0x97/0xc0 (4)
Nov  8 18:42:10 mango kernel:  [<c012a053>] kthread+0xa3/0xb0 (20)
Nov  8 18:42:10 mango kernel:  [<c0129fb0>] kthread+0x0/0xb0 (20)
Nov  8 18:42:10 mango kernel:  [<c0103e75>] kernel_thread_helper+0x5/0x10 (16)
Nov  8 18:42:10 mango kernel: XRUN: pcmC0D0p
Nov  8 18:42:10 mango kernel:  [<f088eb05>] snd_pcm_period_elapsed+0x265/0x3a0 [snd_pcm] (8)
Nov  8 18:42:10 mango kernel:  [<f08cc831>] snd_cs46xx_interrupt+0x1d1/0x210 [snd_cs46xx] (56)
Nov  8 18:42:10 mango kernel:  [<c0132358>] handle_IRQ_event+0x38/0x80 (32)
Nov  8 18:42:10 mango kernel:  [<c0132a69>] do_hardirq+0x69/0x110 (36)
Nov  8 18:42:10 mango kernel:  [<c0132b10>] do_irqd+0x0/0xc0 (20)
Nov  8 18:42:10 mango kernel:  [<c0132ba7>] do_irqd+0x97/0xc0 (4)
Nov  8 18:42:10 mango kernel:  [<c012a053>] kthread+0xa3/0xb0 (20)
Nov  8 18:42:10 mango kernel:  [<c0129fb0>] kthread+0x0/0xb0 (20)
Nov  8 18:42:10 mango kernel:  [<c0103e75>] kernel_thread_helper+0x5/0x10 (16)

Do these show anything helpful?

Quoted 7 lines
Quoted 3 lines

And one more question: what happens to an IRQ raised by a pci device which get's ignored [either due to a cli or because it's masked by another IRQ with a higher prio]?

PCI uses level-triggered interrupts, i.e., the interrupt line stays in raised state until the driver tells the device that the interrupt has been handled.

Ahhh, ok. Thanks!

flo

-------------------------------------------------------
This SF.Net email is sponsored by:
Sybase ASE Linux Express Edition - download now for FREE LinuxWorld Reader's Choice Award Winner for best database on Linux.
http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click

#3 lore raw
Quoted 11 lines · Florian Schmidt
Nov  8 18:42:10 mango kernel: XRUN: pcmC0D0p
Nov  8 18:42:10 mango kernel:  [<f088eb05>] snd_pcm_period_elapsed+0x265/0x3a0 [snd_pcm] (8)
Nov  8 18:42:10 mango kernel:  [<f08cc831>] snd_cs46xx_interrupt+0x1d1/0x210 [snd_cs46xx] (56)
Nov  8 18:42:10 mango kernel:  [<c0132358>] handle_IRQ_event+0x38/0x80 (32)
Nov  8 18:42:10 mango kernel:  [<c0132a69>] do_hardirq+0x69/0x110 (36)
Nov  8 18:42:10 mango kernel:  [<c0132b10>] do_irqd+0x0/0xc0 (20)
Nov  8 18:42:10 mango kernel:  [<c0132ba7>] do_irqd+0x97/0xc0 (4)
Nov  8 18:42:10 mango kernel:  [<c012a053>] kthread+0xa3/0xb0 (20)
Nov  8 18:42:10 mango kernel:  [<c0129fb0>] kthread+0x0/0xb0 (20)
Nov  8 18:42:10 mango kernel:  [<c0103e75>] kernel_thread_helper+0x5/0x10 (16)
Quoted 1 line

Do these show anything helpful?

Not for me. Are you using a threaded interrupts?

Try asking on LKML.

Clemens

-------------------------------------------------------
This SF.Net email is sponsored by:
Sybase ASE Linux Express Edition - download now for FREE LinuxWorld Reader's Choice Award Winner for best database on Linux.
http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click

#4 lore raw
Quoted 3 lines · On Mon, 8 Nov 2004 18:52:36 +0100 (MET) Clemens Ladisch <[email protected]>…

Not for me. Are you using a threaded interrupts?

Try asking on LKML.

Oh well, actually it does make no difference wrt the # of xruns whether i use threaded irq handlers or not [but seemingly to the debug output :)]. I will build a normal VP kernel tomorrow where i can unthread the cs46xx irq

flo

-------------------------------------------------------
This SF.Net email is sponsored by:
Sybase ASE Linux Express Edition - download now for FREE LinuxWorld Reader's Choice Award Winner for best database on Linux.
http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click