Skip to content

Commit 38a679e

Browse files
committed
iqaudio-codec: Use the codec's new set_bclk_ratio
To ensure that the CPU DAI and codec agree over the BCLK ratio, impose a fixed value of 64 on both of them. Signed-off-by: Phil Elwell <[email protected]>
1 parent 87266b5 commit 38a679e

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

sound/soc/bcm/iqaudio-codec.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,13 +127,19 @@ static int snd_rpi_iqaudio_codec_init(struct snd_soc_pcm_runtime *rtd)
127127
snd_soc_dapm_disable_pin(&rtd->card->dapm, "AUX Jack");
128128
snd_soc_dapm_sync(&rtd->card->dapm);
129129

130-
/* Set bclk ratio to align with codec's BCLK rate */
130+
/* Impose BCLK ratios otherwise the codec may cheat */
131131
ret = snd_soc_dai_set_bclk_ratio(cpu_dai, 64);
132132
if (ret) {
133133
dev_err(rtd->dev, "Failed to set CPU BLCK ratio\n");
134134
return ret;
135135
}
136136

137+
ret = snd_soc_dai_set_bclk_ratio(codec_dai, 64);
138+
if (ret) {
139+
dev_err(rtd->dev, "Failed to set codec BCLK ratio\n");
140+
return ret;
141+
}
142+
137143
/* Set MCLK frequency to codec, onboard 11.2896MHz clock */
138144
return snd_soc_dai_set_sysclk(codec_dai, DA7213_CLKSRC_MCLK, 11289600,
139145
SND_SOC_CLOCK_OUT);

0 commit comments

Comments
 (0)