[alsa-devel] [PATCH v3 5/5] ASoC: omap-mcbsp: Place correct constraints for streams

Peter Ujfalusi peter.ujfalusi at nokia.com
Tue Jun 1 14:19:23 CEST 2010


Hi,

On Tuesday 01 June 2010 14:18:24 Ujfalusi Peter (Nokia-D/Tampere) wrote:

...

> +static int omap_mcbsp_hwrule_min_buffersize(struct snd_pcm_hw_params
> *params, +				    struct snd_pcm_hw_rule *rule)
> +{
> +	struct snd_interval *buffer_size = hw_param_interval(params,
> +					SNDRV_PCM_HW_PARAM_BUFFER_SIZE);
> +	struct snd_interval *channels = hw_param_interval(params,
> +					SNDRV_PCM_HW_PARAM_CHANNELS);
> +	struct omap_mcbsp_data *mcbsp_data = rule->private;
> +	struct snd_interval frames;
> +	int size;
> +
> +	snd_interval_any(&frames);
> +	size = omap_mcbsp_get_fifo_size(mcbsp_data->bus_id);
> +
> +	frames.min = size / channels->min;
> +	frames.integer = 1;
> +	return snd_interval_refine(buffer_size, &frames);
> +
> +}

Just noticed this extra line after the return...
Should I resend?

-- 
Péter


More information about the Alsa-devel mailing list