Subject: Audio not working
To: None <tech-kern@netbsd.org>
From: Mahadeva Swamy T L <Swamy@soc-soft.com>
List: tech-kern
Date: 02/27/2004 20:45:02
Hi,
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.
This is my Interrupt Routine, Please verify:
txdma_intr(void *arg)
{
struct txaudio_softc *sc =3D arg;
int s;
int count =3D sc->sc_pages; /* no. of pages (16 *
4026 =3D 65536->Ring Buffer) */
=09
s =3D splnet();
count --;
if(count =3D=3D 0)
{
REGVAL64(DMA_ADDR + DMCSR) |=3D (1ULL << 5); /* Update
Control Reg once the DMA Transfer is Complete */
REGVAL64(DMA_ADDR + DMCCR) &=3D (1ULL << 10); /* DMA Interrupt
Disable */
REGVAL64(DMA_ADDR + DMCHAR) =3D 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) |=3D (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