Re: [PATCH 1/2] ASoC: omap: Add hardware constraint for HDMI and ABE

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tuesday 07 December 2010 00:34:44 ext Olaya, Margarita wrote:
> From: Jorge Eduardo Candelaria <jorge.candelaria@xxxxxx>
> 
> The Audio Backend needs a step size of 24 * 4, while HDMI requires a
> step size of 32 * 4 bits to align the audio buffer.
> 
> Signed-off-by: Jorge Eduardo Candelaria <jorge.candelaria@xxxxxx>
> Signed-off-by: Margarita Olaya Cabrera <magi.olaya@xxxxxx>
> ---
>  sound/soc/omap/omap-pcm.c |    9 +++++++++
>  1 files changed, 9 insertions(+), 0 deletions(-)
> 
> diff --git a/sound/soc/omap/omap-pcm.c b/sound/soc/omap/omap-pcm.c
> index 8caeb8d..6a21447 100644
> --- a/sound/soc/omap/omap-pcm.c
> +++ b/sound/soc/omap/omap-pcm.c
> @@ -280,6 +280,15 @@ static int omap_pcm_open(struct snd_pcm_substream
> *substream) if (ret < 0)
>  		goto out;
> 
> +	/*
> +	 * ABE needs a step of 24 * 4 data bits, and HDMI 32 * 4
> +	 * Ensure buffer size satisfies both constraints.
> +	 */
> +	ret = snd_pcm_hw_constraint_step(runtime, 0,
> +					 SNDRV_PCM_HW_PARAM_BUFFER_BYTES, 384);
> +	if (ret < 0)
> +		goto out;
> +

Few things:
This only applicable for OMAP4, so please make it so that it only applies to 
OMAP4.
We have the other constraints set in the omap-mcbsp.c:omap_mcbsp_dai_startup.
I think it would be better to keep them in a same place.

>  	prtd = kzalloc(sizeof(*prtd), GFP_KERNEL);
>  	if (prtd == NULL) {
>  		ret = -ENOMEM;

-- 
Péter
_______________________________________________
Alsa-devel mailing list
Alsa-devel@xxxxxxxxxxxxxxxx
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel



[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux