提交 e3606aa4 编写于 作者: P Peter Ujfalusi 提交者: Mark Brown

ASoC: tas2552: Simplify the tas2552_mute function

Initialize the cfg1_reg to 0 and set the mute bit only when it is needed.
Signed-off-by: NPeter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: NMark Brown <broonie@kernel.org>
上级 7de544fd
......@@ -254,13 +254,11 @@ static int tas2552_set_dai_sysclk(struct snd_soc_dai *dai, int clk_id,
static int tas2552_mute(struct snd_soc_dai *dai, int mute)
{
u8 cfg1_reg;
u8 cfg1_reg = 0;
struct snd_soc_codec *codec = dai->codec;
if (mute)
cfg1_reg = TAS2552_MUTE;
else
cfg1_reg = ~TAS2552_MUTE;
cfg1_reg |= TAS2552_MUTE;
snd_soc_update_bits(codec, TAS2552_CFG_1, TAS2552_MUTE, cfg1_reg);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册