diff mbox

[3/3] Add bit shifts to set the correct functional mode and the correct clock divider.

Message ID 1409241250-22097-3-git-send-email-Paul.Handrigan@cirrus.com (mailing list archive)
State Accepted
Commit fb18cd2a62f597557d5078d8fa03bb6930fe839f
Headers show

Commit Message

Paul Handrigan Aug. 28, 2014, 3:54 p.m. UTC
Reported-by: Zoltán Szenczi <zoltan@raspberrypi.org>
Signed-off-by: Paul Handrigan <Paul.Handrigan@cirrus.com>
---
 sound/soc/codecs/cs4265.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff mbox

Patch

diff --git a/sound/soc/codecs/cs4265.c b/sound/soc/codecs/cs4265.c
index c31d29d..e299948 100644
--- a/sound/soc/codecs/cs4265.c
+++ b/sound/soc/codecs/cs4265.c
@@ -436,10 +436,10 @@  static int cs4265_pcm_hw_params(struct snd_pcm_substream *substream,
 	index = cs4265_get_clk_index(cs4265->sysclk, params_rate(params));
 	if (index >= 0) {
 		snd_soc_update_bits(codec, CS4265_ADC_CTL,
-			CS4265_ADC_FM, clk_map_table[index].fm_mode);
+			CS4265_ADC_FM, clk_map_table[index].fm_mode << 6);
 		snd_soc_update_bits(codec, CS4265_MCLK_FREQ,
 			CS4265_MCLK_FREQ_MASK,
-			clk_map_table[index].mclkdiv);
+			clk_map_table[index].mclkdiv << 4);
 
 	} else {
 		dev_err(codec->dev, "can't get correct mclk\n");