Hello World,
I posted some question regarding the ARM7500FE audio driver
a month ago. I have painfully got it running finally. Now I met
another problem....
I recorded some raw sound file (PCM) in a PC. I transferred
the PCM to my Linux system (ARM7500FE) and play it back by copying
the PCM file to my driver (a character device). The sound I heard
is ok and there is no "clicks". This proves that my driver is
implemented correctly somehow....
Then I tried the driver with a MP3 decoder. I transferred
a mp3 song from my PC to the Linux system, and while decoding it,
I transfer the decoded data to the driver (i.e I am trying real
time decoding). It turns out that the ARM7500FE is fast enough
to handle the MP3 quality I needed. I can tell this because the
buffer in the driver is almost always fully occupied with the
decoded data. However, I can always hear some annoying "click".
The "click" is actually a reptition of the sound of small time
period before the moment of click.
It seems to me that it is due latency in the irq. In the
ISR routine, I need to update the pointer of the buffer so that
the hardware can play the buffer I need. However, if the hardware
signals an IRQ and I do not handle it sooner than a certain time,
then I cannot update the pointer and the hardware plays the previous
buffer again. Hence a "click" result. This is especially true
if the CPU is busy doing something...
Now My questions are:
1) Am I right? How does Linux handle interrupt? Does Linux
handle interrupt immediately after it occurs?
2) Is the "click" really due to irq latency? or I guess it wrong?
3) Has anyone met similar problem before? How did you solve
it? It is a real pain to me!!!!
Yick
Hong Kong, China
_______________________________________________
http://lists.arm.linux.org.uk/mailman/listinfo/linux-arm
Please visit the above address for information on this list.