-
Notifications
You must be signed in to change notification settings - Fork 132
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] No sound Lenovo X1 Fold 16 Gen 1 #5274
Comments
No, it looks like a speaker only configuration. @leskunberg Can you confirm that there is no jack supported by the laptop? |
According to https://www.lenovo.com/ie/en/p/laptops/thinkpad/thinkpadx1/thinkpad-x1-fold/len101t0047#ports_slots, it has not jack. |
I can confirm it does not have a headphone jack. As a work around I was using a USB-C to 2.5mm converter. That is working without any problems on all USB-C ports. |
@leskunberg Can you try #5275? And the topology file: |
The kernel referenced in #5275 has been built and it has attempted to load the topology file. Here is the resulting alsa-info A noteworthy part:
The file certainly exists
Pacman output showing sof-firmware:
Does the topology file require special handling? I am loading it with the following modprobe:
|
@leskunberg, the path should be relative to the firmware dir, so:
But in theory you can drop both the path and the filename parameter. |
@leskunberg, there is really no need to specify the |
Thank you @ujfalusi ! That did it. Here is the updated alsa-info
|
@bardliao, We still don't have a machine driver match? |
It seems a little strange that when greping for speakers via acpi only two devices show up. There should be a third shouldn't there?
|
@leskunberg Can you share the output of "uname -a"? Just want to make sure you are booting with your kernel.
And as @ujfalusi mentioned, please remove the And please add sof-dyndbg.conf.txt to the /etc/modprobe.d/ folder to get more debug log. Regarding the speaker locations, I assume 0x000232025d131601 is for the left speaker and 0x000030025d131601 is the right speaker. I have no idea about the third speaker. However, a rt1316 amp can support 2 speakers. So, maybe one rt1316 driver 1 speaker and the other rt1316 driver 2 speakers. I guess the UCM needs to be changed if we want to support that configuration. |
and to me it looks like that two of the three can be used at any given time, one is 'fixed' the other is selected based on the device fold status. |
uname -a:
I do have the sof-dyndbg.conf loaded via modprobe: (trimmed for scrolling) Here is the updated alsa-info. The correct topology file does not seem to load. I have also removed the |
Interesting that the amp supports two speakers. As a guess the speaker selection should probably be done outside the kernel(certainly outside the scope of this work). There likely needs to be some sort of event that detects what orientation the device is in and toggles which speakers are active. Maybe this can be done with a custom lua config for pipewire This is my first escapade into the sound side of the kernel. Forgive the elementary questions. |
@leskunberg, can you share the |
raw text sof.txt |
OK, it is still eaten up :( |
@leskunberg , can you edit the #5274 (comment) and remove the inline kernel log to make scrolling a bit less effort ;) |
Full dmesg |
@leskunberg We need to figure out why soundwire machine driver is not select. Please add git diff
diff --git a/sound/soc/soc-acpi.c b/sound/soc/soc-acpi.c
index 270f9777942f..dbd2a5e3fab1 100644
--- a/sound/soc/soc-acpi.c
+++ b/sound/soc/soc-acpi.c
@@ -145,9 +145,13 @@ bool snd_soc_acpi_sdw_link_slaves_found(struct device *dev,
link_id = SDW_DISCO_LINK_ID(adr);
version = SDW_VERSION(adr);
+ dev_info(dev, "bard: checking adr %llx \n", adr);
for (j = 0; j < peripherals->num_peripherals; j++) {
struct sdw_slave *peripheral = peripherals->array[j];
+ dev_info(dev, "bard: peripheral %d link_id %d part_id %#x mfg_id %#x version %#x\n",
+ j, peripheral->bus->link_id, peripheral->id.part_id,
+ peripheral->id.mfg_id, peripheral->id.sdw_version);
/* find out how many identical parts were reported on that link */
if (peripheral->bus->link_id == link_id &&
peripheral->id.part_id == part_id &&
diff --git a/sound/soc/sof/intel/hda.c b/sound/soc/sof/intel/hda.c
index 720803dadee8..b710208f26d0 100644
--- a/sound/soc/sof/intel/hda.c
+++ b/sound/soc/sof/intel/hda.c
@@ -1108,6 +1108,7 @@ static struct snd_soc_acpi_mach *hda_sdw_machine_select(struct snd_sof_dev *sdev
return NULL;
}
+ dev_info(sdev->dev, "bard: link_mask %#x\n", link_mask);
/*
* Select SoundWire machine driver if needed using the
* alternate tables. This case deals with SoundWire-only
@@ -1124,6 +1125,7 @@ static struct snd_soc_acpi_mach *hda_sdw_machine_select(struct snd_sof_dev *sdev
* link_mask supported by hw and then go on searching
* link_adr
*/
+ dev_info(sdev->dev, "bard: mach link_mask %#x\n", mach->link_mask);
if (~link_mask & mach->link_mask)
continue; Then share the dmesg again, thanks. |
It is currently being loaded in the following:
|
@leskunberg and just to be sure can you check if you really have the patch from #5275 :
if you don't then:
|
Looks like the kernel didn't have the patch, it does now. Here is the updated dmesg output: One thing of note is that the topology file originally couldn't be found as the naming
There seems to be more interesting log output in dmesg as well |
@bardliao did you generate the topology file manually? Looks like a missing stream name in the topology causing the failure to connect? |
Looks like we made some progress. |
Excellent. Here is the new output:
Full dmesg: |
@bardliao, why it wants to connect
|
There are 4 iDisp PCMs in topology1 topologies by default. Let me change it to 3. |
@leskunberg Can you try the topology? |
@bardliao, for me iDisp1-4 is created, but in the case of Fold, only iDisp1-3. Confusing. |
Full dmesg: |
If SOF_SDW_TGL_HDMI quirk is set in the machine driver, iDisp1-4 will be created. |
Here you go @leskunberg |
@bardliao we are getting close. There is now the option to select a new audio output, and see that there is a left and a right channel test, but when clicking on either it freezes. No sound comes on when playing a video either.
dmesg has lots of interesting logs: |
Additional Dmesg log for when attempting to play something in firefox:
|
@leskunberg Please try sof-adl-rt1316-l02-4ch.zip The error of "SDW0 Pin2" is that the "SDW0 Pin2" DAI was missed in the previous topology. |
@bardliao looks like the configuration options have disappeared and I cannot see the card in alsamixer
Dmesg: |
@leskunberg Thanks for testing. Please try sof-adl-rt1316-l02-4ch.zip. Hope it works. |
We have success! All speakers are producing sound and things have cleaned up quite a bit on the menus. The only issue is that the R and L channels are swapped. Thank you for the help @bardliao |
@leskunberg It should be easy to fix the swapped issue. Please apply the updated #5275 and the topology. |
@bardliao Can confirm that both the kernel patch and the new topology works great. Thank you very much for all the hard work @bardliao and @ujfalusi. This is great. |
After running some further tests this weekend, there has been an error popping up in dmesg: """ |
I guess that is fine. I can see |
@bardliao, the firmware reports error for the 0x60010000 message for the second and third HDMI PCM (pcm6 and pcm7), the error is -5. I cannot reproduce the issue locally on my TGL sdw machine :( |
It is important to note there is no external devices plugged into the unit. Testing the most recent patch and tplg over the past week has not yeilded any noticeable bugs. |
Describe the bug
No sound comes from any of the unit speakers(There are 3). The configuration seems correct. The DMIC works correctly. Bluetooth works correctly. Using the USB-C port to a headphone jack also works correctly.
To Reproduce
Install arch linux with kernel 6.12.4 then boot the laptop. Same result with Ubuntu 24.10
Reproduction Rate
Always
Expected behavior
Sound should come from the speakers
Impact
No audio, which is annoying
Environment
Screenshots or console output
Alsa-info
Any help would be greatly appreciated!
The text was updated successfully, but these errors were encountered: