Skip to content

Commit 5bc2e92

Browse files
plbossartdbaluta
authored andcommitted
ASoC: soc-core: filter use of 'ignore_machine' field
The 'ignore_machine' field is currently used to ignore all FE dailinks statically added by the machine drivers, as well as override the fixups for the BE dailinks. The motivation for this field was primarily to reuse the same machine driver on Intel devices, both with legacy and SOF-based platform drivers. SOF is now used on Mediatek platforms, where the same card uses SOF-based dailinks to deal with DSP-managed streams, as well as 'regular' dailinks. The 'ignore_machine' field set by the core SOF platform driver is too strong, with dailinks not managed by SOF being modified. This patch adds a stricter filtering so that only dailinks managed by a topology-based SOF driver are modified. Reported-by: YC Hung <yc.hung@mediatek.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
1 parent 85649b8 commit 5bc2e92

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

sound/soc/soc-core.c

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1771,6 +1771,19 @@ static void soc_check_tplg_fes(struct snd_soc_card *card)
17711771
match:
17721772
/* machine matches, so override the rtd data */
17731773
for_each_card_prelinks(card, i, dai_link) {
1774+
struct snd_soc_dai_link_component *dlc;
1775+
struct snd_soc_dai *dai;
1776+
1777+
/*
1778+
* ignore dailinks exposed by other components, with the
1779+
* assumption that all cpu_dais are exposed by the same
1780+
* component
1781+
*/
1782+
dlc = asoc_link_to_cpu(dai_link, 0);
1783+
dai = snd_soc_find_dai(dlc);
1784+
1785+
if (!dai || dai->component != component)
1786+
continue;
17741787

17751788
/* ignore this FE */
17761789
if (dai_link->dynamic) {

0 commit comments

Comments
 (0)