From: silicom <silicom@163.com>
To: linuxppc-embedded@ozlabs.org
Subject: Can anyone send me a copy of ac97 driver with interrupt function
Date: Sun, 1 Jul 2007 10:03:41 +0800 (CST) [thread overview]
Message-ID: <1719162188.1761901183255421508.JavaMail.coremail@bj163app130.163.com> (raw)
[-- 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 --]
reply other threads:[~2007-07-01 2:34 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1719162188.1761901183255421508.JavaMail.coremail@bj163app130.163.com \
--to=silicom@163.com \
--cc=linuxppc-embedded@ozlabs.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox