← 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

 

🛠️ Correction and expanded comment:
This version of the technical report replaces and improves my earlier submission. Please consider this as my updated analysis and proposed solution.

🛠️ Follow-up: Technical validation of internal microphone activation (CS8409, iMac18,3)
After extensive analysis, hands-on testing and kernel-level diagnostics, I have confirmed that fully functional driver logic for the Cirrus Logic CS8409 codec — including support for the internal microphone — is present in the upstream Linux kernel source, specifically in version 6.16-rc6 (mainline Torvalds).

🧾 System details:

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 summary:

The microphone is detected at NID 0x45, and “Internal Mic Boost” appears
in alsamixer, but capture does not work.

arecord produces silence; PipeWire detects an input stream but does not
record any signal.

Manual activation via hda-verb on NID 0x44/0x45 is accepted by the
codec, but results in no functional input.

🧪 Kernel analysis:

I downloaded and inspected the linux-6.16-rc6 source and located the
DMIC (Digital Microphone) initialization logic in the following files:

sound/pci/hda/patch_cs8409.c  
sound/pci/hda/patch_cs8409.h
✅ Verified fields:

c
spec->reg9_intmike_dmic_mo   = 0x0200;  
spec->reg82_intmike_dmic_scl = 0x0080;
✅ Functional 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);
🧱 The kernel with the DMIC patch compiled successfully (6.16.0-rc6-00002-g155a3c003e55-dirty). Modules were installed, but the system failed to boot into the new kernel (likely due to missing ACPI or init subsystems).

🔁 I also attempted to transplant the DMIC activation logic into the
egorenar/snd-hda-codec-cs8409 tree, but the driver lacked the required
structure (cs8409_spec) and fixup linkage — integration failed.

✅ Conclusion:

Microphone activation logic is fully implemented and functional in
patch_cs8409.c from kernel 6.16-rc6. Recommended actions:

Backport the patch into Ubuntu kernels (version ≥ 6.11)

Integrate it directly into patch_cs8409.c used within snd-hda-intel

Add a corresponding UCM2 profile (cs8409-imac18.3) with correct input
mapping and capture routing

🙋 I’m available to help test updated drivers, provide patch diffs or
DKMS packages, and assist in verifying UCM integration on a real
iMac18,3.

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

-- 
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