My sound card is an Intel 82801G HDA controller using the Realtek ALC883 chip, but hopefully the procedure will be similar for other sound cards.
Firstly, I made sure that the ALSA side of things was configured correctly by using the alsaconf command followed by the alsamixer command, both done as the root user in a Konsole/Terminal window. In AlsaMixer I made sure that all the volume control sliders were turned up to a reasonable level and that nothing was muted (use the M key to mute/un-mute a channel). Don't forget to use the Tab key to page through all of AlsaMixer's pages. I also pressed F6 in AlsaMixer and selected my sound card.
Secondly, I looked into the PulseAudio side of things:
I went to Kickoff > Computer > System Settings, double-clicked on the Multimedia icon and used the Prefer and Defer buttons to select the following Audio Output Device Preference for all cases of Audio Output in the left panel:
HDA Intel (ALC883 Analog)
HDA Intel (ALC883 Digital)
Jack Audio Connection Kit
For the Audio Capture cases I only have one entry:
HDA Intel (ALC883 Analog).
I then installed the various PulseAudio GUI configuration tools:
- Code: Select all
equo install paprefs pavucontrol paman padevchooser pavumeter
The installation of these tools automatically creates the following icons in the Kickoff > Applications > Multimedia menu:
Capture Volume Meter
PulseAudio Volume Meter (Capture)
PulseAudio Device Chooser
Playback Volume Meter
PulseAudio Volume Meter (Playback)
PulseAudio Volume Control
I launched the last of these, Volume Control, and clicked on the Output Devices tab. I selected Show All Output Devices, and on my laptop there are two devices shown: dmix:0 and Internal Audio Analog Stereo. I made sure that none of the output devices was muted (clicking on the speaker icon toggles muting on/off). Then I clicked on the down arrow next to the 'Lock channels together' button for dmix:0, and ticked Default.
I also checked under the Playback tab that System Sounds was not muted.
I clicked on the Input Devices tab. I selected Show All Output Devices, and there are three devices shown on my laptop: 'Monitor of dmix:0', 'Internal Audio Analog Stereo' and 'Monitor of Internal Audio Analog Stereo'. I made sure that none of these input devices was muted (clicking on the speaker icon toggles muting on/off). Then I clicked on the down arrow next to the 'Lock channels together' button for 'Monitor of dmix:0', and ticked Default.
I clicked on the Configuration tab and there are two Internal Audio Profiles to select. I selected 'Analog Stereo Input' for the first Internal Audio profile, and 'Analog Stereo Output' for the second one.
I closed the Volume Control window and launched PulseAudio Device Chooser. An icon appeared in the Panel, and I right-clicked on it and selected 'Default' for the Default Server, for the Default Sink and for the Default Source. I also clicked on Preferences and ticked the boxes for 'Show notifications for discovered servers', 'Show notifications for discovered sinks' and 'Show notifications for discovered sources'. Then I clicked on 'Configure Local Sound Server...' and, under the 'Simultaneous Output' tab, I ticked 'Add virtual output device for simultaneous output on all local sound cards'.
I checked the media players XBMC, VLC, PyKaraoke, Xine, MPlayer, Dragon Player, SMPlayer and Amarok. Only Xine didn't seem to have audio working, but that was soon solved in Xine itself simply by selecting Audio > Volume > increase 10%.
Next I checked Skype. I had to select 'HDA Intel, ALC883 Analog (hw:0,2)' for Microphone, and I left 'Default device (default)' for Speakers and Ringing.
So there you have it. I have no idea whether PulseAudio is working its magic or whether what I did has in fact bypassed it, as it is so darned confusing that you need to be a rocket scientist to understand what the Hell it is doing and what it all means. I have found in practice that I can select different things as Default and it seems to make no difference, which is why I wonder if PulseAudio is actually being bypassed on my laptop and ALSA is being used directly. However, it must be doing something, as I had to tinker with the PulseAudio tools to get XBMC to produce sound.
Just one more tip to mention: On one occasion only, a couple of weeks ago when I booted up there was no sound. I checked in KMix and none of the channels were muted. I then ticked the Mute box for the Front channel (or perhaps it was the Master or PCM channel, I can't remember) and then unticked it, and sound was restored. Figure that one out.
Linux's audio architecture and configuration of it is just plain awful!
Anyway, hope this helps someone. Good luck!
EDIT (Dec. 22, 2009): Since I wrote the above, the package paman has been removed from Portage and the PulseAudio Web site says PulseAudio Manager (paman) and the PulseAudio Device Chooser (padevchooser) are now both obsolete. However, padevchooser is currently still in Portage so I decided to uninstall paman but left padevchooser for the time being.
EDIT2 (Feb. 17, 2010): Things have changed a bit with the new versions of PulseAudio packages that I installed since this first post. My current configuration is described with screenshots in my post of 17 Feb. 2010 in this thread, so be sure to read it (and my other posts) too. Don't forget to make sure first that the ALSA side of things is configured correctly, as described above. Actually, after you have done what I wrote above for ALSA, also run alsamixer under your normal user account too.
EDIT3 (Mar. 5, 2010): If all your multimedia applications produce sound, don't mess with anything! "If it ain't broke, don't fix it."
EDIT 4 (March 31, 2010): Just a note for those of you with hardware including HDMI Audio who are still having trouble:
My new laptop has the following audio hardware:
- Code: Select all
# lspci | grep Audio
00:1b.0 Audio device: Intel Corporation 5 Series/3400 Series Chipset High Definition Audio (rev 05)
01:00.1 Audio device: ATI Technologies Inc Redwood HDMI Audio [Radeon HD 5600 Series]
On the Configuration tab of the PulseAudio Volume Control application, I had to change the Profile of 'Redwood HDMI Audio [Radeon HD 5600] Series' to Off for audio to come out of the speakers (I left the Profile of 'Internal Audio' as 'Analog Stereo Duplex' as usual).