alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
From: Peter Ujfalusi <peter.ujfalusi@ti.com>
To: Mark Brown <broonie@kernel.org>, Liam Girdwood <lgirdwood@gmail.com>
Cc: alsa-devel@alsa-project.org, linaro-kernel@lists.linaro.org,
	Mark Brown <broonie@linaro.org>
Subject: Re: [PATCH 7/7] ASoC: twl4030: Convert to params_width()
Date: Thu, 31 Jul 2014 15:40:03 +0300	[thread overview]
Message-ID: <53DA3923.7080700@ti.com> (raw)
In-Reply-To: <1406808978-16175-7-git-send-email-broonie@kernel.org>

On 07/31/2014 03:16 PM, Mark Brown wrote:
> From: Mark Brown <broonie@linaro.org>
> 
> The CODEC doesn't care how data is laid out in memory.

Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.com>

> 
> Signed-off-by: Mark Brown <broonie@linaro.org>
> ---
>  sound/soc/codecs/twl4030.c | 10 +++++-----
>  1 file changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/sound/soc/codecs/twl4030.c b/sound/soc/codecs/twl4030.c
> index cf404505e7d1..b6b0cb399599 100644
> --- a/sound/soc/codecs/twl4030.c
> +++ b/sound/soc/codecs/twl4030.c
> @@ -1763,16 +1763,16 @@ static int twl4030_hw_params(struct snd_pcm_substream *substream,
>  	old_format = twl4030_read(codec, TWL4030_REG_AUDIO_IF);
>  	format = old_format;
>  	format &= ~TWL4030_DATA_WIDTH;
> -	switch (params_format(params)) {
> -	case SNDRV_PCM_FORMAT_S16_LE:
> +	switch (params_width(params)) {
> +	case 16:
>  		format |= TWL4030_DATA_WIDTH_16S_16W;
>  		break;
> -	case SNDRV_PCM_FORMAT_S32_LE:
> +	case 32:
>  		format |= TWL4030_DATA_WIDTH_32S_24W;
>  		break;
>  	default:
> -		dev_err(codec->dev, "%s: unknown format %d\n", __func__,
> -			params_format(params));
> +		dev_err(codec->dev, "%s: unsupported bits/sample %d\n",
> +			__func__, params_width(params));
>  		return -EINVAL;
>  	}
>  
> 


-- 
Péter

      reply	other threads:[~2014-07-31 12:40 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-31 12:16 [PATCH 1/7] ASoC: tas5086: Convert to params_width() Mark Brown
2014-07-31 12:16 ` [PATCH 2/7] ASoC: tlv320aic26: " Mark Brown
2014-07-31 12:16 ` [PATCH 3/7] ASoC: tlv320aic31xx: " Mark Brown
2014-07-31 12:16 ` [PATCH 4/7] ASoC: tlv320aic32x4: " Mark Brown
2014-07-31 12:16 ` [PATCH 5/7] ASoC: tlv320aic3x: " Mark Brown
2014-07-31 12:16 ` [PATCH 6/7] ASoC: tlv320dac33: " Mark Brown
2014-07-31 12:40   ` Peter Ujfalusi
2014-07-31 12:16 ` [PATCH 7/7] ASoC: twl4030: " Mark Brown
2014-07-31 12:40   ` Peter Ujfalusi [this message]

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=53DA3923.7080700@ti.com \
    --to=peter.ujfalusi@ti.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=broonie@linaro.org \
    --cc=lgirdwood@gmail.com \
    --cc=linaro-kernel@lists.linaro.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;
as well as URLs for NNTP newsgroup(s).