← Back to team overview

debcrafters-packages team mailing list archive

[Bug 2116889] Re: Internal microphone not working on iMac18, 3 (CS8409 codec) in Ubuntu 24.04.02

 

🛠️ Follow-up: Technical validation of internal microphone activation path (CS8409, iMac18,3)
After extensive research, testing and kernel-level diagnostics, I have confirmed that fully functional driver logic for the Cirrus Logic CS8409 codec — including internal microphone support — exists in the upstream kernel source, specifically in Linux 6.16-rc6 (Torvalds mainline).
🧾 Background:
    • Device: Apple iMac18,3 (27", 2017)
    • Codec: Cirrus CS8409 + CS42L83
    • OS: Ubuntu 24.04.2 LTS
    • Initial kernel: 6.11.0-29-generic
    • Alternate tested driver: egorenar/snd-hda-codec-cs8409
🔍 Issue recap:
    • Mic is present at NID 0x45, “Internal Mic Boost” appears in alsamixer, but capture does not work.
    • arecord produces silence, PipeWire sees input stream but records nothing.
    • Manual hda-verb activation on NID 0x44/0x45 accepted by codec, but input remains inactive.
🧪 Manual integration and kernel analysis
I cloned and analyzed linux-6.16-rc6 source, and verified that the DMIC initialization logic is present in:
sound/pci/hda/patch_cs8409.c
sound/pci/hda/patch_cs8409.h
✅ Verified working fields:
c
spec->reg9_intmike_dmic_mo   = 0x0200;
spec->reg82_intmike_dmic_scl = 0x0080;
✅ Active register writes:
c
snd_hda_codec_write(codec, CS8409_VENDOR_NID, 0, AC_VERB_SET_COEF_INDEX, 0x09);
snd_hda_codec_write(codec, CS8409_VENDOR_NID, 0, AC_VERB_SET_PROC_COEF, spec->reg9_intmike_dmic_mo);
snd_hda_codec_write(codec, CS8409_VENDOR_NID, 0, AC_VERB_SET_COEF_INDEX, 0x82);
snd_hda_codec_write(codec, CS8409_VENDOR_NID, 0, AC_VERB_SET_PROC_COEF, spec->reg82_intmike_dmic_scl);
🧱 Rebuilt kernel with DMIC patch: 6.16.0-rc6-00002-g155a3c003e55-dirty. Boot stalled (possibly ACPI-related), but build completed and modules installed correctly.
🔁 Also attempted transplant into egorenar/snd-hda-codec-cs8409, but driver lacked necessary structure (cs8409_spec, fixup linkage), and integration failed.
✅ Conclusion:
Mic activation logic is complete in patch_cs8409.c from kernel 6.16-rc6. This logic should be:
    • Backported to Ubuntu kernel series (≥6.11)
    • Integrated into patch_cs8409.c used in snd-hda-intel
    • Supported by corresponding UCM2 profile (cs8409-imac18.3) with input mapping and capture routing
🙋 I'm available to test updated drivers, submit diffs or DKMS packages, and help verify UCM integration on real hardware.

-- 
You received this bug notification because you are a member of
Debcrafters packages, which is subscribed to alsa-driver in Ubuntu.
https://bugs.launchpad.net/bugs/2116889

Title:
  Internal microphone not working on iMac18,3 (CS8409 codec) in Ubuntu
  24.04.02

Status in alsa-driver package in Ubuntu:
  New

Bug description:
  Internal microphone not working on iMac18,3 with CS8409 codec (Ubuntu
  24.04.02)

  📋 Description
  System:

  Device: Apple iMac18,3 (27", 2017)

  OS: Ubuntu 24.04.2 LTS (Wayland)

  Kernel: 6.11.0-29-generic

  Audio Codec: Cirrus Logic CS8409 / CS42L83

  Driver: snd-hda-codec-cs8409 (manually compiled from egorenar GitHub
  repository)

  ALSA Info: http://alsa-
  project.org/db/?f=47cfd6f15f4b7c5b8bc8110a63b2ebc366be9885

  🔍 Issue
  The internal microphone is detected, but capture input is not functional:

  dmesg detects microphone at NID 0x45

  alsamixer shows “Internal Mic Boost” but no Capture control

  arecord -vv -f cd test.wav produces silence (#+ | 00%)

  PipeWire lists the capture stream but does not receive input

  🧪 Diagnostics
  Tested activation via hda-verb:

  bash
  sudo hda-verb /dev/snd/hwC0D0 0x45 SET_PIN_WIDGET_CONTROL 0x40
  sudo hda-verb /dev/snd/hwC0D0 0x45 SET_AMP_GAIN_MUTE 0x7000
  sudo hda-verb /dev/snd/hwC0D0 0x45 SET_AMP_GAIN_MUTE 0x5000
  All commands returned value = 0x0 (accepted by codec), but input remained inactive.

  Also attempted activation on NID 0x44, with identical results.

  💡 Proposed Solution
  The input path appears physically present but missing software initialization. Suggested fixes:

  Driver patch (patch_cs8409.c):

  Enable NID 0x45 as Internal Mic input

  Properly configure AMP-IN and gain levels

  UCM profile (cs8409-imac18.3):

  Define input stream mapping (capture_FL / capture_FR)

  Include Internal Mic device with boost controls

  Integration with PipeWire via updated ucm2 configuration

  🙋‍♂️ Offer to assist
  I’m happy to test any proposed patches or UCM profiles. I have extensive logs and direct access to affected hardware.

  Thanks to ALSA maintainers and Ubuntu devs for your outstanding work!

  Marek (mahav-t) Ubuntu 24.04 on iMac18,3 (2017)

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/alsa-driver/+bug/2116889/+subscriptions