I have Yoga Slim 7 Carbon Gen 6 (14" AMD) - 14ACN6. The laptop has 4 speakers, 2 woofers, and 2 tweeters. Woofers are not detected it seams, but I have sound from tweeters. The sound however is very low, thin and tremble. According to spec laptop has ALC3306 codec, but codec detected is ALC287. psref: https://psref.lenovo.com/Detail/Yoga/Yoga_Slim_7_Carbon_14ACN6?M=82L0005RMX alsa-info: http://alsa-project.org/db/?f=3d09e96d79c9c19c6c6b6afdea30bbdf209cf2d0 Just give me a word if you need output from any commands. Thanks in advance.
I'm also having this issue. This comment/patch looks to show some promise: https://bugzilla.kernel.org/show_bug.cgi?id=208555#c547 I tried the patch on 5.17, made no difference.
I have the same issue. This is my alsa-info output: http://alsa-project.org/db/?f=045c0b1e6b2f41b44c1a3bc145617ce60a6f756a I am currently trying to play around with the Realtek ALC287 settings, but so far no luck. P.S. I am documenting Linux support for this laptop here: https://github.com/milkovsky/Linux-on-Lenovo-Slim-7-Carbon-AMD/blob/main/README.md
Hi friends! I also have Yoga Slim 7 Carbon Gen 6 (14" AMD). Do you have any workaround solutions? I tried 5.17.15 and 5.18.8 kernels. Woofers doen't work :(
my current workaround - external speakers :,(
Yeap... I'm too. Very nice laptop with one big trouble on linux - sound :( Also mic working, but quite (I set 100% of volume). P.S. And another problem. Laptop detects mic from my external Monitor (Huawei MateView HSN 28"), but can't capture sound. That problem also on Lenovo ThinkBook 15 G2.
@Sergey let's open a separate issue for the mics? I guess that not all of them are detected as well.
@milkovskyi about MICs from my external Huawei MateView monitor... All works. It's my mistake. I connected external speakers to my Huawei MateView. By these reason mic didn't capture sound. I disconnected speakers and now I can capture mic input.
About Internal speakers of Yoga Slim 7 Carbon. I updated BIOS to latest version (H5CN36WW). It didn't help. alsa-info: http://alsa-project.org/db/?f=f29bdd6e36466bd422b0075c1f9fa387d8eae5f6 P.S. I heared internal speakers in the Windows today ... It's perfect sound. But in the linux is a pain :`(
I tried 5.18.11 kernel. Speakers not fixed.
Who can try that patch https://bugzilla.kernel.org/show_bug.cgi?id=208555#c645? Istruction for build kernel with the patch. https://bugzilla.kernel.org/show_bug.cgi?id=208555#c563 NOTE: 7 step contain typo. "module_install" should be "modules_install" P.S. I tried build 5.8.10 with that patch on Ubuntu 22.04 https://bugzilla.kernel.org/show_bug.cgi?id=208555#c649, but it didn't help... Maybe I made a mistake somewhere.
I also tried add next line after applied patch SND_PCI_QUIRK(0x17aa, 0x3856, "Yoga 7 Carbon 14ACN6", ALC287_FIXUP_YOGA9_IAP7_BASS_SPK_PIN) to sound/pci/hda/patch_realtek.c After kernel build and install bass not working. linux-5.18.10/ $ make clean $ make olddefconfig $ make -j 16 # make modules_install # make install NOTE: I building kernel from ubuntu with kernel 5.17.0-1012-oem. It's can affect "make olddefconfig"?
I'm currently using kernel 6.0.12-arch1-1 on my system and still no luck. Does anyone have an idea of the root cause of the problem? Is is a misconfiguration, bad drivers, or simply some compilation flag that needs to be enabled when building the kernel?
Currently using kernel 6.1.12-arch1-1 and this issue is still present.
A Lenovo Support forum thread has been started for this issue: https://forums.lenovo.com/t5/Ubuntu/Yoga-Slim-7-Carbon-14ACN6-Linux-Audio/m-p/5158856
Anyone from Cirrus Logic Audio Codec maintainers that can take a look at this?
Hi, Linux support for this laptop is currently in development and will be sent upstream as soon as it has been developed and tested. Thanks, Stefan
Ok, thank you very much Stefan. Let me know if you want me to test any patches!
Created attachment 306940 [details] Support Patch Hi, I've attached a patch which adds support for this laptop. This patch contains 4 separate patches squashed into one, for ease of testing, and can be applied onto the mainline v6.11 kernel. Please test this, and let me know if you have any issues with it, and if it works I can upstream it. Please note that this does not include the firmware release for this laptop, which needs to be upstreamed separately. For the moment, I just want to ensure that audio is working with the proposed patch. Thanks, Stefan
Hello Stefan. I compiled the patch vs 6.11.1. How should the sound behave different you think compared to current situation without patch. Or do we first need firmware in order for bass and sound to be working properly? Any commands you want output out of with patch applied?
Hi, Can you send me a dmesg to start with? Without specific firmware, the amp should load default firmware, which forces the amp to a low volume. Do you hear the speakers play any audio? Thanks, Stefan
Created attachment 306954 [details] dmesg log with patch applied on kernel 6.11.1
Attached full dmesg log in attachments. Yes speakers play audio. Tried to run a dolby atmos youtube test to see if I could hear a big difference with or without patch, can't really tell. Sound is as you say still low. I can hear sound when speaker test is running on 5 channels, hard to tell if front and back left/right is coming from same speaker. ❯ speaker-test -t wav -c 5 -l 1 speaker-test 1.2.12 Playback device is default Stream parameters are 48000Hz, S16_LE, 5 channels WAV file(s) Rate set to 48000Hz (requested 48000Hz) Buffer size range from 26 to 419430 Period size range from 12 to 209715 Periods = 4 was set period_size = 12000 was set buffer_size = 48000 0 - Front Left 4 - Front Center 1 - Front Right 3 - Rear Right 2 - Rear Left Time per period = 6.323674 ❯ pactl list sinks Sink #50 State: SUSPENDED Name: alsa_output.pci-0000_04_00.6.HiFi__Speaker__sink Description: Family 17h/19h HD Audio Controller Speaker Driver: PipeWire Sample Specification: s32le 2ch 48000Hz Channel Map: front-left,front-right Owner Module: 4294967295 Mute: no Volume: front-left: 58968 / 90% / -2.75 dB, front-right: 58968 / 90% / -2.75 dB balance 0.00 Base Volume: 65536 / 100% / 0.00 dB Monitor Source: alsa_output.pci-0000_04_00.6.HiFi__Speaker__sink.monitor Latency: 0 usec, configured 0 usec Flags: HARDWARE HW_MUTE_CTRL HW_VOLUME_CTRL DECIBEL_VOLUME LATENCY Properties: alsa.card = "1" alsa.card_name = "HD-Audio Generic" alsa.class = "generic" alsa.components = "HDA:10ec0287,17aa3856,00100002" alsa.device = "0" alsa.driver_name = "snd_hda_intel" alsa.id = "Generic_1" alsa.long_card_name = "HD-Audio Generic at 0xd03c0000 irq 94" alsa.mixer_device = "_ucm0003.hw:Generic_1" alsa.mixer_name = "Realtek ALC287" alsa.name = "ALC287 Analog" alsa.resolution_bits = "16" alsa.subclass = "generic-mix" alsa.subdevice = "0" alsa.subdevice_name = "subdevice #0" alsa.sync.id = "00000000:00000000:00000000:00000000" api.alsa.card.longname = "HD-Audio Generic at 0xd03c0000 irq 94" api.alsa.card.name = "HD-Audio Generic" api.alsa.open.ucm = "true" api.alsa.path = "hw:Generic_1" api.alsa.pcm.card = "1" api.alsa.pcm.stream = "playback" audio.channels = "2" audio.position = "FL,FR" card.profile.device = "0" device.api = "alsa" device.class = "sound" device.id = "47" device.profile.description = "Speaker" device.profile.name = "HiFi: Speaker: sink" device.routes = "1" factory.name = "api.alsa.pcm.sink" media.class = "Audio/Sink" device.description = "Family 17h/19h HD Audio Controller" node.name = "alsa_output.pci-0000_04_00.6.HiFi__Speaker__sink" node.nick = "ALC287 Analog" node.pause-on-idle = "false" object.path = "alsa:acp:Generic_1:0:playback" port.group = "playback" priority.driver = "1000" priority.session = "1000" factory.id = "19" clock.quantum-limit = "8192" client.id = "41" node.driver = "true" node.loop.name = "data-loop.0" library.name = "audioconvert/libspa-audioconvert" object.id = "50" object.serial = "50" api.acp.auto-port = "false" api.alsa.card = "1" api.alsa.use-acp = "true" api.dbus.ReserveDevice1 = "Audio1" api.dbus.ReserveDevice1.Priority = "-20" device.bus = "pci" device.bus_path = "pci-0000:04:00.6" device.enum.api = "udev" device.icon_name = "audio-card-analog-pci" device.name = "alsa_card.pci-0000_04_00.6" device.nick = "HD-Audio Generic" device.plugged.usec = "13655140" device.product.id = "0x15e3" device.product.name = "Family 17h/19h HD Audio Controller" device.subsystem = "sound" sysfs.path = "/devices/pci0000:00/0000:00:08.1/0000:04:00.6/sound/card1" device.vendor.id = "0x1022" device.vendor.name = "Advanced Micro Devices, Inc. [AMD]" device.string = "1" Ports: [Out] Speaker: Speaker (type: Speaker, priority: 100, availability unknown) Active Port: [Out] Speaker Formats: pcm
Just one thing, probably does not matter, but in patch maybe get name of device from product version. Yoga Slim 7 Carbon 14ACN6. But I see the patch use right Subsystem Id: 0x17aa3856. !!DMI Information !!--------------- Manufacturer: LENOVO Product Name: 82L0 Product Version: Yoga Slim 7 Carbon 14ACN6 Firmware Version: H5CN31WW System SKU: LENOVO_MT_82L0_BU_idea_FM_Yoga Slim 7 Carbon 14ACN6 Board Vendor: LENOVO Board Name: LNVNB161216
Created attachment 306955 [details] Support patch v2 Hi, I noticed an issue with the patch I sent, can you re-test this new one, and send me another dmesg of the result? Please also let me know if you notice any difference in audio with the new patch. Thanks, Stefan
Ok, no problem, I will report back dmesg in about an hour, just have to recompile.
Created attachment 306957 [details] dmesg log with patch V2
I see two additions with patch V2 when running sudo dmesg | grep -i audio [ 14.187533] snd_hda_codec_realtek hdaudioC1D0: bound i2c-CLSA0102:00-cs35l41-hda.0 (ops cs35l41_hda_comp_ops [snd_hda_scodec_cs35l41]) [ 14.800442] snd_hda_codec_realtek hdaudioC1D0: bound i2c-CLSA0102:00-cs35l41-hda.1 (ops cs35l41_hda_comp_ops [snd_hda_scodec_cs35l41])
Hi, I can now see it probing, but there still seems to be an issue, can you sent me an acpi dump of your system: acpidump > acpidump.out Thanks, Stefan
Created attachment 306958 [details] acpidump
Havent had a chance to compare audio yet, but it still works with new patch. But probably still low, thin and tremble if that makes sense. Is it best to test with dolby atmos media? I will compare pre/post patch to see if there is a difference when you are happy with patch.
Created attachment 306965 [details] Support Patch v3 Hi, Looking at the acpidump, there is an additional issue, so I have another patch for you to test. Please send another dmesg. Thanks, Stefan
Hi again, compiling this now stefan. Will probably take 1 hour+. Which kernel module contains these drivers? I'm compiling all now so takes a little while. Oppsig.
Created attachment 306971 [details] dmesg log patch v3
This is compiled vs 6.11.2. See some errors like this: [ 50.979841] cs35l41-hda i2c-CLSA0102:00-cs35l41-hda.0: Failed waiting for CS35L41_PUP_DONE_MASK: -110
Hi, Yes, that is still a problem, I need to have a deeper look. Unfortunately, I'm away for a couple of weeks, so I'll have to look at it when I get back. Thanks, Stefan
Ok, no problem. Thanks for your help so far though! I can test later when your back! Oppsig
Created attachment 307041 [details] Debug Enablement Patch Hi, Looking at your logs again, I'm not yet sure exactly of the cause of the error. The error message in question could be caused by the Realtek Codec not supplying the I2S clock to the Amp. I believe this laptop has 4 speakers, 2 of which are attached directly to the Codec, and 2 which are attached to the Amps, supplied with I2S data from the Codec. If I understand correctly, you *are* hearing some audio, even when the cs35l41 driver is not functioning, which leads me to believe the Codec speakers are working. Its possible that something is required in the Realtek Codec driver to tell the Realtek codec to provide the I2S to the amps. To start with, I have provided a patch which should add additional debug into the Dmesg logs, can you try this patch, on top of the patch I provided most recently, and send me the full dmesg log? Thanks, Stefan
Yes that is correct, I can hear sound with or without patch enabled, not sure if I am hearing both the codec and amps speakers, or just codec speakers. Sound is low at 100%, and kinda thin/treamble. So definitely a big difference to running on Windows. Anyway, I'm recompiling now on 6.11.5, will report back full dmesg log. Thanks -- Oppsig
Created attachment 307056 [details] dmesg log patch v3 verbose
Created attachment 307057 [details] dmesg log patch v3 verbose
I see some new error messages so far. cat dmesg_log_patchv3_verbose | grep -i CLSA0102 [ 14.650216] cs35l41-hda i2c-CLSA0102:00-cs35l41-hda.0: Failed to request 'cirrus/cs35l41-dsp1-spk-prot-17aa3856-l0.wmfw' [ 14.650427] cs35l41-hda i2c-CLSA0102:00-cs35l41-hda.0: Failed to request 'cirrus/cs35l41-dsp1-spk-prot-17aa3856.wmfw' [ 14.650429] cs35l41-hda i2c-CLSA0102:00-cs35l41-hda.0: Falling back to default firmware. [ 14.651546] cs35l41-hda i2c-CLSA0102:00-cs35l41-hda.0: Loading WMFW Firmware: cirrus/cs35l41-dsp1-spk-prot.wmfw [ 14.651549] cs35l41-hda i2c-CLSA0102:00-cs35l41-hda.0: Loading Coefficient File: cirrus/cs35l41-dsp1-spk-prot.bin [ 14.651760] cs35l41-hda i2c-CLSA0102:00-cs35l41-hda.0: Failed to request 'cirrus/cs35l41-dsp1-spk-prot.bincfg' [ 14.651762] cs35l41-hda i2c-CLSA0102:00-cs35l41-hda.0: Missing Tuning Param for file: cirrus/cs35l41-dsp1-spk-prot.bin: -2
Anyway, just report back if you want me to do additional tests, I've uploaded full dmesg as you requested. thanks a lot! :)
Created attachment 307058 [details] Debug Enablement Patch v2 Hi, Its looking likely that something is missing from the Realtek Codec. I've attached a new patch to replace the previous one to give some deeper logging. Please re-test this patch, and send me a new log of the result. Thanks, Stefan
Created attachment 307061 [details] dmesg_debug_enablement_patch_v2
Compiled vs 6.11.5.
Hi, The new logs indicate that the clock to the Cirrus amps are missing. The clock is provided by the Realtek Codec, at the point of playback, alongside the other I2S signals. In most cases, the Realtek Codec does this without having to set anything special, however in some cases, like this one, it needs an additional setting, such as a fixup inside the Realtek driver. There are examples where such quirks are chained alongside the Cirrus amp quirks, such as the quirk ALC285_FIXUP_SPEAKER2_TO_DAC1, in order to get both codec speakers and amp speakers working. Unfortunately, we were unable to source this laptop to test this ourselves, so we cannot provide a patch which chains one of these quirks, since this is setting something within the Realtek Codec's driver, and we cannot guarantee that it won't damage your laptop. Instead, I recommend trying to talk to Realtek to try and get them to tell you which is the appropriate quirk. Please note, the support patch I provided to you would still be required to get the Cirrus amp to work, in addition to any change to get the Realtek Codec to produce the I2S required by the Cirrus Amp. If you can find a quirk which provides the I2S to the amp from Realtek, we would be happy to upstream our patches to support this laptop. Thanks, Stefan
I do have a laptop of this build, that is just lying around. Purely for the purpose of saving costs on shipment, would I prefer to offer it via VRC or similar, but it could be provided 24/7 this way, in case you guys want to test anything. I could obviously also assist with it. Let me know, if you are interested.
Sorry, I misspelled VNC in the last message. Generally, I am open for remote desktop software. Ideally compatible with Wayland.
Added some of the people from realtek that has contributed to the patch_realtek.c file in hope that they can help us forward. Please see latest comment from stefan. We need clock to the cirrus amps provided by the Realtek Codec!
FYI I don't have the hardware which is the subject of this bug so I am unable to assist. My work on the Realtek driver is limited to the ALC260 chip in a (now very old but still operational) laptop I have. Sorry. I will therefore remove myself from this bug report's CC list.