ASoC: Intel: sdw_sof: append dai_type and remove codec_type
authorBard Liao <yung-chuan.liao@linux.intel.com>
Fri, 2 Jun 2023 20:22:02 +0000 (15:22 -0500)
committerMark Brown <broonie@kernel.org>
Mon, 5 Jun 2023 13:00:12 +0000 (14:00 +0100)
commit5714aabdf9713297947615fd2325719a6f9db316
tree3370f8c208e43ccb2e75151b24cd7c286b80978a
parentcededa5a6486821402c5e9bb7fd3cfd71d7999bc
ASoC: Intel: sdw_sof: append dai_type and remove codec_type

We append codec type to dailink name to distinguish different dailink
on the same sdw link and direction. But we could create multi dailinks
for a codec and the dailink name will be duplicated if we append codec
type to the dailink name.
Appending dai type instead of codec type can solve the issue.
For example, if a codec supports JACK on dai 0 and AMP on dai 1, the
existing code will create dailinks
SDW0-Playback-SimpleJack or SDW0-Playback-SmartAmp for both dailinks,
and it will be SDW0-Playback-SimpleJack for dailink 0 and
SDW0-Playback-SmartAmp for dailink 1 after this change.
Then codec type is not used any more and can be removed.

Reviewed-by: Ranjani Sridharan <ranjani.sridharan@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/20230602202225.249209-6-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/intel/boards/sof_sdw.c
sound/soc/intel/boards/sof_sdw_common.h