Commit fbeabd09 authored by Kirill Marinushkin's avatar Kirill Marinushkin Committed by Mark Brown

ASoC: topology: Modify clock gating parameter parsing to switch

This improves the coding style of this piece of code.
Signed-off-by: default avatarKirill Marinushkin <k.marinushkin@gmail.com>
Cc: Mark Brown <broonie@kernel.org>
Cc: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Cc: Jaroslav Kysela <perex@perex.cz>
Cc: Takashi Iwai <tiwai@suse.de>
Cc: Pan Xiuli <xiuli.pan@linux.intel.com>
Cc: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Cc: linux-kernel@vger.kernel.org
Cc: alsa-devel@alsa-project.org
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent d59fb285
...@@ -2007,11 +2007,19 @@ static void set_link_hw_format(struct snd_soc_dai_link *link, ...@@ -2007,11 +2007,19 @@ static void set_link_hw_format(struct snd_soc_dai_link *link,
link->dai_fmt = hw_config->fmt & SND_SOC_DAIFMT_FORMAT_MASK; link->dai_fmt = hw_config->fmt & SND_SOC_DAIFMT_FORMAT_MASK;
/* clock gating */ /* clock gating */
if (hw_config->clock_gated == SND_SOC_TPLG_DAI_CLK_GATE_GATED) switch (hw_config->clock_gated) {
case SND_SOC_TPLG_DAI_CLK_GATE_GATED:
link->dai_fmt |= SND_SOC_DAIFMT_GATED; link->dai_fmt |= SND_SOC_DAIFMT_GATED;
else if (hw_config->clock_gated == break;
SND_SOC_TPLG_DAI_CLK_GATE_CONT)
case SND_SOC_TPLG_DAI_CLK_GATE_CONT:
link->dai_fmt |= SND_SOC_DAIFMT_CONT; link->dai_fmt |= SND_SOC_DAIFMT_CONT;
break;
default:
/* ignore the value */
break;
}
/* clock signal polarity */ /* clock signal polarity */
invert_bclk = hw_config->invert_bclk; invert_bclk = hw_config->invert_bclk;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment