Skip to content

SoundWire: add quirks for HP Omen 16-k0005TX - #3730

Merged
plbossart merged 5 commits into
thesofproject:topic/sof-devfrom
plbossart:sdw/add-version-number
Jul 12, 2022
Merged

plbossart merged 5 commits into
thesofproject:topic/sof-devfrom
plbossart:sdw/add-version-number

Conversation

@plbossart

@plbossart plbossart commented Jun 29, 2022 •

Copy link
Copy Markdown
Member

Set of patches to get audio support on HP Omen 16 SoundWire device

BugLink: #3727

Companion topology fix:
thesofproject/sof#5974

We still need to check the jack detection (JD1 v. JD2)

@greg-intel

greg-intel commented Jun 29, 2022 •

Copy link
Copy Markdown

SOFCI TEST
There was a CI outage, so the tests were interrupted. Note that they may take longer than usual and be missing a few devices because a few other tests are currently running.

@plbossart
plbossart force-pushed the sdw/add-version-number branch 3 times, most recently from 990bc44 to b5e9277 Compare July 1, 2022 16:25
@plbossart
plbossart force-pushed the sdw/add-version-number branch from 7af1dd7 to 3513e3e Compare July 6, 2022 14:11
@plbossart plbossart changed the title soundwire: peripheral: add version_id to device name SoundWire: add quirks for HP Omen 16-k0005TX Jul 7, 2022
@plbossart
plbossart marked this pull request as ready for review July 11, 2022 17:06
@plbossart
plbossart force-pushed the sdw/add-version-number branch from 3513e3e to 7cd7a52 Compare July 11, 2022 17:06
Comment thread drivers/soundwire/dmi-quirks.c Outdated
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>
The DSDT for this device has a number of problems:
a) it lists rt711 on link0 and link1, but link1 is disabled
b) the rt711 entry on link0 uses the wrong v2 instead of v3 (SDCA)
c) the rt1316 amplifier on link3 is not listed.

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

BugLink: https://github.com/thesofproject/sof/issues/5955
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
The JD2 jack detection was selected based on similar settings from
other platforms based on RT711-SDCA.

BugLink: https://github.com/thesofproject/sof/issues/5955
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
When PCH-attached DMICs are used on a SoundWire-based platform, all
known devices pin-mux SoundWire link2 and link3 with DMIC, and only
use link0 and link1 for SoundWire.

The HP Omen16 is the first exception to the rule, with SoundWire using
link0 and link3. Rather than using a fixed mask, let's count the
number of SoundWire links used.

BugLink: thesofproject/sof#5966
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
@plbossart
plbossart requested a review from ranj063 July 11, 2022 21:36
@plbossart
plbossart force-pushed the sdw/add-version-number branch from 7cd7a52 to 64a99b8 Compare July 11, 2022 21:36
@plbossart

Copy link
Copy Markdown
Member Author

SOFCI TEST

@plbossart
plbossart merged commit fd7e21c into thesofproject:topic/sof-dev Jul 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants