Commit 5001765f authored by Mark Brown's avatar Mark Brown

ASoC: arizona: Be more forgiving in BCLK selection

Allow any BCLK which can be divided down to generate LRCLK, not just the
lowest possible BCLK to clock out the samples.
Signed-off-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
parent 5b2eec3f
...@@ -518,7 +518,8 @@ static int arizona_hw_params(struct snd_pcm_substream *substream, ...@@ -518,7 +518,8 @@ static int arizona_hw_params(struct snd_pcm_substream *substream,
rates = &arizona_48k_bclk_rates[0]; rates = &arizona_48k_bclk_rates[0];
for (i = 0; i < ARRAY_SIZE(arizona_44k1_bclk_rates); i++) { for (i = 0; i < ARRAY_SIZE(arizona_44k1_bclk_rates); i++) {
if (rates[i] == snd_soc_params_to_bclk(params)) { if (rates[i] >= snd_soc_params_to_bclk(params) &&
rates[i] % params_rate(params) == 0) {
bclk = i; bclk = i;
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