No sound with snd_hda_intel on macbookair5,2

After a clean installation of Monjaro on a MacBook Air 2012, it had no sound (only dummy audio). I wrote in /etc/modprobe.d/alsa-base.conf - options snd-hda-intel model=intel-mac-auto. The sound appeared at first, but disappeared after a while (the same thing happened on Ubuntu).

Some of my configurations:

$ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: PCH [HDA Intel PCH], device 3: HDMI 0 [HDMI 0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 7: HDMI 1 [HDMI 1]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 8: HDMI 2 [HDMI 2]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
$ inxi -A
Audio:
  Device-1: Intel 7 Series/C216 Family High Definition Audio
    driver: snd_hda_intel
  API: ALSA v: k6.5.5-1-MANJARO status: kernel-api
  Server-1: PipeWire v: 0.3.80 status: active
  Server-2: PulseAudio v: 16.1 status: active
$ sudo dmesg | grep snd
[   10.097854] snd_hda_intel 0000:00:1b.0: bound 0000:00:02.0 (ops i915_audio_component_bind_ops [i915])
$ lsmod | grep snd 

snd_seq_dummy          12288  0
snd_hrtimer            12288  1
snd_seq               131072  7 snd_seq_dummy
snd_seq_device         16384  1 snd_seq
snd_hda_codec_hdmi     94208  1
snd_hda_intel          65536  2
snd_intel_dspcfg       32768  1 snd_hda_intel
snd_intel_sdw_acpi     16384  1 snd_intel_dspcfg
snd_hda_codec         225280  2 snd_hda_codec_hdmi,snd_hda_intel
snd_hda_core          151552  3 snd_hda_codec_hdmi,snd_hda_intel,snd_hda_codec
snd_hwdep              20480  1 snd_hda_codec
snd_pcm               204800  4 snd_hda_codec_hdmi,snd_hda_intel,snd_hda_codec,snd_hda_core
snd_timer              53248  3 snd_seq,snd_hrtimer,snd_pcm
snd                   155648  14 snd_seq,snd_seq_device,snd_hda_codec_hdmi,snd_hwdep,snd_hda_intel,snd_hda_codec,snd_timer,snd_pcm
soundcore              16384  1 snd

Is it normal?:

$ cat /sys/module/snd_hda_intel/parameters/model
intel-mac-auto,(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)

Maybe try

snd_hda_intel model=mb5

Thanks for the answer.
I changed the file, restarted the laptop, but still no sound.
I also tried all other models of MacBooks, it did not help.

List of playback devices should show an analog output for speakers/headphones:

HW probe of Apple MacBookAir5,2 #137fbb8afb: aplay
**** List of PLAYBACK Hardware Devices ****
card 0: PCH [HDA Intel PCH], device 0: CS4206 Analog [CS4206 Analog]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 3: HDMI 0 [HDMI 0]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 7: HDMI 1 [HDMI 1]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 8: HDMI 2 [HDMI 2]
Subdevices: 1/1
Subdevice #0: subdevice #0

Kernel documentation shows codec was patched using the same model option as MacBook Pro 8,1

[PATCH 3.12 051/155] ALSA: hda - Add workaround for MacBook Air 5,2 built-in mic - Jiri Slaby

SND_PCI_QUIRK(0x106b, 0x5600, "MacBookAir 5,2", CS420X_MBP81),

patch_cirrus.c - sound/pci/hda/patch_cirrus.c - Linux source code (v6.5.5) - Bootlin

{ .id = CS420X_MBP81, .name = "mbp81" },

I suggest change the modprobe model option to mbp81:

sudo tee /etc/modprobe.d/alsa-base.conf <<< 'options snd_hda_intel model=mbp81'

You need to specify the exact model, whatever that may be. Intel should have a whole range of ID’s listed somewhere.

You can query the model from the (Mac) Terminal with:

system_profiler SPAudioDataType

… or, find this information via a system report. Ofourse, this doesn’t actually help unless you also have macOS running on the machine.

Assuming you found the model:

  • Check available snd_hda_intel module options:
modinfo snd_hda_intel
  • Create a configuration file to set options; typically placed in /etc/modprobe.d/. Example:
sudo nano /etc/modprobe.d/snd_hda_intel.conf
  • Edit the file and add (please check this line for accuracy):
options snd_hda_intel model=SOUNDCARD

… where ‘SOUNDCARD’ is your device model; this help to identify the correct driver, and respective options.

  • After saving the snd_hda_intel.conf file, reload the module to apply any changes:
sudo modprobe -r snd_hda_intel
sudo modprobe snd_hda_intel
  • Test that your audio works. A reboot shouldn’t be needed.

I hope this helps. Cheers.

Laptop model name posted in topic title (macbookair 5,2) was sufficient information to find VendorID/Product ID [106b: 5600] of Cirrus CS4206 audio codec from linux-hardware.org
the codec model name and ID can then be used to search for model option in Linux Kernel Mailing List and Kernel documentation

since OP already has file /etc/modprobe.d/alsa-base.conf the tee command was suggested to correct model name in existing file.
I usually use a more meaningful name for modprobe files but the name is not significant
OS will use modprobe options from any file in /etc/modprobe.d/ that has a .conf suffix

My search revealed Realtek ALC269 which didn’t seem likely as the OP seemed certain it was Intel. However, chipsets typically do tend to differ across mainboard models; or even the same models, at times.

Further information on linux-hardware.org confirms audio codec and ID codes

HW probe of Apple MacBookAir5,2 #137fbb8afb: amixer
Card hw:0 ‘PCH’/‘HDA Intel PCH at 0xa0610000 irq 34’
Mixer name : ‘Cirrus Logic CS4206’
Components : ‘HDA:10134206,106b5600,00100302 HDA:80862806,80860101,00100000’

VendorID code 8086 identifies audio codec as an Intel device

HW probe of Apple MacBookAir5,2 #137fbb8afb: lspci_all
00:14.0 USB controller [0c03]: Intel Corporation 7 Series/C210 Series Chipset Family USB xHCI Host Controller [8086:1e31] (rev 04) (prog-if 30 [XHCI])
Subsystem: Intel Corporation 7 Series/C210 Series Chipset Family USB xHCI Host Controller [8086:7270]

VendorID 106b is registered to Apple
VendorID 1013 is registered to Cirrus Logic

options snd_hda_intel model=CS4206

… is likely then; if the OP ever revisits.

Model name CS4206 is not listed in kernel documentation

cs420x_models identifier - Linux source code (v6.5.7) - Bootlin

HD-Audio Codec-Specific Models — The Linux Kernel documentation

And yet, that’s all it could be, as extrapolated from your previous discoveries; unless a model id is actually needed, rather than the model.

Thanks everyone for your help!
It was a hardware problem. I wiped all the contacts of the sound card and everything worked (but it’s strange)

It probably just needed to be re-seated.

Most welcome; buy us all a :beer: next time you’re passing through.

Cheers.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.