-
Notifications
You must be signed in to change notification settings - Fork 131
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
[FEATURE] Add support for sof-adl-rt711-2ch on HP Omen 16-k0005TX #3727
Comments
@AlecJY unfortunately it's likely that we will need topology and machine driver changes to support this HP platform. It's not the first time this happens, it was the same mess with TigerLake. Can you please add this file If you can also add the result of
and
|
And the result of the two commands $ ls /sys/bus/soundwire/devices/
sdw:0:025d:0711:00 sdw:0:025d:0711:01:0 sdw:3:025d:1316:01:0 sdw-master-0 sdw-master-1 $ cat /sys/bus/acpi/devices/*/adr | grep 025d
0x000020025d071100
0x000120025d071100 |
Thanks @AlecJY ok, so the BIOS/DSDT is completely wrong. HP declared the SAME rt711 (headset) on two links, but in reality it's really a rt711-sdca (new version!) on link0 and rt1316 on link1. What a complete fail. I'll prepare a set of patches but you'll have to compile your own kernel |
The DSDT does not only list twice the same RT711 on different links - and missed the RT1316 amplifier - but it also shows the wrong version. Add a remapping table to work-around these BIOS shenanigans. BugLink: https://github.com/thesofproject/sof/issues/5955 Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
This device has an RT711-SDCA headset codec on link0 and an RT1316 amplifier on link1. BugLink: https://github.com/thesofproject/sof/issues/5955 Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
FIXME: The JD type needs to be checked. BugLink: https://github.com/thesofproject/sof/issues/5955 Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
@AlecJY if you don't know how to build the kernel, see https://thesofproject.github.io/latest/getting_started/setup_linux/prepare_build_environment.html and |
FIXME: The JD type needs to be checked. BugLink: https://github.com/thesofproject/sof/issues/5955 Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
The soundcard still did not work, and there's nothing under |
@AlecJY you seem to have a kernel configuration issue. Make sure that SOF is enabled. You can also use 'blacklist snd-hda-intel' to see what happens. Here are a set of configs you'll need:
|
I found that There is something changed in
|
ok, so the remapping seems to work but the wrong topology is still chosen
|
No that's wrong:
I may have things mixed-up in the 64-bit values. |
should be
|
It seems there's a disconnect in some of the earlier reports @AlecJY Can you revert to plain vanilla v5.19-rc2 kernel, without any of my 3 patches, and provide the dmesg log and two commands $ ls /sys/bus/soundwire/devices/ |
And better yet, extract the DSDT from this device apt install acpica-tools and attach dsdt.dsl.txt Thanks! |
$ ls /sys/bus/soundwire/devices/
sdw:0:025d:0711:00 sdw:0:025d:0711:01:0 sdw:3:025d:1316:01:0 sdw-master-0 sdw-master-1 $ cat /sys/bus/acpi/devices/*/adr | grep 025d
0x000020025d071100
0x000120025d071100 |
thanks @AlecJY wow, that's weird. there isn't an entry in the DSDT table for the 1316 device, so no idea how it shows up in the device list. |
Some devices advertise RT711 (version1) but use RT711-SDCA (version2). It's very confusing and adds complexity with unique numbers taken into account by mistakes - there are not identical chips. Follow the DT implementation and add the version_id when adding ACPI devices. BugLink: thesofproject#3727 Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
@AlecJY I have a hunch that the coexistence between RT711 (v2) and RT711-sdca (v3) creates all kinds of problems with device names that conflicts. Can you retest v5.19-rc2 with this patch on top? https://github.com/thesofproject/linux/commit/33978383df6caa0ba076701598571d17b6d62272.patch |
|
Thanks @AlecJY I will need to spend more time on this, this configuration seems to create a lot of problems. I can't figure out why the first device sdw:0:025d:0711:2:00 is missing the extension (unique ID) and why we are missing the second device 0x000120025d071100 |
$ ls /sys/bus/soundwire/devices/
sdw:0:025d:0711:2:00 sdw-master-0 sdw-master-1 $ cat /sys/bus/acpi/devices/*/adr | grep 025d
0x000020025d071100
0x000120025d071100 |
Ah yes, echo reference is exposed for rt1316 so there's an off-by-one. Try this updated file @AlecJY |
@plbossart Yes, the change looks good to me. |
The sound card works!!! It seems that the speakers, microphones and headset jack work normally. Thank you. There is only one thing I'm not sure if it is a bug. When I tried to record sound with the headset microphone using Audacity, only the right channel received the sound. However, both channels worked on Windows. |
Great, thanks @AlecJY for the reports. Can you try to change this code to see if this changes the headset detection? diff --git a/sound/soc/intel/boards/sof_sdw.c b/sound/soc/intel/boards/sof_sdw.c
index eede9b55e06f..f50f20e958d2 100644
--- a/sound/soc/intel/boards/sof_sdw.c
+++ b/sound/soc/intel/boards/sof_sdw.c
@@ -332,7 +332,7 @@ static const struct dmi_system_id sof_sdw_quirk_table[] = {
DMI_MATCH(DMI_PRODUCT_NAME, "OMEN by HP Gaming Laptop 16-k0xxx"),
},
.driver_data = (void *)(SOF_SDW_TGL_HDMI |
- RT711_JD2),
+ RT711_JD1),
},
/* MeteorLake devices */
{ |
While tinkering with ACPI work-arounds for the HP Omen 16 support, we identified a corner case where the headset codec device properties are not set in the codec .init when -EPROBE_DEFER is returned, but released unconditionally in the .exit(). This leads to a kernel oops [ 4.186891] sof_sdw sof_sdw: snd_soc_register_card failed -517 [ 4.186896] BUG: kernel NULL pointer dereference, address: 00000000000003f0 [ 4.186914] Oops: 0000 [#1] PREEMPT SMP NOPTI [ 4.186926] RIP: 0010:dev_fwnode+0x5/0x20 [ 4.186974] device_remove_software_node+0x10/0x80 [ 4.186982] sof_sdw_rt711_exit+0x19/0x30 [snd_soc_sof_sdw] [ 4.186990] mc_dailink_exit_loop+0x94/0xc0 [snd_soc_sof_sdw] [ 4.186996] ? rt711_rtd_init+0x170/0x170 [snd_soc_sof_sdw] A similar error case can occur if the addition of the device property fails. We need to test if the property was successfully added before removing it. BugLink: thesofproject#3727 Fixes: 768ad6d ("ASoC: Intel: sof_sdw: handle errors on card registration") Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Still have the same problem. |
@shumingfan can you help with the jack settings? It's surprising that JD1 or JD2 doesn't seem to have an effect, and I am not sure what could happen with the left channel silent. I am not sure what could possibly happen, headset mics are typically mono, maybe an OMTP/CTIA issue? |
@AlecJY Could you dump registers while recording? Another test I want to try is the loopback that makes ADC data to DAC.
You could playback silent data and enable the recording. Could you hear the sound from the headset mic to the headset headphones? |
I can't image a case would be broken, it is good for me. |
JD1: Output of JD2: Output of
I can't hear any sound from headset mic with both JD1 and JD2. |
@AlecJY It is weird that the driver can detect CTIA jack type whether using JD1 or JD2. |
@AlecJY BTW, the JD source should select JD2. |
The problem is solved after running the command. Thank you! |
@shumingfan @bardliao I don't see this mixer value being set in UCM, and it's an SOF mixer value that should be set to 0dB on both channels. We need to fix this without asking people to play with amixer, otherwise other folks will have the same issue. Besides, we don't have any references to the PGA stuff any longer, see alsa-project/alsa-ucm-conf@b856040 |
@plbossart We should set to 0dB for all platforms. Probable add a new file for SOF mixers in https://github.com/alsa-project/alsa-ucm-conf/tree/master/ucm2/Intel/SOF? @libinyang What do you think? |
@ranj063 aren't those controls initialized by default to 0dB? Not sure why we would need an UCM file to alter the default that the topology should do already. Thanks! |
HP Omen 16 devices have an amplifier on link3, add the required configuration macro. BugLink: thesofproject/linux#3727 Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
While tinkering with ACPI work-arounds for the HP Omen 16 support, we identified a corner case where the headset codec device properties are not set in the codec .init when -EPROBE_DEFER is returned, but released unconditionally in the .exit(). This leads to a kernel oops [ 4.186891] sof_sdw sof_sdw: snd_soc_register_card failed -517 [ 4.186896] BUG: kernel NULL pointer dereference, address: 00000000000003f0 [ 4.186914] Oops: 0000 [#1] PREEMPT SMP NOPTI [ 4.186926] RIP: 0010:dev_fwnode+0x5/0x20 [ 4.186974] device_remove_software_node+0x10/0x80 [ 4.186982] sof_sdw_rt711_exit+0x19/0x30 [snd_soc_sof_sdw] [ 4.186990] mc_dailink_exit_loop+0x94/0xc0 [snd_soc_sof_sdw] [ 4.186996] ? rt711_rtd_init+0x170/0x170 [snd_soc_sof_sdw] A similar error case can occur if the addition of the device property fails. We need to test if the property was successfully added before removing it. BugLink: thesofproject#3727 Fixes: 768ad6d ("ASoC: Intel: sof_sdw: handle errors on card registration") Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
HP Omen 16 devices have an amplifier on link3, add the required configuration macro. BugLink: thesofproject/linux#3727 Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
While tinkering with ACPI work-arounds for the HP Omen 16 support, we identified a corner case where the headset codec device properties are not set in the codec .init when -EPROBE_DEFER is returned, but released unconditionally in the .exit(). This leads to a kernel oops [ 4.186891] sof_sdw sof_sdw: snd_soc_register_card failed -517 [ 4.186896] BUG: kernel NULL pointer dereference, address: 00000000000003f0 [ 4.186914] Oops: 0000 [#1] PREEMPT SMP NOPTI [ 4.186926] RIP: 0010:dev_fwnode+0x5/0x20 [ 4.186974] device_remove_software_node+0x10/0x80 [ 4.186982] sof_sdw_rt711_exit+0x19/0x30 [snd_soc_sof_sdw] [ 4.186990] mc_dailink_exit_loop+0x94/0xc0 [snd_soc_sof_sdw] [ 4.186996] ? rt711_rtd_init+0x170/0x170 [snd_soc_sof_sdw] A similar error case can occur if the addition of the device property fails. We need to test if the property was successfully added before removing it. BugLink: #3727 Fixes: 768ad6d ("ASoC: Intel: sof_sdw: handle errors on card registration") Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
While tinkering with ACPI work-arounds for the HP Omen 16 support, we identified a corner case where the headset codec device properties are not set in the codec .init when -EPROBE_DEFER is returned, but released unconditionally in the .exit(). This leads to a kernel oops [ 4.186891] sof_sdw sof_sdw: snd_soc_register_card failed -517 [ 4.186896] BUG: kernel NULL pointer dereference, address: 00000000000003f0 [ 4.186914] Oops: 0000 [#1] PREEMPT SMP NOPTI [ 4.186926] RIP: 0010:dev_fwnode+0x5/0x20 [ 4.186974] device_remove_software_node+0x10/0x80 [ 4.186982] sof_sdw_rt711_exit+0x19/0x30 [snd_soc_sof_sdw] [ 4.186990] mc_dailink_exit_loop+0x94/0xc0 [snd_soc_sof_sdw] [ 4.186996] ? rt711_rtd_init+0x170/0x170 [snd_soc_sof_sdw] A similar error case can occur if the addition of the device property fails. We need to test if the property was successfully added before removing it. BugLink: #3727 Fixes: 768ad6d ("ASoC: Intel: sof_sdw: handle errors on card registration") Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
While tinkering with ACPI work-arounds for the HP Omen 16 support, we identified a corner case where the headset codec device properties are not set in the codec .init when -EPROBE_DEFER is returned, but released unconditionally in the .exit(). This leads to a kernel oops [ 4.186891] sof_sdw sof_sdw: snd_soc_register_card failed -517 [ 4.186896] BUG: kernel NULL pointer dereference, address: 00000000000003f0 [ 4.186914] Oops: 0000 [#1] PREEMPT SMP NOPTI [ 4.186926] RIP: 0010:dev_fwnode+0x5/0x20 [ 4.186974] device_remove_software_node+0x10/0x80 [ 4.186982] sof_sdw_rt711_exit+0x19/0x30 [snd_soc_sof_sdw] [ 4.186990] mc_dailink_exit_loop+0x94/0xc0 [snd_soc_sof_sdw] [ 4.186996] ? rt711_rtd_init+0x170/0x170 [snd_soc_sof_sdw] A similar error case can occur if the addition of the device property fails. We need to test if the property was successfully added before removing it. BugLink: thesofproject/linux#3727 Fixes: 768ad6d ("ASoC: Intel: sof_sdw: handle errors on card registration") Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com> Link: https://lore.kernel.org/r/20220715144144.274770-2-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
HP Omen 16 devices have an amplifier on link3, add the required configuration macro. BugLink: thesofproject/linux#3727 Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> (cherry picked from commit e70fd0f)
@AlecJY I am told there's a tentative fix available made available by the Quanta BIOS team at https://drive.google.com/file/d/1ZjX-Gvb_Zy948t2f44D4gXIiiXVZbdfp/view. If you are willing to give this update a try that would be appreciated. You may want to make sure you have a BIOS backup or something to go back to the previious solution should any problems occur. |
@plbossart I tried to update the BIOS with the utility. However, it showed this. I also tried to install with recovery USB, but it showed another error message. |
Thanks @AlecJY. Quanta confirmed that end-users cannot install non 'formal' BIOS releases so they will have to do the validation. Sorry for the noise and thanks for your tests. |
Is your feature request related to a problem? Please describe.
I bought an HP Omen 16-k0005TX recently. The soundcard didn't work on Linux. I try to reload
snd_sof_pci_intel_tgl
then dmesg shows the following messages that sof-adl-rt711-2ch.tplg is not found.I also tried with renaming
sof-adl-rt711.tplg
andsof-adl-rt711-4ch.tplg
tosof-adl-rt711-2ch.tplg
, but it still didn't work. The following is the dmesg log.Describe the solution you'd like
It would be appreciated if add support for
sof-adl-rt711-2ch
.Additional context
alsa-info log
The text was updated successfully, but these errors were encountered: