Commit 77441825 authored by Paul Handrigan's avatar Paul Handrigan Committed by Mark Brown

ASoC: cs4265: Fix register address to set the proper data type.

The SPDIF control register must be written to set the data type in hw_params
not the ADC control register.
Signed-off-by: default avatarPaul Handrigan <Paul.Handrigan@cirrus.com>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
Cc: stable@vger.kernel.org
parent 7d1311b9
...@@ -458,12 +458,12 @@ static int cs4265_pcm_hw_params(struct snd_pcm_substream *substream, ...@@ -458,12 +458,12 @@ static int cs4265_pcm_hw_params(struct snd_pcm_substream *substream,
if (params_width(params) == 16) { if (params_width(params) == 16) {
snd_soc_update_bits(codec, CS4265_DAC_CTL, snd_soc_update_bits(codec, CS4265_DAC_CTL,
CS4265_DAC_CTL_DIF, (1 << 5)); CS4265_DAC_CTL_DIF, (1 << 5));
snd_soc_update_bits(codec, CS4265_ADC_CTL, snd_soc_update_bits(codec, CS4265_SPDIF_CTL2,
CS4265_SPDIF_CTL2_DIF, (1 << 7)); CS4265_SPDIF_CTL2_DIF, (1 << 7));
} else { } else {
snd_soc_update_bits(codec, CS4265_DAC_CTL, snd_soc_update_bits(codec, CS4265_DAC_CTL,
CS4265_DAC_CTL_DIF, (3 << 5)); CS4265_DAC_CTL_DIF, (3 << 5));
snd_soc_update_bits(codec, CS4265_ADC_CTL, snd_soc_update_bits(codec, CS4265_SPDIF_CTL2,
CS4265_SPDIF_CTL2_DIF, (1 << 7)); CS4265_SPDIF_CTL2_DIF, (1 << 7));
} }
break; break;
...@@ -472,7 +472,7 @@ static int cs4265_pcm_hw_params(struct snd_pcm_substream *substream, ...@@ -472,7 +472,7 @@ static int cs4265_pcm_hw_params(struct snd_pcm_substream *substream,
CS4265_DAC_CTL_DIF, 0); CS4265_DAC_CTL_DIF, 0);
snd_soc_update_bits(codec, CS4265_ADC_CTL, snd_soc_update_bits(codec, CS4265_ADC_CTL,
CS4265_ADC_DIF, 0); CS4265_ADC_DIF, 0);
snd_soc_update_bits(codec, CS4265_ADC_CTL, snd_soc_update_bits(codec, CS4265_SPDIF_CTL2,
CS4265_SPDIF_CTL2_DIF, (1 << 6)); CS4265_SPDIF_CTL2_DIF, (1 << 6));
break; break;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment