Skip to content

Commit a432523

Browse files
committed
ASoC: Intel: sof-function-topology-lib: add different channel number sdw
dmic support Now the machine driver provides the sdca dmic channel number information in the dai link name. We can use the information to select different topologies for different dmic channels. To be backward compatible, the 2ch sdca dmic topology will still use the "sdca-mic" topology. Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
1 parent 11293db commit a432523

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

sound/soc/intel/common/sof-function-topology-lib.c

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,18 @@ int sof_sdw_get_tplg_files(struct snd_soc_card *card, const struct snd_soc_acpi_
6666
"sdca-%damp", dai_link->num_cpus);
6767
if (!tplg_dev_name)
6868
return -ENOMEM;
69+
} else if (strstr(dai_link->name, "SmartMic-8ch")) {
70+
tplg_dev = TPLG_DEVICE_SDCA_MIC;
71+
tplg_dev_name = "sdca-mic-8ch";
72+
} else if (strstr(dai_link->name, "SmartMic-4ch")) {
73+
tplg_dev = TPLG_DEVICE_SDCA_MIC;
74+
tplg_dev_name = "sdca-mic-4ch";
75+
} else if (strstr(dai_link->name, "SmartMic-1ch")) {
76+
tplg_dev = TPLG_DEVICE_SDCA_MIC;
77+
tplg_dev_name = "sdca-mic-1ch";
6978
} else if (strstr(dai_link->name, "SmartMic")) {
7079
tplg_dev = TPLG_DEVICE_SDCA_MIC;
80+
/* Use the default 2ch topology */
7181
tplg_dev_name = "sdca-mic";
7282
} else if (strstr(dai_link->name, "dmic")) {
7383
switch (mach_params.dmic_num) {

0 commit comments

Comments
 (0)