1 Jul
2022
1 Jul
'22
3:44 p.m.
/* Validate supported sample rates that are autodetected from MCLK */ @@ -477,19 +478,24 @@ static int es8316_pcm_hw_params(struct snd_pcm_substream *substream, } if (i == NR_SUPPORTED_MCLK_LRCK_RATIOS) return -EINVAL;
- lrck_divider = es8316->sysclk/params_rate(params);
- bclk_divider = lrck_divider/4; switch (params_format(params)) { case SNDRV_PCM_FORMAT_S16_LE: wordlen = ES8316_SERDATA2_LEN_16;
break; case SNDRV_PCM_FORMAT_S20_3LE: wordlen = ES8316_SERDATA2_LEN_20;bclk_divider/=16;
bclk_divider/=32;
S20_3LE uses 3 bytes, is the 32 divider correct here?
break;
case SNDRV_PCM_FORMAT_S24_LE: wordlen = ES8316_SERDATA2_LEN_24;
case SNDRV_PCM_FORMAT_S32_LE: wordlen = ES8316_SERDATA2_LEN_32;bclk_divider/=24;> break;
break; default: return -EINVAL;bclk_divider/=32;