Skip to contentSkip to conversation

problem with driver

DISCUSSION Ash Willis 2 participants 2 messages Sep 6, 2004

lore
Share & tools
lore

Ash Willis

author
#0 lore raw

Hi guys, i'm in need of a tiny bit of help...

I've been working on a driver. When playing sound, there are gaps and aplay complains of underuns.
There is a problem that i need to correct, regarding calculating the correct dma position.
This isn't the problem for me BUT when playing back the driver calls pcm_trigger (start) and pcm_trigger(stop) throughout the playback process...
So when it triggers pcm start, the card resets it's counter and any query to the corresponding register is then deemed pointless because it will always return 0 (every time the interrupt routine is called, pcm_trigger (start) has just been called).

Any help?

Thanks a lot for you time and i hope i've been clear enough :s

Ash

Signature · 11 lines
___________________________________________________________
Sign-up for Ads Free at Mail.com
http://promo.mail.com/adsfreejump.htm



-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_idP47&alloc_id808&op=click
#1 lore raw
Quoted 7 lines · Ash Willis

Hi guys, i'm in need of a tiny bit of help...

I've been working on a driver. When playing sound, there are gaps and aplay complains of underuns.
There is a problem that i need to correct, regarding calculating the correct dma position.
This isn't the problem for me BUT when playing back the driver calls pcm_trigger (start) and pcm_trigger(stop) throughout the playback process...
So when it triggers pcm start, the card resets it's counter and any query to the corresponding register is then deemed pointless because it will always return 0 (every time the interrupt routine is called, pcm_trigger (start) has just been called).

Quoted 5 lines

Any help?

Thanks a lot for you time and i hope i've been clear enough :s

Ash

Most sound cards have 2 registers that control DMA.
1) shows the hw_pointer
2) starts and stops the DMA actually happening.

snd_pcm_prepare() should set the hw_pointers to zero and and initialise any DMA registers. snd_pcm_trigger() should just start/stop the DMA running.

It sounds like you are leaving the DMA running, and just setting the pointers to zero.

Another problem is that some sound cards call the interrupt routine immediately, and this first time call, when the pointer is at zero, should be acknowledged, but no snd_periods_elapsed() called.

Cheers
James

-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click