Commit 00958200 authored by Charles Keepax's avatar Charles Keepax Committed by Mark Brown

ASoC: intel: sof_sdw: Allow direct specification of CODEC name

Add support for MFD based CODEC drivers, by allowing the CODEC name to
not be the SoundWire device directly.
Signed-off-by: default avatarCharles Keepax <ckeepax@opensource.cirrus.com>
Signed-off-by: default avatarBard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: default avatarPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20230731214257.444605-20-pierre-louis.bossart@linux.intel.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent 656dd91a
......@@ -1174,7 +1174,11 @@ static int create_codec_dai_name(struct device *dev,
class_id = SDW_CLASS_ID(adr);
comp_index = i - adr_index + offset;
if (is_unique_device(adr_link, sdw_version, mfg_id, part_id,
if (codec_info_list[codec_index].codec_name) {
codec[comp_index].name =
devm_kstrdup(dev, codec_info_list[codec_index].codec_name,
GFP_KERNEL);
} else if (is_unique_device(adr_link, sdw_version, mfg_id, part_id,
class_id, i)) {
codec_str = "sdw:%01x:%04x:%04x:%02x";
codec[comp_index].name =
......
......@@ -80,6 +80,7 @@ struct sof_sdw_dai_info {
struct sof_sdw_codec_info {
const int part_id;
const int version_id;
const char *codec_name;
int amp_num;
const u8 acpi_id[ACPI_ID_LEN];
const bool ignore_pch_dmic;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment