From: Julien Bramary <julien.bramary@blueyonder.co.uk>
To: Julien Bramary <julien.bramary@blueyonder.co.uk>
Cc: alsa-devel@lists.sourceforge.net
Subject: Re: aplay skipping first periods
Date: Sat, 12 Aug 2006 04:44:18 +0100 [thread overview]
Message-ID: <44DD4E92.3060202@blueyonder.co.uk> (raw)
In-Reply-To: <44DD4583.2020409@blueyonder.co.uk>
Julien Bramary wrote:
> When testing my driver at low sampling rates like 8k,
> I noticed that aplay was skipping the very first samples.
>
> This skipping process might also happen at 44.1k but is then too short
> to be noticeable.
>
> Is this a know issue with aplay or a bug with my driver?
> I really don't see how my code could be causing this.
>
No it was my code breaking the stuff.
Some obscure transfer request that I was enabling too soon.
I needed to add that in the trigger callback instead of the open callback.
Here is my new trigger, do you think it is short enough? (atomicity in
mind):
static int snd_card_mdac3560c_pcm_trigger(struct snd_pcm_substream
*substream, int cmd)
{
struct snd_pcm_runtime *runtime = substream->runtime;
struct snd_mdac3560c_pcm *dpcm = runtime->private_data;
int err = 0;
spin_lock(&dpcm->lock);
switch (cmd) {
case SNDRV_PCM_TRIGGER_START:
case SNDRV_PCM_TRIGGER_RESUME:
unlock_mdac_irq(); /* enable hardware IRQ */
at91_ssc_write(AT91_PDC_PTCR, AT91_PDC_TXTEN); /* enable PDC
transfer requests */
at91_ssc_write(AT91_SSC_CR, AT91_SSC_TXEN); /* enable SSC
(I2S) data Tx */
break;
case SNDRV_PCM_TRIGGER_STOP:
case SNDRV_PCM_TRIGGER_SUSPEND:
at91_ssc_write(AT91_SSC_CR, AT91_SSC_TXDIS); /* disable SSC
(I2S) data Tx */
at91_ssc_write(AT91_PDC_PTCR, AT91_PDC_TXTDIS); /* disable
PDC transfer requests */
lock_mdac_irq(); /* disable hardware IRQ /*
break;
default:
err = -EINVAL;
break;
}
spin_unlock(&dpcm->lock);
return 0;
}
Cheers then,
Julien
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
prev parent reply other threads:[~2006-08-12 3:44 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-08-12 3:05 aplay skipping first periods Julien Bramary
2006-08-12 3:44 ` Julien Bramary [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=44DD4E92.3060202@blueyonder.co.uk \
--to=julien.bramary@blueyonder.co.uk \
--cc=alsa-devel@lists.sourceforge.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox