Bug 216925

Summary: Builtin microphone doesn't work on ThinkPad Neo 14 (21EFA000CD)
Product: Drivers Reporter: malvery (fort.malvery)
Component: Sound(ALSA)Assignee: Jaroslav Kysela (perex)
Status: NEW ---    
Severity: normal CC: christian.rohmann, ethan, gregor.billing.dev, lainme, mario.limonciello, stanislav.i.petrov
Priority: P1    
Hardware: AMD   
OS: Linux   
Kernel Version: 6.1.4 Subsystem:
Regression: No Bisected commit-id:
Attachments: cat /proc/asound/card1/codec#0
kernel patch

Description malvery 2023-01-13 11:10:15 UTC
Created attachment 303591 [details]
cat /proc/asound/card1/codec#0

CPU: AMD Ryzen 7 6800H
Codec: Conexant CX8070

$ lspci | grep Audio
33:00.1 Audio device: Advanced Micro Devices, Inc. [AMD/ATI] Rembrandt Radeon High Definition Audio Controller
33:00.5 Multimedia controller: Advanced Micro Devices, Inc. [AMD] ACP/ACP3X/ACP6x Audio Coprocessor (rev 60)
33:00.6 Audio device: Advanced Micro Devices, Inc. [AMD] Family 17h/19h HD Audio Controller

$ arecord -l
**** List of CAPTURE Hardware Devices ****
card 1: Generic_1 [HD-Audio Generic], device 0: CX8070 Analog [CX8070 Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

The device is present, but it is unable to get any record.
Comment 1 lainme 2023-03-04 19:07:10 UTC
I also encountered this issue, and have tested that adding

	{
		.driver_data = &acp6x_card,
		.matches = {
			DMI_MATCH(DMI_BOARD_VENDOR, "LENOVO"),
			DMI_MATCH(DMI_PRODUCT_NAME, "21EFA000CD"),
		}
	},

to dmi_system_id yc_acp_quirk_table in sound/soc/amd/yc/acp6x-mach.c can fix the issue. (together with load-module module-udev-detect use_ucm=0
 in /etc/pulse/default.pa)
Comment 2 Mario Limonciello (AMD) 2023-03-06 21:42:24 UTC
Would you mind submitting that patch to the mailing list?
Comment 3 lainme 2023-03-07 01:11:53 UTC
Created attachment 303891 [details]
kernel patch

Here is the patch generated with kernel 6.2.2
Comment 4 Mario Limonciello (AMD) 2023-03-07 21:13:11 UTC
Can you please send it up to alsa-devel mailing list if you haven't already?
Comment 5 lainme 2023-03-09 06:16:12 UTC
(In reply to Mario Limonciello (AMD) from comment #4)
> Can you please send it up to alsa-devel mailing list if you haven't already?

I have send it to the mailing list.
Comment 6 Stanislav Petrov 2024-02-03 14:15:41 UTC
I have the same issue with the built-in microphone on my notebook: Lenovo IdeaPad Pro 5 16ARP8 (83AS) with Ubuntu 23.10 (mantic) installed.

I've upgraded to latest stable kernel 6.7.3-060703-generic via mainline app. Previous kernel version was linux-image-6.5.0-15-generic (Ubuntu distro official one). The issue is there with both versions.

I believe it's because my model is missing of the quirk table. I'm not experienced enough to make change in source code and compile a patched version. 
Can you please add my model to the table?
------------------------------------
$ sudo dmidecode -t system
System Information
        Manufacturer: LENOVO
        Product Name: 83AS
        Version: IdeaPad Pro 5 16ARP8
        Family: IdeaPad Pro 5 16ARP8
------------------------------------
$ sudo dmidecode -t baseboard
Base Board Information
        Manufacturer: LENOVO
        Product Name: LNVNB161216
        Type: Motherboard
------------------------------------
$ lspci | grep Audio
73:00.1 Audio device: Advanced Micro Devices, Inc. [AMD/ATI] Rembrandt Radeon High Definition Audio Controller
73:00.5 Multimedia controller: Advanced Micro Devices, Inc. [AMD] ACP/ACP3X/ACP6x Audio Coprocessor (rev 60)
73:00.6 Audio device: Advanced Micro Devices, Inc. [AMD] Family 17h/19h HD Audio Controller
------------------------------------
$ arecord -l
**** List of CAPTURE Hardware Devices ****
card 1: Generic_1 [HD-Audio Generic], device 0: ALC257 Analog [ALC257 Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
------------------------------------
$ dmesg | grep '\(acp6x\|DMIC\)'
[    3.847205] snd_pci_acp6x 0000:73:00.5: enabling device (0000 -> 0002)
Comment 7 Mario Limonciello (AMD) 2024-02-05 22:19:13 UTC
Sure I've sent it for you
https://lore.kernel.org/all/20240205214853.2689-1-mario.limonciello@amd.com/
Comment 8 Stanislav Petrov 2024-02-06 08:24:58 UTC
(In reply to Mario Limonciello (AMD) from comment #7)
> Sure I've sent it for you
> https://lore.kernel.org/all/20240205214853.2689-1-mario.limonciello@amd.com/

I appreciate your help. Thank you!
Comment 9 Ethan du Toit 2024-03-17 06:42:04 UTC
I had the same issue with Arch on my Lenovo IdeaPad Pro 5. Then I added my model to the quirks table, booted with a compiled kernel, and it worked. I don't really know how to turn my changes to the quirks table into a patch, though, so can you please also add my model to the table?

Relevant information:
$ sudo dmidecode -t system
System Information
	Manufacturer: LENOVO
	Product Name: 83D5
	Version: IdeaPad Pro 5 16AHP9
	Family: IdeaPad Pro 5 16AHP9
$ sudo dmidecode -t baseboard
Base Board Information
	Manufacturer: LENOVO
	Product Name: LNVNB161216
	Type: Motherboard
$ lspci | grep Audio
35:00.1 Audio device: Advanced Micro Devices, Inc. [AMD/ATI] Rembrandt Radeon High Definition Audio Controller
35:00.5 Multimedia controller: Advanced Micro Devices, Inc. [AMD] ACP/ACP3X/ACP6x Audio Coprocessor (rev 63)
35:00.6 Audio device: Advanced Micro Devices, Inc. [AMD] Family 17h/19h HD Audio Controller


The edit I made to the source code (modelled on the patch above!) consisted in adding this:
{
	.driver_data = &acp6x_card,
	.matches = {
		DMI_MATCH(DMI_BOARD_VENDOR, "LENOVO"),
		DMI_MATCH(DMI_PRODUCT_NAME, "83D5"),
	}
},
Comment 10 gregor.billing.dev@gmail.com 2024-07-20 11:59:55 UTC
I am experiencing the same symptoms on my Lenovo ThinkPad E14 Gen6 AMD model.

The relevant output is as follows:

$ sudo dmidecode -t system
System Information
	Manufacturer: LENOVO
	Product Name: 21M3002BGE
	Version: ThinkPad E14 Gen 6
	Family: ThinkPad E14 Gen 6

$ sudo dmidecode -t baseboard
Base Board Information
	Manufacturer: LENOVO
	Product Name: 21M3002BGE
	Version: ThinkPad
	Type: Motherboard

$ lspci | grep -i Audio
04:00.1 Audio device: Advanced Micro Devices, Inc. [AMD/ATI] Rembrandt Radeon High Definition Audio Controller
04:00.5 Multimedia controller: Advanced Micro Devices, Inc. [AMD] ACP/ACP3X/ACP6x Audio Coprocessor (rev 60)
04:00.6 Audio device: Advanced Micro Devices, Inc. [AMD] Family 17h/19h HD Audio Controller

$ cat /proc/asound/card*/codec* | grep Codec
Codec: ATI R6xx HDMI
Codec: Conexant CX8070

Would it be possible for my model to be included in the quirk table as well?
Thank you!