diff mbox

[1/2] ASoC: pcm1681: Fix setting de-emphasis sampling rate selection

Message ID 1437664946.20606.5.camel@ingics.com (mailing list archive)
State Accepted
Commit fa8173a3ef0570affde7da352de202190b3786c2
Headers show

Commit Message

Axel Lin July 23, 2015, 3:22 p.m. UTC
The de-emphasis sampling rate selection is controlled by BIT[3:4] of
PCM1681_DEEMPH_CONTROL register. Do proper left shift to set it.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
---
 sound/soc/codecs/pcm1681.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Marek Belisko July 23, 2015, 7:46 p.m. UTC | #1
On 23.07.2015 17:22, Axel Lin wrote:
> The de-emphasis sampling rate selection is controlled by BIT[3:4] of
> PCM1681_DEEMPH_CONTROL register. Do proper left shift to set it.
>
> Signed-off-by: Axel Lin <axel.lin@ingics.com>
> ---
>   sound/soc/codecs/pcm1681.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/sound/soc/codecs/pcm1681.c b/sound/soc/codecs/pcm1681.c
> index b2c990f..1011142 100644
> --- a/sound/soc/codecs/pcm1681.c
> +++ b/sound/soc/codecs/pcm1681.c
> @@ -102,7 +102,7 @@ static int pcm1681_set_deemph(struct snd_soc_codec *codec)
>
>   	if (val != -1) {
>   		regmap_update_bits(priv->regmap, PCM1681_DEEMPH_CONTROL,
> -					PCM1681_DEEMPH_RATE_MASK, val);
> +				   PCM1681_DEEMPH_RATE_MASK, val << 3);
Good catch. Acked-by: Marek Belisko <marek.belisko@streamunlimited.com>
>   		enable = 1;
>   	} else
>   		enable = 0;
>
diff mbox

Patch

diff --git a/sound/soc/codecs/pcm1681.c b/sound/soc/codecs/pcm1681.c
index b2c990f..1011142 100644
--- a/sound/soc/codecs/pcm1681.c
+++ b/sound/soc/codecs/pcm1681.c
@@ -102,7 +102,7 @@  static int pcm1681_set_deemph(struct snd_soc_codec *codec)
 
 	if (val != -1) {
 		regmap_update_bits(priv->regmap, PCM1681_DEEMPH_CONTROL,
-					PCM1681_DEEMPH_RATE_MASK, val);
+				   PCM1681_DEEMPH_RATE_MASK, val << 3);
 		enable = 1;
 	} else
 		enable = 0;