mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-27 06:34:11 +08:00
ASoC: Error out if we can't generate a LRCLK at all for WM8994
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
This commit is contained in:
parent
5b895eec11
commit
fc07ecd851
@ -2357,6 +2357,11 @@ static int wm8994_hw_params(struct snd_pcm_substream *substream,
|
||||
bclk |= best << WM8994_AIF1_BCLK_DIV_SHIFT;
|
||||
|
||||
lrclk = bclk_rate / params_rate(params);
|
||||
if (!lrclk) {
|
||||
dev_err(dai->dev, "Unable to generate LRCLK from %dHz BCLK\n",
|
||||
bclk_rate);
|
||||
return -EINVAL;
|
||||
}
|
||||
dev_dbg(dai->dev, "Using LRCLK rate %d for actual LRCLK %dHz\n",
|
||||
lrclk, bclk_rate / lrclk);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user