Repository navigation
SoundWire: rt711-sdca: transfers timed out on component remove/probe #3650
Copy link
Copy link
Closed
Description
In bind/unbind driver tests, the transfers can fail with a timeout during .set_jack_detect
[ 89.930339] rt711-sdca sdw:0:025d:0711:01: rt711_sdca_set_jack_detect: start
[ 90.430633] soundwire_intel soundwire_intel.link.0: SCP Msg trf timed out
[ 90.430648] soundwire sdw-master-0: trf on Slave 1 failed:-5 read addr 803c count 0
[ 90.934652] soundwire_intel soundwire_intel.link.0: SCP Msg trf timed out
[ 90.934671] rt711-sdca sdw:0:025d:0711:01: Failed to get private value: 610003c => 467bb425 ret=-5
[ 91.438629] soundwire_intel soundwire_intel.link.0: SCP Msg trf timed out
[ 91.438643] soundwire sdw-master-0: trf on Slave 1 failed:-5 read addr 8038 count 0
[ 91.942625] soundwire_intel soundwire_intel.link.0: SCP Msg trf timed out
[ 91.942643] rt711-sdca sdw:0:025d:0711:01: Failed to get private value: 6100038 => 467bb425 ret=-5
[ 92.446623] soundwire_intel soundwire_intel.link.0: SCP Msg trf timed out
[ 92.446638] soundwire sdw-master-0: trf on Slave 1 failed:-5 write addr a03d count 0
[ 92.950620] soundwire_intel soundwire_intel.link.0: SCP Msg trf timed out
[ 92.950639] rt711-sdca sdw:0:025d:0711:01: Failed to set private value: 610003d <= ffff ret=-5
[ 93.454619] soundwire_intel soundwire_intel.link.0: SCP Msg trf timed out
[ 93.454634] soundwire sdw-master-0: trf on Slave 1 failed:-5 write addr a03f count 0
[ 93.958625] soundwire_intel soundwire_intel.link.0: SCP Msg trf timed out
[ 93.958646] rt711-sdca sdw:0:025d:0711:01: Failed to set private value: 610003f <= 0f12 ret=-5
[ 94.462619] soundwire_intel soundwire_intel.link.0: SCP Msg trf timed out
[ 94.462635] soundwire sdw-master-0: trf on Slave 1 failed:-5 write addr a035 count 0
[ 94.966613] soundwire_intel soundwire_intel.link.0: SCP Msg trf timed out
[ 94.966632] rt711-sdca sdw:0:025d:0711:01: Failed to set private value: 6100035 <= 0c60 ret=-5
[ 95.470618] soundwire_intel soundwire_intel.link.0: SCP Msg trf timed out
[ 95.470633] soundwire sdw-master-0: trf on Slave 1 failed:-5 read addr 8008 count 0
[ 95.974635] soundwire_intel soundwire_intel.link.0: SCP Msg trf timed out
[ 95.974651] rt711-sdca sdw:0:025d:0711:01: Failed to get private value: 2000008 => 0c60 ret=-5
[ 96.478610] soundwire_intel soundwire_intel.link.0: SCP Msg trf timed out
[ 96.478625] soundwire sdw-master-0: trf on Slave 1 failed:-5 write addr a009 count 0
[ 96.982613] soundwire_intel soundwire_intel.link.0: SCP Msg trf timed out
[ 96.982631] rt711-sdca sdw:0:025d:0711:01: Failed to set private value: 2000009 <= 302b ret=-5
[ 97.486609] soundwire_intel soundwire_intel.link.0: SCP Msg trf timed out
[ 97.486623] soundwire sdw-master-0: trf on Slave 1 failed:-5 write addr a011 count 0
[ 97.990595] soundwire_intel soundwire_intel.link.0: SCP Msg trf timed out
[ 97.990614] rt711-sdca sdw:0:025d:0711:01: Failed to set private value: 2000011 <= 047a ret=-5
[ 98.494605] soundwire_intel soundwire_intel.link.0: IO transfer timed out, cmd 3 device 1 addr 5c len 1
[ 98.494622] soundwire sdw-master-0: trf on Slave 1 failed:-110 write addr 5c count 0
[ 98.998600] soundwire_intel soundwire_intel.link.0: IO transfer timed out, cmd 3 device 1 addr 5d len 1
[ 98.998619] soundwire sdw-master-0: trf on Slave 1 failed:-110 write addr 5d count 0
[ 98.998629] rt711-sdca sdw:0:025d:0711:01: in rt711_sdca_jack_init enable
[ 98.998639] rt711-sdca sdw:0:025d:0711:01: rt711_sdca_set_jack_detect: end
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
Activity
plbossart commentedon May 12, 2022
@shumingfan @bardliao I am not sure what happens here
first, I don't understand why the component remove plays with the regcache.
Why is this necessary?
unfortunately, removing this doesn't seem to solve the problem.
I am starting to wonder if there are device timing restrictions here, or something that needs to be turned on before accessing the vendor-specific registers?
plbossart commentedon May 12, 2022
8b527e9 suggests removing those regcache changes, but that doesn't fix the issue.
plbossart commentedon May 13, 2022
@bardliao can I ask you to test #3642 (commit d2e9a6d)
this needs to be build without HDaudio link/codec support in make menuconfig
test.sh.txt
I tested on SKU 0A32 (TGL SDCA)
plbossart commentedon May 13, 2022
Also need thesofproject/sof#5813 with the HDMI commented out @bardliao
bardliao commentedon May 13, 2022
@plbossart I tested it on SKU 0A5E and no issue found. BTW, thesofproject/sof#5813 seems not work for me. I modified it as below.
I have to remove the HDMI part manually.
I also tried with SKU 0A32, but somehow snd_soc_sof_sdw is already in used after bootup. So I can't run the test on my SKU 0A32 device.
plbossart commentedon May 13, 2022
sorry @bardliao, yes the HDMI part has to be removed manually in the file as you did. This is just for tests, I don't want to have a new topology maintained here, just a quick hook to remove HDMI in one shot.
For the tests, I removed pulseaudio, otherwise the card is marked as in use.
bardliao commentedon May 16, 2022
No, sorry, @plbossart I didn't make it clear. I meant the change didn't work for me. I have to remove the HDMI related code from sof-icl-rt711-rt1308-rt715-hdmi.m4 manually. Like
and so on.
I can run the test and found no issue on SKU 0A32, too.
plbossart commentedon May 16, 2022
@bardliao I forgot to push a local change, now fixed with thesofproject/sof@ef9883d
bardliao commentedon May 17, 2022
It works now :)
plbossart commentedon May 17, 2022
@bardliao can you reproduce the issue with the timeout?
bardliao commentedon May 18, 2022
No, I didn't see any issue with #3642. I will test without #3642
bardliao commentedon May 18, 2022
@plbossart If I apply 861d91f and d2e9a6d only, I will see below error.
plbossart commentedon May 18, 2022
@bardliao the error above happens when you remove the rt1316 driver, right? That's what is reported already in #3531 and is fixed by the commit e850e40 ('soundwire: revisit driver bind/unbind and callbacks').
However I have not seen the error
what sequence did you use to see it?
EDIT: sorry, this was just a dev_dbg message
sound/soc/soc-core.c: dev_dbg(dai->dev, "ASoC: Unregistered DAI '%s'\n", dai->name);
plbossart commentedon May 18, 2022
@bardliao @shumingfan I can reproduce the error, even with #3657 applied on top.
The test has to be run in a loop though, it doesn't happen the first time.
while true; do bash ./test.sh; done
plbossart commentedon May 18, 2022
@bardliao please retry with the rebased code in #3645 commit 676ec0f
bardliao commentedon May 19, 2022
@plbossart I run the test.sh in loop with #3642. I got no error in more than one hour.
dmesg_mod_reload.txt
And I will get
BUG: kernel NULL pointer dereference, address: 00000000000003f0when I triedsudo modprobe -r snd-soc-sof-sdwif I apply #3645 only.dmesg_remove_machine.txt
shumingfan commentedon May 19, 2022
@plbossart I also run the test.sh on Dell SKU 0A5D (non-SDCA) with #3642. The 'timed out' messages doesn't happen.
The test run over two hours.
plbossart commentedon May 19, 2022
The test fails only on the SDCA skew @bardliao @shumingfan, it's related to the rt711-sdca codec driver.
plbossart commentedon May 19, 2022
Cannot reproduce this with the changes in #3642
ASoC: codecs: soundwire: call pm_runtime_resume() in component probe
ASoC: codecs: soundwire: call pm_runtime_resume() in component probe
ASoC: codecs: soundwire: call pm_runtime_resume() in component probe
ASoC: codecs: soundwire: call pm_runtime_resume() in component probe
ASoC: codecs: soundwire: call pm_runtime_resume() in component probe
ASoC: codecs: soundwire: call pm_runtime_resume() in component probe