From 044eb2d13a2147a7ac15a400c2a4f020a7857c36 Mon Sep 17 00:00:00 2001 From: Pierre-Louis Bossart Date: Fri, 2 Oct 2020 16:18:59 -0500 Subject: ASoC: Intel: sof_sdw_rt1308: add extra check on init Apply same test as for other amplifiers - in case we enable feedback one day. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Bard Liao Link: https://lore.kernel.org/r/20201002211902.287692-2-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown --- sound/soc/intel/boards/sof_sdw_rt1308.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'sound') diff --git a/sound/soc/intel/boards/sof_sdw_rt1308.c b/sound/soc/intel/boards/sof_sdw_rt1308.c index dba2fd28d77f..0d476f6f6313 100644 --- a/sound/soc/intel/boards/sof_sdw_rt1308.c +++ b/sound/soc/intel/boards/sof_sdw_rt1308.c @@ -132,6 +132,10 @@ int sof_sdw_rt1308_init(const struct snd_soc_acpi_link_adr *link, struct sof_sdw_codec_info *info, bool playback) { + /* Count amp number and do init on playback link only. */ + if (!playback) + return 0; + info->amp_num++; if (info->amp_num == 1) dai_links->init = first_spk_init; -- cgit v1.2.3