[alsa-devel] [PATCH] add number of periods constraint to snd-aoa [try 3]
Johannes Berg
johannes at sipsolutions.net
Fri Nov 23 13:49:42 CET 2007
On Fri, 2007-11-23 at 14:25 +0200, Heikki O Lindholm wrote:
> From: Heikki Lindholm <holindho at cs.helsinki.fi>
>
> The aoa driver is not specifying constraints on number of periods, and, it
> seems, it might end with a non-integer number, which it cannot deal with.
> Fix by adding a proper constraint.
>
> Signed-off-by: Heikki Lindholm <holindho at cs.helsinki.fi>
> ---
> try 3: fixed coding style
>
> diff -r 1b54a8725ded aoa/soundbus/i2sbus/i2sbus-pcm.c
> --- a/aoa/soundbus/i2sbus/i2sbus-pcm.c Wed Nov 14 17:07:17 2007 +0100
> +++ b/aoa/soundbus/i2sbus/i2sbus-pcm.c Fri Nov 23 14:16:07 2007 +0200
> @@ -194,6 +194,12 @@ static int i2sbus_pcm_open(struct i2sbus
> hw->period_bytes_max = 16384;
> hw->periods_min = 3;
> hw->periods_max = MAX_DBDMA_COMMANDS;
> + err = snd_pcm_hw_constraint_integer(pi->substream->runtime,
> + SNDRV_PCM_HW_PARAM_PERIODS);
Personally, I prefer that indented to just after the opening
parenthesis.
;)
> + if (err < 0) {
> + result = err;
> + goto out_unlock;
> + }
> list_for_each_entry(cii, &sdev->codec_list, list) {
> if (cii->codec->open) {
> err = cii->codec->open(cii, pi->substream);
So what I'm not sure on... Why do we see the same behaviour with other
drivers? Same bug?
johannes
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 828 bytes
Desc: This is a digitally signed message part
Url : http://mailman.alsa-project.org/pipermail/alsa-devel/attachments/20071123/0c394a0e/attachment.sig
More information about the Alsa-devel
mailing list