[alsa-devel] [PATCH 1/1] ASoC: TWL4030: Fix for the constraint handling

Mark Brown broonie at sirena.org.uk
Fri Apr 17 16:26:42 CEST 2009


On Fri, Apr 17, 2009 at 03:55:08PM +0300, Peter Ujfalusi wrote:

> +	snd_pcm_hw_constraint_minmax(slv_substream->runtime,
> +				SNDRV_PCM_HW_PARAM_RATE,
> +				twl4030->rate,
> +				twl4030->rate);

You did note this yourself but there's support for this in the core;
it'd be good to switch over to that (and push handling for the other
constraints into core).

> +	snd_pcm_hw_constraint_minmax(slv_substream->runtime,
> +				SNDRV_PCM_HW_PARAM_SAMPLE_BITS,
> +				twl4030->sample_bits,
> +				twl4030->sample_bits);
> +
> +	snd_pcm_hw_constraint_minmax(slv_substream->runtime,
> +				SNDRV_PCM_HW_PARAM_CHANNELS,
> +				twl4030->channels,
> +				twl4030->channels);

Are you sure that these need to match exactly and don't set maxima?

Your overall approach in the patch looks good so I'll apply it - it's
an improvement on the current situation.


More information about the Alsa-devel mailing list