From: James Courtier-Dutton <James@superbug.demon.co.uk>
To: Ash Willis <ashwillis@programmer.net>
Cc: alsa-devel@lists.sourceforge.net
Subject: Re: problem with driver
Date: Mon, 06 Sep 2004 16:28:44 +0100 [thread overview]
Message-ID: <413C822C.2090908@superbug.demon.co.uk> (raw)
In-Reply-To: <20040906122604.EAC9E4BDA8@ws1-1.us4.outblaze.com>
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
prev parent reply other threads:[~2004-09-06 15:28 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-09-06 12:26 problem with driver Ash Willis
2004-09-06 15:28 ` James Courtier-Dutton [this message]
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=413C822C.2090908@superbug.demon.co.uk \
--to=james@superbug.demon.co.uk \
--cc=alsa-devel@lists.sourceforge.net \
--cc=ashwillis@programmer.net \
/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 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.