2004-09-26 12:08:58

by Gundolf Kiefer

[permalink] [raw]
Subject: IRQ blocking when reading audio CDs

Dear Jens (& Christoph),

on my media PC (a Pentium II 350 MHz running Debian Woody with Kernel
2.4.25), I have problems using LIRC 0.6.6 with a serial IR reveiver when at
the same time some application (cdparanoia, xmms/Audio CD reader) is reading
audio data from a CD.

After some testing and exploration of the LIRC source code, I figured out
that during audio CD reading interrupts seem to be blocked for a longer time
(in the order of milliseconds), while lirc_serial measures the exact time
between two serial interrupts and thus relies on an accurate timing. In
consequence, LIRC does not recognize the IR sequences, there are no errors
reported. Assigning a high priority to the serial interrupt using "irq_tune"
did not help.

Is there a way to make the audio CD read operations less blocking? Or does
any of you know a different source of the problem I observed?

Thank you very much,

Gundolf



2004-09-27 05:55:05

by Jens Axboe

[permalink] [raw]
Subject: Re: IRQ blocking when reading audio CDs

On Sun, Sep 26 2004, Gundolf Kiefer wrote:
> Dear Jens (& Christoph),
>
> on my media PC (a Pentium II 350 MHz running Debian Woody with Kernel
> 2.4.25), I have problems using LIRC 0.6.6 with a serial IR reveiver when at
> the same time some application (cdparanoia, xmms/Audio CD reader) is
> reading audio data from a CD.
>
> After some testing and exploration of the LIRC source code, I figured out
> that during audio CD reading interrupts seem to be blocked for a longer
> time (in the order of milliseconds), while lirc_serial measures the exact
> time between two serial interrupts and thus relies on an accurate timing.
> In consequence, LIRC does not recognize the IR sequences, there are no
> errors reported. Assigning a high priority to the serial interrupt using
> "irq_tune" did not help.
>
> Is there a way to make the audio CD read operations less blocking? Or does
> any of you know a different source of the problem I observed?

Upgrade to 2.6, it can use DMA for cdda extraction. If you cannot for
some reason, Andrew had an ide-cd hack to enable dma in 2.4 for this.

--
Jens Axboe

2004-09-28 19:21:26

by Lee Revell

[permalink] [raw]
Subject: Re: IRQ blocking when reading audio CDs

On Mon, 2004-09-27 at 01:52, Jens Axboe wrote:
> On Sun, Sep 26 2004, Gundolf Kiefer wrote:
> > Dear Jens (& Christoph),
> >
> > on my media PC (a Pentium II 350 MHz running Debian Woody with Kernel
> > 2.4.25), I have problems using LIRC 0.6.6 with a serial IR reveiver when at
> > the same time some application (cdparanoia, xmms/Audio CD reader) is
> > reading audio data from a CD.
>
> Upgrade to 2.6, it can use DMA for cdda extraction. If you cannot for
> some reason, Andrew had an ide-cd hack to enable dma in 2.4 for this.

Seems like it should also work in PIO mode as long as unmask_irq is set.

Lee

2004-09-29 18:49:40

by Gundolf Kiefer

[permalink] [raw]
Subject: Re: IRQ blocking when reading audio CDs

Ok, I applied Andrew Morton's updated CDROMREADAUDIO DMA patch from Jan 2003
(http://lwn.net/Articles/19386/) to kernel 2.4.25, and everything seems to
work fine now.

Thanks, Jens & Lee!


On 2004.09.28 21:21 Lee Revell wrote:
> On Mon, 2004-09-27 at 01:52, Jens Axboe wrote:
>> On Sun, Sep 26 2004, Gundolf Kiefer wrote:
>> > Dear Jens (& Christoph),
>> >
>> > on my media PC (a Pentium II 350 MHz running Debian Woody with Kernel
>> > 2.4.25), I have problems using LIRC 0.6.6 with a serial IR reveiver when
> at
>> > the same time some application (cdparanoia, xmms/Audio CD reader) is
>> > reading audio data from a CD.
>>
>> Upgrade to 2.6, it can use DMA for cdda extraction. If you cannot for
>> some reason, Andrew had an ide-cd hack to enable dma in 2.4 for this.
>
> Seems like it should also work in PIO mode as long as unmask_irq is set.
>
> Lee
>