Skip to content

Conversation

@yaochunhung
Copy link

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

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>
@yaochunhung
Copy link
Author

yaochunhung commented Jan 3, 2022

Create this PR from #3236 to verify sof-ci test. Thanks

@kv2019i
Copy link
Collaborator

kv2019i commented Jan 4, 2022

Took a bit of time to understand what's this about. So basicly this is resubmitting the patch that was merged once, but then reverted in #3294 .

It seems failures are similar as before. A number of Intel SDW mach drivers fail to probe with this patch:

[   13.339685] kernel: sof-audio-pci-intel-cnl 0000:00:1f.3: loading topology:intel/sof-tplg/sof-cml-rt700.tplg
[   13.340698] kernel: sof-audio-pci-intel-cnl 0000:00:1f.3: Topology: ABI 3:20:0 Kernel ABI 3:18:0
[   13.340702] kernel: sof-audio-pci-intel-cnl 0000:00:1f.3: warn: topology ABI is more recent than kernel
[   13.340706] kernel: sof-audio-pci-intel-cnl 0000:00:1f.3: tplg: ready widget id 0 pipe 1 type 4 name : MIXER1.0 stream none
[   13.340712] kernel: sof-audio-pci-intel-cnl 0000:00:1f.3: tplg: load control type 1 name : 1 Master Playback Volume
[   13.340716] kernel: sof-audio-pci-intel-cnl 0000:00:1f.3: tplg: load kcontrol index 1 chans 2
[   13.340718] kernel: sof-audio-pci-intel-cnl 0000:00:1f.3: tplg: ready widget id 1 pipe 1 type 6 name : PGA1.0 stream none
[   13.340721] kernel: sof-audio-pci-intel-cnl 0000:00:1f.3: tplg: ready widget id 2 pipe 1 type 27 name : ALH0x102.OUT stream SDW1-Playback
[   13.340724] kernel: sof-audio-pci-intel-cnl 0000:00:1f.3: error: can't connect DAI ALH0x102.OUT stream SDW1-Playback
[   13.340736] kernel: sof-audio-pci-intel-cnl 0000:00:1f.3: error: failed to add widget id 0 type 27 name : ALH0x102.OUT stream SDW1-Playback
[   13.340748] kernel: sof_sdw sof_sdw: ASoC: failed to load widget ALH0x102.OUT

Copy link
Collaborator

@kv2019i kv2019i left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bardliao as this seems to affect SDW machine only, can you spot anything obvious in the filter checks that affects SDW?

dai = snd_soc_find_dai(dlc);

if (dai && dai->component != component)
continue;
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@plbossart I modify this to check if it work but it seems not. Could you please help to check if the modification is fine or need original conditional checking as below. Thanks.

if (!dai || dai->component != component) 
    continue;

@bardliao
Copy link
Collaborator

bardliao commented Jan 6, 2022

@bardliao as this seems to affect SDW machine only, can you spot anything obvious in the filter checks that affects SDW?

Sure, I will take a look.

@bardliao
Copy link
Collaborator

bardliao commented Jan 6, 2022

The SDW dais are created and registered by intel soundwire driver. (drivers/soundwire/intel.c). So the dai->component is different from the SOF component.

@cujomalainey
Copy link

The SDW dais are created and registered by intel soundwire driver. (drivers/soundwire/intel.c). So the dai->component is different from the SOF component.

ah yes I see what you mean, hmm, do we want to maybe make a allow-list of component names for SOF to take over? All other alternatives go back to either marking the link or the component for this specific case which seems like it should be SOF/SDW code to determine this, not ASoC

@plbossart
Copy link
Member

this PR seems to be abandoned or without a clear direction @yaochunhung ?

@yaochunhung
Copy link
Author

@plbossart We still use the patch on internal branch but currently I don't have good solution to fix the issue of SOF/SDW based on this PR. Thanks.

@plbossart plbossart added the Unclear No agreement on problem statement and resolution label Jun 21, 2022
@chunxu-li chunxu-li mentioned this pull request Jul 4, 2022
@plbossart
Copy link
Member

@yaochunhung this PR has been marked as 'Unclear' for several weeks. Unless there's an update and/or a need for comments, we should close this PR. You can always resubmit a new one later, it's just not efficient to leave such PRs dangling without any progress.

@yaochunhung
Copy link
Author

@plbossart I will close this PR. Thanks.

@yaochunhung yaochunhung closed this Aug 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Unclear No agreement on problem statement and resolution

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants