ASoC: Intel: sof_sdw_rt_sdca_jack_common: check ctx->headset_codec_dev instead of...
authorBard Liao <yung-chuan.liao@linux.intel.com>
Mon, 4 Dec 2023 21:42:00 +0000 (15:42 -0600)
committerMark Brown <broonie@kernel.org>
Mon, 4 Dec 2023 21:46:12 +0000 (21:46 +0000)
commit70a6b66d6e8e70966274cab2fc9ee75fd60e36bf
tree98e8a9519e47f6c6cc9041fa7d66c600d458969a
parente38e252dbceeef7d2f848017132efd68e9ae1416
ASoC: Intel: sof_sdw_rt_sdca_jack_common: check ctx->headset_codec_dev instead of playback

'if (!playback)' will not work if the dai is only on capture dai link
or is on more than one playback dai links. Check 'if
(ctx->headset_codec_dev)' instead.

Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20231204214200.203100-6-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/intel/boards/sof_sdw_rt_sdca_jack_common.c