distribution icon indicating copy to clipboard operation
distribution copied to clipboard

No sound Lenovo Z13 G2

Open chrysophylax opened this issue 1 year ago • 7 comments

Hi, I have no sound on my Lenovo ThinkPad Z13 G2.

I suspect something needs to be configured for the sound driver in the kconfig.

c3:00.1 Audio device: Advanced Micro Devices, Inc. [AMD/ATI] Rembrandt Radeon High Definition Audio Controller
c3:00.5 Multimedia controller: Advanced Micro Devices, Inc. [AMD] ACP/ACP3X/ACP6x Audio Coprocessor (rev 63)
c3:00.6 Audio device: Advanced Micro Devices, Inc. [AMD] Family 17h/19h HD Audio Controller
Distribution:      Clear Linux OS
Installed version: 42790

I attach the dmesg of a clean boot.

dmesg.log

chrysophylax avatar Dec 19 '24 15:12 chrysophylax

These are the only relevant options I see, and we've already enabled them:

CONFIG_SND_AMD_ASOC_REMBRANDT=m
CONFIG_SND_SOC_SOF_AMD_REMBRANDT=m
CONFIG_SND_SOC_AMD_ACP3x=m
CONFIG_SND_SOC_AMD_ACP6x=m
CONFIG_SND_SOC_AMD_RPL_ACP6x=m

Unfortunately, we don't have any of that hardware to test with, so I'm not sure what to suggest.

bwarden avatar Jan 02 '25 18:01 bwarden

OK, maybe it's this one: CONFIG_DRM_AMD_ACP

I'll enable it; give it a try in a new release and see if it works. This issue will be tagged when the new version is published.

  | CONFIG_DRM_AMD_ACP:                                                                                                                                                                                                                                                    │
  │                                                                                                                                                                                                                                                                        │
  │ Choose this option to enable ACP IP support for AMD SOCs.                                                                                                                                                                                                              │
  │ This adds the ACP (Audio CoProcessor) IP driver and wires                                                                                                                                                                                                              │
  │ it up into the amdgpu driver.  The ACP block provides the DMA                                                                                                                                                                                                          │
  │ engine for the i2s-based ALSA driver. It is required for audio                                                                                                                                                                                                         │
  │ on APUs which utilize an i2s codec.                                                                                                                                                                                                                                    │
  │                                                                                                                                                                                                                                                                        │
  │ Symbol: DRM_AMD_ACP [=y]                                                                                                                                                                                                                                               │
  │ Type  : bool                                                                                                                                                                                                                                                           │
  │ Defined at drivers/gpu/drm/amd/acp/Kconfig:5                                                                                                                                                                                                                           │
  │   Prompt: Enable AMD Audio CoProcessor IP support                                                                                                                                                                                                                      │
  │   Depends on: HAS_IOMEM [=y] && DRM [=y] && DRM_AMDGPU [=m]                                                                                                                                                                                                            │
  │   Location:                                                                                                                                                                                                                                                            │
  │     -> Device Drivers                                                                                                                                                                                                                                                  │
  │       -> Graphics support                                                                                                                                                                                                                                              │
  │         -> Direct Rendering Manager (XFree86 4.1.0 and higher DRI support) (DRM [=y])                                                                                                                                                                                  │
  │           -> AMD GPU (DRM_AMDGPU [=m])                                                                                                                                                                                                                                 │
  │             -> ACP (Audio CoProcessor) Configuration                                                                                                                                                                                                                   │
  │               -> Enable AMD Audio CoProcessor IP support (DRM_AMD_ACP [=y])                                                                                                                                                                                            │
  │ Selects: MFD_CORE [=y] && PM_GENERIC_DOMAINS [=y]                                                                                                                                                                                                                      │
  │                                                                              

bwarden avatar Jan 02 '25 18:01 bwarden

On version 43160 I have sound out through my headphones but not the speakers.

I was recently informed that there is a quirk in sound/pci/hda/patch_realtek.c for my specific model which applies the quirk ALC287_FIXUP_MG_RTKC_CSAMP_CS35L41_I2C_THINKPAD - this enables an amplifier by cirrus logic that sits between the speakers - however it doesn't seem like on my system the CSC3551 device does anything. It should be on i2c but I can't seem to find any I2C devices.

I ran i2cdetect -l but the output is empty.

chrysophylax avatar Mar 30 '25 22:03 chrysophylax

I enabled dyndbg for snd_hda_codec_realtek and I see the following, it tries to apply the quirk but the driver fallbacks as it does not detect the Cirrus amp in ACPI entries.

[    1.030332] calling  realtek_cr_driver_init+0x0/0x40 @ 1
[    1.030337] usbcore: registered new interface driver ums-realtek
[    1.030338] initcall realtek_cr_driver_init+0x0/0x40 returned 0 after 4 usecs
[   10.032783] calling  realtek_driver_init+0x0/0xfc0 [snd_hda_codec_realtek] @ 750
[   10.033450] snd_hda_codec_realtek hdaudioC2D0: ALC287: picked fixup Thinkpad Z13 Gen2 for PCI SSID 17aa:2318
[   10.033612] [750] snd_hda_codec_realtek hdaudioC2D0: Did not find ACPI entry for a Cirrus Amp
[   10.034119] snd_hda_codec_realtek hdaudioC2D0: autoconfig for ALC287: line_outs=1 (0x17/0x0/0x0/0x0/0x0) type:speaker
[   10.034143] snd_hda_codec_realtek hdaudioC2D0:    speaker_outs=0 (0x0/0x0/0x0/0x0/0x0)
[   10.034150] snd_hda_codec_realtek hdaudioC2D0:    hp_outs=1 (0x21/0x0/0x0/0x0/0x0)
[   10.034155] snd_hda_codec_realtek hdaudioC2D0:    mono: mono_out=0x0
[   10.034158] snd_hda_codec_realtek hdaudioC2D0:    inputs:
[   10.034161] snd_hda_codec_realtek hdaudioC2D0:      Mic=0x19
[   10.034165] [750] snd_hda_codec_realtek hdaudioC2D0: realtek: Enable default setup for auto mode as fallback
[   10.233777] initcall realtek_driver_init+0x0/0xfc0 [snd_hda_codec_realtek] returned 0 after 92678 usecs

It seems ASUS computers have had a similar issue recently: https://asus-linux.org/guides/cirrus-amps/

chrysophylax avatar Mar 30 '25 23:03 chrysophylax

I ran i2cdetect -l but the output is empty.

That means no i2c bus is detected at all (or at least there's no driver loaded for the controller). But that combined with the missing ACPI entry makes me think it might be disabled in your BIOS settings.

You can also try sudo sensors-detect to at least scan for i2c bus controllers.

bwarden avatar Mar 31 '25 20:03 bwarden

After asking upstream https://bugzilla.kernel.org/show_bug.cgi?id=219976 it turns out we are missing a config flag. I compiled 6.13.9 after running update.sh with CONFIG_SERIAL_MULTI_INSTANTIATE=m and speaker sound now works. Opened a PR.

dmesg | grep cs35l41-hda
[   18.712718] cs35l41-hda i2c-CSC3551:00-cs35l41-hda.0: Cirrus Logic CS35L41 (35a40), Revision: B2
[   18.713331] probe of i2c-CSC3551:00-cs35l41-hda.0 returned 0 after 84166 usecs
[   18.714242] cs35l41-hda i2c-CSC3551:00-cs35l41-hda.1: Reset line busy, assuming shared reset
[   18.760468] cs35l41-hda i2c-CSC3551:00-cs35l41-hda.1: Cirrus Logic CS35L41 (35a40), Revision: B2
[   18.760503] probe of i2c-CSC3551:00-cs35l41-hda.1 returned 0 after 47145 usecs
[   18.822413] cs35l41-hda i2c-CSC3551:00-cs35l41-hda.0: DSP1: cirrus/cs35l41-dsp1-spk-prot-17aa2318.wmfw: format 3 timestamp 0x6128e16b
[   18.822421] cs35l41-hda i2c-CSC3551:00-cs35l41-hda.0: DSP1: cirrus/cs35l41-dsp1-spk-prot-17aa2318.wmfw: Fri 27 Aug 2021 14:58:19 W. Europe Daylight Time
[   19.299402] cs35l41-hda i2c-CSC3551:00-cs35l41-hda.0: DSP1: Firmware: 400a4 vendor: 0x2 v0.43.1, 2 algorithms
[   19.300626] cs35l41-hda i2c-CSC3551:00-cs35l41-hda.0: DSP1: cirrus/cs35l41-dsp1-spk-prot-17aa2318-r0.bin: v0.43.1
[   19.300631] cs35l41-hda i2c-CSC3551:00-cs35l41-hda.0: DSP1: spk-prot: C:\Working\Project\LCFC\Z13&Z16\Z13-Pegasus-NDA-P\2022-03-11-release 3% 5%\5% tuning\17AA22F1_202203
[   19.391516] cs35l41-hda i2c-CSC3551:00-cs35l41-hda.0: Firmware Loaded - Type: spk-prot, Gain: 16
[   19.391570] cs35l41-hda i2c-CSC3551:00-cs35l41-hda.0: CS35L41 Bound - SSID: 17AA2318, BST: 1, VSPK: 1, CH: R, FW EN: 1, SPKID: -19
[   19.391576] snd_hda_codec_realtek hdaudioC2D0: bound i2c-CSC3551:00-cs35l41-hda.0 (ops cs35l41_hda_comp_ops [snd_hda_scodec_cs35l41])
[   19.393378] cs35l41-hda i2c-CSC3551:00-cs35l41-hda.1: DSP1: cirrus/cs35l41-dsp1-spk-prot-17aa2318.wmfw: format 3 timestamp 0x6128e16b
[   19.393381] cs35l41-hda i2c-CSC3551:00-cs35l41-hda.1: DSP1: cirrus/cs35l41-dsp1-spk-prot-17aa2318.wmfw: Fri 27 Aug 2021 14:58:19 W. Europe Daylight Time
[   19.871452] cs35l41-hda i2c-CSC3551:00-cs35l41-hda.1: DSP1: Firmware: 400a4 vendor: 0x2 v0.43.1, 2 algorithms
[   19.872609] cs35l41-hda i2c-CSC3551:00-cs35l41-hda.1: DSP1: cirrus/cs35l41-dsp1-spk-prot-17aa2318-l0.bin: v0.43.1
[   19.872615] cs35l41-hda i2c-CSC3551:00-cs35l41-hda.1: DSP1: spk-prot: C:\Working\Project\LCFC\Z13&Z16\Z13-Pegasus-NDA-P\2022-03-11-release 3% 5%\5% tuning\17AA22F1_202203
[   19.963575] cs35l41-hda i2c-CSC3551:00-cs35l41-hda.1: Firmware Loaded - Type: spk-prot, Gain: 16
[   19.963673] cs35l41-hda i2c-CSC3551:00-cs35l41-hda.1: CS35L41 Bound - SSID: 17AA2318, BST: 1, VSPK: 0, CH: L, FW EN: 1, SPKID: -19
[   19.963682] snd_hda_codec_realtek hdaudioC2D0: bound i2c-CSC3551:00-cs35l41-hda.1 (ops cs35l41_hda_comp_ops [snd_hda_scodec_cs35l41])

chrysophylax avatar Apr 03 '25 18:04 chrysophylax

ok turning that on in our config.... speaking of obscure things ;)

On Thu, Apr 3, 2025 at 11:22 AM Billy @.***> wrote:

After asking upstream https://bugzilla.kernel.org/show_bug.cgi?id=219976 it turns out we are missing a config flag. I compiled 6.13.9 after running update.sh with CONFIG_SERIAL_MULTI_INSTANTIATE=m and speaker sound now works. Opened

— Reply to this email directly, view it on GitHub https://github.com/clearlinux/distribution/issues/3231#issuecomment-2776595761, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAJ54FLCTUPX76WQ4MPSZM32XV37TAVCNFSM6AAAAABT5JHNGKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDONZWGU4TKNZWGE . You are receiving this because you are subscribed to this thread.Message ID: @.***> [image: chrysophylax]chrysophylax left a comment (clearlinux/distribution#3231) https://github.com/clearlinux/distribution/issues/3231#issuecomment-2776595761

After asking upstream https://bugzilla.kernel.org/show_bug.cgi?id=219976 it turns out we are missing a config flag. I compiled 6.13.9 after running update.sh with CONFIG_SERIAL_MULTI_INSTANTIATE=m and speaker sound now works. Opened

— Reply to this email directly, view it on GitHub https://github.com/clearlinux/distribution/issues/3231#issuecomment-2776595761, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAJ54FLCTUPX76WQ4MPSZM32XV37TAVCNFSM6AAAAABT5JHNGKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDONZWGU4TKNZWGE . You are receiving this because you are subscribed to this thread.Message ID: @.***>

fenrus75 avatar Apr 03 '25 18:04 fenrus75