Skip to content

Sound does not work on Rooks County laptop LAPRC710 / Intel NUC M15 Alder Lake #4088

Closed
thesofproject/sof
#6763

Description

@eugenhu

Similar laptop to #3049 but the Alder Lake version with i7-1260p.

I've tried remapping _ADRs like in #3049, and copying the quirks from the AlderLake devices entry:

/* AlderLake devices */
{
.callback = sof_sdw_quirk_cb,
.matches = {
DMI_MATCH(DMI_SYS_VENDOR, "Intel Corporation"),
DMI_MATCH(DMI_PRODUCT_NAME, "Alder Lake Client Platform"),
},
.driver_data = (void *)(RT711_JD2_100K |
SOF_SDW_TGL_HDMI |
SOF_BT_OFFLOAD_SSP(2) |
SOF_SSP_BT_OFFLOAD_PRESENT),
},

except matching my device instead:

.matches = { 
    DMI_MATCH(DMI_SYS_VENDOR, "Intel (R) Client Systems"), 
    DMI_MATCH(DMI_PRODUCT_NAME, "LAPRC"), 
}, 

Without these modifications, I get "no soundcards found" when running aplay -l. Using these modifications, I get a headphone jack, some HDMI outputs, but no internal speaker. The jack always shows up as unplugged in pavucontrol, so I can't play sound out of the laptop's headphone jack, but I can play sounds through a monitor connected to the laptop's HDMI port.

I don't know how to make any further progress, not really familiar with this kind of stuff.

I'm running Arch with sof-firmware 2.2.3.

Diagnostic info below:

ls /sys/bus/soundwire/devices:

sdw:0:025d:0711:01
sdw:2:025d:1316:01
sdw-master-0
sdw-master-1

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

0x000020025d071100
0x000120025d071100

alsa-info.txt

dmesg.txt

From dmesg, only SDW0-Playback and SDW0-Capture dai links are created it seems, not sure if this relates to the absence of speakers.

Activity

  1. plbossart commented on Dec 9, 2022

    @plbossart
    Member

    Thanks @eugenhu for the report.

    You will also need a quirk in drivers/soundwire/dmi_quirks.c, the address for the amplifier (1316) is incorrect, it's the wrong SoundWire version and likely the wrong link used.

    From the dmesg log, you have
    rt7111-scda on link0: 30025d071101
    rt1316 (sdca as well) on link2 30025d131601

    which seems to match the HP Omen1 quirk

    static const struct adr_remap hp_omen_16[] = {

  2. eugenhu commented on Dec 9, 2022

    @eugenhu
    Author

    Thanks for the help.

    Sorry, I forgot to mention I've currently got this adr_remap in dmi-quirks.c:

    static const struct adr_remap intel_tgl_bios[] = {
    	{
    		0x000020025D071100ull,
    		0x000030025D071101ull
    	},
    	{
    		0x000120025D071100ull,
    		0x000230025D131601ull
    	},
    	{}
    };
    

    And it looks like both 711 and 1316 are found:

    [    7.968395] sof-audio-pci-intel-tgl 0000:00:1f.3: found 1316 at link 2
    [    7.968398] sof-audio-pci-intel-tgl 0000:00:1f.3: Slave 714 not found
    [    7.968399] sof-audio-pci-intel-tgl 0000:00:1f.3: Slave 711 not found
    [    7.968401] sof-audio-pci-intel-tgl 0000:00:1f.3: found 711 at link 0
    

    Checking on Windows devmgmt, 000030025D071101 and 000230025D131601 look like the right addresses, no 714 in devmgmt though, not sure that's coming from.

    I've also tried using the quirk RT711_JD2 instead of RT711_JD2_100K which gets rid of the

    [   12.207145] rt711-sdca sdw:0:025d:0711:01: Wrong JD source
    

    But the headphones still show up as unplugged.

  3. plbossart commented on Dec 9, 2022

    @plbossart
    Member

    @eugenhu try using the same quirks as other NUC laptops

    		.driver_data = (void *)(SOF_SDW_TGL_HDMI |
    					SOF_SDW_PCH_DMIC |
    					RT711_JD1),
    

    It could very well be that you only need RT711_JD1 as well, IIRC the other quirks are not really useful.

  4. eugenhu commented on Dec 9, 2022

    @eugenhu
    Author

    I get this error with those quirks:

    [   11.706954] sof-audio-pci-intel-tgl 0000:00:1f.3: loading topology:intel/sof-tplg/sof-adl-rt711-4ch.tplg
    ...
    [   11.707887] sof-audio-pci-intel-tgl 0000:00:1f.3: error: can't connect DAI SSP2.OUT stream SSP2-BT
    [   11.707893] sof-audio-pci-intel-tgl 0000:00:1f.3: error: failed to add widget id 0 type 27 name : SSP2.OUT stream SSP2-BT
    [   11.707898] sof_sdw sof_sdw: ASoC: failed to load widget SSP2.OUT
    [   11.707902] sof_sdw sof_sdw: ASoC: topology: could not load header: -22
    [   11.707926] sof-audio-pci-intel-tgl 0000:00:1f.3: error: tplg component load failed -22
    [   11.707935] sof-audio-pci-intel-tgl 0000:00:1f.3: error: failed to load DSP topology -22
    [   11.707938] sof-audio-pci-intel-tgl 0000:00:1f.3: ASoC: error at snd_soc_component_probe on 0000:00:1f.3: -22
    [   11.707963] sof_sdw sof_sdw: ASoC: failed to instantiate card -22
    [   11.708207] sof_sdw sof_sdw: snd_soc_register_card failed -22
    [   11.708232] sof_sdw: probe of sof_sdw failed with error -22
    

    Headphones still unplugged when switching RT711_JD2 for RT711_JD1 and using the other quirks from the original post.

    dmesg2.txt

  5. plbossart commented on Dec 9, 2022

    @plbossart
    Member

    You can't use these SSP quirks on your platform. It's SoundWire + DMIC only.

    SOF_BT_OFFLOAD_SSP(2) |
    SOF_SSP_BT_OFFLOAD_PRESENT),

  6. plbossart commented on Dec 9, 2022

    @plbossart
    Member

    And I also don't know why you are loading this sof-adl-rt711-4ch.tplg topology, this is not quite right either.

    Bottom line: please provide a PR or GitHub changes I can comment on. I am lost with all your changes.

  7. eugenhu commented on Dec 9, 2022

    @eugenhu
    Author

    Sorry, I'll make a PR with the original changes. Is there a way to load a specific topology? sof-adl-rt711-4ch.tplg was chosen automatically.

  8. plbossart commented on Dec 9, 2022

    @plbossart
    Member

    You may need a new entry in sound/soc/intel/common/soc-acpi-adl-match.c. We have this one, but the amplifier is on link3, you need link2 apparently.

    	{
    		.link_mask = 0x9, /* 2 active links required */
    		.links = adl_sdw_rt711_link0_rt1316_link3,
    		.drv_name = "sof_sdw",
    		.sof_tplg_filename = "sof-adl-rt711-l0-rt1316-l3.tplg",
    	},

    so that would be

    	{
    		.link_mask = 0x5, /* 2 active links required */
    		.links = adl_sdw_rt711_link0_rt1316_link2,
    		.drv_name = "sof_sdw",
    		.sof_tplg_filename = "sof-adl-rt711-l0-rt1316-l2.tplg",
    	},

    Unzip these two files and copy them in /lib/firmware/intel/sof-tplg/

    sof-adl-rt711-l0-rt1316-l2-2ch.tplg.gz
    sof-adl-rt711-l0-rt1316-l2-4ch.tplg.gz

  9. eugenhu commented on Dec 9, 2022

    @eugenhu
    Author

    The changes you suggested worked to get the internal speaker working, thanks. All changes are in PR #4091.

    However, the headphone jack is still not working, show as (unplugged) in pavucontrol. I've tried using RT711_JD1 and RT711_JD2_100K, with no improvement.

    Logs:
    dmesg3.txt
    alsa-info2.txt

  10. plbossart commented on Dec 9, 2022

    @plbossart
    Member

    Thanks for testing @eugenhu, nice progress.

    I'll have to add @shumingfan to help with jack detection. All NUC laptops used JD1 so far, not sure why it's not working this time or if another setting is required.

  11. plbossart commented on Dec 9, 2022

    @plbossart
    Member

    also @eugenhu please try at the amixer level to see if there are any changes

    assuming the numid = 18 (Headphone Jack), you can use

    amixer -Dhw:0 numid=18 cget

    and see if plugging the headphone has any effect. We need to make sure it works at that level before checking PulseAudio/PipeWire integration.

  12. eugenhu commented on Dec 9, 2022

    @eugenhu
    Author

    Not too familiar with ALSA, but this is what I tried:

    $ amixer cget -Dhw:0 numid=18
    numid=18,iface=CARD,name='Headphone Jack'
      ; type=BOOLEAN,access=r-------,values=1
      : values=off
    

    Same output when headphones are plugged in vs out.

  13. plbossart commented on Dec 9, 2022

    @plbossart
    Member

    Thanks @eugenhu, that points to a driver issue then. @shumingfan might be able to help next week.

  14. shumingfan commented on Dec 12, 2022

    @shumingfan

    @eugenhu
    Could you dump registers while using RT711_JD1 and RT711_JD2 separately?
    When the jack was plugged in, then dump the registers by the commands below.
    $ cat /sys/kernel/debug/regmap/sdw:0:025d:0711:01/registers
    $ cat /sys/kernel/debug/regmap/sdw:0:025d:0711:01-sdw-mbq/registers

  15. 112 remaining items

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    ADLApplies to Alder Lake platformCommunityend-user or distro-reported issuesNUCSDWApplies to SoundWire bus for codec connection

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions