summaryrefslogtreecommitdiff
path: root/sound
diff options
context:
space:
mode:
authorPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>2020-10-02 16:18:59 -0500
committerMark Brown <broonie@kernel.org>2020-10-05 14:40:19 +0100
commit044eb2d13a2147a7ac15a400c2a4f020a7857c36 (patch)
tree6de0f56622b9423ae5b94461abf3aef14dfde54e /sound
parentf525facaecd22502b20b22762ec609fdd66902f0 (diff)
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 <pierre-louis.bossart@linux.intel.com> Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com> Link: https://lore.kernel.org/r/20201002211902.287692-2-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound')
-rw-r--r--sound/soc/intel/boards/sof_sdw_rt1308.c4
1 files changed, 4 insertions, 0 deletions
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;