From: Adrian McMenamin <adrian@mcmen.demon.co.uk>
To: James Courtier-Dutton <James@superbug.co.uk>
Cc: Lee Revell <rlrevell@joe-job.com>,
Alsa-devel <alsa-devel@lists.sourceforge.net>
Subject: Re: pointer callback in pcm
Date: Sat, 11 Mar 2006 19:55:57 +0000 [thread overview]
Message-ID: <1142106957.9496.45.camel@localhost.localdomain> (raw)
In-Reply-To: <441326EB.8070801@superbug.co.uk>
On Sat, 2006-03-11 at 19:37 +0000, James Courtier-Dutton wrote:
> Adrian McMenamin wrote:
> > On Sat, 2006-03-11 at 19:15 +0000, James Courtier-Dutton wrote:
> >
> >
> >>>
> >>>
> >> Ok, that is not what is needed.
> >> The value returned should be the position of the ADC in the hardware's
> >> ring buffer in units of frames.
> >> Not the cumulative number of samples played.
> >> E.g. If the buffer is 32768 frames long, the returned value should only
> >> have a value from 0 to 32767
> >> Once it gets to 32767, it should then role over to 0 again.
> >>
> >>
> > Yes, that's what I meant :) Sorry if I wasn't clear enough.
> >
> Which application are you using to test.
> Have you tried "speaker-test"
I cannot get aplay to work so I am just do cat somefile.wav > /dev/dsp
As I couldn't get the ack callback to work I have just rewritten the
interrupt handler as below:
static irqreturn_t aica_period_elapsed(int irq, void *dev_id, struct
pt_regs *regs)
{
int transferred;
snd_pcm_runtime_t *runtime;
if (dev_id != dreamcastcard) return IRQ_NONE;
/* clear the interrupt on the ARM side */
spu_memset(0x28BC, 0x20, 4);
runtime = (((snd_card_aica_t *)dev_id)->substream)->runtime;
dma_xfer(0, runtime->dma_area + (0x1000 * dreamcastcard->clicks),
0x11000 + (0x1000 * dreamcastcard->clicks), 0x1000, 5);
do {
mdelay(1);
transferred = get_dma_residue(0);
snd_printk("Transfer reports 0x%X\n", transferred);
}
while (transferred < 0x1000);
snd_pcm_period_elapsed(((snd_card_aica_t *)dev_id)->substream);
dreamcastcard->clicks++;
if (dreamcastcard->clicks == 8) dreamcastcard->clicks = 0;
snd_printk("Clicks is %d\n", dreamcastcard->clicks);
return IRQ_HANDLED;
}
which shows the transfers work (the rate is about 12 Mb/s so it's fast)
but still just plays the same stuff over and over in an endless loop :(
-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
next prev parent reply other threads:[~2006-03-11 19:55 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-03-09 22:21 pointer callback in pcm Adrian McMenamin
2006-03-10 0:53 ` Lee Revell
2006-03-10 19:51 ` Adrian McMenamin
2006-03-10 20:16 ` Takashi Iwai
2006-03-10 20:21 ` Adrian McMenamin
2006-03-10 20:23 ` Lee Revell
2006-03-11 11:16 ` James Courtier-Dutton
2006-03-11 11:27 ` Adrian McMenamin
2006-03-11 15:42 ` James Courtier-Dutton
2006-03-11 15:53 ` Adrian McMenamin
2006-03-11 17:30 ` Adrian McMenamin
2006-03-11 18:47 ` James Courtier-Dutton
2006-03-11 19:08 ` Adrian McMenamin
2006-03-11 19:15 ` James Courtier-Dutton
2006-03-11 19:18 ` Adrian McMenamin
2006-03-11 19:37 ` James Courtier-Dutton
2006-03-11 19:55 ` Adrian McMenamin [this message]
2006-03-11 19:26 ` Adrian McMenamin
2006-03-11 19:35 ` James Courtier-Dutton
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=1142106957.9496.45.camel@localhost.localdomain \
--to=adrian@mcmen.demon.co.uk \
--cc=James@superbug.co.uk \
--cc=alsa-devel@lists.sourceforge.net \
--cc=rlrevell@joe-job.com \
/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.