LinuxPPC-Dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* Can anyone send me a copy of ac97 driver with interrupt function
@ 2007-07-01  2:03 silicom
  0 siblings, 0 replies; only message in thread
From: silicom @ 2007-07-01  2:03 UTC (permalink / raw)
  To: linuxppc-embedded

[-- Attachment #1: Type: text/plain, Size: 1017 bytes --]

 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

[-- Attachment #2: Type: text/html, Size: 2181 bytes --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2007-07-01  2:34 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-07-01  2:03 Can anyone send me a copy of ac97 driver with interrupt function silicom

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox