[prev in list] [next in list] [prev in thread] [next in thread]
List: netbsd-tech-kern
Subject: RE: Audio file in /dev
From: "Mahadeva Swamy T L" <Swamy () soc-soft ! com>
Date: 2004-02-27 15:35:17
Message-ID: E519BE9E8DAC6A4B89DA4AD1D2A155B7789CA7 () soc-mail ! soc-soft ! com
[Download RAW message or body]
Thank You for replying.
I am working on a Audio Driver with DMA enabled. Presently I am able to
hear some junk data when I say,
"audioplay file_name.wav" from the application layer.
I feel I have some problem in the Interrupt Routine:
This is my Interrupt Routine, Please verify:
txdma_intr(void *arg)
{
struct txaudio_softc *sc = arg;
int s;
int count = sc->sc_pages; /* no. of pages (16 * 4026 =
65536->Ring Buffer) */
s = splnet();
count --;
if(count == 0)
{
REGVAL64(DMA_ADDR + DMCSR) |= (1ULL << 5); /* Update Control
Reg once the DMA Transfer is Complete */
REGVAL64(DMA_ADDR + DMCCR) &= (1ULL << 10);/* DMA Interrupt
Disable */
REGVAL64(DMA_ADDR + DMCHAR) = 0; /* stop DMA */
if(sc->sc_pintr) /* Update the argument(/dev/audio.c) */
(*sc->sc_pintr)(sc->sc_parg);
}
else
{
if(sc->sc_pintr)
(*sc->sc_pintr)(sc->sc_parg);
REGVAL64(DMA_ADDR + DMCSR) |= (1ULL << 5); /* Update Control Reg
once the DMA Transfer is Complete */
}
splx(s);
return (1);
I am using mapped and cacheable region.
Please give some inputs.
Regards
Swamy
-----Original Message-----
From: Jared D. McNeill [mailto:jmcneill@invisible.ca]
Sent: Friday, February 27, 2004 8:29 PM
To: Mahadeva Swamy T L
Cc: tech-kern@netbsd.org
Subject: Re: Audio file in /dev
On 27-Feb-04, at 2:27 AM, Mahadeva Swamy T L wrote:
> I need to support the Audio Driver. I wanted to know whether the
> audio.c
> present in /sys/dev/ directory can be used to communicate between the
> application and the lower level driver, can I rely upon that? Will it
> hook-up to the Lower Level driver.
Yep! The audio(9) man page explains the API that the low-level HW
driver uses to interface with the audio subsystem. You also might want
to have a look at some of the existing drivers to see how they
interface with it.
Cheers,
Jared
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic