Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Eliot Blennerhassett <linux@audioscience.com>
To: alsa-devel@alsa-project.org
Subject: Re: How can I make sure the period size is a multiple of 16?
Date: Wed, 05 Sep 2007 12:29:54 +1200	[thread overview]
Message-ID: <200709051229.54852.linux@audioscience.com> (raw)
In-Reply-To: <46DDE137.2070507@freescale.com>

On Wednesday 05 September 2007 10:50:31 Timur Tabi wrote:
> To work around a hardware issue, my ASoC driver requires the period size to
> be a multiple of 16.  What is the best way to ensure that?

Well, I was going to refer you to
 http://www-old.alsa-project.org/~iwai/writing-an-alsa-driver/index.html
but I just get a blank page today.

Set snd_pcm_hardware.period_bytes_min to 16 or is that 16 * samplesize?

You need to add some constraints to your driver, in the open callback.
E.g.
snd_pcm_hw_constraint_step(runtime, 0, SNDRV_PCM_HW_PARAM_PERIOD_BYTES, 16);

List of hwparams that can be constrained is in asound.h
List of constraint helpers in pcm.h, or grep for snd_pcm_hw_constraint to see 
usage examples.

--
Eliot

  reply	other threads:[~2007-09-05  0:26 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-09-04 22:50 How can I make sure the period size is a multiple of 16? Timur Tabi
2007-09-05  0:29 ` Eliot Blennerhassett [this message]
2007-09-05  9:08   ` Clemens Ladisch
2007-09-05  9:55     ` Trent Piepho
2007-09-05 12:58       ` Takashi Iwai
2007-09-06 17:07   ` Timur Tabi
2007-09-06 17:14     ` Trent Piepho

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=200709051229.54852.linux@audioscience.com \
    --to=linux@audioscience.com \
    --cc=alsa-devel@alsa-project.org \
    /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