Bug 205529 - Mic mute LED does not follow mic mute status on Dell Latitude E7450
Summary: Mic mute LED does not follow mic mute status on Dell Latitude E7450
Status: RESOLVED CODE_FIX
Alias: None
Product: Drivers
Classification: Unclassified
Component: Sound(ALSA) (show other bugs)
Hardware: Intel Linux
: P1 normal
Assignee: Jaroslav Kysela
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-11-14 16:14 UTC by Michael Marley
Modified: 2020-01-05 08:12 UTC (History)
2 users (show)

See Also:
Kernel Version: 5.4-rc7
Subsystem:
Regression: No
Bisected commit-id:


Attachments
alsa-info.sh output from the affected system (61.05 KB, text/plain)
2019-11-14 16:14 UTC, Michael Marley
Details
Test patch (1.04 KB, patch)
2020-01-04 11:35 UTC, Takashi Iwai
Details | Diff
Revised test patch (1.10 KB, patch)
2020-01-04 21:44 UTC, Takashi Iwai
Details | Diff

Description Michael Marley 2019-11-14 16:14:40 UTC
Created attachment 285919 [details]
alsa-info.sh output from the affected system

I have a Dell Latitude E7450 laptop on which I am running kernel 5.4-rc7 and PulseAudio 13.  The mic mute LED does not follow the mic mute status.  The mic mute button does work to mute the mic and I can manually turn the LED on and off manually by using /sys/class/leds/platform::micmute/brightness, so it seems there is just some missing bit to integrate the two.

I have attached the output of alsa-info.sh.  If you need any other information, I will be happy to provide it.
Comment 1 Takashi Iwai 2020-01-04 11:34:40 UTC
Does the patch below work?
Comment 2 Takashi Iwai 2020-01-04 11:35:01 UTC
Created attachment 286619 [details]
Test patch
Comment 3 Michael Marley 2020-01-04 13:49:29 UTC
The mic mute LED still doesn't work.  I also get the following error message in dmesg on boot when the codec is initialized:

[    3.297990] ------------[ cut here ]------------
[    3.297999] WARNING: CPU: 3 PID: 655 at sound/pci/hda/patch_realtek.c:5073 alc_fixup_headset_mode+0xec/0xf0 [snd_hda_codec_realtek]
[    3.298000] Modules linked in: snd_hda_codec_realtek(+) snd_hda_codec_generic snd_hda_codec_hdmi snd_hda_intel snd_intel_dspcfg snd_hda_codec snd_hda_core snd_hwdep snd_pcm mei_hdcp snd_seq_midi intel_rapl_msr snd_seq_midi_event x86_pkg_temp_thermal intel_powerclamp snd_rawmidi kvm_intel snd_seq kvm dell_laptop ledtrig_audio irqbypass snd_seq_device dell_smm_hwmon crct10dif_pclmul snd_timer crc32_pclmul uvcvideo ghash_clmulni_intel iwlmvm binfmt_misc mac80211 libarc4 nls_iso8859_1 videobuf2_vmalloc videobuf2_memops aesni_intel crypto_simd videobuf2_v4l2 cryptd videobuf2_common glue_helper iwlwifi snd intel_cstate dell_wmi intel_rapl_perf videodev dell_smbios btusb dcdbas mc btrtl cfg80211 joydev btbcm input_leds serio_raw sparse_keymap dell_wmi_descriptor wmi_bmof btintel mei_me soundcore mei processor_thermal_device intel_rapl_common intel_soc_dts_iosf int3403_thermal dell_smo8800 mac_hid acpi_pad int3400_thermal dell_rbtn int3402_thermal int340x_thermal_zone acpi_thermal_rel sch_fq_codel
[    3.298030]  coretemp rfcomm bluetooth ecdh_generic ecc parport_pc ppdev lp parport iTCO_wdt iTCO_vendor_support ip_tables x_tables autofs4 i915 i2c_algo_bit drm_kms_helper syscopyarea sdhci_pci sysfillrect sysimgblt fb_sys_fops cqhci psmouse lpc_ich i2c_i801 sdhci ahci drm libahci e1000e wmi video
[    3.298044] CPU: 3 PID: 655 Comm: modprobe Not tainted 5.5.0-050500rc4-lowlatency #201912291846
[    3.298045] Hardware name: Dell Inc. Latitude E7450/, BIOS A22 10/03/2019
[    3.298051] RIP: 0010:alc_fixup_headset_mode+0xec/0xf0 [snd_hda_codec_realtek]
[    3.298052] Code: e8 00 00 00 48 89 e5 83 fa 10 74 0c 83 fa 40 74 07 e8 78 f4 ff ff 5d c3 48 c7 80 2c 0a 00 00 00 00 00 00 e8 66 f4 ff ff 5d c3 <0f> 0b eb a5 0f 1f 44 00 00 55 48 89 e5 41 54 49 89 fc 85 d2 75 62
[    3.298053] RSP: 0018:ffffa3c38073ba38 EFLAGS: 00010282
[    3.298055] RAX: ffff96fe0a311000 RBX: ffffffffc0d65148 RCX: 0000000000000003
[    3.298056] RDX: 0000000000000006 RSI: ffff96fe0a3114dc RDI: 0000000000000006
[    3.298056] RBP: ffffa3c38073ba40 R08: 0000000000000003 R09: ffff96fe0c803880
[    3.298057] R10: ffffa3c38073ba28 R11: ffffa3c48073b9fb R12: 0000000000000005
[    3.298058] R13: 0000000000000001 R14: ffff96fe0a311000 R15: ffff96fe0a3d9000
[    3.298060] FS:  00007ff4f87b2500(0000) GS:ffff96fe0e580000(0000) knlGS:0000000000000000
[    3.298061] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[    3.298062] CR2: 00007fe0fd26e130 CR3: 00000004067e8005 CR4: 00000000003606e0
[    3.298063] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
[    3.298064] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
[    3.298064] Call Trace:
[    3.298071]  ? alc_fixup_headset_mode_no_hp_mic+0x21/0x30 [snd_hda_codec_realtek]
[    3.298078]  apply_fixup+0x185/0x270 [snd_hda_codec]
[    3.298085]  snd_hda_apply_fixup+0x22/0x30 [snd_hda_codec]
[    3.298090]  patch_alc269+0x2b8/0x770 [snd_hda_codec_realtek]
[    3.298095]  hda_codec_driver_probe+0x99/0x170 [snd_hda_codec]
[    3.298098]  ? driver_sysfs_add+0x72/0xd0
[    3.298100]  really_probe+0x2b3/0x3e0
[    3.298103]  driver_probe_device+0xbc/0x100
[    3.298105]  device_driver_attach+0x5d/0x70
[    3.298107]  __driver_attach+0x8f/0x150
[    3.298109]  ? device_driver_attach+0x70/0x70
[    3.298111]  bus_for_each_dev+0x7e/0xc0
[    3.298113]  driver_attach+0x1e/0x20
[    3.298114]  bus_add_driver+0x152/0x1f0
[    3.298116]  driver_register+0x74/0xd0
[    3.298118]  ? 0xffffffffc0d75000
[    3.298122]  __hda_codec_driver_register+0x5d/0x60 [snd_hda_codec]
[    3.298126]  realtek_driver_init+0x23/0x1000 [snd_hda_codec_realtek]
[    3.298129]  do_one_initcall+0x4a/0x230
[    3.298132]  ? kmem_cache_alloc_trace+0x17f/0x230
[    3.298135]  do_init_module+0x62/0x250
[    3.298137]  load_module+0x10b6/0x1210
[    3.298141]  __do_sys_finit_module+0xbe/0x120
[    3.298142]  ? __do_sys_finit_module+0xbe/0x120
[    3.298146]  __x64_sys_finit_module+0x1a/0x20
[    3.298148]  do_syscall_64+0x57/0x1b0
[    3.298150]  entry_SYSCALL_64_after_hwframe+0x44/0xa9
[    3.298152] RIP: 0033:0x7ff4f88f795d
[    3.298154] Code: 00 c3 66 2e 0f 1f 84 00 00 00 00 00 90 f3 0f 1e fa 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d 03 e5 0c 00 f7 d8 64 89 01 48
[    3.298154] RSP: 002b:00007ffc2dde1128 EFLAGS: 00000246 ORIG_RAX: 0000000000000139
[    3.298156] RAX: ffffffffffffffda RBX: 0000556a2b6ebab0 RCX: 00007ff4f88f795d
[    3.298157] RDX: 0000000000000000 RSI: 0000556a2b6dd348 RDI: 0000000000000001
[    3.298158] RBP: 0000000000040000 R08: 0000000000000000 R09: 0000000000000000
[    3.298159] R10: 0000000000000001 R11: 0000000000000246 R12: 0000556a2b6dd348
[    3.298159] R13: 0000000000000000 R14: 0000556a2b6f3210 R15: 0000556a2b6ebab0
[    3.298162] ---[ end trace 43e5dd8bf3bb81ac ]---
Comment 4 Takashi Iwai 2020-01-04 21:43:47 UTC
My bad, I forgot that this fixup chain is tricky.
The revised patch is below.
Comment 5 Takashi Iwai 2020-01-04 21:44:17 UTC
Created attachment 286627 [details]
Revised test patch
Comment 6 Michael Marley 2020-01-05 00:53:10 UTC
That patch works great.  There is no more crash message and the mic mute LED works, both with using the button and when (un)muting it from software.  Thanks!
Comment 7 Takashi Iwai 2020-01-05 08:12:52 UTC
Good to hear.  I submitted the patch and will merge it.

Note You need to log in before you can comment on or make changes to this bug.