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

[FEATURE] Add support for sof-adl-rt711-2ch on HP Omen 16-k0005TX #3727

Closed
AlecJY opened this issue Jun 28, 2022 · 68 comments
Closed

[FEATURE] Add support for sof-adl-rt711-2ch on HP Omen 16-k0005TX #3727

AlecJY opened this issue Jun 28, 2022 · 68 comments
Labels
codec Codec HW or driver restriction enhancement New feature or request topology Issues caused by topology

Comments

@AlecJY
Copy link

AlecJY commented Jun 28, 2022

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.

[  390.982490] sof-audio-pci-intel-tgl 0000:00:1f.3: DSP detected with PCI class/subclass/prog-if info 0x040100
[  390.982512] sof-audio-pci-intel-tgl 0000:00:1f.3: SoundWire enabled on CannonLake+ platform, using SOF driver
[  390.982704] sof-audio-pci-intel-tgl 0000:00:1f.3: DSP detected with PCI class/subclass/prog-if 0x040100
[  390.982791] sof-audio-pci-intel-tgl 0000:00:1f.3: bound 0000:00:02.0 (ops i915_audio_component_bind_ops [i915])
[  390.989168] sof-audio-pci-intel-tgl 0000:00:1f.3: use msi interrupt mode
[  391.005236] sof-audio-pci-intel-tgl 0000:00:1f.3: DMICs detected in NHLT tables: 2
[  391.005242] sof-audio-pci-intel-tgl 0000:00:1f.3: hda codecs found, mask 4
[  391.005415] sof-audio-pci-intel-tgl 0000:00:1f.3: Firmware info: version 2:1:1-3964a
[  391.005417] sof-audio-pci-intel-tgl 0000:00:1f.3: Firmware: ABI 3:21:0 Kernel ABI 3:19:1
[  391.005419] sof-audio-pci-intel-tgl 0000:00:1f.3: warn: FW ABI is more recent than kernel
[  391.005423] sof-audio-pci-intel-tgl 0000:00:1f.3: unknown sof_ext_man header type 3 size 0x30
[  391.120009] sof-audio-pci-intel-tgl 0000:00:1f.3: Firmware info: version 2:1:1-3964a
[  391.120028] sof-audio-pci-intel-tgl 0000:00:1f.3: Firmware: ABI 3:21:0 Kernel ABI 3:19:1
[  391.120036] sof-audio-pci-intel-tgl 0000:00:1f.3: warn: FW ABI is more recent than kernel
[  391.125025] soundwire sdw-master-0: Slave Entry not found
[  391.125525] soundwire sdw-master-1: Slave Entry not found
[  391.133608] sof-audio-pci-intel-tgl 0000:00:1f.3: Direct firmware load for intel/sof-tplg/sof-adl-rt711-2ch.tplg failed with error -2
[  391.133618] sof-audio-pci-intel-tgl 0000:00:1f.3: error: tplg request firmware intel/sof-tplg/sof-adl-rt711-2ch.tplg failed err: -2
[  391.133628] sof-audio-pci-intel-tgl 0000:00:1f.3: you may need to download the firmware from https://github.com/thesofproject/sof-bin/
[  391.133631] sof-audio-pci-intel-tgl 0000:00:1f.3: error: failed to load DSP topology -2
[  391.133634] sof-audio-pci-intel-tgl 0000:00:1f.3: ASoC: error at snd_soc_component_probe on 0000:00:1f.3: -2
[  391.133650] sof_sdw sof_sdw: ASoC: failed to instantiate card -2
[  391.133775] sof_sdw sof_sdw: snd_soc_register_card failed -2
[  391.133779] sof_sdw: probe of sof_sdw failed with error -2
[  393.157068] soundwire sdw:3:025d:1316:01:0: Probe not complete, timed out
[  393.157103] soundwire sdw:3:025d:1316:01:0: Update Slave status failed:-110
[  393.157144] soundwire sdw:0:025d:0711:01:0: Probe not complete, timed out
[  393.157153] soundwire sdw:0:025d:0711:01:0: Update Slave status failed:-110

I also tried with renaming sof-adl-rt711.tplg and sof-adl-rt711-4ch.tplg to sof-adl-rt711-2ch.tplg, but it still didn't work. The following is the dmesg log.

[ 1811.139617] sof-audio-pci-intel-tgl 0000:00:1f.3: DSP detected with PCI class/subclass/prog-if info 0x040100
[ 1811.139652] sof-audio-pci-intel-tgl 0000:00:1f.3: SoundWire enabled on CannonLake+ platform, using SOF driver
[ 1811.139984] sof-audio-pci-intel-tgl 0000:00:1f.3: DSP detected with PCI class/subclass/prog-if 0x040100
[ 1811.140102] sof-audio-pci-intel-tgl 0000:00:1f.3: bound 0000:00:02.0 (ops i915_audio_component_bind_ops [i915])
[ 1811.146769] sof-audio-pci-intel-tgl 0000:00:1f.3: use msi interrupt mode
[ 1811.162141] sof-audio-pci-intel-tgl 0000:00:1f.3: DMICs detected in NHLT tables: 2
[ 1811.162145] sof-audio-pci-intel-tgl 0000:00:1f.3: hda codecs found, mask 4
[ 1811.162336] sof-audio-pci-intel-tgl 0000:00:1f.3: Firmware info: version 2:1:1-3964a
[ 1811.162338] sof-audio-pci-intel-tgl 0000:00:1f.3: Firmware: ABI 3:21:0 Kernel ABI 3:19:1
[ 1811.162340] sof-audio-pci-intel-tgl 0000:00:1f.3: warn: FW ABI is more recent than kernel
[ 1811.162343] sof-audio-pci-intel-tgl 0000:00:1f.3: unknown sof_ext_man header type 3 size 0x30
[ 1811.276182] sof-audio-pci-intel-tgl 0000:00:1f.3: Firmware info: version 2:1:1-3964a
[ 1811.276202] sof-audio-pci-intel-tgl 0000:00:1f.3: Firmware: ABI 3:21:0 Kernel ABI 3:19:1
[ 1811.276210] sof-audio-pci-intel-tgl 0000:00:1f.3: warn: FW ABI is more recent than kernel
[ 1811.281201] soundwire sdw-master-1: Slave Entry not found
[ 1811.281413] sof-audio-pci-intel-tgl 0000:00:1f.3: Topology: ABI 3:21:0 Kernel ABI 3:19:1
[ 1811.281424] sof-audio-pci-intel-tgl 0000:00:1f.3: warn: topology ABI is more recent than kernel
[ 1811.281527] sof-audio-pci-intel-tgl 0000:00:1f.3: error: can't connect DAI HDA3.OUT stream iDisp4
[ 1811.281536] sof-audio-pci-intel-tgl 0000:00:1f.3: error: failed to add widget id 0 type 27 name : HDA3.OUT stream iDisp4
[ 1811.281543] sof_sdw sof_sdw: ASoC: failed to load widget HDA3.OUT
[ 1811.281546] sof_sdw sof_sdw: ASoC: topology: could not load header: -22
[ 1811.281565] sof-audio-pci-intel-tgl 0000:00:1f.3: error: tplg component load failed -22
[ 1811.281578] sof-audio-pci-intel-tgl 0000:00:1f.3: error: failed to load DSP topology -22
[ 1811.281581] sof-audio-pci-intel-tgl 0000:00:1f.3: ASoC: error at snd_soc_component_probe on 0000:00:1f.3: -22
[ 1811.281609] sof_sdw sof_sdw: ASoC: failed to instantiate card -22
[ 1811.281955] sof_sdw sof_sdw: snd_soc_register_card failed -22
[ 1811.281958] sof_sdw: probe of sof_sdw failed with error -22
[ 1811.301675] soundwire sdw-master-0: Slave Entry not found

Describe the solution you'd like
It would be appreciated if add support for sof-adl-rt711-2ch.

Additional context
alsa-info log

@AlecJY AlecJY added the enhancement New feature or request label Jun 28, 2022
@plbossart
Copy link
Member

@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
sof-dyndbg.conf.txt
as /etc/modprobe.d/sof-dyndbg.conf (the extension does matter), reboot and attach the entire dmesg log.

If you can also add the result of

ls /sys/bus/soundwire/devices/

and

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

@plbossart plbossart added codec Codec HW or driver restriction topology Issues caused by topology labels Jun 28, 2022
@AlecJY
Copy link
Author

AlecJY commented Jun 28, 2022

dmesg.log

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

@plbossart
Copy link
Member

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

plbossart referenced this issue in plbossart/sound Jun 28, 2022
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>
plbossart referenced this issue in plbossart/sound Jun 28, 2022
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>
plbossart referenced this issue in plbossart/sound Jun 28, 2022
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>
@plbossart
Copy link
Member

plbossart commented Jun 28, 2022

@AlecJY Please try the last three patches in #3725

You will need do this as well, we'll release an update later on for topologies.

cd /lib/firmware/intel/sof-tplg

cp sof-tgl-rt711-rt1308-2ch.tplg sof-adl-rt711-l0-rt1326-l1-2ch.tplg

plbossart referenced this issue in plbossart/sound Jun 28, 2022
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>
@lgirdwood lgirdwood transferred this issue from thesofproject/sof Jun 29, 2022
@AlecJY
Copy link
Author

AlecJY commented Jun 29, 2022

The soundcard still did not work, and there's nothing under /sys/bus/soundwire/devices/.

dmesg.log
alsa-info log

@plbossart
Copy link
Member

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

CONFIG_SND_SOC_INTEL_SOUNDWIRE_SOF_MACH=m
CONFIG_SND_SOC_SOF_TOPLEVEL=y
CONFIG_SND_SOC_SOF_PCI_DEV=m
CONFIG_SND_SOC_SOF_PCI=m
CONFIG_SND_SOC_SOF_ALDERLAKE=m
CONFIG_SND_SOC_SOF_HDA_COMMON=m
CONFIG_SND_SOC_SOF_HDA_LINK=y
CONFIG_SND_SOC_SOF_HDA_AUDIO_CODEC=y
CONFIG_SND_SOC_SOF_HDA_LINK_BASELINE=m
CONFIG_SND_SOC_SOF_HDA=m
CONFIG_SND_SOC_SOF_HDA_PROBES=m
CONFIG_SND_SOC_SOF_INTEL_SOUNDWIRE_LINK_BASELINE=m
CONFIG_SND_SOC_SOF_INTEL_SOUNDWIRE=m
CONFIG_REGMAP_SOUNDWIRE=m
CONFIG_REGMAP_SOUNDWIRE_MBQ=m
CONFIG_SND_INTEL_SOUNDWIRE_ACPI=m
CONFIG_SND_SOC_INTEL_SOUNDWIRE_SOF_MACH=m
CONFIG_SND_SOC_SOF_INTEL_SOUNDWIRE_LINK_BASELINE=m
CONFIG_SND_SOC_SOF_INTEL_SOUNDWIRE=m
CONFIG_SOUNDWIRE=m
CONFIG_SOUNDWIRE_CADENCE=m
CONFIG_SOUNDWIRE_INTEL=m
# CONFIG_SOUNDWIRE_QCOM is not set
CONFIG_SOUNDWIRE_GENERIC_ALLOCATION=m

@AlecJY
Copy link
Author

AlecJY commented Jun 29, 2022

I found that CONFIG_SND_SOC_SOF_ALDERLAKE was not set, thank you. However, the sound card still didn't work.

There is something changed in /sys/bus/soundwire/devices/

$ ls /sys/bus/soundwire/devices/
sdw:0:025d:0711:01  sdw:3:025d:1316:01:0  sdw-master-0  sdw-master-1

dmesg.log

@plbossart
Copy link
Member

ok, so the remapping seems to work but the wrong topology is still chosen

[    5.748855] acpi PRP00001:00: Creating 4 SDW Link devices
[    5.749046] soundwire sdw-master-0: remapped _ADR 0x20025d071100 as 0x30025d071101
[    5.749047] soundwire sdw-master-0: SDW Slave Addr: 30025d071101
[    5.749048] soundwire sdw-master-0: SDW Slave class_id 0x01, mfg_id 0x025d, part_id 0x0711, unique_id 0x0, version 0x3
[    5.749054] soundwire sdw-master-0: remapped _ADR 0x120025d071100 as 0x130025d131601
[    5.749123] soundwire sdw-master-0: remapped _ADR 0x120025d071100 as 0x130025d131601
[    5.749268] soundwire sdw-master-1: remapped _ADR 0x20025d071100 as 0x30025d071101
[    5.749272] soundwire sdw-master-1: remapped _ADR 0x120025d071100 as 0x130025d131601

[    5.757051] sof-audio-pci-intel-tgl 0000:00:1f.3: SoundWire machine driver sof_sdw topology sof-adl-rt711-2ch.tplg

@plbossart
Copy link
Member

No that's wrong:

sdw:0:025d:0711:01  sdw:3:025d:1316:01:0

I may have things mixed-up in the 64-bit values.

@plbossart
Copy link
Member

should be

sdw:0:025d:0711:01  sdw:1:025d:1316:01

@plbossart
Copy link
Member

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/
$ cat /sys/bus/acpi/devices/*/adr | grep 025d

@plbossart
Copy link
Member

And better yet, extract the DSDT from this device

apt install acpica-tools
cat /sys/firmware/acpi/tables/DSDT > dsdt.dat
iasl -d dsdt.dat
cp dsdt.dsl dsdt.dsl.txt

and attach dsdt.dsl.txt

Thanks!

@AlecJY
Copy link
Author

AlecJY commented Jun 29, 2022

$ 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

dmesg.log
dsdt.dsl.txt

@plbossart
Copy link
Member

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.

plbossart added a commit to plbossart/sound that referenced this issue Jun 29, 2022
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>
@plbossart
Copy link
Member

@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

@AlecJY
Copy link
Author

AlecJY commented Jun 30, 2022

$ ls /sys/bus/soundwire/devices/
sdw:0:025d:0711:2:00  sdw:0:025d:0711:3:01:0  sdw:3:025d:1316:3:01:0  sdw-master-0  sdw-master-1
cat /sys/bus/acpi/devices/*/adr | grep 025d
0x000020025d071100
0x000120025d071100

dmesg.log

@plbossart
Copy link
Member

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

@plbossart
Copy link
Member

@AlecJY Let's first try to revert one change to only focus on the ACPI devices. Can you try the updated patches in PR #3730 #3730

Thanks! I realize it's painful but I don't have the hardware to test myself.

@AlecJY
Copy link
Author

AlecJY commented Jun 30, 2022

$ 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

dmesg.log

@plbossart
Copy link
Member

Ah yes, echo reference is exposed for rt1316 so there's an off-by-one. Try this updated file @AlecJY

sof-adl-rt711-l0-rt1316-l3-2ch.tplg.gz

@bardliao
Copy link
Collaborator

bardliao commented Jul 6, 2022

@bardliao @RanderWang FYI, wondering if the change above will break existing platforms or require topologies we haven't released?

@plbossart It will break the existing platforms ONLY if the platform uses less then 2 SoundWire links AND doesn't use DMIC, right? In addition to checking link mask, we check dmic number from nhlt. So I think it is safe for this change.

Not following @bardliao, are you saying the changes are ok or something else needs to be added?

@plbossart Yes, the change looks good to me.

@AlecJY
Copy link
Author

AlecJY commented Jul 6, 2022

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.

dmesg.log
alsa-info log

@plbossart
Copy link
Member

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 */
        {

plbossart added a commit to plbossart/sound that referenced this issue Jul 6, 2022
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>
@AlecJY
Copy link
Author

AlecJY commented Jul 6, 2022

Still have the same problem.

dmesg.log

@plbossart
Copy link
Member

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

@shumingfan
Copy link

shumingfan commented Jul 7, 2022

@AlecJY Could you dump registers while recording?
cat /sys/kernel/debug/regmap/sdw:0:025d:0711:01/registers
cat /sys/kernel/debug/regmap/sdw:0:025d:0711:01-sdw-mbq/registers

Another test I want to try is the loopback that makes ADC data to DAC.
The loopback setting shows below.

@@ -1565,6 +1756,10 @@ int rt711_sdca_io_init(struct device *dev, struct sdw_slave *slave)
        regmap_write(rt711->regmap,
                SDW_SDCA_CTL(FUNC_NUM_JACK_CODEC, RT711_SDCA_ENT_OT1, RT711_SDCA_CTL_VENDOR_DEF, 0), 0x4);

+       // ADC->DAC loopback test
+       rt711_sdca_index_update_bits(rt711, RT711_VENDOR_REG,
+               0x07, 0x0800, 0x0800);
+
        /*
         * if set_jack callback occurred early than io_init,

You could playback silent data and enable the recording. Could you hear the sound from the headset mic to the headset headphones?
Please test JD1/JD2 separately. I am not sure which JD source your platform uses.

@RanderWang
Copy link

@bardliao @RanderWang FYI, wondering if the change above will break existing platforms or require topologies we haven't released?

I can't image a case would be broken, it is good for me.

@AlecJY
Copy link
Author

AlecJY commented Jul 7, 2022

JD1:
Ouput of cat /sys/kernel/debug/regmap/sdw:0:025d:0711:01/registers
JD1-output1.log

Output of cat /sys/kernel/debug/regmap/sdw:0:025d:0711:01-sdw-mbq/registers
JD1-output2.log

JD2:
Ouput of cat /sys/kernel/debug/regmap/sdw:0:025d:0711:01/registers
JD2-output1.log

Output of cat /sys/kernel/debug/regmap/sdw:0:025d:0711:01-sdw-mbq/registers
JD2-output2.log

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 hear any sound from headset mic with both JD1 and JD2.

@shumingfan
Copy link

shumingfan commented Jul 7, 2022

@AlecJY It is weird that the driver can detect CTIA jack type whether using JD1 or JD2.
I will check this with the internal HW engineer. Will give back soon.

@shumingfan
Copy link

shumingfan commented Jul 8, 2022

@AlecJY
I got the same machine and reproduce this issue on my side.
I found the root cause that the 'PGA2.0 2 Master Capture Volume' sets the 0 to the left channel.
Please input the command to set the volume.
amixer -c<card number> cset name='PGA2.0 2 Master Capture Volume' 50,50

BTW, the JD source should select JD2.

@AlecJY
Copy link
Author

AlecJY commented Jul 8, 2022

The problem is solved after running the command. Thank you!

@AlecJY AlecJY closed this as completed Jul 8, 2022
@plbossart
Copy link
Member

@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

@bardliao
Copy link
Collaborator

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

@plbossart
Copy link
Member

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

plbossart added a commit to plbossart/sof that referenced this issue Jul 11, 2022
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>
plbossart added a commit to plbossart/sound that referenced this issue Jul 11, 2022
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>
lgirdwood pushed a commit to thesofproject/sof that referenced this issue Jul 12, 2022
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>
plbossart added a commit that referenced this issue Jul 12, 2022
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>
plbossart added a commit that referenced this issue Jul 15, 2022
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>
ammarfaizi2 pushed a commit to ammarfaizi2/linux-block that referenced this issue Jul 15, 2022
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>
lgirdwood pushed a commit to thesofproject/sof that referenced this issue Aug 15, 2022
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)
@plbossart
Copy link
Member

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

@AlecJY
Copy link
Author

AlecJY commented Sep 15, 2022

@plbossart I tried to update the BIOS with the utility. However, it showed this.

image

I also tried to install with recovery USB, but it showed another error message.

image

@plbossart
Copy link
Member

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.

@shourove000
Copy link

354053927_292069906500188_4598077252978343396_n
Equalizer is not available in headphone after reinstalling windows,, i updated the audio driver but still facing this problem,,, anyone please help.

@plbossart
Copy link
Member

354053927_292069906500188_4598077252978343396_n Equalizer is not available in headphone after reinstalling windows,, i updated the audio driver but still facing this problem,,, anyone please help.

not an SOF bug, please see through HP/Windows support channels.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
codec Codec HW or driver restriction enhancement New feature or request topology Issues caused by topology
Projects
None yet
Development

No branches or pull requests

6 participants