Closed plbossart closed 6 months ago
@shumingfan @bardliao here's an example of what we could do to filter the required topology.
On a MTL device with RT713, I can detect the VA version. I don't have a device with RT712 VB but presumably the SmartMic function is the main difference.
@bardliao @shumingfan I can't figure out if the RT712 and RT713 are identical or not, and if they have the same number of endpoints.
For now I get this error when I align RT712 and RT713...
[ 144.018284] sof_sdw sof_sdw: 1 is too many endpoints for codec: 0x713
@shumingfan can you test this with RT712 VA and VB? The topologies required are generated with https://github.com/thesofproject/sof/pull/9125
@bardliao @shumingfan I can't figure out if the RT712 and RT713 are identical or not, and if they have the same number of endpoints.
For now I get this error when I align RT712 and RT713...
[ 144.018284] sof_sdw sof_sdw: 1 is too many endpoints for codec: 0x713
rt712 and rt713 are not identical. rt712 supports amp function while rt713 doesn't.
@shumingfan can you test this with RT712 VA and VB? The topologies required are generated with thesofproject/sof#9125
@plbossart I try to test RT712VA and VB on MTL RVP with different ASL files. rt712-l0-disco-table-test.asl.txt rt712-vb-l0-disco-table-test.asl.txt This PR could find out the VA and VB, then load different tplg.
Of course we have a side effect with MTL AIOC having a bad DSDT
[ 6.321319] kernel: acpi device:2e: found invalid SDCA function AF01 type 4 ADR 1, skipped
[ 6.321847] kernel: acpi device:35: found invalid SDCA function AF02 type 2 ADR 2, skipped
Gah. what a mess.
https://sof-ci.01.org/linuxpr/PR4995/build3008/devicetest/index.html?model=MTLP_SDW_AIOC&testcase=verify-kernel-boot-log is a case of bad configuration I am afraid on ba-mtlp-sdw-aioc-02: the device is detected as HDaudio and we use it for SoundWire tests??
@ssavati can you please double-check this device? This is clearly wrong:
May 16 18:08:04 ba-mtlp-sdw-aioc-02 kernel: snd_sof_intel_hda_generic:hda_init_caps: sof-audio-pci-intel-mtl 0000:00:1f.3: skipping SoundWire, no links enabled
May 16 18:08:04 ba-mtlp-sdw-aioc-02 kernel: snd_sof_intel_hda:hda_codec_probe: sof-audio-pci-intel-mtl 0000:00:1f.3: HDA codec #2 probed OK: response: 8086281d
May 16 18:08:04 ba-mtlp-sdw-aioc-02 kernel: snd_sof_intel_hda:request_codec_module: hdaudio ehdaudio0D2: loading codec module: hdaudio:v8086281Dr00100000a01
May 16 18:08:04 ba-mtlp-sdw-aioc-02 kernel: sof-audio-pci-intel-mtl 0000:00:1f.3: hda codecs found, mask 4
May 16 18:08:04 ba-mtlp-sdw-aioc-02 kernel: sof-audio-pci-intel-mtl 0000:00:1f.3: using HDA machine driver skl_hda_dsp_generic now
May 16 18:08:04 ba-mtlp-sdw-aioc-02 kernel: snd_intel_dspcfg:intel_nhlt_get_dmic_geo: sof-audio-pci-intel-mtl 0000:00:1f.3: found 1 format definitions
May 16 18:08:04 ba-mtlp-sdw-aioc-02 kernel: snd_intel_dspcfg:intel_nhlt_get_dmic_geo: sof-audio-pci-intel-mtl 0000:00:1f.3: max channels found 2
May 16 18:08:04 ba-mtlp-sdw-aioc-02 kernel: snd_intel_dspcfg:intel_nhlt_get_dmic_geo: sof-audio-pci-intel-mtl 0000:00:1f.3: Array with 2 dmics
May 16 18:08:04 ba-mtlp-sdw-aioc-02 kernel: snd_intel_dspcfg:intel_nhlt_get_dmic_geo: sof-audio-pci-intel-mtl 0000:00:1f.3: dmic number 2 max_ch 2
May 16 18:08:04 ba-mtlp-sdw-aioc-02 kernel: sof-audio-pci-intel-mtl 0000:00:1f.3: DMICs detected in NHLT tables: 2
May 16 18:08:04 ba-mtlp-sdw-aioc-02 kernel: snd_sof:sof_select_ipc_and_paths: sof-audio-pci-intel-mtl 0000:00:1f.3: Module parameter used, changed fw path to intel/sof-ipc4/mtl/community
May 16 18:08:04 ba-mtlp-sdw-aioc-02 kernel: snd_sof:sof_select_ipc_and_paths: sof-audio-pci-intel-mtl 0000:00:1f.3: Module parameter used, changed tplg path to intel/sof-ipc4-tplg
May 16 18:08:04 ba-mtlp-sdw-aioc-02 kernel: snd_sof:sof_select_ipc_and_paths: sof-audio-pci-intel-mtl 0000:00:1f.3: Module parameter used, changed tplg name to sof-mtl-rt711-l0-rt1316-l23-rt714-l1.tplg
May 16 18:08:04 ba-mtlp-sdw-aioc-02 kernel: sof-audio-pci-intel-mtl 0000:00:1f.3: Firmware paths/files for ipc type 1:
May 16 18:08:04 ba-mtlp-sdw-aioc-02 kernel: sof-audio-pci-intel-mtl 0000:00:1f.3: Firmware file: intel/sof-ipc4/mtl/community/sof-mtl.ri
May 16 18:08:04 ba-mtlp-sdw-aioc-02 kernel: sof-audio-pci-intel-mtl 0000:00:1f.3: Firmware lib path: intel/sof-ipc4-lib/mtl
May 16 18:08:04 ba-mtlp-sdw-aioc-02 kernel: sof-audio-pci-intel-mtl 0000:00:1f.3: Topology file: intel/sof-ipc4-tplg/sof-mtl-rt711-l0-rt1316-l23-rt714-l1.tplg
@plbossart I have checked the BIOS configuration and other settings , everything is fine. Same device without this PR works fine. I think there is regression in this PR.
@plbossart I have checked the BIOS configuration and other settings , everything is fine. Same device without this PR works fine. I think there is regression in this PR.
Thanks for checking @ssavati there was a one-line Kconfig change that caused the problem by completely disabling SoundWire with the default kconfig scripts. Fixed now on my side.
New version with a cleaner parsing of the functions with the backwards-compatible re-ordering for early devices
[ 131.499758] soundwire sdw:0:0:025d:0713:01: found SDCA function UAJ (type 6)
[ 131.499761] soundwire sdw:0:0:025d:0713:01: found SDCA function HID (type 10)
[ 131.500270] soundwire sdw:0:1:025d:1316:01: found SDCA function SmartAmp (type 1)
[ 131.500804] soundwire sdw:0:2:025d:1316:01: found SDCA function SmartAmp (type 1)
@shumingfan please re-check if I did something wrong, it's Friday afternoon and it's been a long week. Thanks!
https://github.com/thesofproject/linux/actions/runs/9134952643/job/25121470472?pr=4995
sound/soc/sof/amd/acp-common.c: In function ‘amd_sof_sdw_machine_select’:
sound/soc/sof/amd/acp-common.c:148:86: error: ‘struct sdw_amd_ctx’ has no member named ‘ids’
148 | acp_data->sdw->ids,
| ^~
sound/soc/sof/amd/acp-common.c:149:86: error: ‘struct sdw_amd_ctx’ has no member named ‘num_slaves’
149 | acp_data->sdw->num_slaves))
| ^~
sound/soc/sof/amd/acp-common.c:147:38: error: too many arguments to function ‘snd_soc_acpi_sdw_link_slaves_found’
147 | if (!snd_soc_acpi_sdw_link_slaves_found(sdev->dev, link,
closing for now, WIP alternate solution with extensions for functions
Somewhat convoluted code to skip machine driver entries that require RT712 VB hardware.