-
Notifications
You must be signed in to change notification settings - Fork 322
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ADL: Load tplg file and return lots of errors from SOF driver #8247
Comments
@charleskeepax @rfvirgil @bardliao is there a topology file for CS42L42 ? |
@davidrau-renesas-opensource there may also be driver updates needed too, best to align with @charleskeepax and @rfvirgil here. |
Hi @lgirdwood ,
Hi charleskeepax and Richard, My current test environment bases on Linux_v6.5. Any sugeestions to fix it on my own? Thanks. Best, |
We have sof-mtl-sdw-cs42l42-l0-max98363-l2.tplg for MTL, but not for ADL. @davidrau-renesas-opensource Please rename sof-dyndbg.conf.txt to BTW, do you have the audio HW configuration in detail? For example, cs42l42 in sdw link 0, max98363 in sdw link 2. |
@bardliao According to the info of "sdw_intel_ctx", the default ids is configured for RT711. The attachment is my complete bootup log message after applying sof-dyndbg.conf. About HW configuration, CS42L42 is connected to 2 kinds of SNDW link accoring to the HW option.
Please provide me any suggestions about this information. |
@davidrau-renesas-opensource It will be easier to connect the cs42l42 on sdw link 0.
Here is an example for adl cs42l42 adl-cs42l42.asl.txt And you can rename sof-adl-rt711-4ch.tplg and sof-adl-rt711.tplg to sof-adl-cs42l42-4ch.tplg and sof-adl-cs42l42.tplg Please share the dmesg with those changes. |
@bardliao If my understanding is correct, the related setting should be confiuged to "link#1". Is't it? :) And the following modificatins of ADL ACPI code are also needed? |
@bardliao
And ideas about my test result? |
It means your cs42l43 should be connected to SNDW_DAT1 and SNDW_CLK1. And it looks like there is no SNDW #0 option in your BIOS. And my patch assumes the cs42l42 is connected to SNDW_DAT0 and SNDW_CLK0 Let's connect the cs42l42 on SNDW_DAT0 and SNDW_CLK0 and use kernel option to overwrite the mask to 0x1.
Connecting your cs42l42 to link 0 can reuse the existing topology. Yes, we can use link 1, and all above change is correct. .You need to change adr to 0x00010001fa424200ull, in diff --git a/tools/topology/topology1/sof-tgl-rt711-rt1308.m4 b/tools/topology/topology1/sof-tgl-rt711-rt1308.m4
index 73f3bc7b67ae..ed92fe67ad28 100644
--- a/tools/topology/topology1/sof-tgl-rt711-rt1308.m4
+++ b/tools/topology/topology1/sof-tgl-rt711-rt1308.m4
@@ -166,14 +166,14 @@ dnl deadline, priority, core, time_domain)
# playback DAI is ALH(SDW0 PIN2) using 2 periods
# Buffers use s24le format, with 48 frame per 1000us on core 0 with priority 0
DAI_ADD(sof/pipe-mixer-volume-dai-playback.m4,
- 1, ALH, 2, SDW0-Playback,
+ 1, ALH, 258, SDW0-Playback,
NOT_USED_IGNORED, 2, s24le,
1000, 0, 0, SCHEDULE_TIME_DOMAIN_TIMER, 2, 48000)
# capture DAI is ALH(SDW0 PIN2) using 2 periods
# Buffers use s24le format, with 48 frame per 1000us on core 0 with priority 0
DAI_ADD(sof/pipe-dai-capture.m4,
- 2, ALH, 3, SDW0-Capture,
+ 2, ALH, 259, SDW0-Capture,
PIPELINE_SINK_2, 2, s24le,
1000, 0, 0, SCHEDULE_TIME_DOMAIN_TIMER) Rebuild the topology and use the sof-adl-rt711-4ch.tplg |
I also modified the _ADR in "adl-cs42l42.asl" as below. According to the boot message, the ACPI table is already applied to the sysytem successfully. And then the following messages tell us the previous modifications we did are correct. doesn't? Next, the SOF driver loads the tplg file we created "sof-adl-sdw-cs42l42-4ch.tplg". And ideas? The complete log message is for your reference. Thank. you. |
@davidrau-renesas-opensource Sorry, I missed something in the pervious topology patch. We need to change the BE name, too. diff --git a/tools/topology/topology1/sof-tgl-rt711-rt1308.m4 b/tools/topology/topology1/sof-tgl-rt711-rt1308.m4
index 73f3bc7b67ae..fc192f981d8c 100644
--- a/tools/topology/topology1/sof-tgl-rt711-rt1308.m4
+++ b/tools/topology/topology1/sof-tgl-rt711-rt1308.m4
@@ -166,14 +166,14 @@ dnl deadline, priority, core, time_domain)
# playback DAI is ALH(SDW0 PIN2) using 2 periods
# Buffers use s24le format, with 48 frame per 1000us on core 0 with priority 0
DAI_ADD(sof/pipe-mixer-volume-dai-playback.m4,
- 1, ALH, 2, SDW0-Playback,
+ 1, ALH, 258, SDW1-Playback,
NOT_USED_IGNORED, 2, s24le,
1000, 0, 0, SCHEDULE_TIME_DOMAIN_TIMER, 2, 48000)
# capture DAI is ALH(SDW0 PIN2) using 2 periods
# Buffers use s24le format, with 48 frame per 1000us on core 0 with priority 0
DAI_ADD(sof/pipe-dai-capture.m4,
- 2, ALH, 3, SDW0-Capture,
+ 2, ALH, 259, SDW1-Capture,
PIPELINE_SINK_2, 2, s24le,
1000, 0, 0, SCHEDULE_TIME_DOMAIN_TIMER)
@@ -276,12 +276,12 @@ PCM_PLAYBACK_ADD(HDMI 4, 8, PIPELINE_PCM_9)
#ALH dai index = ((link_id << 8) | PDI id)
#ALH SDW0 Pin2 (ID: 0)
-DAI_CONFIG(ALH, 2, 0, SDW0-Playback,
- ALH_CONFIG(ALH_CONFIG_DATA(ALH, 2, 48000, 2)))
+DAI_CONFIG(ALH, 258, 0, SDW1-Playback,
+ ALH_CONFIG(ALH_CONFIG_DATA(ALH, 258, 48000, 2)))
#ALH SDW0 Pin3 (ID: 1)
-DAI_CONFIG(ALH, 3, 1, SDW0-Capture,
- ALH_CONFIG(ALH_CONFIG_DATA(ALH, 3, 48000, 2)))
+DAI_CONFIG(ALH, 259, 1, SDW1-Capture,
+ ALH_CONFIG(ALH_CONFIG_DATA(ALH, 259, 48000, 2)))
ifdef(`EXT_AMP',
` |
@bardliao After applying the new patch of tplg file, it shows the different error message about "DAI HDA3.OUT stream iDisp4". So I took a try to disable the related definitations of "iDisp4" and then the new error mesage is about "SSP2.OUT stream SSP2-BT" Any ideas? |
@davidrau-renesas-opensource It looks like there is no iDisp4 in your device. Please remove the HDA 3 stuff from the topology. |
@bardliao Would you please let me know how to remove this stuff correctly? Thanks. |
@bardliao Any ideas? |
Yes, that is correct.
Please remove
for this error. |
@bardliao After removing this stuff, the current error message shows something wrong when adding cs42l42 routes. I guess there are still incompatible configurations between the current tplg we applied and sof_sdw_cs42l42 helper code. Do you have any suggestions to modify below dapm route in "sof_sdw_cs42l42.c" to fix this error? The complete log message is for your reference. Thanks. |
@davidrau-renesas-opensource sof_sdw_cs42l42.c is shared with other machine drivers. What we need to do is to change the name_prefix to "cs42l42".
|
@bardliao When verifying playback function, I executed aplay command but no output from headphone. About recording function, there is error message about hw parameters. Thanks. |
@davidrau-renesas-opensource Can you share the "amixer contents" result? And please share the dmesg log while playback and capture. |
@bardliao When running capture function by arecord command, the below error shows in the dmesg log. Thanks. |
@davidrau-renesas-opensource Regarding the amixer, you need to set below settings
For "cs42l42-sdw sdw:1:01fa:4242:00: Chn prep failed for port 1: -110", that is cs42l42 failed to prepare. Can you contact Cirrus Logic folks for help? |
this is another instance of a ETIMEDOUT response to a prepare step, but this time on the channel prepare. it's the same NotFinished type of logic, so that's suspicious. |
@bardliao |
@davidrau-renesas-opensource pls do upstream any topology or UCM changes needed to get this config working. |
@lgirdwood |
Yes, and also once @rfvirgil and @charleskeepax also approve the UCM and codec config. |
Already created a pull request: 8370 |
1. Environment:
2. Situation:
I tried the available tplg files (for ADL) to bring-up the onboard codec and then got lots of error message from SOF driver.
(e.g. sof-adl-nocodec.tplg, )
[ 15.592511] sof-audio-pci-intel-tgl 0000:00:1f.3: DSP detected with PCI class/subclass/prog-if info 0x040380
[ 15.592762] sof-audio-pci-intel-tgl 0000:00:1f.3: SoundWire enabled on CannonLake+ platform, using SOF driver
[ 15.592782] sof-audio-pci-intel-tgl 0000:00:1f.3: enabling device (0000 -> 0002)
[ 15.593274] sof-audio-pci-intel-tgl 0000:00:1f.3: DSP detected with PCI class/subclass/prog-if 0x040380
[ 15.593476] sof-audio-pci-intel-tgl 0000:00:1f.3: bound 0000:00:02.0 (ops i915_audio_component_bind_ops [i915])
[ 15.600749] sof-audio-pci-intel-tgl 0000:00:1f.3: use msi interrupt mode
[ 15.771673] sof-audio-pci-intel-tgl 0000:00:1f.3: DMICs detected in NHLT tables: 4
[ 15.771674] sof-audio-pci-intel-tgl 0000:00:1f.3: hda codecs found, mask 4
[ 15.975370] sof-audio-pci-intel-tgl 0000:00:1f.3: Firmware info: version 2:0:0-b678a
[ 15.975374] sof-audio-pci-intel-tgl 0000:00:1f.3: Firmware: ABI 3:20:0 Kernel ABI 3:23:0
[ 15.975382] sof-audio-pci-intel-tgl 0000:00:1f.3: unknown sof_ext_man header type 3 size 0x30
[ 16.085714] sof-audio-pci-intel-tgl 0000:00:1f.3: Firmware info: version 2:0:0-b678a
[ 16.085731] sof-audio-pci-intel-tgl 0000:00:1f.3: Firmware: ABI 3:20:0 Kernel ABI 3:23:0
[ 16.205352] sof-audio-pci-intel-tgl 0000:00:1f.3: Topology: ABI 3:20:0 Kernel ABI 3:23:0
[ 16.205416] sof-audio-pci-intel-tgl 0000:00:1f.3: error: can't connect DAI ALH2.OUT stream SDW0-Playback
[ 16.207010] sof-audio-pci-intel-tgl 0000:00:1f.3: error: failed to add widget id 0 type 27 name : ALH2.OUT stream SDW0-Playback
[ 16.210194] sof-audio-pci-intel-tgl 0000:00:1f.3: error: can't connect DAI ALH3.IN stream SDW0-Capture
[ 16.211317] sof-audio-pci-intel-tgl 0000:00:1f.3: error: failed to add widget id 0 type 28 name : ALH3.IN stream SDW0-Capture
[ 16.213025] sof-audio-pci-intel-tgl 0000:00:1f.3: error: can't connect DAI HDA3.OUT stream iDisp4
[ 16.213423] sof-audio-pci-intel-tgl 0000:00:1f.3: error: failed to add widget id 0 type 27 name : HDA3.OUT stream iDisp4
[ 16.214678] sof-audio-pci-intel-tgl 0000:00:1f.3: error: can't connect DAI SSP2.OUT stream SSP2-BT
[ 16.215092] sof-audio-pci-intel-tgl 0000:00:1f.3: error: failed to add widget id 0 type 27 name : SSP2.OUT stream SSP2-BT
[ 16.216325] sof-audio-pci-intel-tgl 0000:00:1f.3: error: can't connect DAI SSP2.IN stream SSP2-BT
[ 16.216741] sof-audio-pci-intel-tgl 0000:00:1f.3: error: failed to add widget id 0 type 28 name : SSP2.IN stream SSP2-BT
[ 16.218060] sof-audio-pci-intel-tgl 0000:00:1f.3: error: sink ALH2.OUT not found
[ 16.219458] sof-audio-pci-intel-tgl 0000:00:1f.3: error: source ALH3.IN not found
[ 16.220794] sof-audio-pci-intel-tgl 0000:00:1f.3: error: sink HDA3.OUT not found
[ 16.220796] sof-audio-pci-intel-tgl 0000:00:1f.3: error: sink SSP2.OUT not found
[ 16.220798] sof-audio-pci-intel-tgl 0000:00:1f.3: error: source SSP2.IN not found
[ 16.226628] sof-audio-pci-intel-tgl 0000:00:1f.3: ipc tx error for 0x30030000 (msg/reply size: 16/0): -22
[ 16.226631] sof-audio-pci-intel-tgl 0000:00:1f.3: sof_ipc3_route_setup: route BUF14.0 -> PCM14C failed
[ 16.226632] sof-audio-pci-intel-tgl 0000:00:1f.3: sof_ipc3_set_up_all_pipelines: route set up failed
[ 16.226633] sof-audio-pci-intel-tgl 0000:00:1f.3: error: tplg component load failed -22
[ 16.226638] sof-audio-pci-intel-tgl 0000:00:1f.3: error: failed to load DSP topology -22
[ 16.226640] sof-audio-pci-intel-tgl 0000:00:1f.3: ASoC: error at snd_soc_component_probe on 0000:00:1f.3: -22
Some questions as following.
Thank you.
Best,
David
The text was updated successfully, but these errors were encountered: