ASoC: Intel: sof_sdw: append codec type to dai link name
authorBard Liao <yung-chuan.liao@linux.intel.com>
Wed, 19 Apr 2023 19:55:24 +0000 (14:55 -0500)
committerMark Brown <broonie@kernel.org>
Thu, 20 Apr 2023 11:51:53 +0000 (12:51 +0100)
commitdc5a3e60a4b5974a0cb5bf2c5df70a490dce9df2
tree6aa0ca34332903eff3c69e3dc00d18155fe607d3
parentc8db7b50128b8cc61a5ca6e4717cf8158fca302a
ASoC: Intel: sof_sdw: append codec type to dai link name

The existing sdw_sof machine driver constructs two SoundWire interfaces
by direction and sdw link id. It means that we will have exactly the
same dai link name if two dai links are on the same sdw link with the
same direction.
The new Realtek codec has two SoundWire interfaces for jack and DMIC
functions and they are treated as different codecs. To create two dai
links for jack and DMIC, we need to have different dai link names.
This patch suggests to append codec type if there are two or more
different types of devices on the same sdw bus.

Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Rander Wang <rander.wang@intel.com>
Link: https://lore.kernel.org/r/20230419195524.46995-8-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/intel/boards/sof_sdw.c