This article describes a way to get the headphone out on the front side of Apple's MacPro 1,1 from August 2006 up and running. In February 2014 this enhancement had been integrated in upcoming stable kernel release 3.14. If you use a recent kernel it might happen that your MacPro's headphone out at last is working. The following article describes my approach to the configuration of the kernel when dealing with ALSA and illustrates the search for clues with the help of HDA-Analyzer.
The Apple Mac Pro used is almost 7 years old (specifications). Since its first days Gentoo Linux is doing a good job and reached kernel version 3.10.17 with ALSA k3.10.17 resp. 188.8.131.52 housing libraries and utilities. I have tried to keep the description as general as possible to help users in other environments, too.
What to look for in kernel configuration
The sound driver is integrated as a module and is called snd-hda-intel. The following options should be considered when configuring the kernel module: For better diagnostics CONFIG_SND_DEBUG = y is recommended, if the driver should be more verbose CONFIG_SND_DEBUG_VERBOSE = y helps. The correct codec should be inserted - if you are unsure, you can activate all CONFIG_SND_HDA_CODEC_* in /usr/src/linux/.config.
The codec currently in use provides:
cat /proc/asound/card0/codec#* | grep Codec Codec: Realtek ALC889A
The following line determines the built-in device and shows the sound driver in use:
lspci -k |grep -A2 Audio 00:1b.0 Audio device: Intel Corporation 631xESB/632xESB High Definition Audio Controller (rev 09) Kernel driver in use: snd_hda_intel Kernel modules: snd_hda_intel
Not only for debugging, but generally recommended CONFIG_SND_HDA_HWDEP = y. The new and therefore still marked as experimental CONFIG_SND_HDA_RECONFIG option allows you to configure the sound chips on the fly. For the CO2 balance and specifically for laptops CONFIG_SND_HDA_POWER_SAVE = y helps to save power. To patch the driver before the codec is loaded CONFIG_SND_HDA_PATCH_LOADER = y must be set.
Intels HD-Audio is the replacement of the old AC97 standards. The standard itself describes only minimum requirements and sometimes the built-in hardware cannot be fully utilized without additional parameters despite the presence of the driver because the built-in automation relies on often faulty BIOS informations.
If the sound does not work and nothing comes out from the outputs, you should first check whether all mixer channels are unmuted and turned up. By default, the master channel and others are muted.
The init-script /etc/init.d/alsasound and the configuration in file /etc/conf.d/alsasound affect the mixer-settings between reboots.
The console allows the mixer-settings to be easily reviewed and changed by using
Muted channels are tagged by the channel identifier MM. Navigation and volume control is done with the arrow keys, M key toggles between mute and unmuted. Esc exits the mixer.
To test driver options, you load the driver on the commandline after removing the running:
rmmod snd-hda-intel modprobe snd-hda-intel enable_msi=1
If the first command fails with the error message Module snd_hda_intel is in use, the module is still in use.
All processes that are currently accessing the sound card, this command lists.
They have to be terminated (eg kill -9 vlc) before you can unload the sound module.
If the modules are loaded correctly the loaded sound drivers and their dependencies are listed by typing
lsmod |grep snd_hda
Configuring the driver
The ALSA installation contains the script alsa-info.
Once requested it produces a detailed report on the installed hardware and software. In the final report beneath Loaded sound module options the active sound module options are located. A brief description is offered by modinfo snd-hda-intel.
Alternatively, you can view and edit the current configuration parameters with the help of /sys/class/sound/hwC0D0 without the need to reload the driver. (see HWDEP)
Which screws the driver provides for popular problems, is explained, among other things in HD Audio.txt. You find it in the kernel source
When the internal speakers or the headphone output does not work you have to adjust the raw codec settings. (requirements see) For easier access, there is the HDA-Analyzer.
Direct access to the PINs of the sound card with HDA Analyzer
The program HDA-Analyzer provides direct access to sound card parameters via an easy-to-use graphical user interface. Without having the driver reloaded, hereby settings can be tested spontaneously.
In the case of my Mac Pro 1,1 the headphone connector at the front did not work. Although silenced the line-out, as soon as I plug in the headphones, but heard nothing. Mute Line-out suggests that the headphone input is detected and the auto-mute mode works. It can be comfortably adjusted in the mixer-settings using alsamixer.
HDA-Analyzer to help. When the Python script had been downloaded
python run.pystarts the program on the command line. This startup script retrieves the current program components from the network, copies it to a directory under /tmp and then starts the view of fig. 1.
In the program window of the HDA-Analyzer Node 0x18 is selected. The Config Default section shows an apt description, even the location of the connectors is given. A few clicks later - many switches do not exist - the parameter is found and the headphone output works as intended: It is the VREF setting. Changed from HIZ to 50 and off you go.
Of course, the question arises, what is there exactly set. In the High Definition Audio Specification Rev. 1.0a by Intel on page 162 you get an explanation: VREF is a reference signal level, HIZ Hi-Z (high impedance). Simply put, HIZ is the default setting so as not to endanger connected devices. The selected 50 represents a percentage, 80 and 100 work the same way. A level difference, I can not tell.
The diff indicator helps to determine the values ??that the sound card is to be configured during system startup.
Figure 2 shows the diff output of HDA-Analyzer. Lines marked with a plus sign show the changed settings. In this example, 0xC1 for the node 0x18 of the verb PIN_Widget_Control.
On the command line and in the configuration script hda-verb helps. With Gentoo Linux, it is found in the package media-sound/alsa-tools. With the following line written to a local startup script in /etc/local.d/, the headphone output will unlock when booting the computer.
/usr/bin/hda-verb /dev/snd/hwC0D0 0x18 SET_PIN_WIDGET_CONTROL 0xc1 &>/dev/null
The other option would have the transfer of initialization parameters to the driver via the patch option of modprobe. Here the driver is given a text file that contains the definitions. Details about the format can be found in HD Audio.txt under the heading Early patching. (see also SND_HDA_PATCH_LOADER
Acknowledgements and sources
Homepage of HDA-Analyzer:
UPDATE from 2/21/2014:
Since February, 14th the patch is in the stable 3.10er kernel and most newer entitled ALSA: hda - Fix missing VREF setup for Mac Pro 1,1.
Thursday, January 2. 2014Comment (1) | Trackbacks (0) This article describes a way to get the headphone out on the front side of Apple's MacPro 1,1 from August 2006 up and running. In February 2014 this enhancement had been integrated in upcoming stable kernel release 3.14. If you use a recent kernel it might happen that your MacPro's headphone out at last is working. The following article describes my approach to the configuration of the kernel when dealing with ALSA and illustrates the search for clues with the help of HDA-Analyzer.
Display comments as (Linear | Threaded)
Danke für diesen Beitrag. Ich hatte das Problem mit einem Netbook der nur via Headphone sound von sich gab.
Das in diesem Beitrag erwähnte Program HDA-Analyzer ergab bei mir nur Fehlermeldung (kein output).
Ich habe dann das also-tools Software packet geladen (inklusive GUI). Dann das Programm HDAJackRetask benutzt und mit der Pin Zuordnung gespielt bis ich Sound von Speaker hatte.
#1 Walter Hangartner on 2014-11-30 10:27