Intel HD Audio

From Funtoo
Jump to: navigation, search

Introduction

This tutorial describes how to configure an Intel HD Audio sound card. It explains the configuration at the kernel level and the changes you'll need to make to /etc/modprobe.d/alsa.conf.

Prerequisites

Before using this tutorial to configure your PC's sound card, make sure that the command lspci displays information similar to the following:

# lspci | grep -i audio
00:1b.0 Audio device: Intel Corporation 5 Series/3400 Series Chipset High Definition Audio (rev 06)

In addition, the following packages must be installed. They are usually installed during the installation of the base system.

  • media-libs/alsa-lib
  • media-plugins/gst-plugins-alsa
  • media-sound/alsa-headers
  • media-sound/alsa-utils

The codec for the sound card used in this example is:

$ cat /proc/asound/card*/codec#0 | grep -i codec
Codec: IDT 92HD73C1X5

Kernel configuration

Note

The kernel configuration shown in this example is based on vanilla-sources-3.0.3, but the options are present in other versions of the kernel, including gentoo-sources and git-sources.

menuconfig

Shown here are the kernel options that need to be selected. Configure the options as modules (<M>) if permitted. Leave the other options as they are.

Device Drivers  --->
  <M> Sound card support  --->
    [*]   Preclaim OSS device numbers
    <M>   Advanced Linux Sound Architecture  --->
      <M>   Sequencer support
      <M>     Sequencer dummy client
      <M>   OSS Mixer API
      <M>   OSS PCM (digital audio) API
      [*]     OSS PCM (digital audio) API - Include plugin system
      [*]   OSS Sequencer API
      <M>   HR-timer backend support
      [*]     Use HR-timer as default sequencer timer
      -*-   Dynamic device file minor numbers
      [*]   Verbose procfs contents
      [*]   Generic sound devices  --->
         <M>   Virtual MIDI soundcard
      [*]   PCI sound devices  --->
         <M>   Intel HD Audio  --->
           [*]   Build Realtek HD-audio codec support
           [*]   Build Analog Device HD-audio codec support
           [*]   Build IDT/Sigmatel HD-audio codec support
           [*]   Build VIA HD-audio codec support
           [*]   Build HDMI/DisplayPort HD-audio codec support
           [*]   Build Conexant HD-audio codec support
           [*]   Build Creative CA0110-IBG codec support
           [*]   Build C-Media HD-audio codec support
           [*]   Build Silicon Labs 3054 HD-modem codec support
           [*]   Enable generic HD-audio codec parser
           [*]   Aggressive power-saving on HD-audio
           (20)    Default time-out for HD-audio power-save mode
      [*]   USB sound devices  --->
        <M>   USB Audio/MIDI driver
      [*]   FireWire sound devices  --->

/usr/src/linux/.config

The options required for the sound card can be selected by editing /usr/src/linux/.config as well:

CONFIG_SOUND=m
CONFIG_SOUND_OSS_CORE=y
CONFIG_SOUND_OSS_CORE_PRECLAIM=y
CONFIG_SND=m
CONFIG_SND_TIMER=m
CONFIG_SND_PCM=m
CONFIG_SND_HWDEP=m
CONFIG_SND_RAWMIDI=m
CONFIG_SND_SEQUENCER=m
CONFIG_SND_SEQ_DUMMY=m
CONFIG_SND_OSSEMUL=y
CONFIG_SND_MIXER_OSS=m
CONFIG_SND_PCM_OSS=m
CONFIG_SND_PCM_OSS_PLUGINS=y
CONFIG_SND_SEQUENCER_OSS=y
CONFIG_SND_HRTIMER=m
CONFIG_SND_SEQ_HRTIMER_DEFAULT=y
CONFIG_SND_DYNAMIC_MINORS=y
# CONFIG_SND_SUPPORT_OLD_API is not set
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=m
# CONFIG_SND_OPL3_LIB_SEQ is not set
# CONFIG_SND_OPL4_LIB_SEQ is not set
# CONFIG_SND_SBAWE_SEQ is not set
# CONFIG_SND_EMU10K1_SEQ is not set
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=m
# CONFIG_SND_MTPAV is not set
# CONFIG_SND_SERIAL_U16550 is not set
# CONFIG_SND_MPU401 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 is not set
# CONFIG_SND_CS46XX is not set
# CONFIG_SND_CS5530 is not set
# CONFIG_SND_CS5535AUDIO is not set
# 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_HDA_INTEL=m
# CONFIG_SND_HDA_HWDEP is not set
# CONFIG_SND_HDA_INPUT_BEEP is not set
# CONFIG_SND_HDA_INPUT_JACK is not set
# CONFIG_SND_HDA_PATCH_LOADER is not set
CONFIG_SND_HDA_CODEC_REALTEK=y
CONFIG_SND_HDA_CODEC_ANALOG=y
CONFIG_SND_HDA_CODEC_SIGMATEL=y
CONFIG_SND_HDA_CODEC_VIA=y
CONFIG_SND_HDA_CODEC_HDMI=y
# CONFIG_SND_HDA_CODEC_CIRRUS is not set
CONFIG_SND_HDA_CODEC_CONEXANT=y
CONFIG_SND_HDA_CODEC_CA0110=y
CONFIG_SND_HDA_CODEC_CMEDIA=y
CONFIG_SND_HDA_CODEC_SI3054=y
CONFIG_SND_HDA_GENERIC=y
CONFIG_SND_HDA_POWER_SAVE=y
CONFIG_SND_HDA_POWER_SAVE_DEFAULT=20
# 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 is not set
# 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_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_USB=y
CONFIG_SND_USB_AUDIO=m
# 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_FIREWIRE=y
# CONFIG_SND_FIREWIRE_SPEAKERS is not set
# CONFIG_SND_ISIGHT is not set
# CONFIG_SND_PCMCIA is not set
# CONFIG_SND_SOC is not set
# CONFIG_SOUND_PRIME is not set

/etc/modprobe.d/alsa.conf

Dell laptop

Note

The configuration shown here applies to a Dell Studio 1749 laptop. It might also be applicable to other Dell laptops.

If you plan on using external speakers or a headset, you need to edit /etc/modprobe.d/alsa.conf so that the integrated speakers are muted when you plug an external sound device in. Add the following lines to the end of the file:

# Sound card config
# Codec: IDT 92HD73C1X5

options snd-hda-intel model=dell-m6
options snd-hda-intel enable_msi=1