All of lore.kernel.org
 help / color / mirror / Atom feed
From: Adrian McMenamin <adrian@mcmen.demon.co.uk>
To: Lee Revell <rlrevell@joe-job.com>
Cc: Takashi Iwai <tiwai@suse.de>, alsa-devel@alsa-project.org
Subject: Re: Couple of questions
Date: Sat, 18 Mar 2006 00:08:56 +0000	[thread overview]
Message-ID: <1142640536.9449.29.camel@localhost.localdomain> (raw)
In-Reply-To: <1142639891.25258.134.camel@mindpipe>

On Fri, 2006-03-17 at 18:58 -0500, Lee Revell wrote:
> On Fri, 2006-03-17 at 23:51 +0000, Adrian McMenamin wrote:
> > On Fri, 2006-03-17 at 18:46 -0500, Lee Revell wrote:
> > > On Fri, 2006-03-17 at 23:29 +0000, Adrian McMenamin wrote:
> > > > 
> > > > So, just to be clear. When I am transferring a "period" I should
> > > > actually stream half a period's worth of bytes into the channel
> > > > playing
> > > > the left and half a period into the right - and can advance each dma
> > > > transfer through the buffer by half a period length on both the left
> > > > and
> > > > the right side of the buffer 
> > > 
> > > No, one period.
> > > 
> > 
> > 
> > How does that work? That would imply that there were half as many
> > periods in the DMA buffer as specified here...
> > 
> > static snd_pcm_hardware_t snd_pcm_aica_playback_hw = {
> > 
> > 	.info = (SNDRV_PCM_INFO_NONINTERLEAVED),
> > 	.formats =
> > 	    (SNDRV_PCM_FMTBIT_S8 | SNDRV_PCM_FMTBIT_S16_LE |
> > 	     SNDRV_PCM_FMTBIT_IMA_ADPCM),
> > 	.rates = SNDRV_PCM_RATE_8000_48000,
> > 	.rate_min = 8000,
> > 	.rate_max = 48000,
> > 	.channels_min = 2,
> > 	.channels_max = 2,
> > 	.buffer_bytes_max = AICA_BUFFER_SIZE,
> > 	.period_bytes_min = AICA_PERIOD_SIZE,
> > 	.period_bytes_max = AICA_PERIOD_SIZE,
> > 	.periods_min = AICA_PERIOD_NUMBER,
> > 	.periods_max = AICA_PERIOD_NUMBER,
> > };
> > 
> > 
> > As the buffer and period (in bytes) size is constant. 
> > 
> > 
> 
> That's why the maximum buffer and period is in bytes not frames.  Stereo
> has twice as many bytes per frame than mono.



Err...yes :)

I am still confused though. In mono, every time a period is played a new
period is loaded into the DMA buffer and then transferred into the
hardware's buffer.

How does this work now - wait for one period to play on the left (or
right) channel and then transfer one period's worth on the left and
right channel (ie ALSA fills the buffer up with 2 periods at a go in
stereo) or transfer half a period's worth on each channel but move the
copy pointer on a full period (ie ALSA transfers just one period's worth
which translates as half a period in either channel) 



-------------------------------------------------------
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

  reply	other threads:[~2006-03-18  0:09 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-03-16  0:01 Couple of questions Adrian McMenamin
2006-03-16 10:42 ` Takashi Iwai
2006-03-16 21:08   ` Adrian McMenamin
2006-03-17  0:10     ` Carlos Munoz
2006-03-17  0:20     ` Lee Revell
2006-03-16 23:34   ` Adrian McMenamin
2006-03-17  0:16     ` Lee Revell
2006-03-17 10:13       ` Takashi Iwai
2006-03-17 20:27         ` Adrian McMenamin
2006-03-17 20:29           ` Takashi Iwai
2006-03-17 23:29             ` Adrian McMenamin
2006-03-17 23:46               ` Lee Revell
2006-03-17 23:51                 ` Adrian McMenamin
2006-03-17 23:58                   ` Lee Revell
2006-03-18  0:08                     ` Adrian McMenamin [this message]
2006-03-18  0:17                       ` Lee Revell
2006-03-18  0:22                         ` Adrian McMenamin
2006-03-18 11:08   ` Adrian McMenamin
2006-03-20 18:11     ` Carlos Munoz
  -- strict thread matches above, loose matches on Subject: below --
2011-04-09 16:14 Brad Campbell
2011-04-09 23:17 ` Roman Mamedov
2011-04-10  8:02 ` NeilBrown
1998-03-20 18:39 couple " Nick Verhaegen

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=1142640536.9449.29.camel@localhost.localdomain \
    --to=adrian@mcmen.demon.co.uk \
    --cc=alsa-devel@alsa-project.org \
    --cc=rlrevell@joe-job.com \
    --cc=tiwai@suse.de \
    /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.