Skip to content

topology2: add missing nhlt - #6957

Merged
kv2019i merged 2 commits into
thesofproject:mainfrom
bardliao:topology2-nhlt
Jan 17, 2023
Merged

kv2019i merged 2 commits into
thesofproject:mainfrom
bardliao:topology2-nhlt

Conversation

@bardliao

@bardliao bardliao commented Jan 16, 2023 •

Copy link
Copy Markdown
Collaborator

Somehow some SoundWire topologies don't have PREPROCESS_PLUGINS=nhlt definition. It leads to nhlt is not included in those topologies.

Signed-off-by: Bard Liao yung-chuan.liao@linux.intel.com

Fixes: #6955

Somehow some SoundWire topologies don't have PREPROCESS_PLUGINS=nhlt
definition. It leads to nhlt is not included in those topologies.

Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>

@kv2019i kv2019i left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks @bardliao ! Let's see the CI results...

@kv2019i

kv2019i commented Jan 16, 2023

Copy link
Copy Markdown
Collaborator

Hmm, puzzled. So this seems to fix the HDMI load issue (although this PR doesn't touch the HDMI issue). But some of the tests fail to dmic error which incicates some NHLT blob is still missing and/or wrong:
https://sof-ci.01.org/sofpr/PR6957/build3383/devicetest/index.html?model=ADLP_RVP_SDW_IPC4ZPH&testcase=check-capture-10sec

[   10.603905] <err> dai_intel_dmic_nhlt: dmic_set_config_nhlt(): illegal OUTCONTROL0 = 0x00390843
[   10.603913] <err> dai_intel_dmic: dmic_set_config(): Failed to set the requested configuration.
[   10.603943] <err> copier: comp:0 0x40000 failed to create dai

@juimonen

Copy link
Copy Markdown

topologies compiled need to have the PLATFORM definition. like mtl, tgl etc. Dmic blob is different depending on that -> we have dmic hw change between tgl and mtl.

@bardliao

Copy link
Copy Markdown
Collaborator Author

topologies compiled need to have the PLATFORM definition. like mtl, tgl etc. Dmic blob is different depending on that -> we have dmic hw change between tgl and mtl.

Thanks @juimonen for pointing this out. DMIC_DRIVER_VERSION should be 1 for ADL, right?

@juimonen

Copy link
Copy Markdown

topologies compiled need to have the PLATFORM definition. like mtl, tgl etc. Dmic blob is different depending on that -> we have dmic hw change between tgl and mtl.

Thanks @juimonen for pointing this out. DMIC_DRIVER_VERSION should be 1 for ADL, right?

yes.

@bardliao

Copy link
Copy Markdown
Collaborator Author

Thanks @juimonen, setting DMIC_DRIVER_VERSION=1 fixed the DMIC recording issue on ADL SDW RVP. Instead of removing DMIC from sof-adl-rt711-4ch.tplg, I removed DMIC_DRIVER_VERSION=3 which is for MTL only from cavs-sdw.conf in this PR. Let's wait and see the PR test result.

DMIC_DRIVER_VERSION=3 is already set in mtl.conf. Other platforms
should use the default value in dmic-default.conf

Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
@kv2019i

kv2019i commented Jan 16, 2023

Copy link
Copy Markdown
Collaborator

Hmm, still issue with the blob:
https://sof-ci.01.org/sofpr/PR6957/build3393/devicetest/index.html?model=ADLP_RVP_SDW_IPC4ZPH&testcase=check-capture-10sec

[  355.903195] kernel: snd_sof:sof_ipc4_prepare_copier_module: sof-audio-pci-intel-tgl 0000:00:1f.3: copier copier.DMIC.101.1, type 28
[  355.903201] kernel: snd_sof:snd_sof_get_nhlt_endpoint_data: sof-audio-pci-intel-tgl 0000:00:1f.3: dai index 0 nhlt type 2 direction 1
[  355.903209] kernel: snd_intel_dspcfg:intel_nhlt_get_endpoint_blob: sof-audio-pci-intel-tgl 0000:00:1f.3: Looking for configuration:
[  355.903213] kernel: snd_intel_dspcfg:intel_nhlt_get_endpoint_blob: sof-audio-pci-intel-tgl 0000:00:1f.3:   vbus_id=0 link_type=2 dir=1, dev_type=0
[  355.903219] kernel: snd_intel_dspcfg:intel_nhlt_get_endpoint_blob: sof-audio-pci-intel-tgl 0000:00:1f.3:   ch=4 fmt=32/32 rate=48000
[  355.903226] kernel: snd_intel_dspcfg:intel_nhlt_get_endpoint_blob: sof-audio-pci-intel-tgl 0000:00:1f.3: Endpoint count=2
[  355.903230] kernel: snd_intel_dspcfg:nhlt_check_ep_match: sof-audio-pci-intel-tgl 0000:00:1f.3: Endpoint: vbus_id=2 link_type=3 dir=0 dev_type = 0
[  355.903236] kernel: snd_intel_dspcfg:nhlt_check_ep_match: sof-audio-pci-intel-tgl 0000:00:1f.3: Endpoint: vbus_id=2 link_type=3 dir=1 dev_type = 0
[  355.903241] kernel: sof-audio-pci-intel-tgl 0000:00:1f.3: no matching blob for sample rate: 48000 sample width: 32 channels: 4
[  355.903254] kernel: sof-audio-pci-intel-tgl 0000:00:1f.3: failed to prepare widget copier.DMIC.101.1
[  355.903195] kernel: snd_sof:sof_ipc4_prepare_copier_module: sof-audio-pci-intel-tgl 0000:00:1f.3: copier copier.DMIC.101.1, type 28
[  355.903201] kernel: snd_sof:snd_sof_get_nhlt_endpoint_data: sof-audio-pci-intel-tgl 0000:00:1f.3: dai index 0 nhlt type 2 direction 1
[  355.903209] kernel: snd_intel_dspcfg:intel_nhlt_get_endpoint_blob: sof-audio-pci-intel-tgl 0000:00:1f.3: Looking for configuration:
[  355.903213] kernel: snd_intel_dspcfg:intel_nhlt_get_endpoint_blob: sof-audio-pci-intel-tgl 0000:00:1f.3:   vbus_id=0 link_type=2 dir=1, dev_type=0
[  355.903219] kernel: snd_intel_dspcfg:intel_nhlt_get_endpoint_blob: sof-audio-pci-intel-tgl 0000:00:1f.3:   ch=4 fmt=32/32 rate=48000
[  355.903226] kernel: snd_intel_dspcfg:intel_nhlt_get_endpoint_blob: sof-audio-pci-intel-tgl 0000:00:1f.3: Endpoint count=2
[  355.903230] kernel: snd_intel_dspcfg:nhlt_check_ep_match: sof-audio-pci-intel-tgl 0000:00:1f.3: Endpoint: vbus_id=2 link_type=3 dir=0 dev_type = 0
[  355.903236] kernel: snd_intel_dspcfg:nhlt_check_ep_match: sof-audio-pci-intel-tgl 0000:00:1f.3: Endpoint: vbus_id=2 link_type=3 dir=1 dev_type = 0
[  355.903241] kernel: sof-audio-pci-intel-tgl 0000:00:1f.3: no matching blob for sample rate: 48000 sample width: 32 channels: 4
[  355.903254] kernel: sof-audio-pci-intel-tgl 0000:00:1f.3: failed to prepare widget copier.DMIC.101.1 [  355.903195] kernel: snd_sof:sof_ipc4_prepare_copier_module: sof-audio-pci-intel-tgl 0000:00:1f.3: copier copier.DMIC.101.1, type 28
[  355.903201] kernel: snd_sof:snd_sof_get_nhlt_endpoint_data: sof-audio-pci-intel-tgl 0000:00:1f.3: dai index 0 nhlt type 2 direction 1
[  355.903209] kernel: snd_intel_dspcfg:intel_nhlt_get_endpoint_blob: sof-audio-pci-intel-tgl 0000:00:1f.3: Looking for configuration:
[  355.903213] kernel: snd_intel_dspcfg:intel_nhlt_get_endpoint_blob: sof-audio-pci-intel-tgl 0000:00:1f.3:   vbus_id=0 link_type=2 dir=1, dev_type=0
[  355.903219] kernel: snd_intel_dspcfg:intel_nhlt_get_endpoint_blob: sof-audio-pci-intel-tgl 0000:00:1f.3:   ch=4 fmt=32/32 rate=48000
[  355.903226] kernel: snd_intel_dspcfg:intel_nhlt_get_endpoint_blob: sof-audio-pci-intel-tgl 0000:00:1f.3: Endpoint count=2
[  355.903230] kernel: snd_intel_dspcfg:nhlt_check_ep_match: sof-audio-pci-intel-tgl 0000:00:1f.3: Endpoint: vbus_id=2 link_type=3 dir=0 dev_type = 0
[  355.903236] kernel: snd_intel_dspcfg:nhlt_check_ep_match: sof-audio-pci-intel-tgl 0000:00:1f.3: Endpoint: vbus_id=2 link_type=3 dir=1 dev_type = 0
[  355.903241] kernel: sof-audio-pci-intel-tgl 0000:00:1f.3: no matching blob for sample rate: 48000 sample width: 32 channels: 4
[  355.903254] kernel: sof-audio-pci-intel-tgl 0000:00:1f.3: failed to prepare widget copier.DMIC.101.1 [  355.903195] kernel: snd_sof:sof_ipc4_prepare_copier_module: sof-audio-pci-intel-tgl 0000:00:1f.3: copier copier.DMIC.101.1, type 28
[  355.903201] kernel: snd_sof:snd_sof_get_nhlt_endpoint_data: sof-audio-pci-intel-tgl 0000:00:1f.3: dai index 0 nhlt type 2 direction 1
[  355.903209] kernel: snd_intel_dspcfg:intel_nhlt_get_endpoint_blob: sof-audio-pci-intel-tgl 0000:00:1f.3: Looking for configuration:
[  355.903213] kernel: snd_intel_dspcfg:intel_nhlt_get_endpoint_blob: sof-audio-pci-intel-tgl 0000:00:1f.3:   vbus_id=0 link_type=2 dir=1, dev_type=0
[  355.903219] kernel: snd_intel_dspcfg:intel_nhlt_get_endpoint_blob: sof-audio-pci-intel-tgl 0000:00:1f.3:   ch=4 fmt=32/32 rate=48000
[  355.903226] kernel: snd_intel_dspcfg:intel_nhlt_get_endpoint_blob: sof-audio-pci-intel-tgl 0000:00:1f.3: Endpoint count=2
[  355.903230] kernel: snd_intel_dspcfg:nhlt_check_ep_match: sof-audio-pci-intel-tgl 0000:00:1f.3: Endpoint: vbus_id=2 link_type=3 dir=0 dev_type = 0
[  355.903236] kernel: snd_intel_dspcfg:nhlt_check_ep_match: sof-audio-pci-intel-tgl 0000:00:1f.3: Endpoint: vbus_id=2 link_type=3 dir=1 dev_type = 0
[  355.903241] kernel: sof-audio-pci-intel-tgl 0000:00:1f.3: no matching blob for sample rate: 48000 sample width: 32 channels: 4
[  355.903254] kernel: sof-audio-pci-intel-tgl 0000:00:1f.3: failed to prepare widget copier.DMIC.101.1 

@juimonen

Copy link
Copy Markdown

these are needed in cmakefile or inside the topology file: NUM_DMICS=4,DMIC0_ID=3,DMIC1_ID=4,PDM1_MIC_A_ENABLE=1,PDM1_MIC_B_ENABLE=1

so the dmic definitions need to be present also when compiling (if you want 4 ch)... default is 2ch. actually don't know what is the "ID", at least NUM_DMICS=4,PDM1_MIC_A_ENABLE=1,PDM1_MIC_B_ENABLE=1, need to be there.

@bardliao

Copy link
Copy Markdown
Collaborator Author

https://sof-ci.01.org/sofpr/PR6957/build3393/devicetest/index.html?model=ADLP_RVP_SDW_IPC4ZPH&testcase=check-capture-10sec failed is because that options snd_sof_intel_hda_common sof_use_tplg_nhlt=1 is not in /etc/modprobe.d/snd_sof_intel_hda_common.conf. Let's trigger the test again. @miRoox FYI

@bardliao

Copy link
Copy Markdown
Collaborator Author

SOFCI TEST

@bardliao

Copy link
Copy Markdown
Collaborator Author

these are needed in cmakefile or inside the topology file: NUM_DMICS=4,DMIC0_ID=3,DMIC1_ID=4,PDM1_MIC_A_ENABLE=1,PDM1_MIC_B_ENABLE=1

so the dmic definitions need to be present also when compiling (if you want 4 ch)... default is 2ch. actually don't know what is the "ID", at least NUM_DMICS=4,PDM1_MIC_A_ENABLE=1,PDM1_MIC_B_ENABLE=1, need to be there.

@juimonen Yes, the topology is built with
"cavs-sdw;sof-adl-rt711-4ch;DEEPBUFFER_FW_DMA_MS=100,NUM_DMICS=4,DMIC0_ID=2,
DMIC1_ID=3,PDM1_MIC_A_ENABLE=1,PDM1_MIC_B_ENABLE=1,HDMI1_ID=4,HDMI2_ID=5,
HDMI3_ID=6,PREPROCESS_PLUGINS=nhlt,NHLT_BIN=nhlt-sof-adl-rt711-4ch.bin"

@bardliao

Copy link
Copy Markdown
Collaborator Author

Hmm, still issue with the blob: https://sof-ci.01.org/sofpr/PR6957/build3393/devicetest/index.html?model=ADLP_RVP_SDW_IPC4ZPH&testcase=check-capture-10sec

[  355.903195] kernel: snd_sof:sof_ipc4_prepare_copier_module: sof-audio-pci-intel-tgl 0000:00:1f.3: copier copier.DMIC.101.1, type 28
[  355.903201] kernel: snd_sof:snd_sof_get_nhlt_endpoint_data: sof-audio-pci-intel-tgl 0000:00:1f.3: dai index 0 nhlt type 2 direction 1
[  355.903209] kernel: snd_intel_dspcfg:intel_nhlt_get_endpoint_blob: sof-audio-pci-intel-tgl 0000:00:1f.3: Looking for configuration:
[  355.903213] kernel: snd_intel_dspcfg:intel_nhlt_get_endpoint_blob: sof-audio-pci-intel-tgl 0000:00:1f.3:   vbus_id=0 link_type=2 dir=1, dev_type=0
[  355.903219] kernel: snd_intel_dspcfg:intel_nhlt_get_endpoint_blob: sof-audio-pci-intel-tgl 0000:00:1f.3:   ch=4 fmt=32/32 rate=48000
[  355.903226] kernel: snd_intel_dspcfg:intel_nhlt_get_endpoint_blob: sof-audio-pci-intel-tgl 0000:00:1f.3: Endpoint count=2
[  355.903230] kernel: snd_intel_dspcfg:nhlt_check_ep_match: sof-audio-pci-intel-tgl 0000:00:1f.3: Endpoint: vbus_id=2 link_type=3 dir=0 dev_type = 0
[  355.903236] kernel: snd_intel_dspcfg:nhlt_check_ep_match: sof-audio-pci-intel-tgl 0000:00:1f.3: Endpoint: vbus_id=2 link_type=3 dir=1 dev_type = 0
[  355.903241] kernel: sof-audio-pci-intel-tgl 0000:00:1f.3: no matching blob for sample rate: 48000 sample width: 32 channels: 4
[  355.903254] kernel: sof-audio-pci-intel-tgl 0000:00:1f.3: failed to prepare widget copier.DMIC.101.1
[  355.903195] kernel: snd_sof:sof_ipc4_prepare_copier_module: sof-audio-pci-intel-tgl 0000:00:1f.3: copier copier.DMIC.101.1, type 28
[  355.903201] kernel: snd_sof:snd_sof_get_nhlt_endpoint_data: sof-audio-pci-intel-tgl 0000:00:1f.3: dai index 0 nhlt type 2 direction 1
[  355.903209] kernel: snd_intel_dspcfg:intel_nhlt_get_endpoint_blob: sof-audio-pci-intel-tgl 0000:00:1f.3: Looking for configuration:
[  355.903213] kernel: snd_intel_dspcfg:intel_nhlt_get_endpoint_blob: sof-audio-pci-intel-tgl 0000:00:1f.3:   vbus_id=0 link_type=2 dir=1, dev_type=0
[  355.903219] kernel: snd_intel_dspcfg:intel_nhlt_get_endpoint_blob: sof-audio-pci-intel-tgl 0000:00:1f.3:   ch=4 fmt=32/32 rate=48000
[  355.903226] kernel: snd_intel_dspcfg:intel_nhlt_get_endpoint_blob: sof-audio-pci-intel-tgl 0000:00:1f.3: Endpoint count=2
[  355.903230] kernel: snd_intel_dspcfg:nhlt_check_ep_match: sof-audio-pci-intel-tgl 0000:00:1f.3: Endpoint: vbus_id=2 link_type=3 dir=0 dev_type = 0
[  355.903236] kernel: snd_intel_dspcfg:nhlt_check_ep_match: sof-audio-pci-intel-tgl 0000:00:1f.3: Endpoint: vbus_id=2 link_type=3 dir=1 dev_type = 0
[  355.903241] kernel: sof-audio-pci-intel-tgl 0000:00:1f.3: no matching blob for sample rate: 48000 sample width: 32 channels: 4
[  355.903254] kernel: sof-audio-pci-intel-tgl 0000:00:1f.3: failed to prepare widget copier.DMIC.101.1 [  355.903195] kernel: snd_sof:sof_ipc4_prepare_copier_module: sof-audio-pci-intel-tgl 0000:00:1f.3: copier copier.DMIC.101.1, type 28
[  355.903201] kernel: snd_sof:snd_sof_get_nhlt_endpoint_data: sof-audio-pci-intel-tgl 0000:00:1f.3: dai index 0 nhlt type 2 direction 1
[  355.903209] kernel: snd_intel_dspcfg:intel_nhlt_get_endpoint_blob: sof-audio-pci-intel-tgl 0000:00:1f.3: Looking for configuration:
[  355.903213] kernel: snd_intel_dspcfg:intel_nhlt_get_endpoint_blob: sof-audio-pci-intel-tgl 0000:00:1f.3:   vbus_id=0 link_type=2 dir=1, dev_type=0
[  355.903219] kernel: snd_intel_dspcfg:intel_nhlt_get_endpoint_blob: sof-audio-pci-intel-tgl 0000:00:1f.3:   ch=4 fmt=32/32 rate=48000
[  355.903226] kernel: snd_intel_dspcfg:intel_nhlt_get_endpoint_blob: sof-audio-pci-intel-tgl 0000:00:1f.3: Endpoint count=2
[  355.903230] kernel: snd_intel_dspcfg:nhlt_check_ep_match: sof-audio-pci-intel-tgl 0000:00:1f.3: Endpoint: vbus_id=2 link_type=3 dir=0 dev_type = 0
[  355.903236] kernel: snd_intel_dspcfg:nhlt_check_ep_match: sof-audio-pci-intel-tgl 0000:00:1f.3: Endpoint: vbus_id=2 link_type=3 dir=1 dev_type = 0
[  355.903241] kernel: sof-audio-pci-intel-tgl 0000:00:1f.3: no matching blob for sample rate: 48000 sample width: 32 channels: 4
[  355.903254] kernel: sof-audio-pci-intel-tgl 0000:00:1f.3: failed to prepare widget copier.DMIC.101.1 [  355.903195] kernel: snd_sof:sof_ipc4_prepare_copier_module: sof-audio-pci-intel-tgl 0000:00:1f.3: copier copier.DMIC.101.1, type 28
[  355.903201] kernel: snd_sof:snd_sof_get_nhlt_endpoint_data: sof-audio-pci-intel-tgl 0000:00:1f.3: dai index 0 nhlt type 2 direction 1
[  355.903209] kernel: snd_intel_dspcfg:intel_nhlt_get_endpoint_blob: sof-audio-pci-intel-tgl 0000:00:1f.3: Looking for configuration:
[  355.903213] kernel: snd_intel_dspcfg:intel_nhlt_get_endpoint_blob: sof-audio-pci-intel-tgl 0000:00:1f.3:   vbus_id=0 link_type=2 dir=1, dev_type=0
[  355.903219] kernel: snd_intel_dspcfg:intel_nhlt_get_endpoint_blob: sof-audio-pci-intel-tgl 0000:00:1f.3:   ch=4 fmt=32/32 rate=48000
[  355.903226] kernel: snd_intel_dspcfg:intel_nhlt_get_endpoint_blob: sof-audio-pci-intel-tgl 0000:00:1f.3: Endpoint count=2
[  355.903230] kernel: snd_intel_dspcfg:nhlt_check_ep_match: sof-audio-pci-intel-tgl 0000:00:1f.3: Endpoint: vbus_id=2 link_type=3 dir=0 dev_type = 0
[  355.903236] kernel: snd_intel_dspcfg:nhlt_check_ep_match: sof-audio-pci-intel-tgl 0000:00:1f.3: Endpoint: vbus_id=2 link_type=3 dir=1 dev_type = 0
[  355.903241] kernel: sof-audio-pci-intel-tgl 0000:00:1f.3: no matching blob for sample rate: 48000 sample width: 32 channels: 4
[  355.903254] kernel: sof-audio-pci-intel-tgl 0000:00:1f.3: failed to prepare widget copier.DMIC.101.1 

I checked it and the reason is that options snd_sof_intel_hda_common sof_use_tplg_nhlt=1 was not set. So the driver was using nhlt from BIOS not from the topology.

@bardliao

Copy link
Copy Markdown
Collaborator Author

https://sof-ci.01.org/sofpr/PR6957/build3404/devicetest/index.html looks good now.

@juimonen

Copy link
Copy Markdown

@bardliao thanks!

@kv2019i
kv2019i merged commit 4b810a8 into thesofproject:main Jan 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] no matching blob for sample rate: 48000 sample width: 32 channels: 4 when capture with DMIC on ADLP_RVP_SDW + IPC4

3 participants