linux icon indicating copy to clipboard operation
linux copied to clipboard

[BUG] Acer Swift Go 14 - No sound card detected - "No SoundWire machine driver found"

Open rodrigovivi opened this issue 1 year ago • 105 comments

Describe the bug No sound card detected on a laptop - Acer Swift Go 14

System : Fedora 40

Packages : Fedora: alsa-sof-firmware-2024.03-2.fc40.noarch alsa-firmware-1.2.4-12.fc40.noarch

And even with manually installing: sof-bin-2024.03.tar.gz

To Reproduce Install Linux on this Acer laptop.

sudo modprobe -r snd_sof_pci_intel_mtl sudo modprobe snd_sof_pci_intel_mtl

Reproduction Rate All the time

Expected behavior The sound card should be detected.

Impact showstopper It is necessary for meeting.

Environment

Branch name and commit hash of the 2 repositories: sof (firmware/topology) and linux (kernel driver). Kernel: : vmlinuz-6.8.5-300.fc40.x86_64 or Linus 6.9.0-rc3+ SOF: sof-bin-2024.03 Name of the topology file Topology file: intel/sof-ace-tplg/sof-hda-generic-idisp-2ch.tplg Name of the platform(s) on which the bug is observed. Platform: Acer Swift Go 14 Screenshots or console output

** No SoundWire machine driver found **

[  119.281924] sof-audio-pci-intel-mtl 0000:00:1f.3: DSP detected with PCI class/subclass/prog-if info 0x040100
[  119.281952] sof-audio-pci-intel-mtl 0000:00:1f.3: SoundWire enabled on CannonLake+ platform, using SOF driver
[  119.282189] sof-audio-pci-intel-mtl 0000:00:1f.3: DSP detected with PCI class/subclass/prog-if 0x040100
[  119.282297] sof-audio-pci-intel-mtl 0000:00:1f.3: bound 0000:00:02.0 (ops i915_audio_component_bind_ops [i915])
[  119.289796] sof-audio-pci-intel-mtl 0000:00:1f.3: use msi interrupt mode
[  119.303215] sof-audio-pci-intel-mtl 0000:00:1f.3: No SoundWire machine driver found
[  119.303218] sof-audio-pci-intel-mtl 0000:00:1f.3: hda codecs found, mask 4
[  119.303220] sof-audio-pci-intel-mtl 0000:00:1f.3: using HDA machine driver skl_hda_dsp_generic now
[  119.303224] sof-audio-pci-intel-mtl 0000:00:1f.3: DMICs detected in NHLT tables: 2
[  119.304432] sof-audio-pci-intel-mtl 0000:00:1f.3: SOF firmware and/or topology file not found.
[  119.304434] sof-audio-pci-intel-mtl 0000:00:1f.3: Supported default profiles
[  119.304435] sof-audio-pci-intel-mtl 0000:00:1f.3: - ipc type 1 (Requested):
[  119.304437] sof-audio-pci-intel-mtl 0000:00:1f.3:  Firmware file: intel/sof-ipc4/mtl/sof-mtl.ri
[  119.304438] sof-audio-pci-intel-mtl 0000:00:1f.3:  Topology file: intel/sof-ace-tplg/sof-hda-generic-idisp-2ch.tplg
[  119.304440] sof-audio-pci-intel-mtl 0000:00:1f.3: Check if you have 'sof-firmware' package installed.
[  119.304441] sof-audio-pci-intel-mtl 0000:00:1f.3: Optionally it can be manually downloaded from:
[  119.304442] sof-audio-pci-intel-mtl 0000:00:1f.3:    https://github.com/thesofproject/sof-bin/
[  119.304470] sof-audio-pci-intel-mtl 0000:00:1f.3: Direct firmware load for (null)/(null) failed with error -2
[  119.304473] sof-audio-pci-intel-mtl 0000:00:1f.3: error: sof firmware file is missing, you might need to
[  119.304474] sof-audio-pci-intel-mtl 0000:00:1f.3:        download it from https://github.com/thesofproject/sof-bin/
[  119.304475] sof-audio-pci-intel-mtl 0000:00:1f.3: error: failed to load DSP firmware -2
[  119.306005] sof-audio-pci-intel-mtl 0000:00:1f.3: error: sof_probe_work failed err: -2

alsa-info.txt

rodrigovivi avatar Apr 12 '24 18:04 rodrigovivi

@rodrigovivi if you have 2 DMICs and no HDaudio external codec, then chances are the configuration is similar to the HP SoundWire versions.

Can you add this file sof-dyndbg.conf.txt as /etc/modprobe.d/sof-dyndbg.conf, reboot then attach the dmesg log.

Also provide the result of

cat /sys/bus/acpi/devices/*/adr  | grep 025d

plbossart avatar Apr 12 '24 19:04 plbossart

$ cat /sys/bus/acpi/devices/*/adr | grep 025d 0x000030025d071201

rodrigovivi avatar Apr 12 '24 21:04 rodrigovivi

Thanks @rodrigovivi, so you have one RT712 on SoundWire link0, 2 DMICs and HDMI support with iDISP.

[   14.813241] soundwire_intel:sdw_intel_probe_controller: acpi PRP00001:00: Creating 4 SDW Link devices
[   14.813350] soundwire_bus:sdw_extract_slave_id: soundwire sdw-master-0-0: SDW Slave Addr: 30025d071201
[   14.813352] soundwire_bus:sdw_extract_slave_id: soundwire sdw-master-0-0: SDW Slave class_id 0x01, mfg_id 0x025d, part_id 0x0712, unique_id 0x0, version 0x3
[   14.813487] snd_sof_intel_hda:hda_codec_probe: sof-audio-pci-intel-mtl 0000:00:1f.3: HDA codec thesofproject/sof#2 probed OK: response: 8086281d

of course we don't support this configuration...

Usually we have a RT712 for jack/amp and the RT1712 for the DMIC. Here the latter seems replaced by the PCH-attached DMIC.

wow. I'll start cooking up a patch shortly.

plbossart avatar Apr 12 '24 21:04 plbossart

@rodrigovivi can you try the patch in PR thesofproject/sof#4925 and also unzip/copy this file sof-mtl-rt712-l0-2ch.tplg.gz in /lib/firmware/intel/sof-ipc4-tplg/

Reboot and attach the results. You should see a sound card if I didn't screw up the indices.

Thanks!

plbossart avatar Apr 12 '24 21:04 plbossart

dmesg-audio-with-patch-take-1.txt It goes further, then it fails... [ 16.204785] snd_sof:sof_route_load: sof-audio-pci-intel-mtl 0000:00:1f.3: sink module-copier.101.2 control none source eqiir.101.1 [ 16.204786] sof_sdw sof_sdw: ASoC: physical link dmic01 (id 4) not exist [ 16.204787] sof_sdw sof_sdw: ASoC: topology: could not load header: -22 [ 16.204832] sof-audio-pci-intel-mtl 0000:00:1f.3: error: tplg component load failed -22 [ 16.204834] sof-audio-pci-intel-mtl 0000:00:1f.3: error: failed to load DSP topology -22 [ 16.204835] sof-audio-pci-intel-mtl 0000:00:1f.3: ASoC: error at snd_soc_component_probe on 0000:00:1f.3: -22 [ 16.204845] sof_sdw sof_sdw: ASoC: failed to instantiate card -22 [ 16.204882] sof_sdw sof_sdw: error -EINVAL: snd_soc_register_card failed -22 [ 16.204888] sof_sdw sof_sdw: probe with driver sof_sdw failed with error -22

rodrigovivi avatar Apr 13 '24 01:04 rodrigovivi

Ok that's probably the topology file, I don't really understand how the indices are handled. @bardliao can you take a look?

plbossart avatar Apr 13 '24 13:04 plbossart

one important information here: the sound over USB works pretty well even without this patch. USB speaker and USB headset works well. only the native laptop speakers and mic doesn't work. I was surprised by that over the weekend. So, I really can do meetings on this laptop and sound works for my regular case. But I'm still up to test any patch here and get this product really working out of the box. There might be users out there who really depend on the native speakers/mic.

rodrigovivi avatar Apr 14 '24 19:04 rodrigovivi

@rodrigovivi Can you try sof-mtl-rt712-l0-2ch.zip?

[   16.204349] snd_soc_sof_sdw:sof_card_dai_links_create: sof_sdw sof_sdw: sdw 3, ssp 0, dmic 2, hdmi 3, bt: 0
[   16.204350] snd_soc_sof_sdw:init_dai_link: sof_sdw sof_sdw: create dai link SDW0-Playback-SimpleJack, id 0
[   16.204371] snd_soc_sof_sdw:init_dai_link: sof_sdw sof_sdw: create dai link SDW0-Capture-SimpleJack, id 1
[   16.204372] snd_soc_sof_sdw:init_dai_link: sof_sdw sof_sdw: create dai link SDW0-Playback-SmartAmp, id 2
[   16.204372] snd_soc_sof_sdw:init_dai_link: sof_sdw sof_sdw: create dai link dmic01, id 3
[   16.204373] snd_soc_sof_sdw:init_dai_link: sof_sdw sof_sdw: create dai link dmic16k, id 4
[   16.204375] snd_soc_sof_sdw:init_dai_link: sof_sdw sof_sdw: create dai link iDisp1, id 5
[   16.204376] snd_soc_sof_sdw:init_dai_link: sof_sdw sof_sdw: create dai link iDisp2, id 6
[   16.204377] snd_soc_sof_sdw:init_dai_link: sof_sdw sof_sdw: create dai link iDisp3, id 7

The dmic01 id is 3. I modified the indices in the topology.

bardliao avatar Apr 15 '24 03:04 bardliao

The dmic01 id is 3. I modified the indices in the topology.

@bardliao is this because we don't have the amp feedback on rt712?

plbossart avatar Apr 15 '24 14:04 plbossart

one important information here: the sound over USB works pretty well even without this patch. USB speaker and USB headset works well. only the native laptop speakers and mic doesn't work. I was surprised by that over the weekend. So, I really can do meetings on this laptop and sound works for my regular case. But I'm still up to test any patch here and get this product really working out of the box. There might be users out there who really depend on the native speakers/mic.

Yes, BT and USB are orthogonal to the Intel IP for audio, so they might work even if the DSP doesn't. Still there's no reason why this configuration wouldn't work with minor tweaks, as you said there will be lots of others who need jack/speaker/mic.

plbossart avatar Apr 15 '24 15:04 plbossart

The dmic01 id is 3. I modified the indices in the topology.

@bardliao is this because we don't have the amp feedback on rt712?

Yes.

bardliao avatar Apr 16 '24 00:04 bardliao

with dmic01 id 3 it goes further, and then it fails: [ 18.577436] sof_sdw sof_sdw: ASoC: physical link dmic16k (id 5) not exist

dmesg-audio-dmic01-id-3.txt

rodrigovivi avatar Apr 16 '24 02:04 rodrigovivi

with dmic01 id 3 it goes further, and then it fails: [ 18.577436] sof_sdw sof_sdw: ASoC: physical link dmic16k (id 5) not exist

dmesg-audio-dmic01-id-3.txt

@rodrigovivi Thanks for testing. Could you try sof-mtl-rt712-l0-2ch.zip?

bardliao avatar Apr 16 '24 06:04 bardliao

@rodrigovivi Do you have a chance to test sof-mtl-rt712-l0-2ch.zip? We will merge https://github.com/thesofproject/sof/pull/9041 if the test result is positive.

bardliao avatar Apr 25 '24 09:04 bardliao

@rodrigovivi Do you have a chance to test sof-mtl-rt712-l0-2ch.zip? We will merge thesofproject/sof#9041 if the test result is positive.

Hello everyone! I'm also having this issue in a Swift SFG14-72 running latest Ubuntu 24.04. I tried the linked topology and it didn't work for me. Is this ticket going to be continued in issue 9085? Is there something I can help to debug this?

franc5 avatar Apr 27 '24 12:04 franc5

@rodrigovivi Do you have a chance to test sof-mtl-rt712-l0-2ch.zip? We will merge thesofproject/sof#9041 if the test result is positive.

Hello everyone! I'm also having this issue in a Swift SFG14-72 running latest Ubuntu 24.04. I tried the linked topology and it didn't work for me. Is this ticket going to be continued in issue 9085? Is there something I can help to debug this?

@franc5 You need to apply https://github.com/thesofproject/linux/pull/4925 to your kernel. And from https://github.com/thesofproject/linux/issues/4970, https://github.com/thesofproject/sof/pull/9041 should be good. The DSP panic looks like a different issue.

bardliao avatar Apr 29 '24 05:04 bardliao

I'm sorry for the late reply here. With the latest sof-mtl-rt712-l0-2ch.zip I do can see the output audio enumerated, but no sound is audible when testing the speakers. also no microfone enumerated. dmesg-apr-29.txt

rodrigovivi avatar Apr 29 '24 14:04 rodrigovivi

@rodrigovivi I don't know what's going on with GitHub but your attached dmesg-apr-29 didn't go through.

plbossart avatar Apr 29 '24 14:04 plbossart

@rodrigovivi I don't see anything wrong in the dmesg log. The speakers probably miss a mixer config. For the dmics, I don't really understand what you meant by "no microphone enumerated". what is the output of 'arecord -l' ?

plbossart avatar Apr 29 '24 14:04 plbossart

The Gnome Settings shows the output device, but even with tuning the volume, nothing is audible. But for the input devices it just shows: "No Input device"

$ arecord -l **** List of CAPTURE Hardware Devices **** card 1: sofsoundwire [sof-soundwire], device 1: Jack In () [] Subdevices: 1/1 Subdevice #0: subdevice #0 card 1: sofsoundwire [sof-soundwire], device 10: DMIC Raw () [] Subdevices: 1/1 Subdevice #0: subdevice #0

$ amixer Simple mixer control 'Master',0 Capabilities: pvolume pswitch pswitch-joined Playback channels: Front Left - Front Right Limits: Playback 0 - 65536 Mono: Front Left: Playback 49806 [76%] [on] Front Right: Playback 49806 [76%] [on] Simple mixer control 'Capture',0 Capabilities: cvolume cswitch cswitch-joined Capture channels: Front Left - Front Right Limits: Capture 0 - 65536 Front Left: Capture 49806 [76%] [on] Front Right: Capture 49806 [76%] [on]

rodrigovivi avatar Apr 29 '24 16:04 rodrigovivi

that's because you don't have a UCM file.

Try capturing something with "arecord -Dhw:0,10 -c2 -r48000 -fS32_LE -d10 test.wav" and see if there's any sound coming in.

plbossart avatar Apr 29 '24 16:04 plbossart

I couldn't hear anything... then I plugged the usb-audio, where I can hear stuff and I played it again and still couldn't hear anything. so, still output is listed, but it doesn't work. input is not listed and even arecord directly didn't worked.

rodrigovivi avatar Apr 29 '24 16:04 rodrigovivi

"arecord directly didn't work" Did you mean that the recorded file is silent, or that some sort of error happened. It could be that we are using the 'wrong' set of channels, the interface supports 4 channels so if the OEM picks 2 we have a chance on using the pdm1 instead of classic pdm0.

plbossart avatar Apr 29 '24 16:04 plbossart

silent! I couldn't listen to anything...

rodrigovivi avatar Apr 29 '24 16:04 rodrigovivi

ok, so we need to try the 4ch setup and see if the channels 2-3 are used

Can you add this in a .conf file in /etc/modprobe.d/

options snd_sof_intel_hda_common dmic_num=4

and unzip/add this topology file sof-mtl-rt712-l0-4ch.tplg.gz

if you can record something and share the wav file that would be great.

plbossart avatar Apr 29 '24 17:04 plbossart

Oh and the number of channels needs to change of course:

arecord -Dhw:0,10 -c4 -r48000 -fS32_LE -d10 test.wav

plbossart avatar Apr 29 '24 17:04 plbossart

$ find /lib/firmware/intel/sof-ipc4-tplg/ | grep sof-mtl-rt712-l0-4ch /lib/firmware/intel/sof-ipc4-tplg/sof-mtl-rt712-l0-4ch.tplg

$ cat /proc/cmdline BOOT_IMAGE=(hd0,gpt3)/vmlinuz-6.9.0-rc3+ root=/dev/mapper/fedora-root ro rd.lvm.lv=fedora/root rd.luks.uuid=luks-7ba20335-722d-4a79-9c82-451033b7ceb4 snd_sof_intel_hda_common.dmic_num=4 rhgb quiet

$ arecord -Dhw:0,10 -c4 -r48000 -fS32_LE -d10 test-4ch.wav arecord: set_params:1398: Channels count non available

dmesg-apr-30.txt

rodrigovivi avatar May 01 '24 01:05 rodrigovivi

Not following what goes sideways, we do add the 4ch count

"cavs-sdw\;sof-mtl-rt712-l0-4ch\;PLATFORM=mtl,NUM_SDW_AMP_LINKS=1,\
SDW_AMP_FEEDBACK=false,SDW_SPK_STREAM=Playback-SmartAmp,\
SDW_JACK_OUT_STREAM=Playback-SimpleJack,SDW_JACK_IN_STREAM=Capture-SimpleJack,\
NUM_DMICS=4,PDM1_MIC_A_ENABLE=1,PDM1_MIC_B_ENABLE=1,DMIC0_ID=3,DMIC1_ID=4,\
PREPROCESS_PLUGINS=nhlt,NHLT_BIN=nhlt-sof-mtl-rt712-l0-4ch.bin,\
HDMI1_ID=5,HDMI2_ID=6,HDMI3_ID=7"

It's possible though that somehow we use the NHLT blob coming from ACPI tables.

But at the same time, I see

[  483.498873] snd_sof:sof_ipc4_prepare_copier_module: sof-audio-pci-intel-mtl 0000:00:1f.3: copier host-copier.10.capture: reference output rate 48000, channels 2

so not sure what's going on. @bardliao @ranj063 any ideas?

plbossart avatar May 01 '24 14:05 plbossart