Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
* snd_hda_codec_cirrus kernel oops
@ 2023-05-11 15:12 Olliver Schinagl
  2023-05-12  9:01 ` Takashi Iwai
  0 siblings, 1 reply; 11+ messages in thread
From: Olliver Schinagl @ 2023-05-11 15:12 UTC (permalink / raw)
  To: alsa-devel

Hey list,

I've noticed the following crash since the last few days, causing audio 
to no longer to work. It could be related to me updating the firmware 
(bios) not too long ago (I load Mac OS every few months via an external 
drive) which caused the firmware to be updated. Or, it was a kernel 
update, that came along every few weeks.

I'll try to find my archlinux bugzilla stuff, to report it there as 
well, but I don't think they are actively patching the sound stuff.

The last commit I'm seeing on `patch_cirrus.c` seems to be from aug 
2022, so that can't be it, though incidentally, the change is with 
regards to support for iMac 12,1 model, which is interesting as the 
number is the same.

I understand you guys probably get tons of bug reports, but best to 
leave it here, just in case.

[   90.497004] CPU: 3 PID: 343 Comm: modprobe Not tainted 6.3.1-arch2-1 
#1 4c16b0b90f71a940c7f1bb2eb00cdd9db2a83452
[   90.497008] Hardware name: Apple Inc. 
MacBookPro12,1/Mac-E43C1C25D4880AD6, BIOS 481.0.0.0.0 01/12/2023
[   90.497010] RIP: 0010:get_line_out_pfx+0x2dd/0x3e0 
[snd_hda_codec_generic]
[   90.497019] Code: f9 01 0f 84 20 fe ff ff 48 c7 c2 4d 45 f9 c0 41 83 
f9 02 0f 85 fe fd ff ff e9 0a fe ff ff 48 c7 c7 6e 45
f9 c0 e8 13 26 32 e6 <0f> 0b 48 c7 c2 dd 45 f9 c0 e9 f0 fd ff ff 8b 91 
10 0b 00 00 48 8b
[   90.497021] RSP: 0018:ffffa50740cebad8 EFLAGS: 00010282
[   90.497023] RAX: 0000000000000000 RBX: ffff90ea048d1cf0 RCX: 
0000000000000027
[   90.497025] RDX: ffff90ed5eda1688 RSI: 0000000000000001 RDI: 
ffff90ed5eda1680
[   90.497027] RBP: 0000000000000004 R08: 0000000000000000 R09: 
ffffa50740ceb968
[   90.497028] R10: 0000000000000003 R11: ffffffffa90ca208 R12: 
ffffffffc0f948c0
[   90.497030] R13: ffff90ea13961000 R14: ffff90ea13940000 R15: 
0000000010000013
[   90.497032] FS:  00007f1db7091740(0000) GS:ffff90ed5ed80000(0000) 
knlGS:0000000000000000
[   90.497034] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[   90.497036] CR2: 000056301fb6f000 CR3: 00000001018ec002 CR4: 
00000000003706e0
[   90.497038] Call Trace:
[   90.497040]  <TASK>
[   90.497043]  snd_hda_gen_parse_auto_config+0xa54/0x2d50 
[snd_hda_codec_generic 81639eb673de159e5e532c3e233834b733e4a85d]
[   90.497066]  ? snd_hda_parse_pin_defcfg+0xaf7/0xda0 [snd_hda_codec 
5b5014cb067d97e046acd84ac2db87d5fa068fb6]
[   90.497086]  cs_parse_auto_config+0x3b/0xa0 [snd_hda_codec_cirrus 
9ac52229b60afb26837192841054ac3dbe8aecc3]
[   90.497094]  patch_cs4208+0x155/0x1a0 [snd_hda_codec_cirrus 
9ac52229b60afb26837192841054ac3dbe8aecc3]
[   90.497101]  ? snd_hdac_regmap_init+0x24/0x50 [snd_hda_core 
b180f4281d829fe0e1d0ef6f041e0fc5adf64817]
[   90.497128]  hda_codec_driver_probe+0x98/0x150 [snd_hda_codec 
5b5014cb067d97e046acd84ac2db87d5fa068fb6]
[   90.497143]  really_probe+0x19b/0x3e0
[   90.497149]  ? __pfx___driver_attach+0x10/0x10
[   90.497152]  __driver_probe_device+0x78/0x160
[   90.497156]  driver_probe_device+0x1f/0x90
[   90.497159]  __driver_attach+0xd2/0x1c0
[   90.497163]  bus_for_each_dev+0x85/0xd0
[   90.497166]  bus_add_driver+0x116/0x220
[   90.497170]  driver_register+0x59/0x100
[   90.497173]  ? __pfx_init_module+0x10/0x10 [snd_hda_codec_cirrus 
9ac52229b60afb26837192841054ac3dbe8aecc3]
[   90.497179]  do_one_initcall+0x5a/0x240
[   90.497184]  do_init_module+0x4a/0x200
[   90.497190]  __do_sys_init_module+0x17f/0x1b0
[   90.497195]  do_syscall_64+0x5d/0x90
[   90.497213]  ? do_user_addr_fault+0x1e0/0x720
[   90.497217]  ? exc_page_fault+0x7c/0x180
[   90.497222]  entry_SYSCALL_64_after_hwframe+0x72/0xdc
[   90.497225] RIP: 0033:0x7f1db6b21f9e
[   90.497242] Code: 48 8b 0d bd ed 0c 00 f7 d8 64 89 01 48 83 c8 ff c3 
66 2e 0f 1f 84 00 00 00 00 00 90 f3 0f 1e fa 49 89 ca b8 af 00 00 00 0f 
05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d 8a ed 0c 00 f7 d8 64 89 01 48
[   90.497244] RSP: 002b:00007fff2ac9ec58 EFLAGS: 00000246 ORIG_RAX: 
00000000000000af
[   90.497246] RAX: ffffffffffffffda RBX: 00005614a9a07e00 RCX: 
00007f1db6b21f9e
[   90.497248] RDX: 00005614a8e1dcb2 RSI: 0000000000010660 RDI: 
00005614a9a6cdb0
[   90.497250] RBP: 00005614a8e1dcb2 R08: 0000000000010660 R09: 
0000000000000000
[   90.497251] R10: 000000000005d8a1 R11: 0000000000000246 R12: 
0000000000040000
[   90.497253] R13: 00005614a9a07c50 R14: 0000000000000000 R15: 
00005614a9a0bbb0
[   90.497270]  </TASK>
[   90.497271] ---[ end trace 0000000000000000 ]---
[   90.497273] ------------[ cut here ]------------
[   90.497274] BUG?
[   90.497284] WARNING: CPU: 3 PID: 343 at 
sound/pci/hda/hda_generic.c:1238 get_line_out_pfx+0x2dd/0x3e0 
[snd_hda_codec_generic]
[   90.497293] Modules linked in: snd_hda_codec_cirrus(+) brcmfmac(+) 
snd_hda_codec_generic ledtrig_audio brcmutil iTCO_wdt snd_hda_intel 
mei_pxp mei_hdcp snd_intel_dspcfg btusb irqbypass snd_intel_sdw_acpi 
btrtl intel_pmc_bxt snd_hda_codec btbcm drm_buddy spi_intel_platform 
btintel snd_hda_core spi_intel iTCO_vendor_support rapl btmtk cfg80211 
applesmc i2c_i801 mei_me joydev i2c_algo_bit intel_cstate snd_hwdep ttm 
i2c_smbus pcspkr mei intel_uncore intel_pch_thermal bluetooth lpc_ich 
snd_pcm thunderbolt mmc_core drm_display_helper snd_timer snd acpi_als 
ecdh_generic cec mousedev bcm5974 rfkill intel_gtt 
industrialio_triggered_buffer soundcore sbs kfifo_buf video 
apple_mfi_fastcharge sbshc industrialio wmi apple_bl mac_hid 
dm_multipath sg loop crypto_user fuse bpf_preload ip_tables x_tables 
usbhid crct10dif_pclmul crc32_pclmul polyval_clmulni polyval_generic 
gf128mul ghash_clmulni_intel sha512_ssse3 aesni_intel crypto_simd cryptd 
applespi crc16 xhci_pci spi_pxa2xx_pci spi_pxa2xx_platform 
xhci_pci_renesas dw_dmac hid_apple
[   90.497374]  tg3 libphy vfat fat btrfs blake2b_generic xor raid6_pq 
libcrc32c crc32c_generic crc32c_intel dm_crypt cbc encrypted_keys 
trusted asn1_encoder tee dm_mod
[   90.497388] CPU: 3 PID: 343 Comm: modprobe Tainted: G        W 
   6.3.1-arch2-1 #1 4c16b0b90f71a940c7f1bb2eb00cdd9db2a83452
[   90.497391] Hardware name: Apple Inc. 
MacBookPro12,1/Mac-E43C1C25D4880AD6, BIOS 481.0.0.0.0 01/12/2023
[   90.497392] RIP: 0010:get_line_out_pfx+0x2dd/0x3e0 
[snd_hda_codec_generic]
[   90.497401] Code: f9 01 0f 84 20 fe ff ff 48 c7 c2 4d 45 f9 c0 41 83 
f9 02 0f 85 fe fd ff ff e9 0a fe ff ff 48 c7 c7 6e 45 f9 c0 e8 13 26 32 
e6 <0f> 0b 48 c7 c2 dd 45 f9 c0 e9 f0 fd ff ff 8b 91 10 0b 00 00 48 8b
[   90.497403] RSP: 0018:ffffa50740cebad8 EFLAGS: 00010282
[   90.497418] RAX: 0000000000000000 RBX: ffff90ea048d1cf0 RCX: 
0000000000000027
[   90.497420] RDX: ffff90ed5eda1688 RSI: 0000000000000001 RDI: 
ffff90ed5eda1680
[   90.497422] RBP: 0000000000000004 R08: 0000000000000000 R09: 
ffffa50740ceb968
[   90.497423] R10: 0000000000000003 R11: ffffffffa90ca208 R12: 
0000000000000004
[   90.497425] R13: ffff90ea13961000 R14: ffff90ea13940000 R15: 
ffffffffc0f945dd
[   90.497427] FS:  00007f1db7091740(0000) GS:ffff90ed5ed80000(0000) 
knlGS:0000000000000000
[   90.497429] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[   90.497430] CR2: 000056301fb6f000 CR3: 00000001018ec002 CR4: 
00000000003706e0
[   90.497432] Call Trace:
[   90.497433]  <TASK>
[   90.497435]  snd_hda_gen_parse_auto_config+0x9a5/0x2d50 
[snd_hda_codec_generic 81639eb673de159e5e532c3e233834b733e4a85d]
[   90.497444]  ? snd_hda_parse_pin_defcfg+0xaf7/0xda0 [snd_hda_codec 
5b5014cb067d97e046acd84ac2db87d5fa068fb6]
[   90.497463]  cs_parse_auto_config+0x3b/0xa0 [snd_hda_codec_cirrus 
9ac52229b60afb26837192841054ac3dbe8aecc3]
[   90.497469]  patch_cs4208+0x155/0x1a0 [snd_hda_codec_cirrus 
9ac52229b60afb26837192841054ac3dbe8aecc3]
[   90.497476]  ? snd_hdac_regmap_init+0x24/0x50 [snd_hda_core 
b180f4281d829fe0e1d0ef6f041e0fc5adf64817]
[   90.497489]  hda_codec_driver_probe+0x98/0x150 [snd_hda_codec 
5b5014cb067d97e046acd84ac2db87d5fa068fb6]
[   90.497516]  really_probe+0x19b/0x3e0
[   90.497520]  ? __pfx___driver_attach+0x10/0x10
[   90.497523]  __driver_probe_device+0x78/0x160
[   90.497527]  driver_probe_device+0x1f/0x90
[   90.497530]  __driver_attach+0xd2/0x1c0
[   90.497533]  bus_for_each_dev+0x85/0xd0
[   90.497537]  bus_add_driver+0x116/0x220
[   90.497540]  driver_register+0x59/0x100
[   90.497543]  ? __pfx_init_module+0x10/0x10 [snd_hda_codec_cirrus 
9ac52229b60afb26837192841054ac3dbe8aecc3]
[   90.497549]  do_one_initcall+0x5a/0x240
[   90.497553]  do_init_module+0x4a/0x200
[   90.497570]  __do_sys_init_module+0x17f/0x1b0
[   90.497576]  do_syscall_64+0x5d/0x90
[   90.497579]  ? do_user_addr_fault+0x1e0/0x720
[   90.497583]  ? exc_page_fault+0x7c/0x180
[   90.497587]  entry_SYSCALL_64_after_hwframe+0x72/0xdc
[   90.497589] RIP: 0033:0x7f1db6b21f9e
[   90.497595] Code: 48 8b 0d bd ed 0c 00 f7 d8 64 89 01 48 83 c8 ff c3 
66 2e 0f 1f 84 00 00 00 00 00 90 f3 0f 1e fa 49 89 ca b8 af 00 00 00 0f 
05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d 8a ed 0c 00 f7 d8 64 89 01 48
[   90.497596] RSP: 002b:00007fff2ac9ec58 EFLAGS: 00000246 ORIG_RAX: 
00000000000000af
[   90.497599] RAX: ffffffffffffffda RBX: 00005614a9a07e00 RCX: 
00007f1db6b21f9e
[   90.497601] RDX: 00005614a8e1dcb2 RSI: 0000000000010660 RDI: 
00005614a9a6cdb0
[   90.497602] RBP: 00005614a8e1dcb2 R08: 0000000000010660 R09: 
0000000000000000
[   90.497604] R10: 000000000005d8a1 R11: 0000000000000246 R12: 
0000000000040000
[   90.497605] R13: 00005614a9a07c50 R14: 0000000000000000 R15: 
00005614a9a0bbb0
[   90.497609]  </TASK>
[   90.497610] ---[ end trace 0000000000000000 ]---
[   90.512670] bcm5974: bad trackpad package, length: 8
[   90.569769] input: HDA Intel PCH Mic as 
/devices/pci0000:00/0000:00:1b.0/sound/card1/input9
[   90.569831] input: HDA Intel PCH Line as 
/devices/pci0000:00/0000:00:1b.0/sound/card1/input10
[   90.569886] input: HDA Intel PCH Headphone as 
/devices/pci0000:00/0000:00:1b.0/sound/card1/input11
[   90.569926] input: HDA Intel PCH SPDIF as 
/devices/pci0000:00/0000:00:1b.0/sound/card1/input12
[   90.569977] input: HDA Intel PCH SPDIF In as 
/devices/pci0000:00/0000:00:1b.0/sound/card1/input13

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: snd_hda_codec_cirrus kernel oops
  2023-05-11 15:12 snd_hda_codec_cirrus kernel oops Olliver Schinagl
@ 2023-05-12  9:01 ` Takashi Iwai
  2023-05-16 16:49   ` Olliver Schinagl
  0 siblings, 1 reply; 11+ messages in thread
From: Takashi Iwai @ 2023-05-12  9:01 UTC (permalink / raw)
  To: Olliver Schinagl; +Cc: alsa-devel

On Thu, 11 May 2023 17:12:23 +0200,
Olliver Schinagl wrote:
> 
> Hey list,
> 
> I've noticed the following crash since the last few days, causing
> audio to no longer to work. It could be related to me updating the
> firmware (bios) not too long ago (I load Mac OS every few months via
> an external drive) which caused the firmware to be updated. Or, it was
> a kernel update, that came along every few weeks.
> 
> I'll try to find my archlinux bugzilla stuff, to report it there as
> well, but I don't think they are actively patching the sound stuff.
> 
> The last commit I'm seeing on `patch_cirrus.c` seems to be from aug
> 2022, so that can't be it, though incidentally, the change is with
> regards to support for iMac 12,1 model, which is interesting as the
> number is the same.
> 
> I understand you guys probably get tons of bug reports, but best to
> leave it here, just in case.
> 
> [   90.497004] CPU: 3 PID: 343 Comm: modprobe Not tainted
> 6.3.1-arch2-1 #1 4c16b0b90f71a940c7f1bb2eb00cdd9db2a83452
> [   90.497008] Hardware name: Apple
> Inc. MacBookPro12,1/Mac-E43C1C25D4880AD6, BIOS 481.0.0.0.0 01/12/2023
> [   90.497010] RIP: 0010:get_line_out_pfx+0x2dd/0x3e0
> [snd_hda_codec_generic]

Can you try to decode which line does it hit?

Also, as a blind shot, does the patch below work around the bug?


thanks,

Takashi

-- 8< --
--- a/sound/pci/hda/hda_generic.c
+++ b/sound/pci/hda/hda_generic.c
@@ -1182,7 +1182,7 @@ static const char *get_line_out_pfx(struct hda_codec *codec, int ch,
 
 	/* multi-io channels */
 	if (ch >= cfg->line_outs)
-		return channel_name[ch];
+		goto fixed_names;
 
 	switch (cfg->line_out_type) {
 	case AUTO_PIN_SPEAKER_OUT:
@@ -1234,8 +1234,9 @@ static const char *get_line_out_pfx(struct hda_codec *codec, int ch,
 	if (cfg->line_outs == 1 && !spec->multi_ios)
 		return "Line Out";
 
+ fixed_names:
 	if (ch >= ARRAY_SIZE(channel_name)) {
-		snd_BUG();
+		codec_err(codec, "Too many channels in %s: %d\n", __func__, ch);
 		return "PCM";
 	}
 

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: snd_hda_codec_cirrus kernel oops
  2023-05-12  9:01 ` Takashi Iwai
@ 2023-05-16 16:49   ` Olliver Schinagl
  2023-05-16 18:31     ` Takashi Iwai
  0 siblings, 1 reply; 11+ messages in thread
From: Olliver Schinagl @ 2023-05-16 16:49 UTC (permalink / raw)
  To: Takashi Iwai; +Cc: alsa-devel

Hey Takashi,

>> [   90.497004] CPU: 3 PID: 343 Comm: modprobe Not tainted
>> 6.3.1-arch2-1 #1 4c16b0b90f71a940c7f1bb2eb00cdd9db2a83452
>> [   90.497008] Hardware name: Apple
>> Inc. MacBookPro12,1/Mac-E43C1C25D4880AD6, BIOS 481.0.0.0.0 01/12/2023
>> [   90.497010] RIP: 0010:get_line_out_pfx+0x2dd/0x3e0
>> [snd_hda_codec_generic]
> 
> Can you try to decode which line does it hit?
This was the arch 'vendor' kernel, so not easily? I could have tried 
though I suppose :)

Instead, I just applied your patch and tried that instead.

> 
> Also, as a blind shot, does the patch below work around the bug?
[   16.593760] 0x000000000000-0x000000800000 : "BIOS"
[   16.603877] snd_hda_codec_cirrus hdaudioC1D0: autoconfig for CS4208: 
line_outs=5 (0x11/0x12/0x13/0x14/0x1d) type:speaker
[   16.603885] snd_hda_codec_cirrus hdaudioC1D0:    speaker_outs=0 
(0x0/0x0/0x0/0x0/0x0)
[   16.603888] snd_hda_codec_cirrus hdaudioC1D0:    hp_outs=1 
(0x10/0x0/0x0/0x0/0x0)
[   16.603890] snd_hda_codec_cirrus hdaudioC1D0:    mono: mono_out=0x0
[   16.603892] snd_hda_codec_cirrus hdaudioC1D0:    dig-out=0x1e/0x21
[   16.603894] snd_hda_codec_cirrus hdaudioC1D0:    inputs:
[   16.603895] snd_hda_codec_cirrus hdaudioC1D0:      Internal Mic=0x16
[   16.603897] snd_hda_codec_cirrus hdaudioC1D0:      Internal Mic=0x15
[   16.603899] snd_hda_codec_cirrus hdaudioC1D0:      Mic=0x18
[   16.603900] snd_hda_codec_cirrus hdaudioC1D0:      Internal Mic=0x19
[   16.603902] snd_hda_codec_cirrus hdaudioC1D0:      Internal Mic=0x1a
[   16.603904] snd_hda_codec_cirrus hdaudioC1D0:      Internal Mic=0x1b
[   16.603919] snd_hda_codec_cirrus hdaudioC1D0:      Internal Mic=0x1c
[   16.603921] snd_hda_codec_cirrus hdaudioC1D0:      Line=0x17
[   16.603922] snd_hda_codec_cirrus hdaudioC1D0:    dig-in=0x22
[   16.605152] snd_hda_codec_cirrus hdaudioC1D0: Too many channels in 
get_line_out_pfx: 4
[   16.605215] snd_hda_codec_cirrus hdaudioC1D0: Too many channels in 
get_line_out_pfx: 4

the good thing, you fixed the oops; the bad thing, it's no working, but 
hopefully this helps you gain more insight?

Olliver
> 
> 
> thanks,
> 
> Takashi
> 
> -- 8< --
> --- a/sound/pci/hda/hda_generic.c
> +++ b/sound/pci/hda/hda_generic.c
> @@ -1182,7 +1182,7 @@ static const char *get_line_out_pfx(struct hda_codec *codec, int ch,
>   
>   	/* multi-io channels */
>   	if (ch >= cfg->line_outs)
> -		return channel_name[ch];
> +		goto fixed_names;
>   
>   	switch (cfg->line_out_type) {
>   	case AUTO_PIN_SPEAKER_OUT:
> @@ -1234,8 +1234,9 @@ static const char *get_line_out_pfx(struct hda_codec *codec, int ch,
>   	if (cfg->line_outs == 1 && !spec->multi_ios)
>   		return "Line Out";
>   
> + fixed_names:
>   	if (ch >= ARRAY_SIZE(channel_name)) {
> -		snd_BUG();
> +		codec_err(codec, "Too many channels in %s: %d\n", __func__, ch);
>   		return "PCM";
>   	}
>   

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: snd_hda_codec_cirrus kernel oops
  2023-05-16 16:49   ` Olliver Schinagl
@ 2023-05-16 18:31     ` Takashi Iwai
  2023-05-18 14:24       ` Olliver Schinagl
  0 siblings, 1 reply; 11+ messages in thread
From: Takashi Iwai @ 2023-05-16 18:31 UTC (permalink / raw)
  To: Olliver Schinagl; +Cc: alsa-devel

On Tue, 16 May 2023 18:49:55 +0200,
Olliver Schinagl wrote:
> 
> Hey Takashi,
> 
> >> [   90.497004] CPU: 3 PID: 343 Comm: modprobe Not tainted
> >> 6.3.1-arch2-1 #1 4c16b0b90f71a940c7f1bb2eb00cdd9db2a83452
> >> [   90.497008] Hardware name: Apple
> >> Inc. MacBookPro12,1/Mac-E43C1C25D4880AD6, BIOS 481.0.0.0.0 01/12/2023
> >> [   90.497010] RIP: 0010:get_line_out_pfx+0x2dd/0x3e0
> >> [snd_hda_codec_generic]
> > 
> > Can you try to decode which line does it hit?
> This was the arch 'vendor' kernel, so not easily? I could have tried
> though I suppose :)
> 
> Instead, I just applied your patch and tried that instead.
> 
> > 
> > Also, as a blind shot, does the patch below work around the bug?
> [   16.593760] 0x000000000000-0x000000800000 : "BIOS"
> [   16.603877] snd_hda_codec_cirrus hdaudioC1D0: autoconfig for
> CS4208: line_outs=5 (0x11/0x12/0x13/0x14/0x1d) type:speaker
> [   16.603885] snd_hda_codec_cirrus hdaudioC1D0:    speaker_outs=0
> (0x0/0x0/0x0/0x0/0x0)
> [   16.603888] snd_hda_codec_cirrus hdaudioC1D0:    hp_outs=1
> (0x10/0x0/0x0/0x0/0x0)
> [   16.603890] snd_hda_codec_cirrus hdaudioC1D0:    mono: mono_out=0x0
> [   16.603892] snd_hda_codec_cirrus hdaudioC1D0:    dig-out=0x1e/0x21
> [   16.603894] snd_hda_codec_cirrus hdaudioC1D0:    inputs:
> [   16.603895] snd_hda_codec_cirrus hdaudioC1D0:      Internal Mic=0x16
> [   16.603897] snd_hda_codec_cirrus hdaudioC1D0:      Internal Mic=0x15
> [   16.603899] snd_hda_codec_cirrus hdaudioC1D0:      Mic=0x18
> [   16.603900] snd_hda_codec_cirrus hdaudioC1D0:      Internal Mic=0x19
> [   16.603902] snd_hda_codec_cirrus hdaudioC1D0:      Internal Mic=0x1a
> [   16.603904] snd_hda_codec_cirrus hdaudioC1D0:      Internal Mic=0x1b
> [   16.603919] snd_hda_codec_cirrus hdaudioC1D0:      Internal Mic=0x1c
> [   16.603921] snd_hda_codec_cirrus hdaudioC1D0:      Line=0x17
> [   16.603922] snd_hda_codec_cirrus hdaudioC1D0:    dig-in=0x22
> [   16.605152] snd_hda_codec_cirrus hdaudioC1D0: Too many channels in
> get_line_out_pfx: 4
> [   16.605215] snd_hda_codec_cirrus hdaudioC1D0: Too many channels in
> get_line_out_pfx: 4
> 
> the good thing, you fixed the oops; the bad thing, it's no working,
> but hopefully this helps you gain more insight?

Below is a bit better patch for fixing the Oops.

But, judging from the output above, I guess it won't help completely,
because the pin configuration looks broken; e.g. it reports too many
"Internal Mic" pins (which must be only one usually).

That said, the actual breakage (except for kernel Oops) is the pin
config set by BIOS.  Maybe it doesn't set up things properly *at all*
You'll need to correct it by providing the full pin config with a
quirk table.  And for that, you'll need to figure out the pins via
trial-and-error, for example, with the help of hdajackretask.


thanks,

Takashi

-- 8< --
From: Takashi Iwai <tiwai@suse.de>
Subject: [PATCH] ALSA: hda: Fix Oops by 9.1 surround channel names

get_line_out_pfx() may trigger an Oops by overflowing the static array
with more than 8 channels.  This was reported for MacBookPro 12,1 with
Cirrus codec.

As a workaround, extend for the 9.1 channels and also fix the
potential Oops by unifying the code paths accessing the same array
with the proper size check.

Reported-by: Olliver Schinagl <oliver@schinagl.nl>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/64d95eb0-dbdb-cff8-a8b1-988dc22b24cd@schinagl.nl
Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
 sound/pci/hda/hda_generic.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/sound/pci/hda/hda_generic.c b/sound/pci/hda/hda_generic.c
index fc114e522480..dbf7aa88e0e3 100644
--- a/sound/pci/hda/hda_generic.c
+++ b/sound/pci/hda/hda_generic.c
@@ -1155,8 +1155,8 @@ static bool path_has_mixer(struct hda_codec *codec, int path_idx, int ctl_type)
 	return path && path->ctls[ctl_type];
 }
 
-static const char * const channel_name[4] = {
-	"Front", "Surround", "CLFE", "Side"
+static const char * const channel_name[] = {
+	"Front", "Surround", "CLFE", "Side", "Back",
 };
 
 /* give some appropriate ctl name prefix for the given line out channel */
@@ -1182,7 +1182,7 @@ static const char *get_line_out_pfx(struct hda_codec *codec, int ch,
 
 	/* multi-io channels */
 	if (ch >= cfg->line_outs)
-		return channel_name[ch];
+		goto fixed_name;
 
 	switch (cfg->line_out_type) {
 	case AUTO_PIN_SPEAKER_OUT:
@@ -1234,6 +1234,7 @@ static const char *get_line_out_pfx(struct hda_codec *codec, int ch,
 	if (cfg->line_outs == 1 && !spec->multi_ios)
 		return "Line Out";
 
+ fixed_name:
 	if (ch >= ARRAY_SIZE(channel_name)) {
 		snd_BUG();
 		return "PCM";
-- 
2.35.3


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* Re: snd_hda_codec_cirrus kernel oops
  2023-05-16 18:31     ` Takashi Iwai
@ 2023-05-18 14:24       ` Olliver Schinagl
  2023-05-18 14:27         ` Takashi Iwai
  0 siblings, 1 reply; 11+ messages in thread
From: Olliver Schinagl @ 2023-05-18 14:24 UTC (permalink / raw)
  To: Takashi Iwai; +Cc: alsa-devel

Hey Takashi,

I've applied the patch you've listed below. Is there some 'fool-proof' 
way to produce _any_ output however? I've stopped pulse/pipe audio, and 
only use aplay + alsamixer. Back to basics as they say. For aplay, I use 
-D sysdefault:CARD=PCH (which was listed as a cirrus card with -L).

Alsamixer was used to ensure all volumes are open.

Without anything running, I was able to use hdajackretask to apply 
settings. But then, what to put. I get that I have to figure out, what 
is routed where (i'll try to find the schematic for the macbook pro 
12,1), but hence my question, is there some way to produce something? In 
hdajackretask I've enabled all pins, overriden them all, and set them 
all to the same configuration. 'Internal, internal, speaker, 
other-analog, green, not-present, 1, front'. I figured, by setting up 
verything to the internal speaker, I must get sound out of something, 
but alas.

I also have a Macbook pro from 1 or 2 generations earlier, 11,2 afaik, 
where the sound still does work. I've used the same config hdajackretask 
showed was in use there, but (obviously?) that didn't work.

So I'm a bit grasping at straws. Trying _every_ combination is a bit much?

Olliver

On 16-05-2023 20:31, Takashi Iwai wrote:
> On Tue, 16 May 2023 18:49:55 +0200,
> Olliver Schinagl wrote:
>>
>> Hey Takashi,
>>
>>>> [   90.497004] CPU: 3 PID: 343 Comm: modprobe Not tainted
>>>> 6.3.1-arch2-1 #1 4c16b0b90f71a940c7f1bb2eb00cdd9db2a83452
>>>> [   90.497008] Hardware name: Apple
>>>> Inc. MacBookPro12,1/Mac-E43C1C25D4880AD6, BIOS 481.0.0.0.0 01/12/2023
>>>> [   90.497010] RIP: 0010:get_line_out_pfx+0x2dd/0x3e0
>>>> [snd_hda_codec_generic]
>>>
>>> Can you try to decode which line does it hit?
>> This was the arch 'vendor' kernel, so not easily? I could have tried
>> though I suppose :)
>>
>> Instead, I just applied your patch and tried that instead.
>>
>>>
>>> Also, as a blind shot, does the patch below work around the bug?
>> [   16.593760] 0x000000000000-0x000000800000 : "BIOS"
>> [   16.603877] snd_hda_codec_cirrus hdaudioC1D0: autoconfig for
>> CS4208: line_outs=5 (0x11/0x12/0x13/0x14/0x1d) type:speaker
>> [   16.603885] snd_hda_codec_cirrus hdaudioC1D0:    speaker_outs=0
>> (0x0/0x0/0x0/0x0/0x0)
>> [   16.603888] snd_hda_codec_cirrus hdaudioC1D0:    hp_outs=1
>> (0x10/0x0/0x0/0x0/0x0)
>> [   16.603890] snd_hda_codec_cirrus hdaudioC1D0:    mono: mono_out=0x0
>> [   16.603892] snd_hda_codec_cirrus hdaudioC1D0:    dig-out=0x1e/0x21
>> [   16.603894] snd_hda_codec_cirrus hdaudioC1D0:    inputs:
>> [   16.603895] snd_hda_codec_cirrus hdaudioC1D0:      Internal Mic=0x16
>> [   16.603897] snd_hda_codec_cirrus hdaudioC1D0:      Internal Mic=0x15
>> [   16.603899] snd_hda_codec_cirrus hdaudioC1D0:      Mic=0x18
>> [   16.603900] snd_hda_codec_cirrus hdaudioC1D0:      Internal Mic=0x19
>> [   16.603902] snd_hda_codec_cirrus hdaudioC1D0:      Internal Mic=0x1a
>> [   16.603904] snd_hda_codec_cirrus hdaudioC1D0:      Internal Mic=0x1b
>> [   16.603919] snd_hda_codec_cirrus hdaudioC1D0:      Internal Mic=0x1c
>> [   16.603921] snd_hda_codec_cirrus hdaudioC1D0:      Line=0x17
>> [   16.603922] snd_hda_codec_cirrus hdaudioC1D0:    dig-in=0x22
>> [   16.605152] snd_hda_codec_cirrus hdaudioC1D0: Too many channels in
>> get_line_out_pfx: 4
>> [   16.605215] snd_hda_codec_cirrus hdaudioC1D0: Too many channels in
>> get_line_out_pfx: 4
>>
>> the good thing, you fixed the oops; the bad thing, it's no working,
>> but hopefully this helps you gain more insight?
> 
> Below is a bit better patch for fixing the Oops.
> 
> But, judging from the output above, I guess it won't help completely,
> because the pin configuration looks broken; e.g. it reports too many
> "Internal Mic" pins (which must be only one usually).
> 
> That said, the actual breakage (except for kernel Oops) is the pin
> config set by BIOS.  Maybe it doesn't set up things properly *at all*
> You'll need to correct it by providing the full pin config with a
> quirk table.  And for that, you'll need to figure out the pins via
> trial-and-error, for example, with the help of hdajackretask.
> 
> 
> thanks,
> 
> Takashi
> 
> -- 8< --
> From: Takashi Iwai <tiwai@suse.de>
> Subject: [PATCH] ALSA: hda: Fix Oops by 9.1 surround channel names
> 
> get_line_out_pfx() may trigger an Oops by overflowing the static array
> with more than 8 channels.  This was reported for MacBookPro 12,1 with
> Cirrus codec.
> 
> As a workaround, extend for the 9.1 channels and also fix the
> potential Oops by unifying the code paths accessing the same array
> with the proper size check.
> 
> Reported-by: Olliver Schinagl <oliver@schinagl.nl>
> Cc: <stable@vger.kernel.org>
> Link: https://lore.kernel.org/r/64d95eb0-dbdb-cff8-a8b1-988dc22b24cd@schinagl.nl
> Signed-off-by: Takashi Iwai <tiwai@suse.de>
> ---
>   sound/pci/hda/hda_generic.c | 7 ++++---
>   1 file changed, 4 insertions(+), 3 deletions(-)
> 
> diff --git a/sound/pci/hda/hda_generic.c b/sound/pci/hda/hda_generic.c
> index fc114e522480..dbf7aa88e0e3 100644
> --- a/sound/pci/hda/hda_generic.c
> +++ b/sound/pci/hda/hda_generic.c
> @@ -1155,8 +1155,8 @@ static bool path_has_mixer(struct hda_codec *codec, int path_idx, int ctl_type)
>   	return path && path->ctls[ctl_type];
>   }
>   
> -static const char * const channel_name[4] = {
> -	"Front", "Surround", "CLFE", "Side"
> +static const char * const channel_name[] = {
> +	"Front", "Surround", "CLFE", "Side", "Back",
>   };
>   
>   /* give some appropriate ctl name prefix for the given line out channel */
> @@ -1182,7 +1182,7 @@ static const char *get_line_out_pfx(struct hda_codec *codec, int ch,
>   
>   	/* multi-io channels */
>   	if (ch >= cfg->line_outs)
> -		return channel_name[ch];
> +		goto fixed_name;
>   
>   	switch (cfg->line_out_type) {
>   	case AUTO_PIN_SPEAKER_OUT:
> @@ -1234,6 +1234,7 @@ static const char *get_line_out_pfx(struct hda_codec *codec, int ch,
>   	if (cfg->line_outs == 1 && !spec->multi_ios)
>   		return "Line Out";
>   
> + fixed_name:
>   	if (ch >= ARRAY_SIZE(channel_name)) {
>   		snd_BUG();
>   		return "PCM";

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: snd_hda_codec_cirrus kernel oops
  2023-05-18 14:24       ` Olliver Schinagl
@ 2023-05-18 14:27         ` Takashi Iwai
  2023-05-18 15:11           ` Olliver Schinagl
  0 siblings, 1 reply; 11+ messages in thread
From: Takashi Iwai @ 2023-05-18 14:27 UTC (permalink / raw)
  To: Olliver Schinagl; +Cc: alsa-devel

On Thu, 18 May 2023 16:24:02 +0200,
Olliver Schinagl wrote:
> 
> Hey Takashi,
> 
> I've applied the patch you've listed below. Is there some 'fool-proof'
> way to produce _any_ output however? I've stopped pulse/pipe audio,
> and only use aplay + alsamixer. Back to basics as they say. For aplay,
> I use -D sysdefault:CARD=PCH (which was listed as a cirrus card with
> -L).
> 
> Alsamixer was used to ensure all volumes are open.
> 
> Without anything running, I was able to use hdajackretask to apply
> settings. But then, what to put. I get that I have to figure out, what
> is routed where (i'll try to find the schematic for the macbook pro
> 12,1), but hence my question, is there some way to produce something?
> In hdajackretask I've enabled all pins, overriden them all, and set
> them all to the same configuration. 'Internal, internal, speaker,
> other-analog, green, not-present, 1, front'. I figured, by setting up
> verything to the internal speaker, I must get sound out of something,
> but alas.
> 
> I also have a Macbook pro from 1 or 2 generations earlier, 11,2 afaik,
> where the sound still does work. I've used the same config
> hdajackretask showed was in use there, but (obviously?) that didn't
> work.
> 
> So I'm a bit grasping at straws. Trying _every_ combination is a bit much?

It's the hard part.  I'd try to copy the pin config of the existing
models at first, then try shooting one pin by one if it doesn't work.


Takashi

> 
> Olliver
> 
> On 16-05-2023 20:31, Takashi Iwai wrote:
> > On Tue, 16 May 2023 18:49:55 +0200,
> > Olliver Schinagl wrote:
> >> 
> >> Hey Takashi,
> >> 
> >>>> [   90.497004] CPU: 3 PID: 343 Comm: modprobe Not tainted
> >>>> 6.3.1-arch2-1 #1 4c16b0b90f71a940c7f1bb2eb00cdd9db2a83452
> >>>> [   90.497008] Hardware name: Apple
> >>>> Inc. MacBookPro12,1/Mac-E43C1C25D4880AD6, BIOS 481.0.0.0.0 01/12/2023
> >>>> [   90.497010] RIP: 0010:get_line_out_pfx+0x2dd/0x3e0
> >>>> [snd_hda_codec_generic]
> >>> 
> >>> Can you try to decode which line does it hit?
> >> This was the arch 'vendor' kernel, so not easily? I could have tried
> >> though I suppose :)
> >> 
> >> Instead, I just applied your patch and tried that instead.
> >> 
> >>> 
> >>> Also, as a blind shot, does the patch below work around the bug?
> >> [   16.593760] 0x000000000000-0x000000800000 : "BIOS"
> >> [   16.603877] snd_hda_codec_cirrus hdaudioC1D0: autoconfig for
> >> CS4208: line_outs=5 (0x11/0x12/0x13/0x14/0x1d) type:speaker
> >> [   16.603885] snd_hda_codec_cirrus hdaudioC1D0:    speaker_outs=0
> >> (0x0/0x0/0x0/0x0/0x0)
> >> [   16.603888] snd_hda_codec_cirrus hdaudioC1D0:    hp_outs=1
> >> (0x10/0x0/0x0/0x0/0x0)
> >> [   16.603890] snd_hda_codec_cirrus hdaudioC1D0:    mono: mono_out=0x0
> >> [   16.603892] snd_hda_codec_cirrus hdaudioC1D0:    dig-out=0x1e/0x21
> >> [   16.603894] snd_hda_codec_cirrus hdaudioC1D0:    inputs:
> >> [   16.603895] snd_hda_codec_cirrus hdaudioC1D0:      Internal Mic=0x16
> >> [   16.603897] snd_hda_codec_cirrus hdaudioC1D0:      Internal Mic=0x15
> >> [   16.603899] snd_hda_codec_cirrus hdaudioC1D0:      Mic=0x18
> >> [   16.603900] snd_hda_codec_cirrus hdaudioC1D0:      Internal Mic=0x19
> >> [   16.603902] snd_hda_codec_cirrus hdaudioC1D0:      Internal Mic=0x1a
> >> [   16.603904] snd_hda_codec_cirrus hdaudioC1D0:      Internal Mic=0x1b
> >> [   16.603919] snd_hda_codec_cirrus hdaudioC1D0:      Internal Mic=0x1c
> >> [   16.603921] snd_hda_codec_cirrus hdaudioC1D0:      Line=0x17
> >> [   16.603922] snd_hda_codec_cirrus hdaudioC1D0:    dig-in=0x22
> >> [   16.605152] snd_hda_codec_cirrus hdaudioC1D0: Too many channels in
> >> get_line_out_pfx: 4
> >> [   16.605215] snd_hda_codec_cirrus hdaudioC1D0: Too many channels in
> >> get_line_out_pfx: 4
> >> 
> >> the good thing, you fixed the oops; the bad thing, it's no working,
> >> but hopefully this helps you gain more insight?
> > 
> > Below is a bit better patch for fixing the Oops.
> > 
> > But, judging from the output above, I guess it won't help completely,
> > because the pin configuration looks broken; e.g. it reports too many
> > "Internal Mic" pins (which must be only one usually).
> > 
> > That said, the actual breakage (except for kernel Oops) is the pin
> > config set by BIOS.  Maybe it doesn't set up things properly *at all*
> > You'll need to correct it by providing the full pin config with a
> > quirk table.  And for that, you'll need to figure out the pins via
> > trial-and-error, for example, with the help of hdajackretask.
> > 
> > 
> > thanks,
> > 
> > Takashi
> > 
> > -- 8< --
> > From: Takashi Iwai <tiwai@suse.de>
> > Subject: [PATCH] ALSA: hda: Fix Oops by 9.1 surround channel names
> > 
> > get_line_out_pfx() may trigger an Oops by overflowing the static array
> > with more than 8 channels.  This was reported for MacBookPro 12,1 with
> > Cirrus codec.
> > 
> > As a workaround, extend for the 9.1 channels and also fix the
> > potential Oops by unifying the code paths accessing the same array
> > with the proper size check.
> > 
> > Reported-by: Olliver Schinagl <oliver@schinagl.nl>
> > Cc: <stable@vger.kernel.org>
> > Link: https://lore.kernel.org/r/64d95eb0-dbdb-cff8-a8b1-988dc22b24cd@schinagl.nl
> > Signed-off-by: Takashi Iwai <tiwai@suse.de>
> > ---
> >   sound/pci/hda/hda_generic.c | 7 ++++---
> >   1 file changed, 4 insertions(+), 3 deletions(-)
> > 
> > diff --git a/sound/pci/hda/hda_generic.c b/sound/pci/hda/hda_generic.c
> > index fc114e522480..dbf7aa88e0e3 100644
> > --- a/sound/pci/hda/hda_generic.c
> > +++ b/sound/pci/hda/hda_generic.c
> > @@ -1155,8 +1155,8 @@ static bool path_has_mixer(struct hda_codec *codec, int path_idx, int ctl_type)
> >   	return path && path->ctls[ctl_type];
> >   }
> >   -static const char * const channel_name[4] = {
> > -	"Front", "Surround", "CLFE", "Side"
> > +static const char * const channel_name[] = {
> > +	"Front", "Surround", "CLFE", "Side", "Back",
> >   };
> >     /* give some appropriate ctl name prefix for the given line out
> > channel */
> > @@ -1182,7 +1182,7 @@ static const char *get_line_out_pfx(struct hda_codec *codec, int ch,
> >     	/* multi-io channels */
> >   	if (ch >= cfg->line_outs)
> > -		return channel_name[ch];
> > +		goto fixed_name;
> >     	switch (cfg->line_out_type) {
> >   	case AUTO_PIN_SPEAKER_OUT:
> > @@ -1234,6 +1234,7 @@ static const char *get_line_out_pfx(struct hda_codec *codec, int ch,
> >   	if (cfg->line_outs == 1 && !spec->multi_ios)
> >   		return "Line Out";
> >   + fixed_name:
> >   	if (ch >= ARRAY_SIZE(channel_name)) {
> >   		snd_BUG();
> >   		return "PCM";
> 

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: snd_hda_codec_cirrus kernel oops
  2023-05-18 14:27         ` Takashi Iwai
@ 2023-05-18 15:11           ` Olliver Schinagl
  2023-05-19  7:12             ` Takashi Iwai
  0 siblings, 1 reply; 11+ messages in thread
From: Olliver Schinagl @ 2023-05-18 15:11 UTC (permalink / raw)
  To: Takashi Iwai; +Cc: alsa-devel

Hey Takashi,

On 18-05-2023 16:27, Takashi Iwai wrote:
> On Thu, 18 May 2023 16:24:02 +0200,
> Olliver Schinagl wrote:
>>
>> Hey Takashi,
>>
>> I've applied the patch you've listed below. Is there some 'fool-proof'
>> way to produce _any_ output however? I've stopped pulse/pipe audio,
>> and only use aplay + alsamixer. Back to basics as they say. For aplay,
>> I use -D sysdefault:CARD=PCH (which was listed as a cirrus card with
>> -L).
>>
>> Alsamixer was used to ensure all volumes are open.
>>
>> Without anything running, I was able to use hdajackretask to apply
>> settings. But then, what to put. I get that I have to figure out, what
>> is routed where (i'll try to find the schematic for the macbook pro
>> 12,1), but hence my question, is there some way to produce something?
>> In hdajackretask I've enabled all pins, overriden them all, and set
>> them all to the same configuration. 'Internal, internal, speaker,
>> other-analog, green, not-present, 1, front'. I figured, by setting up
>> verything to the internal speaker, I must get sound out of something,
>> but alas.
>>
>> I also have a Macbook pro from 1 or 2 generations earlier, 11,2 afaik,
>> where the sound still does work. I've used the same config
>> hdajackretask showed was in use there, but (obviously?) that didn't
>> work.
>>
>> So I'm a bit grasping at straws. Trying _every_ combination is a bit much?
> 
> It's the hard part.  I'd try to copy the pin config of the existing
> models at first, then try shooting one pin by one if it doesn't work.

Ok, so no easy way :) I did try copying things, but didn't get sound either.

I did find the schematics for the 2013 and 2014 models of the macbook; 
no luck yet on the 2015 (mine). But all 3 have the same model number 
(A1502), and looking at the schematic (not even sure if it is just a new 
revision, or actually for the different boards) they seem more or less 
identical. Especially on the audio part. The nice thing is it tells me 
what pins things are connected to :) But again, might not be a perfect 
match to my board (crosses fingers).

What is interesting, the schematics [0] actually list the HDA configuration.

CODEC OUTPUT SIGNAL PATHS

FUNCTION   VOLUME    CONVERTER  PIN COMPLEX  MUTE CONTROL

HP/HS OUT  0x02 (2)  0x02 (2)   0x10 (16)    N/A
TWEETERS   0x03 (3)  0x03 (3)   0x12 (18)    CODEC GPIO0
SUB        0x04 (4)  0x04 (4)   0x13 (19)    CODEC GPIO0
SPDIF OUT  N/A       0x0e (14)  0x21 (33)    N/A

DMIC 1               0x09 (9)   0x1c (18)
DMIC 2               0x09 (9)   0x1c (18)

HEADSET MIC          0x07 (7)   0x18 (24)

OTHER CODEC GPIO LINES
LEFT SPEAKER ID      GPIO2 INPUT             HIGH = FG, LOW = MERRY
RIGHT SPEAKER ID     GPIO3 INPUT             HIGH = FG, LOW = MERRY
DFET CONTROL         GPIO4 OUTPUT            HIGH = DFETs OPEN

Granted, that should yield the same infomration I can copy from the 
other one, but I'm trying to understand what this would mean. Function 
is obvious, aswell as the pin-complex, it's what hdajackretasks calls 
pin ID. But the rest is a bit iffy. E.g. what would the volume column 
indicate? What about the 'converter'? And the GPIO's? Are the's GPIO's 
of the codec? Maybe my confusion mostly comes as I'm not sure how to 
relate those fields to hdajackretask.

Olliver

[0]: 
https://www.alisaler.com/macbook-pro-retina-13-a1502-x304-mlb-820-4924-schematic/

> 
> 
> Takashi
> 
>>
>> Olliver
>>
>> On 16-05-2023 20:31, Takashi Iwai wrote:
>>> On Tue, 16 May 2023 18:49:55 +0200,
>>> Olliver Schinagl wrote:
>>>>
>>>> Hey Takashi,
>>>>
>>>>>> [   90.497004] CPU: 3 PID: 343 Comm: modprobe Not tainted
>>>>>> 6.3.1-arch2-1 #1 4c16b0b90f71a940c7f1bb2eb00cdd9db2a83452
>>>>>> [   90.497008] Hardware name: Apple
>>>>>> Inc. MacBookPro12,1/Mac-E43C1C25D4880AD6, BIOS 481.0.0.0.0 01/12/2023
>>>>>> [   90.497010] RIP: 0010:get_line_out_pfx+0x2dd/0x3e0
>>>>>> [snd_hda_codec_generic]
>>>>>
>>>>> Can you try to decode which line does it hit?
>>>> This was the arch 'vendor' kernel, so not easily? I could have tried
>>>> though I suppose :)
>>>>
>>>> Instead, I just applied your patch and tried that instead.
>>>>
>>>>>
>>>>> Also, as a blind shot, does the patch below work around the bug?
>>>> [   16.593760] 0x000000000000-0x000000800000 : "BIOS"
>>>> [   16.603877] snd_hda_codec_cirrus hdaudioC1D0: autoconfig for
>>>> CS4208: line_outs=5 (0x11/0x12/0x13/0x14/0x1d) type:speaker
>>>> [   16.603885] snd_hda_codec_cirrus hdaudioC1D0:    speaker_outs=0
>>>> (0x0/0x0/0x0/0x0/0x0)
>>>> [   16.603888] snd_hda_codec_cirrus hdaudioC1D0:    hp_outs=1
>>>> (0x10/0x0/0x0/0x0/0x0)
>>>> [   16.603890] snd_hda_codec_cirrus hdaudioC1D0:    mono: mono_out=0x0
>>>> [   16.603892] snd_hda_codec_cirrus hdaudioC1D0:    dig-out=0x1e/0x21
>>>> [   16.603894] snd_hda_codec_cirrus hdaudioC1D0:    inputs:
>>>> [   16.603895] snd_hda_codec_cirrus hdaudioC1D0:      Internal Mic=0x16
>>>> [   16.603897] snd_hda_codec_cirrus hdaudioC1D0:      Internal Mic=0x15
>>>> [   16.603899] snd_hda_codec_cirrus hdaudioC1D0:      Mic=0x18
>>>> [   16.603900] snd_hda_codec_cirrus hdaudioC1D0:      Internal Mic=0x19
>>>> [   16.603902] snd_hda_codec_cirrus hdaudioC1D0:      Internal Mic=0x1a
>>>> [   16.603904] snd_hda_codec_cirrus hdaudioC1D0:      Internal Mic=0x1b
>>>> [   16.603919] snd_hda_codec_cirrus hdaudioC1D0:      Internal Mic=0x1c
>>>> [   16.603921] snd_hda_codec_cirrus hdaudioC1D0:      Line=0x17
>>>> [   16.603922] snd_hda_codec_cirrus hdaudioC1D0:    dig-in=0x22
>>>> [   16.605152] snd_hda_codec_cirrus hdaudioC1D0: Too many channels in
>>>> get_line_out_pfx: 4
>>>> [   16.605215] snd_hda_codec_cirrus hdaudioC1D0: Too many channels in
>>>> get_line_out_pfx: 4
>>>>
>>>> the good thing, you fixed the oops; the bad thing, it's no working,
>>>> but hopefully this helps you gain more insight?
>>>
>>> Below is a bit better patch for fixing the Oops.
>>>
>>> But, judging from the output above, I guess it won't help completely,
>>> because the pin configuration looks broken; e.g. it reports too many
>>> "Internal Mic" pins (which must be only one usually).
>>>
>>> That said, the actual breakage (except for kernel Oops) is the pin
>>> config set by BIOS.  Maybe it doesn't set up things properly *at all*
>>> You'll need to correct it by providing the full pin config with a
>>> quirk table.  And for that, you'll need to figure out the pins via
>>> trial-and-error, for example, with the help of hdajackretask.
>>>
>>>
>>> thanks,
>>>
>>> Takashi
>>>
>>> -- 8< --
>>> From: Takashi Iwai <tiwai@suse.de>
>>> Subject: [PATCH] ALSA: hda: Fix Oops by 9.1 surround channel names
>>>
>>> get_line_out_pfx() may trigger an Oops by overflowing the static array
>>> with more than 8 channels.  This was reported for MacBookPro 12,1 with
>>> Cirrus codec.
>>>
>>> As a workaround, extend for the 9.1 channels and also fix the
>>> potential Oops by unifying the code paths accessing the same array
>>> with the proper size check.
>>>
>>> Reported-by: Olliver Schinagl <oliver@schinagl.nl>
>>> Cc: <stable@vger.kernel.org>
>>> Link: https://lore.kernel.org/r/64d95eb0-dbdb-cff8-a8b1-988dc22b24cd@schinagl.nl
>>> Signed-off-by: Takashi Iwai <tiwai@suse.de>
>>> ---
>>>    sound/pci/hda/hda_generic.c | 7 ++++---
>>>    1 file changed, 4 insertions(+), 3 deletions(-)
>>>
>>> diff --git a/sound/pci/hda/hda_generic.c b/sound/pci/hda/hda_generic.c
>>> index fc114e522480..dbf7aa88e0e3 100644
>>> --- a/sound/pci/hda/hda_generic.c
>>> +++ b/sound/pci/hda/hda_generic.c
>>> @@ -1155,8 +1155,8 @@ static bool path_has_mixer(struct hda_codec *codec, int path_idx, int ctl_type)
>>>    	return path && path->ctls[ctl_type];
>>>    }
>>>    -static const char * const channel_name[4] = {
>>> -	"Front", "Surround", "CLFE", "Side"
>>> +static const char * const channel_name[] = {
>>> +	"Front", "Surround", "CLFE", "Side", "Back",
>>>    };
>>>      /* give some appropriate ctl name prefix for the given line out
>>> channel */
>>> @@ -1182,7 +1182,7 @@ static const char *get_line_out_pfx(struct hda_codec *codec, int ch,
>>>      	/* multi-io channels */
>>>    	if (ch >= cfg->line_outs)
>>> -		return channel_name[ch];
>>> +		goto fixed_name;
>>>      	switch (cfg->line_out_type) {
>>>    	case AUTO_PIN_SPEAKER_OUT:
>>> @@ -1234,6 +1234,7 @@ static const char *get_line_out_pfx(struct hda_codec *codec, int ch,
>>>    	if (cfg->line_outs == 1 && !spec->multi_ios)
>>>    		return "Line Out";
>>>    + fixed_name:
>>>    	if (ch >= ARRAY_SIZE(channel_name)) {
>>>    		snd_BUG();
>>>    		return "PCM";
>>

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: snd_hda_codec_cirrus kernel oops
  2023-05-18 15:11           ` Olliver Schinagl
@ 2023-05-19  7:12             ` Takashi Iwai
  2023-05-19 16:53               ` Olliver Schinagl
  0 siblings, 1 reply; 11+ messages in thread
From: Takashi Iwai @ 2023-05-19  7:12 UTC (permalink / raw)
  To: Olliver Schinagl; +Cc: alsa-devel

On Thu, 18 May 2023 17:11:53 +0200,
Olliver Schinagl wrote:
> 
> Hey Takashi,
> 
> On 18-05-2023 16:27, Takashi Iwai wrote:
> > On Thu, 18 May 2023 16:24:02 +0200,
> > Olliver Schinagl wrote:
> >> 
> >> Hey Takashi,
> >> 
> >> I've applied the patch you've listed below. Is there some 'fool-proof'
> >> way to produce _any_ output however? I've stopped pulse/pipe audio,
> >> and only use aplay + alsamixer. Back to basics as they say. For aplay,
> >> I use -D sysdefault:CARD=PCH (which was listed as a cirrus card with
> >> -L).
> >> 
> >> Alsamixer was used to ensure all volumes are open.
> >> 
> >> Without anything running, I was able to use hdajackretask to apply
> >> settings. But then, what to put. I get that I have to figure out, what
> >> is routed where (i'll try to find the schematic for the macbook pro
> >> 12,1), but hence my question, is there some way to produce something?
> >> In hdajackretask I've enabled all pins, overriden them all, and set
> >> them all to the same configuration. 'Internal, internal, speaker,
> >> other-analog, green, not-present, 1, front'. I figured, by setting up
> >> verything to the internal speaker, I must get sound out of something,
> >> but alas.
> >> 
> >> I also have a Macbook pro from 1 or 2 generations earlier, 11,2 afaik,
> >> where the sound still does work. I've used the same config
> >> hdajackretask showed was in use there, but (obviously?) that didn't
> >> work.
> >> 
> >> So I'm a bit grasping at straws. Trying _every_ combination is a bit much?
> > 
> > It's the hard part.  I'd try to copy the pin config of the existing
> > models at first, then try shooting one pin by one if it doesn't work.
> 
> Ok, so no easy way :) I did try copying things, but didn't get sound either.
> 
> I did find the schematics for the 2013 and 2014 models of the macbook;
> no luck yet on the 2015 (mine). But all 3 have the same model number
> (A1502), and looking at the schematic (not even sure if it is just a
> new revision, or actually for the different boards) they seem more or
> less identical. Especially on the audio part. The nice thing is it
> tells me what pins things are connected to :) But again, might not be
> a perfect match to my board (crosses fingers).
> 
> What is interesting, the schematics [0] actually list the HDA configuration.
> 
> CODEC OUTPUT SIGNAL PATHS
> 
> FUNCTION   VOLUME    CONVERTER  PIN COMPLEX  MUTE CONTROL
> 
> HP/HS OUT  0x02 (2)  0x02 (2)   0x10 (16)    N/A
> TWEETERS   0x03 (3)  0x03 (3)   0x12 (18)    CODEC GPIO0
> SUB        0x04 (4)  0x04 (4)   0x13 (19)    CODEC GPIO0
> SPDIF OUT  N/A       0x0e (14)  0x21 (33)    N/A
> 
> DMIC 1               0x09 (9)   0x1c (18)
> DMIC 2               0x09 (9)   0x1c (18)
> 
> HEADSET MIC          0x07 (7)   0x18 (24)
> 
> OTHER CODEC GPIO LINES
> LEFT SPEAKER ID      GPIO2 INPUT             HIGH = FG, LOW = MERRY
> RIGHT SPEAKER ID     GPIO3 INPUT             HIGH = FG, LOW = MERRY
> DFET CONTROL         GPIO4 OUTPUT            HIGH = DFETs OPEN
> 
> Granted, that should yield the same infomration I can copy from the
> other one, but I'm trying to understand what this would mean. Function
> is obvious, aswell as the pin-complex, it's what hdajackretasks calls
> pin ID. But the rest is a bit iffy. E.g. what would the volume column
> indicate? What about the 'converter'? And the GPIO's? Are the's GPIO's
> of the codec? Maybe my confusion mostly comes as I'm not sure how to
> relate those fields to hdajackretask.

It's a good information.
It corresponds to spec->gpio_eapd_speaker, and GPIO2 would be the bit
0x04, GPIO3 would be 0x08, so it should be set to 0x0c.  The headphone
has no GPIO assignment, so spec->gpio_eapd_headphone=0.

But subwoofers seem to have the GPIO controls as well, and the gpio
bit 0x01 should be set.  For that, we'll need to modify cs_automute()
function.  But let's investigate this later.

FWIW, the GPIO bits can be flipped on the fly, too.  Use hda-verb for
setting SET_GPIO_MASK, SET_GPIO_DIRECTION and SET_GPIO_DATA.


Takashi

> 
> Olliver
> 
> [0]:
> https://www.alisaler.com/macbook-pro-retina-13-a1502-x304-mlb-820-4924-schematic/
> 
> > 
> > 
> > Takashi
> > 
> >> 
> >> Olliver
> >> 
> >> On 16-05-2023 20:31, Takashi Iwai wrote:
> >>> On Tue, 16 May 2023 18:49:55 +0200,
> >>> Olliver Schinagl wrote:
> >>>> 
> >>>> Hey Takashi,
> >>>> 
> >>>>>> [   90.497004] CPU: 3 PID: 343 Comm: modprobe Not tainted
> >>>>>> 6.3.1-arch2-1 #1 4c16b0b90f71a940c7f1bb2eb00cdd9db2a83452
> >>>>>> [   90.497008] Hardware name: Apple
> >>>>>> Inc. MacBookPro12,1/Mac-E43C1C25D4880AD6, BIOS 481.0.0.0.0 01/12/2023
> >>>>>> [   90.497010] RIP: 0010:get_line_out_pfx+0x2dd/0x3e0
> >>>>>> [snd_hda_codec_generic]
> >>>>> 
> >>>>> Can you try to decode which line does it hit?
> >>>> This was the arch 'vendor' kernel, so not easily? I could have tried
> >>>> though I suppose :)
> >>>> 
> >>>> Instead, I just applied your patch and tried that instead.
> >>>> 
> >>>>> 
> >>>>> Also, as a blind shot, does the patch below work around the bug?
> >>>> [   16.593760] 0x000000000000-0x000000800000 : "BIOS"
> >>>> [   16.603877] snd_hda_codec_cirrus hdaudioC1D0: autoconfig for
> >>>> CS4208: line_outs=5 (0x11/0x12/0x13/0x14/0x1d) type:speaker
> >>>> [   16.603885] snd_hda_codec_cirrus hdaudioC1D0:    speaker_outs=0
> >>>> (0x0/0x0/0x0/0x0/0x0)
> >>>> [   16.603888] snd_hda_codec_cirrus hdaudioC1D0:    hp_outs=1
> >>>> (0x10/0x0/0x0/0x0/0x0)
> >>>> [   16.603890] snd_hda_codec_cirrus hdaudioC1D0:    mono: mono_out=0x0
> >>>> [   16.603892] snd_hda_codec_cirrus hdaudioC1D0:    dig-out=0x1e/0x21
> >>>> [   16.603894] snd_hda_codec_cirrus hdaudioC1D0:    inputs:
> >>>> [   16.603895] snd_hda_codec_cirrus hdaudioC1D0:      Internal Mic=0x16
> >>>> [   16.603897] snd_hda_codec_cirrus hdaudioC1D0:      Internal Mic=0x15
> >>>> [   16.603899] snd_hda_codec_cirrus hdaudioC1D0:      Mic=0x18
> >>>> [   16.603900] snd_hda_codec_cirrus hdaudioC1D0:      Internal Mic=0x19
> >>>> [   16.603902] snd_hda_codec_cirrus hdaudioC1D0:      Internal Mic=0x1a
> >>>> [   16.603904] snd_hda_codec_cirrus hdaudioC1D0:      Internal Mic=0x1b
> >>>> [   16.603919] snd_hda_codec_cirrus hdaudioC1D0:      Internal Mic=0x1c
> >>>> [   16.603921] snd_hda_codec_cirrus hdaudioC1D0:      Line=0x17
> >>>> [   16.603922] snd_hda_codec_cirrus hdaudioC1D0:    dig-in=0x22
> >>>> [   16.605152] snd_hda_codec_cirrus hdaudioC1D0: Too many channels in
> >>>> get_line_out_pfx: 4
> >>>> [   16.605215] snd_hda_codec_cirrus hdaudioC1D0: Too many channels in
> >>>> get_line_out_pfx: 4
> >>>> 
> >>>> the good thing, you fixed the oops; the bad thing, it's no working,
> >>>> but hopefully this helps you gain more insight?
> >>> 
> >>> Below is a bit better patch for fixing the Oops.
> >>> 
> >>> But, judging from the output above, I guess it won't help completely,
> >>> because the pin configuration looks broken; e.g. it reports too many
> >>> "Internal Mic" pins (which must be only one usually).
> >>> 
> >>> That said, the actual breakage (except for kernel Oops) is the pin
> >>> config set by BIOS.  Maybe it doesn't set up things properly *at all*
> >>> You'll need to correct it by providing the full pin config with a
> >>> quirk table.  And for that, you'll need to figure out the pins via
> >>> trial-and-error, for example, with the help of hdajackretask.
> >>> 
> >>> 
> >>> thanks,
> >>> 
> >>> Takashi
> >>> 
> >>> -- 8< --
> >>> From: Takashi Iwai <tiwai@suse.de>
> >>> Subject: [PATCH] ALSA: hda: Fix Oops by 9.1 surround channel names
> >>> 
> >>> get_line_out_pfx() may trigger an Oops by overflowing the static array
> >>> with more than 8 channels.  This was reported for MacBookPro 12,1 with
> >>> Cirrus codec.
> >>> 
> >>> As a workaround, extend for the 9.1 channels and also fix the
> >>> potential Oops by unifying the code paths accessing the same array
> >>> with the proper size check.
> >>> 
> >>> Reported-by: Olliver Schinagl <oliver@schinagl.nl>
> >>> Cc: <stable@vger.kernel.org>
> >>> Link: https://lore.kernel.org/r/64d95eb0-dbdb-cff8-a8b1-988dc22b24cd@schinagl.nl
> >>> Signed-off-by: Takashi Iwai <tiwai@suse.de>
> >>> ---
> >>>    sound/pci/hda/hda_generic.c | 7 ++++---
> >>>    1 file changed, 4 insertions(+), 3 deletions(-)
> >>> 
> >>> diff --git a/sound/pci/hda/hda_generic.c b/sound/pci/hda/hda_generic.c
> >>> index fc114e522480..dbf7aa88e0e3 100644
> >>> --- a/sound/pci/hda/hda_generic.c
> >>> +++ b/sound/pci/hda/hda_generic.c
> >>> @@ -1155,8 +1155,8 @@ static bool path_has_mixer(struct hda_codec *codec, int path_idx, int ctl_type)
> >>>    	return path && path->ctls[ctl_type];
> >>>    }
> >>>    -static const char * const channel_name[4] = {
> >>> -	"Front", "Surround", "CLFE", "Side"
> >>> +static const char * const channel_name[] = {
> >>> +	"Front", "Surround", "CLFE", "Side", "Back",
> >>>    };
> >>>      /* give some appropriate ctl name prefix for the given line out
> >>> channel */
> >>> @@ -1182,7 +1182,7 @@ static const char *get_line_out_pfx(struct hda_codec *codec, int ch,
> >>>      	/* multi-io channels */
> >>>    	if (ch >= cfg->line_outs)
> >>> -		return channel_name[ch];
> >>> +		goto fixed_name;
> >>>      	switch (cfg->line_out_type) {
> >>>    	case AUTO_PIN_SPEAKER_OUT:
> >>> @@ -1234,6 +1234,7 @@ static const char *get_line_out_pfx(struct hda_codec *codec, int ch,
> >>>    	if (cfg->line_outs == 1 && !spec->multi_ios)
> >>>    		return "Line Out";
> >>>    + fixed_name:
> >>>    	if (ch >= ARRAY_SIZE(channel_name)) {
> >>>    		snd_BUG();
> >>>    		return "PCM";
> >> 
> 

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: snd_hda_codec_cirrus kernel oops
  2023-05-19  7:12             ` Takashi Iwai
@ 2023-05-19 16:53               ` Olliver Schinagl
  2023-05-20  8:02                 ` Takashi Iwai
  0 siblings, 1 reply; 11+ messages in thread
From: Olliver Schinagl @ 2023-05-19 16:53 UTC (permalink / raw)
  To: Takashi Iwai; +Cc: alsa-devel

Hey Takashi,

On 19-05-2023 09:12, Takashi Iwai wrote:
> On Thu, 18 May 2023 17:11:53 +0200,
> Olliver Schinagl wrote:
>>
>> Hey Takashi,
>>
>> On 18-05-2023 16:27, Takashi Iwai wrote:
>>> On Thu, 18 May 2023 16:24:02 +0200,
>>> Olliver Schinagl wrote:
>>>>
>>>> Hey Takashi,
>>>>
>>>> I've applied the patch you've listed below. Is there some 'fool-proof'
>>>> way to produce _any_ output however? I've stopped pulse/pipe audio,
>>>> and only use aplay + alsamixer. Back to basics as they say. For aplay,
>>>> I use -D sysdefault:CARD=PCH (which was listed as a cirrus card with
>>>> -L).
>>>>
>>>> Alsamixer was used to ensure all volumes are open.
>>>>
>>>> Without anything running, I was able to use hdajackretask to apply
>>>> settings. But then, what to put. I get that I have to figure out, what
>>>> is routed where (i'll try to find the schematic for the macbook pro
>>>> 12,1), but hence my question, is there some way to produce something?
>>>> In hdajackretask I've enabled all pins, overriden them all, and set
>>>> them all to the same configuration. 'Internal, internal, speaker,
>>>> other-analog, green, not-present, 1, front'. I figured, by setting up
>>>> verything to the internal speaker, I must get sound out of something,
>>>> but alas.
>>>>
>>>> I also have a Macbook pro from 1 or 2 generations earlier, 11,2 afaik,
>>>> where the sound still does work. I've used the same config
>>>> hdajackretask showed was in use there, but (obviously?) that didn't
>>>> work.
>>>>
>>>> So I'm a bit grasping at straws. Trying _every_ combination is a bit much?
>>>
>>> It's the hard part.  I'd try to copy the pin config of the existing
>>> models at first, then try shooting one pin by one if it doesn't work.
>>
>> Ok, so no easy way :) I did try copying things, but didn't get sound either.
>>
>> I did find the schematics for the 2013 and 2014 models of the macbook;
>> no luck yet on the 2015 (mine). But all 3 have the same model number
>> (A1502), and looking at the schematic (not even sure if it is just a
>> new revision, or actually for the different boards) they seem more or
>> less identical. Especially on the audio part. The nice thing is it
>> tells me what pins things are connected to :) But again, might not be
>> a perfect match to my board (crosses fingers).
>>
>> What is interesting, the schematics [0] actually list the HDA configuration.
>>
>> CODEC OUTPUT SIGNAL PATHS
>>
>> FUNCTION   VOLUME    CONVERTER  PIN COMPLEX  MUTE CONTROL
>>
>> HP/HS OUT  0x02 (2)  0x02 (2)   0x10 (16)    N/A
>> TWEETERS   0x03 (3)  0x03 (3)   0x12 (18)    CODEC GPIO0
>> SUB        0x04 (4)  0x04 (4)   0x13 (19)    CODEC GPIO0
>> SPDIF OUT  N/A       0x0e (14)  0x21 (33)    N/A
>>
>> DMIC 1               0x09 (9)   0x1c (18)
>> DMIC 2               0x09 (9)   0x1c (18)
>>
>> HEADSET MIC          0x07 (7)   0x18 (24)
>>
>> OTHER CODEC GPIO LINES
>> LEFT SPEAKER ID      GPIO2 INPUT             HIGH = FG, LOW = MERRY
>> RIGHT SPEAKER ID     GPIO3 INPUT             HIGH = FG, LOW = MERRY
>> DFET CONTROL         GPIO4 OUTPUT            HIGH = DFETs OPEN
>>
>> Granted, that should yield the same infomration I can copy from the
>> other one, but I'm trying to understand what this would mean. Function
>> is obvious, aswell as the pin-complex, it's what hdajackretasks calls
>> pin ID. But the rest is a bit iffy. E.g. what would the volume column
>> indicate? What about the 'converter'? And the GPIO's? Are the's GPIO's
>> of the codec? Maybe my confusion mostly comes as I'm not sure how to
>> relate those fields to hdajackretask.
> 
> It's a good information.
> It corresponds to spec->gpio_eapd_speaker, and GPIO2 would be the bit
> 0x04, GPIO3 would be 0x08, so it should be set to 0x0c.  The headphone
> has no GPIO assignment, so spec->gpio_eapd_headphone=0.
> 
> But subwoofers seem to have the GPIO controls as well, and the gpio
> bit 0x01 should be set.  For that, we'll need to modify cs_automute()
> function.  But let's investigate this later.
> 
> FWIW, the GPIO bits can be flipped on the fly, too.  Use hda-verb for
> setting SET_GPIO_MASK, SET_GPIO_DIRECTION and SET_GPIO_DATA.

Thanks for that explanation! Great news. I don't know how; but I managed 
to 'fix' the bios. Strange yeah. I wanted to create an uefi boot image 
as that's something arch's mkinitcpio appearantly supports. So I used 
efiboomgr to add an additional entry.

After a reboot, I regained the apple logo at boot (which was gone for 
ages), but also the boot chime returned. And for sure, in Linux also 
sound is working again normally. I have no idea how or why this works, 
but it does.

For reference, this is what 6.3.x now shows:

[   15.642288] snd_hda_codec_cirrus hdaudioC1D0: autoconfig for CS4208: 
line_outs=2 (0x12/0x13/0x0/0x0/0x0) type:speaker
[   15.642296] snd_hda_codec_cirrus hdaudioC1D0:    speaker_outs=0 
(0x0/0x0/0x0/0x0/0x0)
[   15.642299] snd_hda_codec_cirrus hdaudioC1D0:    hp_outs=1 
(0x10/0x0/0x0/0x0/0x0)
[   15.642301] snd_hda_codec_cirrus hdaudioC1D0:    mono: mono_out=0x0
[   15.642303] snd_hda_codec_cirrus hdaudioC1D0:    dig-out=0x21/0x0
[   15.642305] snd_hda_codec_cirrus hdaudioC1D0:    inputs:
[   15.642307] snd_hda_codec_cirrus hdaudioC1D0:      Internal Mic=0x1c
[   15.642309] snd_hda_codec_cirrus hdaudioC1D0:      Mic=0x18
[   15.735257] snd_hda_intel 0000:00:03.0: bound 0000:00:02.0 (ops 
i915_audio_component_bind_ops [i915])

And hdajackretask (without unconnected pins):
Pin ID: 0x10 [Green Headphone]
Jack; External; Headphone; Combination;
Green; Present; 2; Front;

Pin ID: 0x12 [Internal Speaker]
<blank>; Internal; Speaker; Unknown;
Unknown; Not present; 1; Back;

Pin ID: 0x13 [Internal Speaker]
<blank>; Internal; Speaker; Unknown;
Unknown; Not present; 1; Back;

Pin ID: 0x18 [Pink Mic]
Jack; External; Microphone; Combination;
Pink; Present; 4; Front;

Pin ID: 0x1c [Internal Mic]
<blank>; Internal; Microphone; Other Digital;
Unknown; Not present; <blank>; Front

Pin ID: 0x21 [White SPDIF Out]
Jack; External; SPIDF Out; Combination;
White; Present; 3; Front;

The blank connectivity options are a bit off, as is the blank channel 
group on the internal mic.

So curious on those ...

Anyway, leaving this here for any future in case it is needed again.

Olliver
> 
> 
> Takashi
> 
>>
>> Olliver
>>
>> [0]:
>> https://www.alisaler.com/macbook-pro-retina-13-a1502-x304-mlb-820-4924-schematic/
>>
>>>
>>>
>>> Takashi
>>>
>>>>
>>>> Olliver
>>>>
>>>> On 16-05-2023 20:31, Takashi Iwai wrote:
>>>>> On Tue, 16 May 2023 18:49:55 +0200,
>>>>> Olliver Schinagl wrote:
>>>>>>
>>>>>> Hey Takashi,
>>>>>>
>>>>>>>> [   90.497004] CPU: 3 PID: 343 Comm: modprobe Not tainted
>>>>>>>> 6.3.1-arch2-1 #1 4c16b0b90f71a940c7f1bb2eb00cdd9db2a83452
>>>>>>>> [   90.497008] Hardware name: Apple
>>>>>>>> Inc. MacBookPro12,1/Mac-E43C1C25D4880AD6, BIOS 481.0.0.0.0 01/12/2023
>>>>>>>> [   90.497010] RIP: 0010:get_line_out_pfx+0x2dd/0x3e0
>>>>>>>> [snd_hda_codec_generic]
>>>>>>>
>>>>>>> Can you try to decode which line does it hit?
>>>>>> This was the arch 'vendor' kernel, so not easily? I could have tried
>>>>>> though I suppose :)
>>>>>>
>>>>>> Instead, I just applied your patch and tried that instead.
>>>>>>
>>>>>>>
>>>>>>> Also, as a blind shot, does the patch below work around the bug?
>>>>>> [   16.593760] 0x000000000000-0x000000800000 : "BIOS"
>>>>>> [   16.603877] snd_hda_codec_cirrus hdaudioC1D0: autoconfig for
>>>>>> CS4208: line_outs=5 (0x11/0x12/0x13/0x14/0x1d) type:speaker
>>>>>> [   16.603885] snd_hda_codec_cirrus hdaudioC1D0:    speaker_outs=0
>>>>>> (0x0/0x0/0x0/0x0/0x0)
>>>>>> [   16.603888] snd_hda_codec_cirrus hdaudioC1D0:    hp_outs=1
>>>>>> (0x10/0x0/0x0/0x0/0x0)
>>>>>> [   16.603890] snd_hda_codec_cirrus hdaudioC1D0:    mono: mono_out=0x0
>>>>>> [   16.603892] snd_hda_codec_cirrus hdaudioC1D0:    dig-out=0x1e/0x21
>>>>>> [   16.603894] snd_hda_codec_cirrus hdaudioC1D0:    inputs:
>>>>>> [   16.603895] snd_hda_codec_cirrus hdaudioC1D0:      Internal Mic=0x16
>>>>>> [   16.603897] snd_hda_codec_cirrus hdaudioC1D0:      Internal Mic=0x15
>>>>>> [   16.603899] snd_hda_codec_cirrus hdaudioC1D0:      Mic=0x18
>>>>>> [   16.603900] snd_hda_codec_cirrus hdaudioC1D0:      Internal Mic=0x19
>>>>>> [   16.603902] snd_hda_codec_cirrus hdaudioC1D0:      Internal Mic=0x1a
>>>>>> [   16.603904] snd_hda_codec_cirrus hdaudioC1D0:      Internal Mic=0x1b
>>>>>> [   16.603919] snd_hda_codec_cirrus hdaudioC1D0:      Internal Mic=0x1c
>>>>>> [   16.603921] snd_hda_codec_cirrus hdaudioC1D0:      Line=0x17
>>>>>> [   16.603922] snd_hda_codec_cirrus hdaudioC1D0:    dig-in=0x22
>>>>>> [   16.605152] snd_hda_codec_cirrus hdaudioC1D0: Too many channels in
>>>>>> get_line_out_pfx: 4
>>>>>> [   16.605215] snd_hda_codec_cirrus hdaudioC1D0: Too many channels in
>>>>>> get_line_out_pfx: 4
>>>>>>
>>>>>> the good thing, you fixed the oops; the bad thing, it's no working,
>>>>>> but hopefully this helps you gain more insight?
>>>>>
>>>>> Below is a bit better patch for fixing the Oops.
>>>>>
>>>>> But, judging from the output above, I guess it won't help completely,
>>>>> because the pin configuration looks broken; e.g. it reports too many
>>>>> "Internal Mic" pins (which must be only one usually).
>>>>>
>>>>> That said, the actual breakage (except for kernel Oops) is the pin
>>>>> config set by BIOS.  Maybe it doesn't set up things properly *at all*
>>>>> You'll need to correct it by providing the full pin config with a
>>>>> quirk table.  And for that, you'll need to figure out the pins via
>>>>> trial-and-error, for example, with the help of hdajackretask.
>>>>>
>>>>>
>>>>> thanks,
>>>>>
>>>>> Takashi
>>>>>
>>>>> -- 8< --
>>>>> From: Takashi Iwai <tiwai@suse.de>
>>>>> Subject: [PATCH] ALSA: hda: Fix Oops by 9.1 surround channel names
>>>>>
>>>>> get_line_out_pfx() may trigger an Oops by overflowing the static array
>>>>> with more than 8 channels.  This was reported for MacBookPro 12,1 with
>>>>> Cirrus codec.
>>>>>
>>>>> As a workaround, extend for the 9.1 channels and also fix the
>>>>> potential Oops by unifying the code paths accessing the same array
>>>>> with the proper size check.
>>>>>
>>>>> Reported-by: Olliver Schinagl <oliver@schinagl.nl>
>>>>> Cc: <stable@vger.kernel.org>
>>>>> Link: https://lore.kernel.org/r/64d95eb0-dbdb-cff8-a8b1-988dc22b24cd@schinagl.nl
>>>>> Signed-off-by: Takashi Iwai <tiwai@suse.de>
>>>>> ---
>>>>>     sound/pci/hda/hda_generic.c | 7 ++++---
>>>>>     1 file changed, 4 insertions(+), 3 deletions(-)
>>>>>
>>>>> diff --git a/sound/pci/hda/hda_generic.c b/sound/pci/hda/hda_generic.c
>>>>> index fc114e522480..dbf7aa88e0e3 100644
>>>>> --- a/sound/pci/hda/hda_generic.c
>>>>> +++ b/sound/pci/hda/hda_generic.c
>>>>> @@ -1155,8 +1155,8 @@ static bool path_has_mixer(struct hda_codec *codec, int path_idx, int ctl_type)
>>>>>     	return path && path->ctls[ctl_type];
>>>>>     }
>>>>>     -static const char * const channel_name[4] = {
>>>>> -	"Front", "Surround", "CLFE", "Side"
>>>>> +static const char * const channel_name[] = {
>>>>> +	"Front", "Surround", "CLFE", "Side", "Back",
>>>>>     };
>>>>>       /* give some appropriate ctl name prefix for the given line out
>>>>> channel */
>>>>> @@ -1182,7 +1182,7 @@ static const char *get_line_out_pfx(struct hda_codec *codec, int ch,
>>>>>       	/* multi-io channels */
>>>>>     	if (ch >= cfg->line_outs)
>>>>> -		return channel_name[ch];
>>>>> +		goto fixed_name;
>>>>>       	switch (cfg->line_out_type) {
>>>>>     	case AUTO_PIN_SPEAKER_OUT:
>>>>> @@ -1234,6 +1234,7 @@ static const char *get_line_out_pfx(struct hda_codec *codec, int ch,
>>>>>     	if (cfg->line_outs == 1 && !spec->multi_ios)
>>>>>     		return "Line Out";
>>>>>     + fixed_name:
>>>>>     	if (ch >= ARRAY_SIZE(channel_name)) {
>>>>>     		snd_BUG();
>>>>>     		return "PCM";
>>>>
>>

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: snd_hda_codec_cirrus kernel oops
  2023-05-19 16:53               ` Olliver Schinagl
@ 2023-05-20  8:02                 ` Takashi Iwai
  2023-05-20  8:08                   ` Olliver Schinagl
  0 siblings, 1 reply; 11+ messages in thread
From: Takashi Iwai @ 2023-05-20  8:02 UTC (permalink / raw)
  To: Olliver Schinagl; +Cc: alsa-devel

On Fri, 19 May 2023 18:53:16 +0200,
Olliver Schinagl wrote:
> 
> Hey Takashi,
> 
> On 19-05-2023 09:12, Takashi Iwai wrote:
> > On Thu, 18 May 2023 17:11:53 +0200,
> > Olliver Schinagl wrote:
> >> 
> >> Hey Takashi,
> >> 
> >> On 18-05-2023 16:27, Takashi Iwai wrote:
> >>> On Thu, 18 May 2023 16:24:02 +0200,
> >>> Olliver Schinagl wrote:
> >>>> 
> >>>> Hey Takashi,
> >>>> 
> >>>> I've applied the patch you've listed below. Is there some 'fool-proof'
> >>>> way to produce _any_ output however? I've stopped pulse/pipe audio,
> >>>> and only use aplay + alsamixer. Back to basics as they say. For aplay,
> >>>> I use -D sysdefault:CARD=PCH (which was listed as a cirrus card with
> >>>> -L).
> >>>> 
> >>>> Alsamixer was used to ensure all volumes are open.
> >>>> 
> >>>> Without anything running, I was able to use hdajackretask to apply
> >>>> settings. But then, what to put. I get that I have to figure out, what
> >>>> is routed where (i'll try to find the schematic for the macbook pro
> >>>> 12,1), but hence my question, is there some way to produce something?
> >>>> In hdajackretask I've enabled all pins, overriden them all, and set
> >>>> them all to the same configuration. 'Internal, internal, speaker,
> >>>> other-analog, green, not-present, 1, front'. I figured, by setting up
> >>>> verything to the internal speaker, I must get sound out of something,
> >>>> but alas.
> >>>> 
> >>>> I also have a Macbook pro from 1 or 2 generations earlier, 11,2 afaik,
> >>>> where the sound still does work. I've used the same config
> >>>> hdajackretask showed was in use there, but (obviously?) that didn't
> >>>> work.
> >>>> 
> >>>> So I'm a bit grasping at straws. Trying _every_ combination is a bit much?
> >>> 
> >>> It's the hard part.  I'd try to copy the pin config of the existing
> >>> models at first, then try shooting one pin by one if it doesn't work.
> >> 
> >> Ok, so no easy way :) I did try copying things, but didn't get sound either.
> >> 
> >> I did find the schematics for the 2013 and 2014 models of the macbook;
> >> no luck yet on the 2015 (mine). But all 3 have the same model number
> >> (A1502), and looking at the schematic (not even sure if it is just a
> >> new revision, or actually for the different boards) they seem more or
> >> less identical. Especially on the audio part. The nice thing is it
> >> tells me what pins things are connected to :) But again, might not be
> >> a perfect match to my board (crosses fingers).
> >> 
> >> What is interesting, the schematics [0] actually list the HDA configuration.
> >> 
> >> CODEC OUTPUT SIGNAL PATHS
> >> 
> >> FUNCTION   VOLUME    CONVERTER  PIN COMPLEX  MUTE CONTROL
> >> 
> >> HP/HS OUT  0x02 (2)  0x02 (2)   0x10 (16)    N/A
> >> TWEETERS   0x03 (3)  0x03 (3)   0x12 (18)    CODEC GPIO0
> >> SUB        0x04 (4)  0x04 (4)   0x13 (19)    CODEC GPIO0
> >> SPDIF OUT  N/A       0x0e (14)  0x21 (33)    N/A
> >> 
> >> DMIC 1               0x09 (9)   0x1c (18)
> >> DMIC 2               0x09 (9)   0x1c (18)
> >> 
> >> HEADSET MIC          0x07 (7)   0x18 (24)
> >> 
> >> OTHER CODEC GPIO LINES
> >> LEFT SPEAKER ID      GPIO2 INPUT             HIGH = FG, LOW = MERRY
> >> RIGHT SPEAKER ID     GPIO3 INPUT             HIGH = FG, LOW = MERRY
> >> DFET CONTROL         GPIO4 OUTPUT            HIGH = DFETs OPEN
> >> 
> >> Granted, that should yield the same infomration I can copy from the
> >> other one, but I'm trying to understand what this would mean. Function
> >> is obvious, aswell as the pin-complex, it's what hdajackretasks calls
> >> pin ID. But the rest is a bit iffy. E.g. what would the volume column
> >> indicate? What about the 'converter'? And the GPIO's? Are the's GPIO's
> >> of the codec? Maybe my confusion mostly comes as I'm not sure how to
> >> relate those fields to hdajackretask.
> > 
> > It's a good information.
> > It corresponds to spec->gpio_eapd_speaker, and GPIO2 would be the bit
> > 0x04, GPIO3 would be 0x08, so it should be set to 0x0c.  The headphone
> > has no GPIO assignment, so spec->gpio_eapd_headphone=0.
> > 
> > But subwoofers seem to have the GPIO controls as well, and the gpio
> > bit 0x01 should be set.  For that, we'll need to modify cs_automute()
> > function.  But let's investigate this later.
> > 
> > FWIW, the GPIO bits can be flipped on the fly, too.  Use hda-verb for
> > setting SET_GPIO_MASK, SET_GPIO_DIRECTION and SET_GPIO_DATA.
> 
> Thanks for that explanation! Great news. I don't know how; but I
> managed to 'fix' the bios. Strange yeah. I wanted to create an uefi
> boot image as that's something arch's mkinitcpio appearantly
> supports. So I used efiboomgr to add an additional entry.
> 
> After a reboot, I regained the apple logo at boot (which was gone for
> ages), but also the boot chime returned. And for sure, in Linux also
> sound is working again normally. I have no idea how or why this works,
> but it does.
> 
> For reference, this is what 6.3.x now shows:
> 
> [   15.642288] snd_hda_codec_cirrus hdaudioC1D0: autoconfig for
> CS4208: line_outs=2 (0x12/0x13/0x0/0x0/0x0) type:speaker
> [   15.642296] snd_hda_codec_cirrus hdaudioC1D0:    speaker_outs=0
> (0x0/0x0/0x0/0x0/0x0)
> [   15.642299] snd_hda_codec_cirrus hdaudioC1D0:    hp_outs=1
> (0x10/0x0/0x0/0x0/0x0)
> [   15.642301] snd_hda_codec_cirrus hdaudioC1D0:    mono: mono_out=0x0
> [   15.642303] snd_hda_codec_cirrus hdaudioC1D0:    dig-out=0x21/0x0
> [   15.642305] snd_hda_codec_cirrus hdaudioC1D0:    inputs:
> [   15.642307] snd_hda_codec_cirrus hdaudioC1D0:      Internal Mic=0x1c
> [   15.642309] snd_hda_codec_cirrus hdaudioC1D0:      Mic=0x18
> [   15.735257] snd_hda_intel 0000:00:03.0: bound 0000:00:02.0 (ops
> i915_audio_component_bind_ops [i915])
> 
> And hdajackretask (without unconnected pins):
> Pin ID: 0x10 [Green Headphone]
> Jack; External; Headphone; Combination;
> Green; Present; 2; Front;
> 
> Pin ID: 0x12 [Internal Speaker]
> <blank>; Internal; Speaker; Unknown;
> Unknown; Not present; 1; Back;
> 
> Pin ID: 0x13 [Internal Speaker]
> <blank>; Internal; Speaker; Unknown;
> Unknown; Not present; 1; Back;
> 
> Pin ID: 0x18 [Pink Mic]
> Jack; External; Microphone; Combination;
> Pink; Present; 4; Front;
> 
> Pin ID: 0x1c [Internal Mic]
> <blank>; Internal; Microphone; Other Digital;
> Unknown; Not present; <blank>; Front
> 
> Pin ID: 0x21 [White SPDIF Out]
> Jack; External; SPIDF Out; Combination;
> White; Present; 3; Front;
> 
> The blank connectivity options are a bit off, as is the blank channel
> group on the internal mic.
> 
> So curious on those ...
> 
> Anyway, leaving this here for any future in case it is needed again.

Good to hear that you managed to recover BIOS.

Could you give alsa-info.sh output from the working state?  Run the
script with --no-upload option and attach the output.  This will help
in future if it gets broken again :)


thanks,

Takashi

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: snd_hda_codec_cirrus kernel oops
  2023-05-20  8:02                 ` Takashi Iwai
@ 2023-05-20  8:08                   ` Olliver Schinagl
  0 siblings, 0 replies; 11+ messages in thread
From: Olliver Schinagl @ 2023-05-20  8:08 UTC (permalink / raw)
  To: Takashi Iwai; +Cc: alsa-devel

[-- Attachment #1: Type: text/plain, Size: 7012 bytes --]

Hey Takashi,

On 20-05-2023 10:02, Takashi Iwai wrote:
> On Fri, 19 May 2023 18:53:16 +0200,
> Olliver Schinagl wrote:
>>
>> Hey Takashi,
>>
>> On 19-05-2023 09:12, Takashi Iwai wrote:
>>> On Thu, 18 May 2023 17:11:53 +0200,
>>> Olliver Schinagl wrote:
>>>>
>>>> Hey Takashi,
>>>>
>>>> On 18-05-2023 16:27, Takashi Iwai wrote:
>>>>> On Thu, 18 May 2023 16:24:02 +0200,
>>>>> Olliver Schinagl wrote:
>>>>>>
>>>>>> Hey Takashi,
>>>>>>
>>>>>> I've applied the patch you've listed below. Is there some 'fool-proof'
>>>>>> way to produce _any_ output however? I've stopped pulse/pipe audio,
>>>>>> and only use aplay + alsamixer. Back to basics as they say. For aplay,
>>>>>> I use -D sysdefault:CARD=PCH (which was listed as a cirrus card with
>>>>>> -L).
>>>>>>
>>>>>> Alsamixer was used to ensure all volumes are open.
>>>>>>
>>>>>> Without anything running, I was able to use hdajackretask to apply
>>>>>> settings. But then, what to put. I get that I have to figure out, what
>>>>>> is routed where (i'll try to find the schematic for the macbook pro
>>>>>> 12,1), but hence my question, is there some way to produce something?
>>>>>> In hdajackretask I've enabled all pins, overriden them all, and set
>>>>>> them all to the same configuration. 'Internal, internal, speaker,
>>>>>> other-analog, green, not-present, 1, front'. I figured, by setting up
>>>>>> verything to the internal speaker, I must get sound out of something,
>>>>>> but alas.
>>>>>>
>>>>>> I also have a Macbook pro from 1 or 2 generations earlier, 11,2 afaik,
>>>>>> where the sound still does work. I've used the same config
>>>>>> hdajackretask showed was in use there, but (obviously?) that didn't
>>>>>> work.
>>>>>>
>>>>>> So I'm a bit grasping at straws. Trying _every_ combination is a bit much?
>>>>>
>>>>> It's the hard part.  I'd try to copy the pin config of the existing
>>>>> models at first, then try shooting one pin by one if it doesn't work.
>>>>
>>>> Ok, so no easy way :) I did try copying things, but didn't get sound either.
>>>>
>>>> I did find the schematics for the 2013 and 2014 models of the macbook;
>>>> no luck yet on the 2015 (mine). But all 3 have the same model number
>>>> (A1502), and looking at the schematic (not even sure if it is just a
>>>> new revision, or actually for the different boards) they seem more or
>>>> less identical. Especially on the audio part. The nice thing is it
>>>> tells me what pins things are connected to :) But again, might not be
>>>> a perfect match to my board (crosses fingers).
>>>>
>>>> What is interesting, the schematics [0] actually list the HDA configuration.
>>>>
>>>> CODEC OUTPUT SIGNAL PATHS
>>>>
>>>> FUNCTION   VOLUME    CONVERTER  PIN COMPLEX  MUTE CONTROL
>>>>
>>>> HP/HS OUT  0x02 (2)  0x02 (2)   0x10 (16)    N/A
>>>> TWEETERS   0x03 (3)  0x03 (3)   0x12 (18)    CODEC GPIO0
>>>> SUB        0x04 (4)  0x04 (4)   0x13 (19)    CODEC GPIO0
>>>> SPDIF OUT  N/A       0x0e (14)  0x21 (33)    N/A
>>>>
>>>> DMIC 1               0x09 (9)   0x1c (18)
>>>> DMIC 2               0x09 (9)   0x1c (18)
>>>>
>>>> HEADSET MIC          0x07 (7)   0x18 (24)
>>>>
>>>> OTHER CODEC GPIO LINES
>>>> LEFT SPEAKER ID      GPIO2 INPUT             HIGH = FG, LOW = MERRY
>>>> RIGHT SPEAKER ID     GPIO3 INPUT             HIGH = FG, LOW = MERRY
>>>> DFET CONTROL         GPIO4 OUTPUT            HIGH = DFETs OPEN
>>>>
>>>> Granted, that should yield the same infomration I can copy from the
>>>> other one, but I'm trying to understand what this would mean. Function
>>>> is obvious, aswell as the pin-complex, it's what hdajackretasks calls
>>>> pin ID. But the rest is a bit iffy. E.g. what would the volume column
>>>> indicate? What about the 'converter'? And the GPIO's? Are the's GPIO's
>>>> of the codec? Maybe my confusion mostly comes as I'm not sure how to
>>>> relate those fields to hdajackretask.
>>>
>>> It's a good information.
>>> It corresponds to spec->gpio_eapd_speaker, and GPIO2 would be the bit
>>> 0x04, GPIO3 would be 0x08, so it should be set to 0x0c.  The headphone
>>> has no GPIO assignment, so spec->gpio_eapd_headphone=0.
>>>
>>> But subwoofers seem to have the GPIO controls as well, and the gpio
>>> bit 0x01 should be set.  For that, we'll need to modify cs_automute()
>>> function.  But let's investigate this later.
>>>
>>> FWIW, the GPIO bits can be flipped on the fly, too.  Use hda-verb for
>>> setting SET_GPIO_MASK, SET_GPIO_DIRECTION and SET_GPIO_DATA.
>>
>> Thanks for that explanation! Great news. I don't know how; but I
>> managed to 'fix' the bios. Strange yeah. I wanted to create an uefi
>> boot image as that's something arch's mkinitcpio appearantly
>> supports. So I used efiboomgr to add an additional entry.
>>
>> After a reboot, I regained the apple logo at boot (which was gone for
>> ages), but also the boot chime returned. And for sure, in Linux also
>> sound is working again normally. I have no idea how or why this works,
>> but it does.
>>
>> For reference, this is what 6.3.x now shows:
>>
>> [   15.642288] snd_hda_codec_cirrus hdaudioC1D0: autoconfig for
>> CS4208: line_outs=2 (0x12/0x13/0x0/0x0/0x0) type:speaker
>> [   15.642296] snd_hda_codec_cirrus hdaudioC1D0:    speaker_outs=0
>> (0x0/0x0/0x0/0x0/0x0)
>> [   15.642299] snd_hda_codec_cirrus hdaudioC1D0:    hp_outs=1
>> (0x10/0x0/0x0/0x0/0x0)
>> [   15.642301] snd_hda_codec_cirrus hdaudioC1D0:    mono: mono_out=0x0
>> [   15.642303] snd_hda_codec_cirrus hdaudioC1D0:    dig-out=0x21/0x0
>> [   15.642305] snd_hda_codec_cirrus hdaudioC1D0:    inputs:
>> [   15.642307] snd_hda_codec_cirrus hdaudioC1D0:      Internal Mic=0x1c
>> [   15.642309] snd_hda_codec_cirrus hdaudioC1D0:      Mic=0x18
>> [   15.735257] snd_hda_intel 0000:00:03.0: bound 0000:00:02.0 (ops
>> i915_audio_component_bind_ops [i915])
>>
>> And hdajackretask (without unconnected pins):
>> Pin ID: 0x10 [Green Headphone]
>> Jack; External; Headphone; Combination;
>> Green; Present; 2; Front;
>>
>> Pin ID: 0x12 [Internal Speaker]
>> <blank>; Internal; Speaker; Unknown;
>> Unknown; Not present; 1; Back;
>>
>> Pin ID: 0x13 [Internal Speaker]
>> <blank>; Internal; Speaker; Unknown;
>> Unknown; Not present; 1; Back;
>>
>> Pin ID: 0x18 [Pink Mic]
>> Jack; External; Microphone; Combination;
>> Pink; Present; 4; Front;
>>
>> Pin ID: 0x1c [Internal Mic]
>> <blank>; Internal; Microphone; Other Digital;
>> Unknown; Not present; <blank>; Front
>>
>> Pin ID: 0x21 [White SPDIF Out]
>> Jack; External; SPIDF Out; Combination;
>> White; Present; 3; Front;
>>
>> The blank connectivity options are a bit off, as is the blank channel
>> group on the internal mic.
>>
>> So curious on those ...
>>
>> Anyway, leaving this here for any future in case it is needed again.
> 
> Good to hear that you managed to recover BIOS.
> 
> Could you give alsa-info.sh output from the working state?  Run the
> script with --no-upload option and attach the output.  This will help
> in future if it gets broken again :)

That's even better then what I wrote :p File is attached!

> 
> 
> thanks,
> 
> Takashi

[-- Attachment #2: alsa-info_macbookpro_12,1.txt --]
[-- Type: text/plain, Size: 48128 bytes --]

upload=true&script=true&cardinfo=
!!################################
!!ALSA Information Script v 0.5.3
!!################################

!!Script ran on: Sat May 20 08:05:57 UTC 2023


!!Linux Distribution
!!------------------




!!DMI Information
!!---------------

Manufacturer:      Apple Inc.
Product Name:      MacBookPro12,1
Product Version:   1.0
Firmware Version:  481.0.0.0.0
System SKU:        
Board Vendor:      Apple Inc.
Board Name:        Mac-E43C1C25D4880AD6


!!ACPI Device Status Information
!!---------------

/sys/bus/acpi/devices/ACPI0001:00/status 	 15
/sys/bus/acpi/devices/ACPI0008:00/status 	 15
/sys/bus/acpi/devices/APP0001:00/status 	 11
/sys/bus/acpi/devices/APP0002:00/status 	 11
/sys/bus/acpi/devices/APP000D:00/status 	 15
/sys/bus/acpi/devices/INT33C1:00/status 	 15
/sys/bus/acpi/devices/PNP0103:00/status 	 15
/sys/bus/acpi/devices/PNP0C0E:00/status 	 11
/sys/bus/acpi/devices/PNP0C0F:00/status 	 9
/sys/bus/acpi/devices/PNP0C0F:01/status 	 9
/sys/bus/acpi/devices/PNP0C0F:02/status 	 9
/sys/bus/acpi/devices/PNP0C0F:03/status 	 9
/sys/bus/acpi/devices/PNP0C0F:04/status 	 9
/sys/bus/acpi/devices/PNP0C0F:05/status 	 9
/sys/bus/acpi/devices/PNP0C0F:06/status 	 9
/sys/bus/acpi/devices/PNP0C0F:07/status 	 9
/sys/bus/acpi/devices/device:0f/status 	 15
/sys/bus/acpi/devices/device:11/status 	 15
/sys/bus/acpi/devices/device:12/status 	 15
/sys/bus/acpi/devices/device:14/status 	 15
/sys/bus/acpi/devices/device:15/status 	 15
/sys/bus/acpi/devices/device:17/status 	 15
/sys/bus/acpi/devices/device:19/status 	 15
/sys/bus/acpi/devices/device:1a/status 	 15
/sys/bus/acpi/devices/device:1b/status 	 15
/sys/bus/acpi/devices/device:1d/status 	 15
/sys/bus/acpi/devices/device:1e/status 	 15
/sys/bus/acpi/devices/device:1f/status 	 15
/sys/bus/acpi/devices/device:20/status 	 15
/sys/bus/acpi/devices/device:21/status 	 15
/sys/bus/acpi/devices/device:22/status 	 15
/sys/bus/acpi/devices/device:23/status 	 15
/sys/bus/acpi/devices/device:24/status 	 15
/sys/bus/acpi/devices/device:25/status 	 15
/sys/bus/acpi/devices/device:27/status 	 15
/sys/bus/acpi/devices/device:28/status 	 15
/sys/bus/acpi/devices/device:29/status 	 15
/sys/bus/acpi/devices/device:2a/status 	 15
/sys/bus/acpi/devices/device:2b/status 	 15
/sys/bus/acpi/devices/device:2c/status 	 15
/sys/bus/acpi/devices/device:2d/status 	 15
/sys/bus/acpi/devices/device:2e/status 	 15
/sys/bus/acpi/devices/device:2f/status 	 15
/sys/bus/acpi/devices/device:30/status 	 15
/sys/bus/acpi/devices/device:31/status 	 15
/sys/bus/acpi/devices/device:33/status 	 15
/sys/bus/acpi/devices/device:34/status 	 15
/sys/bus/acpi/devices/device:35/status 	 15
/sys/bus/acpi/devices/device:37/status 	 15
/sys/bus/acpi/devices/device:38/status 	 15
/sys/bus/acpi/devices/device:39/status 	 15
/sys/bus/acpi/devices/device:3a/status 	 15
/sys/bus/acpi/devices/device:3b/status 	 15
/sys/bus/acpi/devices/device:3c/status 	 15
/sys/bus/acpi/devices/device:3d/status 	 15
/sys/bus/acpi/devices/device:3e/status 	 15
/sys/bus/acpi/devices/device:3f/status 	 15
/sys/bus/acpi/devices/device:41/status 	 15
/sys/bus/acpi/devices/device:42/status 	 15
/sys/bus/acpi/devices/device:43/status 	 15
/sys/bus/acpi/devices/device:44/status 	 15
/sys/bus/acpi/devices/device:45/status 	 15
/sys/bus/acpi/devices/device:46/status 	 15
/sys/bus/acpi/devices/device:47/status 	 15
/sys/bus/acpi/devices/device:48/status 	 15
/sys/bus/acpi/devices/device:49/status 	 15
/sys/bus/acpi/devices/device:4a/status 	 15
/sys/bus/acpi/devices/device:4b/status 	 15
/sys/bus/acpi/devices/device:4d/status 	 15
/sys/bus/acpi/devices/device:4e/status 	 15
/sys/bus/acpi/devices/device:4f/status 	 15
/sys/bus/acpi/devices/device:51/status 	 15
/sys/bus/acpi/devices/device:52/status 	 15
/sys/bus/acpi/devices/device:53/status 	 15
/sys/bus/acpi/devices/device:54/status 	 15
/sys/bus/acpi/devices/device:55/status 	 15
/sys/bus/acpi/devices/device:56/status 	 15
/sys/bus/acpi/devices/device:57/status 	 15
/sys/bus/acpi/devices/device:58/status 	 15
/sys/bus/acpi/devices/device:59/status 	 15
/sys/bus/acpi/devices/device:5b/status 	 15
/sys/bus/acpi/devices/device:5c/status 	 15
/sys/bus/acpi/devices/device:5d/status 	 15
/sys/bus/acpi/devices/device:5e/status 	 15
/sys/bus/acpi/devices/device:5f/status 	 15
/sys/bus/acpi/devices/device:60/status 	 15
/sys/bus/acpi/devices/device:61/status 	 15
/sys/bus/acpi/devices/device:62/status 	 15
/sys/bus/acpi/devices/device:63/status 	 15
/sys/bus/acpi/devices/device:64/status 	 15
/sys/bus/acpi/devices/device:65/status 	 15
/sys/bus/acpi/devices/device:69/status 	 15
/sys/bus/acpi/devices/device:6a/status 	 15


!!Kernel Information
!!------------------

Kernel release:    #1 SMP PREEMPT_DYNAMIC Thu, 11 May 2023 16:40:42 +0000
Operating System:  Linux
Architecture:      x86_64
Processor:         unknown
SMP Enabled:       Yes


!!ALSA Version
!!------------

Driver version:     k6.3.2-arch1-1
Library version:    
Utilities version:  1.2.9


!!Loaded ALSA modules
!!-------------------

snd_hda_intel (card 0)
snd_hda_intel (card 1)


!!Sound Servers on this system
!!----------------------------

No sound servers found.


!!Soundcards recognised by ALSA
!!-----------------------------

 0 [HDMI           ]: HDA-Intel - HDA Intel HDMI
                      HDA Intel HDMI at 0xc1810000 irq 75
 1 [PCH            ]: HDA-Intel - HDA Intel PCH
                      HDA Intel PCH at 0xc1814000 irq 73


!!Loaded sound module options
!!---------------------------

!!Module: snd_hda_intel
	align_buffer_size : -1
	bdl_pos_adj : -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1
	beep_mode : N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N
	ctl_dev_id : N
	dmic_detect : Y
	enable : Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y
	enable_msi : -1
	id : (null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null)
	index : -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1
	jackpoll_ms : 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
	model : (null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null)
	patch : (null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null)
	pm_blacklist : Y
	position_fix : -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1
	power_save : 1
	power_save_controller : Y
	probe_mask : -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1
	probe_only : 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
	single_cmd : -1
	snoop : -1

!!Module: snd_hda_intel
	align_buffer_size : -1
	bdl_pos_adj : -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1
	beep_mode : N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N
	ctl_dev_id : N
	dmic_detect : Y
	enable : Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y
	enable_msi : -1
	id : (null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null)
	index : -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1
	jackpoll_ms : 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
	model : (null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null)
	patch : (null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null)
	pm_blacklist : Y
	position_fix : -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1
	power_save : 1
	power_save_controller : Y
	probe_mask : -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1
	probe_only : 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
	single_cmd : -1
	snoop : -1


!!Sysfs card info
!!---------------

!!Card: /sys/class/sound/card0
Driver: /sys/bus/pci/drivers/snd_hda_intel
Tree:

!!Card: /sys/class/sound/card1
Driver: /sys/bus/pci/drivers/snd_hda_intel
Tree:


!!HDA-Intel Codec information
!!---------------------------
--startcollapse--

Codec: Intel Broadwell HDMI
Address: 0
AFG Function Id: 0x1 (unsol 0)
Vendor Id: 0x80862808
Subsystem Id: 0x80860101
Revision Id: 0x100000
No Modem Function Group found
Default PCM:
    rates [0x0]:
    bits [0x0]:
    formats [0x0]:
Default Amp-In caps: N/A
Default Amp-Out caps: N/A
State of AFG node 0x01:
  Power states:  D0 D3 CLKSTOP EPSS
  Power: setting=D0, actual=D0, Clock-stop-OK
GPIO: io=0, o=0, i=0, unsolicited=0, wake=0
Node 0x02 [Audio Output] wcaps 0x6611: 8-Channels Digital
  Converter: stream=0, channel=0
  Digital: Enabled KAE
  Digital category: 0x0
  IEC Coding Type: 0x0
  PCM:
    rates [0x7f0]: 32000 44100 48000 88200 96000 176400 192000
    bits [0x1e]: 16 20 24 32
    formats [0x5]: PCM AC3
  Power states:  D0 D3 EPSS
  Power: setting=D0, actual=D0
Node 0x03 [Audio Output] wcaps 0x6611: 8-Channels Digital
  Converter: stream=0, channel=0
  Digital: Enabled KAE
  Digital category: 0x0
  IEC Coding Type: 0x0
  PCM:
    rates [0x7f0]: 32000 44100 48000 88200 96000 176400 192000
    bits [0x1e]: 16 20 24 32
    formats [0x5]: PCM AC3
  Power states:  D0 D3 EPSS
  Power: setting=D0, actual=D0
Node 0x04 [Audio Output] wcaps 0x6611: 8-Channels Digital
  Converter: stream=0, channel=0
  Digital: Enabled KAE
  Digital category: 0x0
  IEC Coding Type: 0x0
  PCM:
    rates [0x7f0]: 32000 44100 48000 88200 96000 176400 192000
    bits [0x1e]: 16 20 24 32
    formats [0x5]: PCM AC3
  Power states:  D0 D3 EPSS
  Power: setting=D0, actual=D0
Node 0x05 [Pin Complex] wcaps 0x40778d: 8-Channels Digital Amp-Out CP
  Amp-Out caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
  Amp-Out vals:  [0x00 0x00]
  Pincap 0x0b000094: OUT Detect HBR HDMI DP
  Pin Default 0x18560010: [Jack] Digital Out at Int HDMI
    Conn = Digital, Color = Unknown
    DefAssociation = 0x1, Sequence = 0x0
  Pin-ctls: 0x00:
  Unsolicited: tag=00, enabled=0
  Power states:  D0 D3 EPSS
  Power: setting=D0, actual=D0
  Devices: 0
  Connection: 0
Node 0x06 [Pin Complex] wcaps 0x40778d: 8-Channels Digital Amp-Out CP
  Amp-Out caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
  Amp-Out vals:  [0x00 0x00]
  Pincap 0x0b000094: OUT Detect HBR HDMI DP
  Pin Default 0x18560010: [Jack] Digital Out at Int HDMI
    Conn = Digital, Color = Unknown
    DefAssociation = 0x1, Sequence = 0x0
  Pin-ctls: 0x00:
  Unsolicited: tag=00, enabled=0
  Power states:  D0 D3 EPSS
  Power: setting=D0, actual=D0
  Devices: 0
  Connection: 0
Node 0x07 [Pin Complex] wcaps 0x40778d: 8-Channels Digital Amp-Out CP
  Amp-Out caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
  Amp-Out vals:  [0x00 0x00]
  Pincap 0x0b000094: OUT Detect HBR HDMI DP
  Pin Default 0x18560010: [Jack] Digital Out at Int HDMI
    Conn = Digital, Color = Unknown
    DefAssociation = 0x1, Sequence = 0x0
  Pin-ctls: 0x00:
  Unsolicited: tag=00, enabled=0
  Power states:  D0 D3 EPSS
  Power: setting=D0, actual=D0
  Devices: 0
  Connection: 0
Node 0x08 [Vendor Defined Widget] wcaps 0xf00000: Mono
Codec: Cirrus Logic CS4208
Address: 0
AFG Function Id: 0x1 (unsol 1)
Vendor Id: 0x10134208
Subsystem Id: 0x106b7b00
Revision Id: 0x100300
No Modem Function Group found
Default PCM:
    rates [0x0]:
    bits [0x0]:
    formats [0x0]:
Default Amp-In caps: N/A
Default Amp-Out caps: N/A
State of AFG node 0x01:
  Power states:  D0 D3 D3cold S3D3cold CLKSTOP EPSS
  Power: setting=D0, actual=D0
GPIO: io=6, o=2, i=0, unsolicited=1, wake=1
  IO[0]: enable=1, dir=1, wake=0, sticky=0, data=1, unsol=0
  IO[1]: enable=0, dir=0, wake=0, sticky=0, data=0, unsol=0
  IO[2]: enable=0, dir=0, wake=0, sticky=0, data=0, unsol=0
  IO[3]: enable=0, dir=0, wake=0, sticky=0, data=0, unsol=0
  IO[4]: enable=0, dir=0, wake=0, sticky=0, data=0, unsol=0
  IO[5]: enable=0, dir=0, wake=0, sticky=0, data=0, unsol=0
Node 0x02 [Audio Output] wcaps 0xd043d: Stereo Amp-Out Stripe
  Control: name="Headphone Playback Volume", index=0, device=0
    ControlAmp: chs=3, dir=Out, idx=0, ofs=0
  Amp-Out caps: ofs=0x7f, nsteps=0x7f, stepsize=0x01, mute=1
  Amp-Out vals:  [0x00 0x00]
  Converter: stream=5, channel=0
  PCM:
    rates [0x7f0]: 32000 44100 48000 88200 96000 176400 192000
    bits [0x1e]: 16 20 24 32
    formats [0x3]: PCM FLOAT
  Power states:  D0 D3 EPSS
  Power: setting=D0, actual=D0
  Delay: 13 samples
Node 0x03 [Audio Output] wcaps 0xd043d: Stereo Amp-Out Stripe
  Control: name="Speaker Playback Volume", index=0, device=0
    ControlAmp: chs=3, dir=Out, idx=0, ofs=0
  Control: name="Speaker Playback Switch", index=0, device=0
    ControlAmp: chs=3, dir=Out, idx=0, ofs=0
  Device: name="CS4208 Analog", type="Audio", device=0
  Amp-Out caps: ofs=0x7f, nsteps=0x7f, stepsize=0x01, mute=1
  Amp-Out vals:  [0xf0 0xf0]
  Converter: stream=5, channel=0
  PCM:
    rates [0x7f0]: 32000 44100 48000 88200 96000 176400 192000
    bits [0x1e]: 16 20 24 32
    formats [0x3]: PCM FLOAT
  Power states:  D0 D3 EPSS
  Power: setting=D0, actual=D0
  Delay: 13 samples
Node 0x04 [Audio Output] wcaps 0xd043d: Stereo Amp-Out Stripe
  Control: name="Bass Speaker Playback Volume", index=0, device=0
    ControlAmp: chs=3, dir=Out, idx=0, ofs=0
  Control: name="Bass Speaker Playback Switch", index=0, device=0
    ControlAmp: chs=3, dir=Out, idx=0, ofs=0
  Amp-Out caps: ofs=0x7f, nsteps=0x7f, stepsize=0x01, mute=1
  Amp-Out vals:  [0xf0 0xf0]
  Converter: stream=5, channel=0
  PCM:
    rates [0x7f0]: 32000 44100 48000 88200 96000 176400 192000
    bits [0x1e]: 16 20 24 32
    formats [0x3]: PCM FLOAT
  Power states:  D0 D3 EPSS
  Power: setting=D0, actual=D0
  Delay: 13 samples
Node 0x05 [Audio Output] wcaps 0xd043d: Stereo Amp-Out Stripe
  Amp-Out caps: ofs=0x7f, nsteps=0x7f, stepsize=0x01, mute=1
  Amp-Out vals:  [0xff 0xff]
  Converter: stream=0, channel=0
  PCM:
    rates [0x7f0]: 32000 44100 48000 88200 96000 176400 192000
    bits [0x1e]: 16 20 24 32
    formats [0x3]: PCM FLOAT
  Power states:  D0 D3 EPSS
  Power: setting=D3, actual=D3
  Delay: 13 samples
Node 0x06 [Audio Input] wcaps 0x18051b: Stereo Amp-In
  Device: name="CS4208 Analog", type="Audio", device=0
  Amp-In caps: ofs=0x33, nsteps=0x3f, stepsize=0x03, mute=1
  Amp-In vals:  [0xb3 0xb3] [0xb3 0xb3] [0xb3 0xb3]
  Converter: stream=0, channel=0
  SDI-Select: 0
  PCM:
    rates [0x1f5]: 8000 16000 32000 44100 48000 88200 96000
    bits [0x1e]: 16 20 24 32
    formats [0x3]: PCM FLOAT
  Power states:  D0 D3 EPSS
  Power: setting=D3, actual=D3
  Delay: 8 samples
  Connection: 3
     0x15* 0x17 0x19
Node 0x07 [Audio Input] wcaps 0x18051b: Stereo Amp-In
  Amp-In caps: ofs=0x33, nsteps=0x3f, stepsize=0x03, mute=1
  Amp-In vals:  [0x80 0x80] [0x80 0x80] [0x80 0x80]
  Converter: stream=0, channel=0
  SDI-Select: 0
  PCM:
    rates [0x1f5]: 8000 16000 32000 44100 48000 88200 96000
    bits [0x1e]: 16 20 24 32
    formats [0x3]: PCM FLOAT
  Power states:  D0 D3 EPSS
  Power: setting=D0, actual=D0
  Delay: 8 samples
  Connection: 3
     0x16* 0x18 0x1a
Node 0x08 [Audio Input] wcaps 0x18051b: Stereo Amp-In
  Amp-In caps: ofs=0x33, nsteps=0x3f, stepsize=0x03, mute=1
  Amp-In vals:  [0xb3 0xb3]
  Converter: stream=0, channel=0
  SDI-Select: 0
  PCM:
    rates [0x1f5]: 8000 16000 32000 44100 48000 88200 96000
    bits [0x1e]: 16 20 24 32
    formats [0x3]: PCM FLOAT
  Power states:  D0 D3 EPSS
  Power: setting=D3, actual=D3
  Delay: 8 samples
  Connection: 1
     0x1b
Node 0x09 [Audio Input] wcaps 0x18051b: Stereo Amp-In
  Control: name="Capture Volume", index=0, device=0
    ControlAmp: chs=3, dir=In, idx=1, ofs=0
  Control: name="Capture Switch", index=0, device=0
    ControlAmp: chs=3, dir=In, idx=1, ofs=0
  Amp-In caps: ofs=0x33, nsteps=0x3f, stepsize=0x03, mute=1
  Amp-In vals:  [0xab 0xab]
  Converter: stream=0, channel=0
  SDI-Select: 0
  PCM:
    rates [0x1f5]: 8000 16000 32000 44100 48000 88200 96000
    bits [0x1e]: 16 20 24 32
    formats [0x3]: PCM FLOAT
  Power states:  D0 D3 EPSS
  Power: setting=D3, actual=D3
  Delay: 8 samples
  Connection: 1
     0x1c
Node 0x0a [Audio Output] wcaps 0x46631: 8-Channels Digital Stripe
  Converter: stream=0, channel=0
  Digital:
  Digital category: 0x0
  IEC Coding Type: 0x0
  PCM:
    rates [0x60]: 44100 48000
    bits [0xe]: 16 20 24
    formats [0x1]: PCM
  Power states:  D0 D3 EPSS
  Power: setting=D3, actual=D3
  Delay: 4 samples
Node 0x0b [Audio Output] wcaps 0x46631: 8-Channels Digital Stripe
  Converter: stream=0, channel=0
  Digital:
  Digital category: 0x0
  IEC Coding Type: 0x0
  PCM:
    rates [0x60]: 44100 48000
    bits [0xe]: 16 20 24
    formats [0x1]: PCM
  Power states:  D0 D3 EPSS
  Power: setting=D3, actual=D3
  Delay: 4 samples
Node 0x0c [Audio Input] wcaps 0x136711: 8-Channels Digital
  Converter: stream=0, channel=0
  SDI-Select: 0
  Digital:
  Digital category: 0x0
  IEC Coding Type: 0x0
  PCM:
    rates [0x60]: 44100 48000
    bits [0x1e]: 16 20 24 32
    formats [0x1]: PCM
  Power states:  D0 D3 EPSS
  Power: setting=D3, actual=D3
  Delay: 3 samples
  Connection: 1
     0x1f
Node 0x0d [Audio Input] wcaps 0x136711: 8-Channels Digital
  Converter: stream=0, channel=0
  SDI-Select: 0
  Digital:
  Digital category: 0x0
  IEC Coding Type: 0x0
  PCM:
    rates [0x60]: 44100 48000
    bits [0x1e]: 16 20 24 32
    formats [0x1]: PCM
  Power states:  D0 D3 EPSS
  Power: setting=D3, actual=D3
  Delay: 3 samples
  Connection: 1
     0x20
Node 0x0e [Audio Output] wcaps 0x40631: Stereo Digital Stripe
  Control: name="IEC958 Playback Con Mask", index=0, device=0
  Control: name="IEC958 Playback Pro Mask", index=0, device=0
  Control: name="IEC958 Playback Default", index=0, device=0
  Control: name="IEC958 Playback Switch", index=0, device=0
  Control: name="IEC958 Default PCM Playback Switch", index=0, device=0
  Device: name="CS4208 Digital", type="SPDIF", device=1
  Converter: stream=5, channel=0
  Digital:
  Digital category: 0x0
  IEC Coding Type: 0x0
  PCM:
    rates [0x7f0]: 32000 44100 48000 88200 96000 176400 192000
    bits [0xe]: 16 20 24
    formats [0x5]: PCM AC3
  Power states:  D0 D3 EPSS
  Power: setting=D0, actual=D0
  Delay: 4 samples
Node 0x0f [Audio Input] wcaps 0x1b0791: Stereo Digital
  Converter: stream=0, channel=0
  SDI-Select: 0
  Digital:
  Digital category: 0x0
  IEC Coding Type: 0x0
  PCM:
    rates [0x5f0]: 32000 44100 48000 88200 96000 192000
    bits [0xe]: 16 20 24
    formats [0x5]: PCM AC3
  Unsolicited: tag=00, enabled=0
  Power states:  D0 D3 EPSS
  Power: setting=D3, actual=D3
  Delay: 11 samples
  Connection: 1
     0x22
Node 0x10 [Pin Complex] wcaps 0x40058d: Stereo Amp-Out
  Control: name="Headphone Playback Switch", index=0, device=0
    ControlAmp: chs=3, dir=Out, idx=0, ofs=0
  Amp-Out caps: ofs=0x42, nsteps=0x42, stepsize=0x03, mute=1
  Amp-Out vals:  [0xc2 0xc2]
  Pincap 0x0000001c: OUT HP Detect
  Pin Default 0x032b401f: [Jack] HP Out at Ext Left
    Conn = Comb, Color = Green
    DefAssociation = 0x1, Sequence = 0xf
  Pin-ctls: 0xc0: OUT HP
  Unsolicited: tag=01, enabled=1
  Power states:  D0 D3 EPSS
  Power: setting=D3, actual=D3
  Connection: 1
     0x02
Node 0x11 [Pin Complex] wcaps 0x400581: Stereo
  Pincap 0x00000054: OUT Detect Balanced
  Pin Default 0x90170010: [Fixed] Speaker at Int N/A
    Conn = Analog, Color = Unknown
    DefAssociation = 0x1, Sequence = 0x0
  Pin-ctls: 0x00:
  Unsolicited: tag=00, enabled=0
  Power states:  D0 D3 EPSS
  Power: setting=D3, actual=D3
  Connection: 1
     0x02
Node 0x12 [Pin Complex] wcaps 0x400501: Stereo
  Pincap 0x00000050: OUT Balanced
  Pin Default 0x90170011: [Fixed] Speaker at Int N/A
    Conn = Analog, Color = Unknown
    DefAssociation = 0x1, Sequence = 0x1
  Pin-ctls: 0x40: OUT
  Power states:  D0 D3 EPSS
  Power: setting=D0, actual=D0
  Connection: 1
     0x03
Node 0x13 [Pin Complex] wcaps 0x400501: Stereo
  Pincap 0x00000050: OUT Balanced
  Pin Default 0x90170012: [Fixed] Speaker at Int N/A
    Conn = Analog, Color = Unknown
    DefAssociation = 0x1, Sequence = 0x2
  Pin-ctls: 0x40: OUT
  Power states:  D0 D3 EPSS
  Power: setting=D0, actual=D0
  Connection: 1
     0x04
Node 0x14 [Pin Complex] wcaps 0x400501: Stereo
  Pincap 0x00000050: OUT Balanced
  Pin Default 0x90170014: [Fixed] Speaker at Int N/A
    Conn = Analog, Color = Unknown
    DefAssociation = 0x1, Sequence = 0x4
  Pin-ctls: 0x00:
  Power states:  D0 D3 EPSS
  Power: setting=D3, actual=D3
  Connection: 1
     0x05
Node 0x15 [Pin Complex] wcaps 0x40040b: Stereo Amp-In
  Amp-In caps: ofs=0x00, nsteps=0x03, stepsize=0x27, mute=0
  Amp-In vals:  [0x00 0x00]
  Pincap 0x00001720: IN
    Vref caps: HIZ 50 GRD 80
  Pin Default 0xb7a70031: [Fixed] Mic at Oth Mobile-In
    Conn = Analog, Color = Unknown
    DefAssociation = 0x3, Sequence = 0x1
  Pin-ctls: 0x00: VREF_HIZ
  Power states:  D0 D3 EPSS
  Power: setting=D3, actual=D3
Node 0x16 [Pin Complex] wcaps 0x40040b: Stereo Amp-In
  Amp-In caps: ofs=0x00, nsteps=0x03, stepsize=0x27, mute=0
  Amp-In vals:  [0x00 0x00]
  Pincap 0x00001720: IN
    Vref caps: HIZ 50 GRD 80
  Pin Default 0xb7a70051: [Fixed] Mic at Oth Mobile-In
    Conn = Analog, Color = Unknown
    DefAssociation = 0x5, Sequence = 0x1
  Pin-ctls: 0x00: VREF_HIZ
  Power states:  D0 D3 EPSS
  Power: setting=D3, actual=D3
Node 0x17 [Pin Complex] wcaps 0x40048b: Stereo Amp-In
  Amp-In caps: ofs=0x00, nsteps=0x03, stepsize=0x27, mute=0
  Amp-In vals:  [0x00 0x00]
  Pincap 0x00000024: IN Detect
  Pin Default 0x038b3037: [Jack] Line In at Ext Left
    Conn = Comb, Color = Blue
    DefAssociation = 0x3, Sequence = 0x7
  Pin-ctls: 0x00:
  Unsolicited: tag=00, enabled=0
  Power states:  D0 D3 EPSS
  Power: setting=D3, actual=D3
Node 0x18 [Pin Complex] wcaps 0x40048a: Mono Amp-In
  Control: name="Mic Boost Volume", index=0, device=0
    ControlAmp: chs=3, dir=In, idx=0, ofs=0
  Amp-In caps: ofs=0x00, nsteps=0x03, stepsize=0x27, mute=0
  Amp-In vals:  [0x00]
  Pincap 0x00001724: IN Detect
    Vref caps: HIZ 50 GRD 80
  Pin Default 0x03ab4057: [Jack] Mic at Ext Left
    Conn = Comb, Color = Green
    DefAssociation = 0x5, Sequence = 0x7
  Pin-ctls: 0x24: IN VREF_80
  Unsolicited: tag=02, enabled=1
  Power states:  D0 D3 EPSS
  Power: setting=D3, actual=D3
Node 0x19 [Pin Complex] wcaps 0x40000b: Stereo Amp-In
  Amp-In caps: ofs=0x00, nsteps=0x02, stepsize=0x27, mute=0
  Amp-In vals:  [0x00 0x00]
  Pincap 0x00000020: IN
  Pin Default 0xb7a6003e: [Fixed] Mic at Oth Mobile-In
    Conn = Digital, Color = Unknown
    DefAssociation = 0x3, Sequence = 0xe
  Pin-ctls: 0x00:
Node 0x1a [Pin Complex] wcaps 0x40000b: Stereo Amp-In
  Amp-In caps: ofs=0x00, nsteps=0x02, stepsize=0x27, mute=0
  Amp-In vals:  [0x00 0x00]
  Pincap 0x00000020: IN
  Pin Default 0xb7a6005e: [Fixed] Mic at Oth Mobile-In
    Conn = Digital, Color = Unknown
    DefAssociation = 0x5, Sequence = 0xe
  Pin-ctls: 0x00:
Node 0x1b [Pin Complex] wcaps 0x40000b: Stereo Amp-In
  Amp-In caps: ofs=0x00, nsteps=0x02, stepsize=0x27, mute=0
  Amp-In vals:  [0x00 0x00]
  Pincap 0x00000020: IN
  Pin Default 0xb7a60070: [Fixed] Mic at Oth Mobile-In
    Conn = Digital, Color = Unknown
    DefAssociation = 0x7, Sequence = 0x0
  Pin-ctls: 0x00:
Node 0x1c [Pin Complex] wcaps 0x40000b: Stereo Amp-In
  Control: name="Internal Mic Boost Volume", index=0, device=0
    ControlAmp: chs=3, dir=In, idx=0, ofs=0
  Amp-In caps: ofs=0x00, nsteps=0x02, stepsize=0x27, mute=0
  Amp-In vals:  [0x02 0x02]
  Pincap 0x00000020: IN
  Pin Default 0xb7a60090: [Fixed] Mic at Oth Mobile-In
    Conn = Digital, Color = Unknown
    DefAssociation = 0x9, Sequence = 0x0
  Pin-ctls: 0x20: IN
Node 0x1d [Pin Complex] wcaps 0x406301: 8-Channels Digital
  Pincap 0x00000010: OUT
  Pin Default 0x901600f0: [Fixed] Speaker at Int N/A
    Conn = Digital, Color = Unknown
    DefAssociation = 0xf, Sequence = 0x0
  Pin-ctls: 0x00:
  Connection: 1
     0x0a
Node 0x1e [Pin Complex] wcaps 0x406301: 8-Channels Digital
  Pincap 0x00000010: OUT
  Pin Default 0x905600f0: [Fixed] Digital Out at Int N/A
    Conn = Digital, Color = Unknown
    DefAssociation = 0xf, Sequence = 0x0
  Pin-ctls: 0x00:
  Connection: 1
     0x0b
Node 0x1f [Pin Complex] wcaps 0x406201: 8-Channels Digital
  Pincap 0x00000020: IN
  Pin Default 0x90d600f0: [Fixed] Digital In at Int N/A
    Conn = Digital, Color = Unknown
    DefAssociation = 0xf, Sequence = 0x0
  Pin-ctls: 0x00:
Node 0x20 [Pin Complex] wcaps 0x406201: 8-Channels Digital
  Pincap 0x00000020: IN
  Pin Default 0x90d600f0: [Fixed] Digital In at Int N/A
    Conn = Digital, Color = Unknown
    DefAssociation = 0xf, Sequence = 0x0
  Pin-ctls: 0x00:
Node 0x21 [Pin Complex] wcaps 0x400381: Stereo Digital
  Pincap 0x00000014: OUT Detect
  Pin Default 0x034b40f0: [Jack] SPDIF Out at Ext Left
    Conn = Comb, Color = Green
    DefAssociation = 0xf, Sequence = 0x0
  Pin-ctls: 0x00:
  Unsolicited: tag=06, enabled=1
  Connection: 1
     0x0e
Node 0x22 [Pin Complex] wcaps 0x400281: Stereo Digital
  Pincap 0x00000024: IN Detect
  Pin Default 0x03cb30f0: [Jack] SPDIF In at Ext Left
    Conn = Comb, Color = Blue
    DefAssociation = 0xf, Sequence = 0x0
  Pin-ctls: 0x00:
  Unsolicited: tag=00, enabled=0
Node 0x23 [Beep Generator Widget] wcaps 0x700200: Mono Digital
Node 0x24 [Vendor Defined Widget] wcaps 0xf0e2c1: 16-Channels Digital
  Unsolicited: tag=00, enabled=0
  Processing caps: benign=0, ncoeff=128
--endcollapse--


!!ALSA Device nodes
!!-----------------

crw-rw----    1 root     996       116,  11 May 20 08:04 /dev/snd/controlC0
crw-rw----    1 root     996       116,   6 May 20 08:04 /dev/snd/controlC1
crw-rw----    1 root     996       116,  10 May 20 08:04 /dev/snd/hwC0D0
crw-rw----    1 root     996       116,   5 May 20 08:04 /dev/snd/hwC1D0
crw-rw----    1 root     996       116,   7 May 20 08:04 /dev/snd/pcmC0D3p
crw-rw----    1 root     996       116,   8 May 20 08:04 /dev/snd/pcmC0D7p
crw-rw----    1 root     996       116,   9 May 20 08:04 /dev/snd/pcmC0D8p
crw-rw----    1 root     996       116,   3 May 20 08:04 /dev/snd/pcmC1D0c
crw-rw----    1 root     996       116,   2 May 20 08:04 /dev/snd/pcmC1D0p
crw-rw----    1 root     996       116,   4 May 20 08:04 /dev/snd/pcmC1D1p
crw-rw----    1 root     996       116,   1 May 20 08:04 /dev/snd/seq
crw-rw----    1 root     996       116,  33 May 20 08:04 /dev/snd/timer


!!Aplay/Arecord output
!!--------------------

APLAY

**** List of PLAYBACK Hardware Devices ****
card 0: HDMI [HDA Intel HDMI], device 3: HDMI 0 [HDMI 0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: HDMI [HDA Intel HDMI], device 7: HDMI 1 [HDMI 1]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: HDMI [HDA Intel HDMI], device 8: HDMI 2 [HDMI 2]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: PCH [HDA Intel PCH], device 0: CS4208 Analog [CS4208 Analog]
  Subdevices: 0/1
  Subdevice #0: subdevice #0
card 1: PCH [HDA Intel PCH], device 1: CS4208 Digital [CS4208 Digital]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

ARECORD

**** List of CAPTURE Hardware Devices ****
card 1: PCH [HDA Intel PCH], device 0: CS4208 Analog [CS4208 Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

!!Amixer output
!!-------------

!!-------Mixer controls for card HDMI

Card sysdefault:0 'HDMI'/'HDA Intel HDMI at 0xc1810000 irq 75'
  Mixer name	: 'Intel Broadwell HDMI'
  Components	: 'HDA:80862808,80860101,00100000'
  Controls      : 21
  Simple ctrls  : 3
Simple mixer control 'IEC958',0
  Capabilities: pswitch pswitch-joined
  Playback channels: Mono
  Mono: Playback [on]
Simple mixer control 'IEC958',1
  Capabilities: pswitch pswitch-joined
  Playback channels: Mono
  Mono: Playback [on]
Simple mixer control 'IEC958',2
  Capabilities: pswitch pswitch-joined
  Playback channels: Mono
  Mono: Playback [on]

!!-------Mixer controls for card PCH

Card sysdefault:1 'PCH'/'HDA Intel PCH at 0xc1814000 irq 73'
  Mixer name	: 'Cirrus Logic CS4208'
  Components	: 'HDA:10134208,106b7b00,00100300'
  Controls      : 28
  Simple ctrls  : 11
Simple mixer control 'Master',0
  Capabilities: pvolume pvolume-joined pswitch pswitch-joined
  Playback channels: Mono
  Limits: Playback 0 - 127
  Mono: Playback 112 [88%] [-7.50dB] [off]
Simple mixer control 'Headphone',0
  Capabilities: pvolume pswitch
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 127
  Mono:
  Front Left: Playback 0 [0%] [-63.50dB] [off]
  Front Right: Playback 0 [0%] [-63.50dB] [off]
Simple mixer control 'Speaker',0
  Capabilities: pvolume pswitch
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 127
  Mono:
  Front Left: Playback 127 [100%] [0.00dB] [off]
  Front Right: Playback 127 [100%] [0.00dB] [off]
Simple mixer control 'Bass Speaker',0
  Capabilities: pvolume pswitch
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 127
  Mono:
  Front Left: Playback 127 [100%] [0.00dB] [off]
  Front Right: Playback 127 [100%] [0.00dB] [off]
Simple mixer control 'PCM',0
  Capabilities: pvolume
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 255
  Mono:
  Front Left: Playback 255 [100%] [0.00dB]
  Front Right: Playback 255 [100%] [0.00dB]
Simple mixer control 'Mic Boost',0
  Capabilities: volume
  Playback channels: Front Left - Front Right
  Capture channels: Front Left - Front Right
  Limits: 0 - 3
  Front Left: 0 [0%] [-20.00dB]
  Front Right: 0 [0%] [-20.00dB]
Simple mixer control 'IEC958',0
  Capabilities: pswitch pswitch-joined
  Playback channels: Mono
  Mono: Playback [off]
Simple mixer control 'IEC958 Default PCM',0
  Capabilities: pswitch pswitch-joined
  Playback channels: Mono
  Mono: Playback [on]
Simple mixer control 'Capture',0
  Capabilities: cvolume cswitch
  Capture channels: Front Left - Front Right
  Limits: Capture 0 - 63
  Front Left: Capture 43 [68%] [-8.00dB] [off]
  Front Right: Capture 43 [68%] [-8.00dB] [off]
Simple mixer control 'Auto-Mute Mode',0
  Capabilities: enum
  Items: 'Disabled' 'Enabled'
  Item0: 'Disabled'
Simple mixer control 'Internal Mic Boost',0
  Capabilities: volume
  Playback channels: Front Left - Front Right
  Capture channels: Front Left - Front Right
  Limits: 0 - 2
  Front Left: 2 [100%] [0.00dB]
  Front Right: 2 [100%] [0.00dB]


!!Alsactl output
!!--------------

--startcollapse--
state.HDMI {
	control.1 {
		iface CARD
		name 'HDMI/DP,pcm=3 Jack'
		value false
		comment {
			access read
			type BOOLEAN
			count 1
		}
	}
	control.2 {
		iface MIXER
		name 'IEC958 Playback Con Mask'
		value '0fff000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
		comment {
			access read
			type IEC958
			count 1
		}
	}
	control.3 {
		iface MIXER
		name 'IEC958 Playback Pro Mask'
		value '0f00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
		comment {
			access read
			type IEC958
			count 1
		}
	}
	control.4 {
		iface MIXER
		name 'IEC958 Playback Default'
		value '0400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
		comment {
			access 'read write'
			type IEC958
			count 1
		}
	}
	control.5 {
		iface MIXER
		name 'IEC958 Playback Switch'
		value true
		comment {
			access 'read write'
			type BOOLEAN
			count 1
		}
	}
	control.6 {
		iface PCM
		device 3
		name ELD
		value ''
		comment {
			access 'read volatile'
			type BYTES
			count 0
		}
	}
	control.7 {
		iface CARD
		name 'HDMI/DP,pcm=7 Jack'
		value false
		comment {
			access read
			type BOOLEAN
			count 1
		}
	}
	control.8 {
		iface MIXER
		name 'IEC958 Playback Con Mask'
		index 1
		value '0fff000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
		comment {
			access read
			type IEC958
			count 1
		}
	}
	control.9 {
		iface MIXER
		name 'IEC958 Playback Pro Mask'
		index 1
		value '0f00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
		comment {
			access read
			type IEC958
			count 1
		}
	}
	control.10 {
		iface MIXER
		name 'IEC958 Playback Default'
		index 1
		value '0400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
		comment {
			access 'read write'
			type IEC958
			count 1
		}
	}
	control.11 {
		iface MIXER
		name 'IEC958 Playback Switch'
		index 1
		value true
		comment {
			access 'read write'
			type BOOLEAN
			count 1
		}
	}
	control.12 {
		iface PCM
		device 7
		name ELD
		value ''
		comment {
			access 'read volatile'
			type BYTES
			count 0
		}
	}
	control.13 {
		iface CARD
		name 'HDMI/DP,pcm=8 Jack'
		value false
		comment {
			access read
			type BOOLEAN
			count 1
		}
	}
	control.14 {
		iface MIXER
		name 'IEC958 Playback Con Mask'
		index 2
		value '0fff000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
		comment {
			access read
			type IEC958
			count 1
		}
	}
	control.15 {
		iface MIXER
		name 'IEC958 Playback Pro Mask'
		index 2
		value '0f00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
		comment {
			access read
			type IEC958
			count 1
		}
	}
	control.16 {
		iface MIXER
		name 'IEC958 Playback Default'
		index 2
		value '0400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
		comment {
			access 'read write'
			type IEC958
			count 1
		}
	}
	control.17 {
		iface MIXER
		name 'IEC958 Playback Switch'
		index 2
		value true
		comment {
			access 'read write'
			type BOOLEAN
			count 1
		}
	}
	control.18 {
		iface PCM
		device 8
		name ELD
		value ''
		comment {
			access 'read volatile'
			type BYTES
			count 0
		}
	}
	control.19 {
		iface PCM
		device 3
		name 'Playback Channel Map'
		value.0 0
		value.1 0
		value.2 0
		value.3 0
		value.4 0
		value.5 0
		value.6 0
		value.7 0
		comment {
			access 'read write'
			type INTEGER
			count 8
			range '0 - 36'
		}
	}
	control.20 {
		iface PCM
		device 7
		name 'Playback Channel Map'
		value.0 0
		value.1 0
		value.2 0
		value.3 0
		value.4 0
		value.5 0
		value.6 0
		value.7 0
		comment {
			access 'read write'
			type INTEGER
			count 8
			range '0 - 36'
		}
	}
	control.21 {
		iface PCM
		device 8
		name 'Playback Channel Map'
		value.0 0
		value.1 0
		value.2 0
		value.3 0
		value.4 0
		value.5 0
		value.6 0
		value.7 0
		comment {
			access 'read write'
			type INTEGER
			count 8
			range '0 - 36'
		}
	}
}
state.PCH {
	control.1 {
		iface MIXER
		name 'Speaker Playback Volume'
		value.0 127
		value.1 127
		comment {
			access 'read write'
			type INTEGER
			count 2
			range '0 - 127'
			dbmin -6350
			dbmax 0
			dbvalue.0 0
			dbvalue.1 0
		}
	}
	control.2 {
		iface MIXER
		name 'Speaker Playback Switch'
		value.0 false
		value.1 false
		comment {
			access 'read write'
			type BOOLEAN
			count 2
		}
	}
	control.3 {
		iface MIXER
		name 'Bass Speaker Playback Volume'
		value.0 127
		value.1 127
		comment {
			access 'read write'
			type INTEGER
			count 2
			range '0 - 127'
			dbmin -6350
			dbmax 0
			dbvalue.0 0
			dbvalue.1 0
		}
	}
	control.4 {
		iface MIXER
		name 'Bass Speaker Playback Switch'
		value.0 false
		value.1 false
		comment {
			access 'read write'
			type BOOLEAN
			count 2
		}
	}
	control.5 {
		iface MIXER
		name 'Headphone Playback Volume'
		value.0 0
		value.1 0
		comment {
			access 'read write'
			type INTEGER
			count 2
			range '0 - 127'
			dbmin -6350
			dbmax 0
			dbvalue.0 -6350
			dbvalue.1 -6350
		}
	}
	control.6 {
		iface MIXER
		name 'Headphone Playback Switch'
		value.0 false
		value.1 false
		comment {
			access 'read write'
			type BOOLEAN
			count 2
		}
	}
	control.7 {
		iface MIXER
		name 'Auto-Mute Mode'
		value Disabled
		comment {
			access 'read write'
			type ENUMERATED
			count 1
			item.0 Disabled
			item.1 Enabled
		}
	}
	control.8 {
		iface MIXER
		name 'Capture Volume'
		value.0 43
		value.1 43
		comment {
			access 'read write'
			type INTEGER
			count 2
			range '0 - 63'
			dbmin -5100
			dbmax 1200
			dbvalue.0 -800
			dbvalue.1 -800
		}
	}
	control.9 {
		iface MIXER
		name 'Capture Switch'
		value.0 false
		value.1 false
		comment {
			access 'read write'
			type BOOLEAN
			count 2
		}
	}
	control.10 {
		iface MIXER
		name 'Internal Mic Boost Volume'
		value.0 2
		value.1 2
		comment {
			access 'read write'
			type INTEGER
			count 2
			range '0 - 2'
			dbmin -2000
			dbmax 0
			dbvalue.0 0
			dbvalue.1 0
		}
	}
	control.11 {
		iface MIXER
		name 'Mic Boost Volume'
		value.0 0
		value.1 0
		comment {
			access 'read write'
			type INTEGER
			count 2
			range '0 - 3'
			dbmin -2000
			dbmax 1000
			dbvalue.0 -2000
			dbvalue.1 -2000
		}
	}
	control.12 {
		iface MIXER
		name 'IEC958 Playback Con Mask'
		value '0fff000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
		comment {
			access read
			type IEC958
			count 1
		}
	}
	control.13 {
		iface MIXER
		name 'IEC958 Playback Pro Mask'
		value '0f00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
		comment {
			access read
			type IEC958
			count 1
		}
	}
	control.14 {
		iface MIXER
		name 'IEC958 Playback Default'
		value '0400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
		comment {
			access 'read write'
			type IEC958
			count 1
		}
	}
	control.15 {
		iface MIXER
		name 'IEC958 Playback Switch'
		value false
		comment {
			access 'read write'
			type BOOLEAN
			count 1
		}
	}
	control.16 {
		iface MIXER
		name 'IEC958 Default PCM Playback Switch'
		value true
		comment {
			access 'read write'
			type BOOLEAN
			count 1
		}
	}
	control.17 {
		iface MIXER
		name 'Master Playback Volume'
		value 112
		comment {
			access 'read write'
			type INTEGER
			count 1
			range '0 - 127'
			dbmin -6350
			dbmax 0
			dbvalue.0 -750
		}
	}
	control.18 {
		iface MIXER
		name 'Master Playback Switch'
		value false
		comment {
			access 'read write'
			type BOOLEAN
			count 1
		}
	}
	control.19 {
		iface CARD
		name 'Internal Mic Phantom Jack'
		value true
		comment {
			access read
			type BOOLEAN
			count 1
		}
	}
	control.20 {
		iface CARD
		name 'Mic Jack'
		value false
		comment {
			access read
			type BOOLEAN
			count 1
		}
	}
	control.21 {
		iface CARD
		name 'Speaker Front Phantom Jack'
		value true
		comment {
			access read
			type BOOLEAN
			count 1
		}
	}
	control.22 {
		iface CARD
		name 'Speaker Surround Phantom Jack'
		value true
		comment {
			access read
			type BOOLEAN
			count 1
		}
	}
	control.23 {
		iface CARD
		name 'Headphone Jack'
		value false
		comment {
			access read
			type BOOLEAN
			count 1
		}
	}
	control.24 {
		iface CARD
		name 'SPDIF Jack'
		value false
		comment {
			access read
			type BOOLEAN
			count 1
		}
	}
	control.25 {
		iface PCM
		name 'Playback Channel Map'
		value.0 3
		value.1 4
		value.2 0
		value.3 0
		comment {
			access read
			type INTEGER
			count 4
			range '0 - 36'
		}
	}
	control.26 {
		iface PCM
		name 'Capture Channel Map'
		value.0 0
		value.1 0
		comment {
			access read
			type INTEGER
			count 2
			range '0 - 36'
		}
	}
	control.27 {
		iface PCM
		device 1
		name 'Playback Channel Map'
		value.0 0
		value.1 0
		comment {
			access read
			type INTEGER
			count 2
			range '0 - 36'
		}
	}
	control.28 {
		iface MIXER
		name 'PCM Playback Volume'
		value.0 255
		value.1 255
		comment {
			access 'read write user'
			type INTEGER
			count 2
			range '0 - 255'
			tlv '0000000100000008ffffec1400000014'
			dbmin -5100
			dbmax 0
			dbvalue.0 0
			dbvalue.1 0
		}
	}
}
--endcollapse--


!!All Loaded Modules
!!------------------

acpi_als
aesni_intel
af_alg
algif_hash
algif_skcipher
apple_bl
apple_mfi_fastcharge
applesmc
applespi
asn1_encoder
bcm5974
blake2b_generic
bluetooth
bnep
bpf_preload
br_netfilter
brcmfmac
brcmfmac_wcc
brcmutil
bridge
btbcm
btintel
btmtk
btrfs
btrtl
btusb
cbc
cec
cfg80211
cmac
coretemp
crc16
crc32_pclmul
crc32c_generic
crc32c_intel
crct10dif_pclmul
cryptd
crypto_simd
crypto_user
dm_crypt
dm_mod
dm_multipath
drm_buddy
drm_display_helper
dw_dmac
ecdh_generic
encrypted_keys
facetimehd
fat
fuse
gf128mul
ghash_clmulni_intel
hid_apple
i2c_algo_bit
i2c_i801
i2c_smbus
i915
iTCO_vendor_support
iTCO_wdt
industrialio
industrialio_triggered_buffer
intel_cstate
intel_gtt
intel_pch_thermal
intel_pmc_bxt
intel_powerclamp
intel_rapl_common
intel_rapl_msr
intel_uncore
ip6_tables
ip6table_filter
ip6table_mangle
ip6table_nat
ip_tables
ipt_REJECT
iptable_filter
iptable_mangle
iptable_nat
irqbypass
joydev
kfifo_buf
kvm
kvm_intel
ledtrig_audio
libcrc32c
libphy
llc
loop
lpc_ich
mac_hid
mc
mei
mei_hdcp
mei_me
mei_pxp
mmc_core
mousedev
mtd
nf_conntrack
nf_conntrack_netlink
nf_defrag_ipv4
nf_defrag_ipv6
nf_nat
nf_reject_ipv4
nfnetlink
overlay
pcspkr
polyval_clmulni
polyval_generic
raid6_pq
rapl
rfcomm
rfkill
sbs
sbshc
sg
sha512_ssse3
snd
snd_hda_codec
snd_hda_codec_cirrus
snd_hda_codec_generic
snd_hda_codec_hdmi
snd_hda_core
snd_hda_intel
snd_hwdep
snd_intel_dspcfg
snd_intel_sdw_acpi
snd_pcm
snd_seq
snd_seq_device
snd_seq_dummy
snd_timer
soundcore
spi_intel
spi_intel_platform
spi_nor
spi_pxa2xx_pci
spi_pxa2xx_platform
stp
tee
tg3
thunderbolt
tls
trusted
ttm
tun
uas
usb_storage
usbhid
veth
vfat
video
videobuf2_common
videobuf2_dma_sg
videobuf2_memops
videobuf2_v4l2
videodev
wmi
x86_pkg_temp_thermal
x_tables
xhci_pci
xhci_pci_renesas
xor
xt_CHECKSUM
xt_MASQUERADE
xt_addrtype
xt_conntrack
xt_nat
xt_tcpudp


!!Sysfs Files
!!-----------

/sys/class/sound/hwC0D0/init_pin_configs:
0x05 0x18560010
0x06 0x18560010
0x07 0x18560010

/sys/class/sound/hwC0D0/driver_pin_configs:

/sys/class/sound/hwC0D0/user_pin_configs:

/sys/class/sound/hwC0D0/init_verbs:

/sys/class/sound/hwC0D0/hints:

/sys/class/sound/hwC1D0/init_pin_configs:
0x10 0x002b4020
0x11 0x400000f0
0x12 0x90100110
0x13 0x90100112
0x14 0x400000f0
0x15 0x400000f0
0x16 0x400000f0
0x17 0x400000f0
0x18 0x00ab9040
0x19 0x400000f0
0x1a 0x400000f0
0x1b 0x400000f0
0x1c 0x90a60100
0x1d 0x400000f0
0x1e 0x400000f0
0x1f 0x400000f0
0x20 0x400000f0
0x21 0x004be030
0x22 0x400000f0

/sys/class/sound/hwC1D0/driver_pin_configs:

/sys/class/sound/hwC1D0/user_pin_configs:

/sys/class/sound/hwC1D0/init_verbs:

/sys/class/sound/hwC1D0/hints:


!!ALSA/HDA dmesg
!!--------------

[   15.628290] iTCO_wdt iTCO_wdt.1.auto: unable to reset NO_REBOOT flag, device disabled by hardware/BIOS
[   15.642288] snd_hda_codec_cirrus hdaudioC1D0: autoconfig for CS4208: line_outs=2 (0x12/0x13/0x0/0x0/0x0) type:speaker
[   15.642296] snd_hda_codec_cirrus hdaudioC1D0:    speaker_outs=0 (0x0/0x0/0x0/0x0/0x0)
[   15.642299] snd_hda_codec_cirrus hdaudioC1D0:    hp_outs=1 (0x10/0x0/0x0/0x0/0x0)
[   15.642301] snd_hda_codec_cirrus hdaudioC1D0:    mono: mono_out=0x0
[   15.642303] snd_hda_codec_cirrus hdaudioC1D0:    dig-out=0x21/0x0
[   15.642305] snd_hda_codec_cirrus hdaudioC1D0:    inputs:
[   15.642307] snd_hda_codec_cirrus hdaudioC1D0:      Internal Mic=0x1c
[   15.642309] snd_hda_codec_cirrus hdaudioC1D0:      Mic=0x18
[   15.660761] Console: switching to colour dummy device 80x25
[   15.661903] i915 0000:00:02.0: vgaarb: deactivate vga console
[   15.668562] input: HDA Intel PCH Mic as /devices/pci0000:00/0000:00:1b.0/sound/card1/input9
[   15.668642] input: HDA Intel PCH Headphone as /devices/pci0000:00/0000:00:1b.0/sound/card1/input10
[   15.670636] input: HDA Intel PCH SPDIF as /devices/pci0000:00/0000:00:1b.0/sound/card1/input11
[   15.672331] i915 0000:00:02.0: vgaarb: changed VGA decodes: olddecodes=io+mem,decodes=io+mem:owns=io+mem
--
[   15.732055] input: Video Bus as /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/LNXVIDEO:00/input/input12
[   15.735257] snd_hda_intel 0000:00:03.0: bound 0000:00:02.0 (ops i915_audio_component_bind_ops [i915])
[   15.738712] fbcon: i915drmfb (fb0) is primary device
--
[   17.173640] brcmfmac_wcc: brcmf_wcc_attach: executing
[   17.175248] input: HDA Intel HDMI HDMI/DP,pcm=3 as /devices/pci0000:00/0000:00:03.0/sound/card0/input13
[   17.175304] input: HDA Intel HDMI HDMI/DP,pcm=7 as /devices/pci0000:00/0000:00:03.0/sound/card0/input14
[   17.175345] input: HDA Intel HDMI HDMI/DP,pcm=8 as /devices/pci0000:00/0000:00:03.0/sound/card0/input15
[   17.177892] brcmfmac: brcmf_c_process_clm_blob: no clm_blob available (err=-2), device may have limited channels available



^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2023-05-20  8:22 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-05-11 15:12 snd_hda_codec_cirrus kernel oops Olliver Schinagl
2023-05-12  9:01 ` Takashi Iwai
2023-05-16 16:49   ` Olliver Schinagl
2023-05-16 18:31     ` Takashi Iwai
2023-05-18 14:24       ` Olliver Schinagl
2023-05-18 14:27         ` Takashi Iwai
2023-05-18 15:11           ` Olliver Schinagl
2023-05-19  7:12             ` Takashi Iwai
2023-05-19 16:53               ` Olliver Schinagl
2023-05-20  8:02                 ` Takashi Iwai
2023-05-20  8:08                   ` Olliver Schinagl

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox