diff options
author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2011-11-28 21:16:56 +0000 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2011-11-28 22:10:05 +0000 |
commit | fc07ecd851bd082265b52838eff12f50b88f6114 (patch) | |
tree | 8d7f2a2be174cf82659e8c651febcc383bd9d903 /sound | |
parent | 5b895eec118ab5fec7b69102d73c1b04a86140b9 (diff) | |
download | linux-fc07ecd851bd082265b52838eff12f50b88f6114.tar.bz2 |
ASoC: Error out if we can't generate a LRCLK at all for WM8994
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound')
-rw-r--r-- | sound/soc/codecs/wm8994.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/sound/soc/codecs/wm8994.c b/sound/soc/codecs/wm8994.c index 9c982e47eb99..36ba1edfff80 100644 --- a/sound/soc/codecs/wm8994.c +++ b/sound/soc/codecs/wm8994.c @@ -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); |