# [SOLVED] Macbook Air 7,2 Sound Card Doesn't Work

## gigavinyl

I recently got Gentoo installed on my Macbook Air 7,2 and, for whatever reason, I get no sound out of pulseaudio + alsa. The pulseaudio and alsa USE flags are both enabled in my make.conf and I compiled snd_hda_intel into the kernel (not as a module) and I have grub2 running "snd-hda-intel=1,0" at boot to switch my PCH and HDMI soundcards. The output of "lspci | grep Audio" is:

```

00:03.0 Audio device: Intel Corporation Broadwell-U Audio Controller (rev 09)

00:1b.0 Audio device: Intel Corporation Wildcat Point-LP High Definition Audio Controller (rev 03)

```

The output of "aplay -l" is:

```

**** List of PLAYBACK Hardware Devices ****

```

I have both udev and consolekit set to start at boot and, while 

```
speaker-test -c2
```

 throws no errors and pavucontrol lists the only output device as "Dummy Output". How would I go about setting up my sound correctly?Last edited by gigavinyl on Wed Nov 02, 2016 6:39 am; edited 1 time in total

----------

## Logicien

I never have compile the sound in Linux in the kernel image since I configure it, I always make modules for anything possible who cannot help the early boot. If you want to swap the PCH and HDMI soundcards, with Grub2 the good Linux kernel parameter syntaxe is for example on the same line than other parameters

```
 linux /boot/vmlinuz snd-hda-intel.index=1,0
```

Do not forget to compile the appropriate codecs for your sound sards.

----------

## gigavinyl

 *Logicien wrote:*   

> I never have compile the sound in Linux in the kernel image since I configure it, I always make modules for anything possible who cannot help the early boot. If you want to swap the PCH and HDMI soundcards, with Grub2 the good Linux kernel parameter syntaxe is for example on the same line than other parameters
> 
> ```
>  linux /boot/vmlinuz snd-hda-intel.index=1,0
> ```
> ...

 

Oops I forgot to compile those codecs and I guess I copied down the kernel command wrong, my bad  :Embarassed: . I've compiled snd_hda support and the codecs for my autio devices as modules and my /etc/conf.d/modules is: 

```
modules="snd-hda-core snd-hwdep snd-hda-codec-hdmi snd-hda-codec snd-hda-codec-cirrus snd-hda-codec-generic snd-hda-intel"
```

. However, I still have the same issue where aplay -l lists no sound cards and Pulseaudio doesn't recognize the sound cards.

----------

## Logicien

There few needs to force sound modules to be load. Linux load all needed ones by itself except as example for OSS compatiblity. If your Linux sound support is compile in modules, to swap the PCH and HDMI soundcards your need to do

```
echo 'options snd-hda-intel index=1,0' > /etc/modprobe.d/snd-hda-intel.conf
```

and reboot or unload and load all sound modules again.

If really nothing is detected have a look at the kernel messages (dmesg).

----------

## gigavinyl

Setting those options in the snd-hda-intel.conf and rebooting produced the same results. the output of dmesg | grep snd is:

```
[    2.377399] snd_hda_intel 0000:00:03.0: bound 0000:00:02.0 (ops 0xffffffff81a8ad70)

[    4.136722] snd_hwdep: exports duplicate symbol snd_hwdep_new (owned by kernel)

[    4.243296] snd_hwdep: exports duplicate symbol snd_hwdep_new (owned by kernel)

[    4.259344] snd_hwdep: exports duplicate symbol snd_hwdep_new (owned by kernel)

[    4.271300] snd_hwdep: exports duplicate symbol snd_hwdep_new (owned by kernel)

[    5.372587] snd_hda_core: exports duplicate symbol _snd_hdac_read_parm (owned by kernel)

[    5.399550] snd_hwdep: exports duplicate symbol snd_hwdep_new (owned by kernel)

[    5.476358] snd_hwdep: exports duplicate symbol snd_hwdep_new (owned by kernel)

[    5.506327] snd_hwdep: exports duplicate symbol snd_hwdep_new (owned by kernel)

[    5.534523] snd_hwdep: exports duplicate symbol snd_hwdep_new (owned by kernel)

[    5.562081] snd_hwdep: exports duplicate symbol snd_hwdep_new (owned by kernel)

[    5.591353] snd_hwdep: exports duplicate symbol snd_hwdep_new (owned by kernel)

[    5.617702] snd_hwdep: exports duplicate symbol snd_hwdep_new (owned by kernel)

[    5.648346] snd_hwdep: exports duplicate symbol snd_hwdep_new (owned by kernel)

[    5.751132] snd_hwdep: exports duplicate symbol snd_hwdep_new (owned by kernel)

[   88.870646] Modules linked in: snd_intel8x0 snd_cs46xx snd_ac97_codec ac97_bus snd_seq_midi snd_seq_midi_emul snd_rawmidi x86_pkg_temp_thermal wl(PO) efivarfs

```

 and the output of dmesng | grep hda is:

```
[    1.804573] hdaudio hdaudioC1D0: Unable to bind the codec

[    2.377399] snd_hda_intel 0000:00:03.0: bound 0000:00:02.0 (ops 0xffffffff81a8ad70)

[    2.383596] hdaudio hdaudioC0D0: Unable to bind the codec

[    5.372587] snd_hda_core: exports duplicate symbol _snd_hdac_read_parm (owned by kernel)

```

 Just to be safe, I built and loaded a few more kernel modules in case the ones I was loading were incorrect: 

```
modules="snd-hda-core snd-hwdep snd-rawmidi snd-seq-midi-emul snd-seq-midi snd-cs4281 snd-hda-codec-hdmi snd-hda-codec-analog snd-hda-codec snd-hda-codec-cirrus snd-hda-codec-generic snd-hda-intel snd-cs46xx snd-intel8x0 snd-ac97-codec ac97-bus and-opl3-synth snd-opl3-lib"
```

----------

## Logicien

Nothing is detected because you have duplicate symbols. You do not have the good codecs for your sound cards possibly. Missing audio codecs in Linux do not prevent the sound cards dectection. About sound, I configure anything I need that Linux allow in modules. All the rest needed go in the kernel image.

Do you use Genkernel or you configure the Linux sources by yourself? How do you proceed from the Linux sources installation? Do you use the stable gentoo-sources? What do you do?

Know you sound card model is helpfull

```
lspci -nn
```

----------

## gigavinyl

Sorry, I'm still a tad new to the whole manual kernel compilaton scene so I'm probably missing something quite obvious  :Embarassed:  . I compile the kernel from gentoo-source and I use dracut to build my initramfs. My kernel config with "SND" in the name of the flag is:

```

CONFIG_SND=y

CONFIG_SND_TIMER=y

CONFIG_SND_PCM=y

CONFIG_SND_HWDEP=y

CONFIG_SND_RAWMIDI=y

CONFIG_SND_JACK=y

CONFIG_SND_SEQUENCER=y

CONFIG_SND_SEQ_DUMMY=y

CONFIG_SND_OSSEMUL=y

CONFIG_SND_MIXER_OSS=y

CONFIG_SND_PCM_OSS=y

CONFIG_SND_PCM_OSS_PLUGINS=y

CONFIG_SND_PCM_TIMER=y

CONFIG_SND_SEQUENCER_OSS=y

CONFIG_SND_HRTIMER=y

CONFIG_SND_SEQ_HRTIMER_DEFAULT=y

# CONFIG_SND_DYNAMIC_MINORS is not set

CONFIG_SND_SUPPORT_OLD_API=y

CONFIG_SND_PROC_FS=y

CONFIG_SND_VERBOSE_PROCFS=y

# CONFIG_SND_VERBOSE_PRINTK is not set

# CONFIG_SND_DEBUG is not set

CONFIG_SND_VMASTER=y

CONFIG_SND_DMA_SGBUF=y

CONFIG_SND_RAWMIDI_SEQ=y

CONFIG_SND_OPL3_LIB_SEQ=y

# CONFIG_SND_OPL4_LIB_SEQ is not set

# CONFIG_SND_SBAWE_SEQ is not set

# CONFIG_SND_EMU10K1_SEQ is not set

CONFIG_SND_OPL3_LIB=y

CONFIG_SND_AC97_CODEC=y

CONFIG_SND_DRIVERS=y

# CONFIG_SND_PCSP is not set

# CONFIG_SND_DUMMY is not set

# CONFIG_SND_ALOOP is not set

# CONFIG_SND_VIRMIDI is not set

# CONFIG_SND_MTPAV is not set

# CONFIG_SND_SERIAL_U16550 is not set

# CONFIG_SND_MPU401 is not set

# CONFIG_SND_AC97_POWER_SAVE is not set

CONFIG_SND_PCI=y

# CONFIG_SND_AD1889 is not set

# CONFIG_SND_ALS300 is not set

# CONFIG_SND_ALS4000 is not set

# CONFIG_SND_ALI5451 is not set

# CONFIG_SND_ASIHPI is not set

# CONFIG_SND_ATIIXP is not set

# CONFIG_SND_ATIIXP_MODEM is not set

# CONFIG_SND_AU8810 is not set

# CONFIG_SND_AU8820 is not set

# CONFIG_SND_AU8830 is not set

# CONFIG_SND_AW2 is not set

# CONFIG_SND_AZT3328 is not set

# CONFIG_SND_BT87X is not set

# CONFIG_SND_CA0106 is not set

# CONFIG_SND_CMIPCI is not set

# CONFIG_SND_OXYGEN is not set

CONFIG_SND_CS4281=y

CONFIG_SND_CS46XX=y

CONFIG_SND_CS46XX_NEW_DSP=y

# CONFIG_SND_CTXFI is not set

# CONFIG_SND_DARLA20 is not set

# CONFIG_SND_GINA20 is not set

# CONFIG_SND_LAYLA20 is not set

# CONFIG_SND_DARLA24 is not set

# CONFIG_SND_GINA24 is not set

# CONFIG_SND_LAYLA24 is not set

# CONFIG_SND_MONA is not set

# CONFIG_SND_MIA is not set

# CONFIG_SND_ECHO3G is not set

# CONFIG_SND_INDIGO is not set

# CONFIG_SND_INDIGOIO is not set

# CONFIG_SND_INDIGODJ is not set

# CONFIG_SND_INDIGOIOX is not set

# CONFIG_SND_INDIGODJX is not set

# CONFIG_SND_EMU10K1 is not set

# CONFIG_SND_EMU10K1X is not set

# CONFIG_SND_ENS1370 is not set

# CONFIG_SND_ENS1371 is not set

# CONFIG_SND_ES1938 is not set

# CONFIG_SND_ES1968 is not set

# CONFIG_SND_FM801 is not set

# CONFIG_SND_HDSP is not set

# CONFIG_SND_HDSPM is not set

# CONFIG_SND_ICE1712 is not set

# CONFIG_SND_ICE1724 is not set

CONFIG_SND_INTEL8X0=y

# CONFIG_SND_INTEL8X0M is not set

# CONFIG_SND_KORG1212 is not set

# CONFIG_SND_LOLA is not set

# CONFIG_SND_LX6464ES is not set

# CONFIG_SND_MAESTRO3 is not set

# CONFIG_SND_MIXART is not set

# CONFIG_SND_NM256 is not set

# CONFIG_SND_PCXHR is not set

# CONFIG_SND_RIPTIDE is not set

# CONFIG_SND_RME32 is not set

# CONFIG_SND_RME96 is not set

# CONFIG_SND_RME9652 is not set

# CONFIG_SND_SE6X is not set

# CONFIG_SND_SONICVIBES is not set

# CONFIG_SND_TRIDENT is not set

# CONFIG_SND_VIA82XX is not set

# CONFIG_SND_VIA82XX_MODEM is not set

# CONFIG_SND_VIRTUOSO is not set

# CONFIG_SND_VX222 is not set

# CONFIG_SND_YMFPCI is not set

CONFIG_SND_HDA=m

CONFIG_SND_HDA_INTEL=m

CONFIG_SND_HDA_HWDEP=y

CONFIG_SND_HDA_RECONFIG=y

CONFIG_SND_HDA_INPUT_BEEP=y

CONFIG_SND_HDA_INPUT_BEEP_MODE=1

CONFIG_SND_HDA_PATCH_LOADER=y

CONFIG_SND_HDA_CODEC_REALTEK=m

CONFIG_SND_HDA_CODEC_ANALOG=m

CONFIG_SND_HDA_CODEC_SIGMATEL=m

CONFIG_SND_HDA_CODEC_VIA=m

CONFIG_SND_HDA_CODEC_HDMI=m

CONFIG_SND_HDA_CODEC_CIRRUS=m

CONFIG_SND_HDA_CODEC_CONEXANT=m

CONFIG_SND_HDA_CODEC_CA0110=m

CONFIG_SND_HDA_CODEC_CA0132=m

CONFIG_SND_HDA_CODEC_CA0132_DSP=y

CONFIG_SND_HDA_CODEC_CMEDIA=m

CONFIG_SND_HDA_CODEC_SI3054=m

CONFIG_SND_HDA_GENERIC=m

CONFIG_SND_HDA_POWER_SAVE_DEFAULT=0

CONFIG_SND_HDA_CORE=m

CONFIG_SND_HDA_DSP_LOADER=y

CONFIG_SND_HDA_I915=y

CONFIG_SND_HDA_PREALLOC_SIZE=2048

CONFIG_SND_USB=y

# CONFIG_SND_USB_AUDIO is not set

# CONFIG_SND_USB_UA101 is not set

# CONFIG_SND_USB_USX2Y is not set

# CONFIG_SND_USB_CAIAQ is not set

# CONFIG_SND_USB_US122L is not set

# CONFIG_SND_USB_6FIRE is not set

# CONFIG_SND_USB_HIFACE is not set

# CONFIG_SND_BCD2000 is not set

# CONFIG_SND_USB_POD is not set

# CONFIG_SND_USB_PODHD is not set

# CONFIG_SND_USB_TONEPORT is not set

# CONFIG_SND_USB_VARIAX is not set

CONFIG_SND_PCMCIA=y

# CONFIG_SND_VXPOCKET is not set

# CONFIG_SND_PDAUDIOCF is not set

# CONFIG_SND_SOC is not set

```

 and the output of lspci -nn is:

```

00:00.0 Host bridge [0600]: Intel Corporation Broadwell-U Host Bridge -OPI [8086:1604] (rev 09)

00:02.0 VGA compatible controller [0300]: Intel Corporation Broadwell-U Integrated Graphics [8086:1626] (rev 09)

00:03.0 Audio device [0403]: Intel Corporation Broadwell-U Audio Controller [8086:160c] (rev 09)

00:14.0 USB controller [0c03]: Intel Corporation Wildcat Point-LP USB xHCI Controller [8086:9cb1] (rev 03)

00:15.0 DMA controller [0801]: Intel Corporation Wildcat Point-LP Serial IO DMA Controller [8086:9ce0] (rev 03)

00:15.4 Serial bus controller [0c80]: Intel Corporation Wildcat Point-LP Serial IO GSPI Controller #1 [8086:9ce6] (rev 03)

00:16.0 Communication controller [0780]: Intel Corporation Wildcat Point-LP MEI Controller #1 [8086:9cba] (rev 03)

00:1b.0 Audio device [0403]: Intel Corporation Wildcat Point-LP High Definition Audio Controller [8086:9ca0] (rev 03)

00:1c.0 PCI bridge [0604]: Intel Corporation Wildcat Point-LP PCI Express Root Port #1 [8086:9c90] (rev e3)

00:1c.1 PCI bridge [0604]: Intel Corporation Wildcat Point-LP PCI Express Root Port #2 [8086:9c92] (rev e3)

00:1c.2 PCI bridge [0604]: Intel Corporation Wildcat Point-LP PCI Express Root Port #3 [8086:9c94] (rev e3)

00:1c.4 PCI bridge [0604]: Intel Corporation Wildcat Point-LP PCI Express Root Port #5 [8086:9c98] (rev e3)

00:1c.5 PCI bridge [0604]: Intel Corporation Wildcat Point-LP PCI Express Root Port #6 [8086:9c9a] (rev e3)

00:1f.0 ISA bridge [0601]: Intel Corporation Wildcat Point-LP LPC Controller [8086:9cc3] (rev 03)

00:1f.3 SMBus [0c05]: Intel Corporation Wildcat Point-LP SMBus Controller [8086:9ca2] (rev 03)

00:1f.6 Signal processing controller [1180]: Intel Corporation Wildcat Point-LP Thermal Management Controller [8086:9ca4] (rev 03)

02:00.0 Multimedia controller [0480]: Broadcom Corporation 720p FaceTime HD Camera [14e4:1570]

03:00.0 Network controller [0280]: Broadcom Corporation BCM4360 802.11ac Wireless Network Adapter [14e4:43a0] (rev 03)

04:00.0 SATA controller [0106]: Samsung Electronics Co Ltd Device [144d:a801] (rev 01)

05:00.0 PCI bridge [0604]: Intel Corporation Device [8086:156b]

06:00.0 PCI bridge [0604]: Intel Corporation Device [8086:156b]

06:03.0 PCI bridge [0604]: Intel Corporation Device [8086:156b]

06:04.0 PCI bridge [0604]: Intel Corporation Device [8086:156b]

06:05.0 PCI bridge [0604]: Intel Corporation Device [8086:156b]

06:06.0 PCI bridge [0604]: Intel Corporation Device [8086:156b]

07:00.0 System peripheral [0880]: Intel Corporation Device [8086:156a]

```

----------

## Logicien

The Linux sound support is not mandatory for the early boot process. It is not necessary that audio drivers be in the kernel image. Compile them in modules is what any generic kernel configuration do in all Linux distributions.

The point is that when a Linux support is in module if it need some firmware or library files it can have them in the root partition who is already mounted because, modules are accessed only when the root partition is mounted. It is sure that they have everything they need when they probe the material unless, you miss to emerge something.

When you put a Linux support in the kernel image all they need must be in the kernel image too. This is the same thing when you put modules in an initramfs. Everything must be there too because in both cases, the real root partition is not mounted yet.

----------

## gigavinyl

Ahhhhh I see. Well I've got some good news and some bad news. The good news is, compiling snd all the way down through snd-hda-intel and the codecs for my sound cards appears to have worked; the modules load correctly and all. The bad news is, this causes a kernel panic at boot seemingly right after or as OpenRC finishes (see: http://imgur.com/QO6Z20J) however I can see the sound card modules loading quite a few lines before the panic. I realize just a picture of the kernel panic from my phone might not contain all of the relevant information but since the kernel panic happens at boot, I'm unsure as to how to get the log of the panic. If it's relevant, I've tried using both genkernel and dracut to build my initramfs, both with the same result.

----------

## Logicien

Do you have a Broadcom wireless device who use the wl module from the broadcom-sta package? If yes, do you do

```
emerge @module-rebuild
```

after an upgrade? Did you put the wl module in an initramfs that you have use in this kernel panic boot?

----------

## gigavinyl

I do have broadcom-sta installed and, unfortunately, running 

```
emerge @module-rebuild
```

in chroot after the machine would consistantly panic on boot didn't resolve the issue so I just bit the bullet and reinstalled Gentoo (I realize this is a bit "brute-force" but I wanted to get through the install process again to get more familiar with it) and compiling all of the sound support as modules did resolve the issue, thanks.  :Smile: 

----------

