Skip to content
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

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

Closed
rodrigovivi opened this issue Apr 12, 2024 · 37 comments · Fixed by #4925
Closed
Labels
MTL Applies to Meteor Lake platform. SDW Applies to SoundWire bus for codec connection

Comments

@rodrigovivi
Copy link

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

@plbossart
Copy link
Member

@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 plbossart added SDW Applies to SoundWire bus for codec connection MTL Applies to Meteor Lake platform. labels Apr 12, 2024
@rodrigovivi
Copy link
Author

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

@rodrigovivi
Copy link
Author

@plbossart
Copy link
Member

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 added a commit to plbossart/sound that referenced this issue Apr 12, 2024
This device has an RT712 on link0, but does not rely on RT1712 for the
DMIC. PCH-attached DMICs are used instead.

Closes: thesofproject#4923
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
@plbossart
Copy link
Member

@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 added a commit to plbossart/sof that referenced this issue Apr 12, 2024
This device has RT712 on link0 2 PCH-attached DMICs.

Add 3 configurations with no DMIC, 4 DMIC and 2 DMIC. For now no
support for -pdm1.

Link: thesofproject/linux#4923
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
@rodrigovivi
Copy link
Author

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

@plbossart
Copy link
Member

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

@rodrigovivi
Copy link
Author

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.

@bardliao
Copy link
Collaborator

@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.

@plbossart
Copy link
Member

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 added a commit to plbossart/sof that referenced this issue Apr 15, 2024
This device has RT712 on link0 2 PCH-attached DMICs.

Add 3 configurations with no DMIC, 4 DMIC and 2 DMIC. For now no
support for -pdm1.

Link: thesofproject/linux#4923
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
@plbossart
Copy link
Member

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.

@bardliao
Copy link
Collaborator

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.

@rodrigovivi
Copy link
Author

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

@bardliao
Copy link
Collaborator

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?

plbossart added a commit to plbossart/sof that referenced this issue Apr 16, 2024
This device has RT712 on link0 2 PCH-attached DMICs.

Add 3 configurations with no DMIC, 4 DMIC and 2 DMIC. For now no
support for -pdm1.

Link: thesofproject/linux#4923
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
plbossart added a commit that referenced this issue Apr 19, 2024
This device has an RT712 on link0, but does not rely on RT1712 for the
DMIC. PCH-attached DMICs are used instead.

Closes: #4923
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
@bardliao
Copy link
Collaborator

@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.

intel-lab-lkp pushed a commit to intel-lab-lkp/linux that referenced this issue Apr 26, 2024
This device has an RT712 on link0, but does not rely on RT1712 for the
DMIC. PCH-attached DMICs are used instead.

Closes: thesofproject#4923
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
plbossart added a commit that referenced this issue Apr 26, 2024
This device has an RT712 on link0, but does not rely on RT1712 for the
DMIC. PCH-attached DMICs are used instead.

Closes: #4923
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
@franc5
Copy link

franc5 commented Apr 27, 2024

@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?

@bardliao
Copy link
Collaborator

@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 #4925 to your kernel. And from #4970, thesofproject/sof#9041 should be good. The DSP panic looks like a different issue.

@rodrigovivi
Copy link
Author

rodrigovivi commented Apr 29, 2024

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

@plbossart
Copy link
Member

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

@rodrigovivi
Copy link
Author

dmesg-apr-29.txt

@plbossart
Copy link
Member

@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 plbossart reopened this Apr 29, 2024
@rodrigovivi
Copy link
Author

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]

@plbossart
Copy link
Member

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.

@rodrigovivi
Copy link
Author

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.

@plbossart
Copy link
Member

"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.

@rodrigovivi
Copy link
Author

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

@plbossart
Copy link
Member

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
Copy link
Member

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

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

@rodrigovivi
Copy link
Author

$ 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

bardliao pushed a commit to bardliao/sof that referenced this issue May 1, 2024
This device has RT712 on link0 2 PCH-attached DMICs.

Add 3 configurations with no DMIC, 4 DMIC and 2 DMIC. For now no
support for -pdm1.

Link: thesofproject/linux#4923
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
@plbossart
Copy link
Member

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?

@bardliao
Copy link
Collaborator

bardliao commented May 2, 2024

Maybe try "options snd_sof_intel_hda_common sof_use_tplg_nhlt=1" to use the nhlt in the topology first?

@rodrigovivi
Copy link
Author

options snd_sof_intel_hda_common sof_use_tplg_nhlt=1
and
options snd_sof_intel_hda_common dmic_num=4
?

@plbossart
Copy link
Member

yes both options @rodrigovivi

@rodrigovivi
Copy link
Author

Using both: $ cat /proc/cmdline
[snip]
snd_sof_intel_hda_common.sof_use_tplg_nhlt=1 snd_sof_intel_hda_common.dmic_num=4

dmesg-may13.txt

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

mic still not listed in the gnome sound configuration.

@plbossart
Copy link
Member

for some reason, even with the 4ch option the kernel selects the 2ch topology

[   15.253637] sof-audio-pci-intel-mtl 0000:00:1f.3: DMICs detected in NHLT tables: 2
[   15.253639] snd_sof_intel_hda_generic:hda_sdw_machine_select: sof-audio-pci-intel-mtl 0000:00:1f.3: SoundWire machine driver sof_sdw topology sof-mtl-rt712-l0-2ch.tplg

Not sure why that is the case.

My money is on the option not being selected, if you enable dynamic debug you should see this, but it's not in your log...

/* allow for module parameter override */
	if (dmic_num_override != -1) {
		dev_dbg(sdev->dev,
			"overriding DMICs detected in NHLT tables %d by kernel param %d\n",
			dmic_num, dmic_num_override);
		dmic_num = dmic_num_override;
	}

@rodrigovivi
Copy link
Author

what debug config and/or levels do you need?
But what to do to allow the override and not end up in this place.

@plbossart
Copy link
Member

plbossart commented May 13, 2024

just make sure the sof-dyndbg.conf file exists in /etc/modprobe.d/ as described earlier in #4923 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
MTL Applies to Meteor Lake platform. SDW Applies to SoundWire bus for codec connection
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants