Can anyone send me a copy of ac97 driver with interrupt function
silicom
silicom at 163.com
Sun Jul 1 12:03:41 EST 2007
Hi I'm writing an ac97 driver with interrupt mode,below is my code:staticirqreturn_t ac97_interrupt_handler(int irq,void *dev_id,struct pt_regs *regs){ disable_irq(7); wake_up_interruptible(ac97_queue); return IRQ_HANDLED;} static int xilinx_ac97_write(struct file *filp,char *buffer,size_t count,loff_t *ppos){ ...... if(XAC97_isInFIFOFull(baseAddress)) wait_event_interruptible(ac97_queue,...); else XAC97_mSetInFifoData(baseAddress,...); ......} Int the write function,when the play back fifo is not full,I send the PCM code to the fifo,else I make the write process sleep,and in the interrupt handler(when the fifo half empty,an interrupt occure),I wake up the write process,and go on write PCM code to the fifo. But I find the play speed is rather faster than regular and can't hear the voice(I have set the pcm rate correctly),I don't know why,can anyone give some advice on writing interupt handler or send me a copy of ac97 driver with interrupt mode? thanks a lot
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://ozlabs.org/pipermail/linuxppc-embedded/attachments/20070701/6e2e48ef/attachment.htm
More information about the Linuxppc-embedded
mailing list