* problem with driver
@ 2004-09-06 12:26 Ash Willis
2004-09-06 15:28 ` James Courtier-Dutton
0 siblings, 1 reply; 2+ messages in thread
From: Ash Willis @ 2004-09-06 12:26 UTC (permalink / raw)
To: alsa-devel
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
--
___________________________________________________________
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_id\x10808&op=click
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: problem with driver
2004-09-06 12:26 problem with driver Ash Willis
@ 2004-09-06 15:28 ` James Courtier-Dutton
0 siblings, 0 replies; 2+ messages in thread
From: James Courtier-Dutton @ 2004-09-06 15:28 UTC (permalink / raw)
To: Ash Willis; +Cc: alsa-devel
Ash Willis wrote:
> 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
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2004-09-06 15:28 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-09-06 12:26 problem with driver Ash Willis
2004-09-06 15:28 ` James Courtier-Dutton
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.