Skip to content

Commit cc75c5e

Browse files
committed
ASoC: Intel: sof_sdw: add multi-card support
Add card_name and dai_type_mask fields to snd_soc_acpi_mach_params to allow per-instance card naming and DAI type filtering. Use card_name in mc_probe() to set the card name when provided. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
1 parent 6186cb5 commit cc75c5e

2 files changed

Lines changed: 4 additions & 1 deletion

File tree

include/sound/soc-acpi.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,8 @@ struct snd_soc_acpi_mach_params {
9090
unsigned short subsystem_rev;
9191
bool subsystem_id_set;
9292
u32 bt_link_mask;
93+
const char *card_name;
94+
u32 dai_type_mask;
9395
};
9496

9597
/**

sound/soc/intel/boards/sof_sdw.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1482,7 +1482,8 @@ static int mc_probe(struct platform_device *pdev)
14821482
ctx->codec_info_list_count = asoc_sdw_get_codec_info_list_count();
14831483
card = &ctx->card;
14841484
card->dev = &pdev->dev;
1485-
card->name = "soundwire";
1485+
card->name = mach->mach_params.card_name ?
1486+
mach->mach_params.card_name : "soundwire";
14861487
card->owner = THIS_MODULE;
14871488
card->late_probe = sof_sdw_card_late_probe;
14881489
card->add_dai_link = sof_sdw_add_dai_link;

0 commit comments

Comments
 (0)