提交 810e4425 编写于 作者: V Vasily Khoruzhick 提交者: Mark Brown

ASoC: uda1380: Avoid accessing i2c bus when codec is disabled

set_dai_fmt_both() callback is called from snd_soc_runtime_set_dai_fmt()
which is called from snd_soc_register_card(), but at this time codec
is not powered on yet. Replace direct i2c write with regcache write.

Fixes: 5f0acedd (ASoC: rx1950_uda1380: Use static DAI format setup)
Fixes: 5cc10b9b (ASoC: h1940_uda1380: Use static DAI format setup)
Signed-off-by: NVasily Khoruzhick <anarsoul@gmail.com>
Signed-off-by: NMark Brown <broonie@kernel.org>
Cc: stable@vger.kernel.org
上级 b787f68c
......@@ -437,7 +437,7 @@ static int uda1380_set_dai_fmt_both(struct snd_soc_dai *codec_dai,
if ((fmt & SND_SOC_DAIFMT_MASTER_MASK) != SND_SOC_DAIFMT_CBS_CFS)
return -EINVAL;
uda1380_write(codec, UDA1380_IFACE, iface);
uda1380_write_reg_cache(codec, UDA1380_IFACE, iface);
return 0;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册