Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
If sound doesn't work - Things to check [Mar 26, 2010]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message
dufeu
l33t
l33t


Joined: 30 Aug 2002
Posts: 738
Location: US-FL-EST

PostPosted: Sat Mar 06, 2010 7:29 am    Post subject: If sound doesn't work - Things to check [Mar 26, 2010] Reply with quote

Introduction

Sound is a very complex topic. I'm not going to cover everything possible nor am I going to explain any of the whys and wherefores. Those explanations are beyond me and will require someone with a more complete understanding of the issues to step forward and write about them.

Also beyond the scope of this post is how to change kernel options. There are plenty of sources for how to configure your kernel. Please reference these if you're lost in the discussion of kernel options which appears later in this post.

This post is simply a collection of some items you can check for and some steps you can take if you're having problems with sound. This post is therefore limited in scope and the information it presents. As I learn more, I'll update this post. Good luck!

Tips and Suggestions

1 ) Check your kernel configuration.

This is critical. In fact, it's much more critical than most people realise. Part of the problem is that the kernel can be fooled into silently loading too many sound drivers. These can conflict resulting in no sound at all or sound for some and no sound for other programs.

The first step is to determine exactly what you need as drivers. I use both of two different methods for this. In a terminal window:
Code:
lspci | grep Audio

This tells me what audio chip is physically present. The next method in the same terminal window:
Code:
alsamixer

You don't need to learn how to use alsamixer. What you're looking for is what alsamixer reports for "Card:" and "Chip:". Write this information down and press the "esc" key to exit from alsamixer. If alsamixer returns a error message and refuses to start, see tip 2) then return here.

On my current system I get the following results:
Code:
lspci | grep Audio
00:14.2 Audio device: ATI Technologies Inc SBx00 Azalia (Intel HDA)
01:00.1 Audio device: ATI Technologies Inc R700 Audio Device [Radeon HD 4000 Series]

alsamixer
Card: HDA ATI SB
Chip: Realtek ALC889A

This is a newer motherboard with High Definition Audio. You can see this from the lspci results. Note especially the "(Intel HDA)". In the kernel, this means you'll need to go to Drivers ==> Sound card support ==> Advanced Linux Sound Architecture ==> PCI sound devices ==> Intel HD audio. Using my system as an example, I turned off everything, then turned on:
Code:
[*]   Support digital beep via input layer
[*]   Support jack plugging notification via input layer
[*]   Build Realtek HD-audio codec support
[*]   Build ATI HDMI HD-audio codec support
[*]   Build INTEL HDMI HD-audio codec support
[*]   Enable generic HD-audio codec parser

I chose to turn on digital beeps because I don't have a PC speaker and there are some instances where I want digital beeps. For most people, I don't activate this feature. Jack plugging notification has to do when you plug in a microphone or headphones. This is good to have turned on. Enabling generic HD-audio parsing is a fall back feature. This is optional.

I chose the Realtek codec because of the information displayed from alsamixer, the ATI HDMI codec because that's the chip on the graphics card<1> and the INTEL codec to ensure that the complete framework for the Intel HDA specification was present.

If I had built this kernel based solely on lspci, I wouldn't have known I also needed the Realtek codec. When I did, this incomplete kernel resulted in only a few channels when opening any mixer. Sound was present, but only the front speakers worked.

Don't make the mistake of building all of the HDA codecs!!! Depending on the release level of the kernel you're running some of these HDA codecs will silently conflict with each other without any hint of a problem. Build only the codecs you actually need. I can't stress this enough.

One of the things I've found helpful is to compile all the Sound settings in the kernel as modules. Doing so allows me to see what modules the kernel detects and automatically loads.

2 ) Remove or move file ~/.asoundrc to another location.<1>

i.e.
Code:
mv ~/.asoundrc ~/asoundrc
or
Code:
rm ~/asoundrc

Be default, you shouldn't need ~/.asoundrc. The expected use of ~/.asoundrc is to override the default behavior of your sound system. Reasons you may want to put in a ~/.soundrc file include exceptional circumstances such as having multiple sound cards installed. If you have a single sound card installed and ~/.asoundrc "fixes" your sound problem, it's highly probable that your kernel configuration needs tweaking.<1>

3 ) Check your backend.

No. This doesn't mean stand up and find your backside. Sound input to the alsa drivers are eventually fed from an "audio backend". That is to say that the drivers take sound information from your backends and process that to drive your audio chip(s). Depending on which desktop you have installed and what your USE settings are, you'll have either the "gstreamer" or "xine" backends. Most people end up with both backends installed. I have KDE, xfce4, fluxbox and lxde installed. Combined with my USE flags, I have both backends installed. But wait! It's more complicated than that.

If you have pulseaudio {as most people do by default} then your default backend might be listed as PulseAudio. What happens is that pulseaudio inserts itself in the audio stream and becomes the backend. The reason for this is to much more easily permit things like having music play in the background, have "PC speaker" style beeps and be able to talk on skype or in an online game all at the same time. Your sound chip is able to process only a single audio stream at a time. Sound servers like pulseaudio take in multiple sound stream sources and combine them to produce a single soundstream for passing off the the actual backend doing the passing off to your alsa driver(s).

Note that I indicated pulseaudio might be listed. This, apparently, is going to be a function of version release. Currently {as of Mar 26, 2010), pulseaudio is not listed on my desktop system after the latest round of updates. Go figure.

I'm going to use KDE as my example here because it provides a clear example of the kind of thing you're looking for. Besides, it's what I normally use so I'm being lazy as well.

Using the KDE application launcher of your choice, open "System Settings". Under computer administration, open "Multimedia". In the left pane will be a hierarchical listing of "sources" and in the right pane will be a list of available sound players. Usually, this screen opens with "music" highlighted and with "PulseAudio" listed as the only available sound player. Depending on the configuration of your system, other things that can appear here include and are not limited to:
Code:
PulseAudio Sound Server
HDA ATI SB ()
HDA ATI HDMI
Jack Audio Connection Kit
... etc

With "music" highlighted in left hand pane, click on the first sound player in the right hand pane. The "Test" button under the right hand pane should now light up. Press the test button. Warning! Regardless of your mixer sound level settings, the test sound will play at full volume. Be sure to turn your sound down physically on your speakers before testing. If no sound appears and there are multiple choices in your right hand pane, continue down the items in the right hand pane until you find one that works.

If none of them work, you need to go back and check your kernel configuration.

If the first one in the list doesn't work but the next one does, then you need to change the order of the items in the list. You can do this by highlighting the desired sound player and then using the "prefer" button to move it to the top. Do this for all the source sound events in the left hand pane including the default source sound.

4 ) Check your player software.

Different media players such as amarok, audacious, qmmp, kmplayer et al will recognize different sound player backends. I'm going to use amarok as an example. Conceptually, most of the different media players permit you to change/configure sound player backends. You'll need to check the media players you use.

In amarok under Settings ==> Configure Amarok, click on the "Playback" tab. There will be a button labeled "Sound System Configuration". On the button itself will be written the sound player server currently configured for the KDE desktop. In my case, it says "phonon". Click this button.

A screen identical to the "Multimedia" screen discussed above will display. However, amarok usually displays the actual available hardware devices first then sound servers like pulseaudio and jack. This screen works exactly as described above. Configure as you need.

5 ) When all else fails: Check your BIOS!<1>

I'm suggesting two different checks here. The first is to confirm that you have the latest available BIOS for your system. The second is to check your actual BIOS settings. Warning: If checking/updating your BIOS is more than you're currently prepared to do, find a technically competent friend to help you. I will not be responsible if you 'brick' your motherboard!!!

If you're using a built in sound chip {as most people do}, ensuring that you have the latest available BIOS just makes sense. The percentage of BIOS updates I've personally seen which include sound chip related updates is quite high. In my opinion, if you don't include BIOS updates which are purely information to expand the use of newer CPU chips, such sound related updates are in the double digit percentages {i.e. over 10%}. I've done no factual research to back this up. But I really have seen a lot of sound related BIOS updates.

Most people don't think of BIOS settings in terms of sound other than to activate or inactivate their built in sound chip. But modern motherboards can be much more complex than that. I'll give you my current system's motherboard as an example.

This motherboard uses an ATI chipset with a built in graphics chip. The IGP is the RD4250. This is an HDMI capable graphics chip which means it has ATI HDMI sound. In the BIOS, I've inactivated the IGP in favor of a separate graphics card utilising the ATI RD4650 {this is the R700 series reference from 'lspci' in 1 ) }. I therefore have 3 different possible hardware related sound processors. The potential for conflict is real and needs to be checked for.

6) When all else really, really fails <2>

Re-emerge all packages having to do with or using sound. Execute:
Code:
USE="-alsa -pulseaudio -jack emerge -puNDv @world

The concept here isn't to re-emerge all these packages without your USE flags. Instead, the concept is to generate a rough list of all packages involving sound. You want to take this list and re-emerge all these packages. You should get a list similar to:
Code:
Calculating dependencies... done!
[ebuild   R   ] media-libs/libsndfile-1.0.21  USE="sqlite -alsa* -minimal" 0 kB
[ebuild   R   ] media-libs/libao-0.8.8  USE="mmap nas -alsa* -doc -pulseaudio*" 0 kB
[ebuild   R   ] media-libs/mediastreamer-2.3.0-r1  USE="X ipv6 speex theora x264 -alsa* (-coreaudio) -debug -examples -gsm -ilbc -jack* -oss -portaudio -video" 0 kB
[ebuild   R   ] dev-java/sun-jdk-1.6.0.18-r1  USE="X nsplugin -alsa* -derby -doc -examples -jce -odbc" 0 kB
[ebuild   R   ] net-wireless/bluez-4.62  USE="consolekit cups gstreamer pcmcia usb -alsa* -caps -debug -old-daemons -test-programs" 0 kB
[ebuild   R   ] media-sound/pulseaudio-0.9.21.2-r1  USE="X asyncns bluetooth caps dbus glib ipv6 libsamplerate tcpd udev -alsa* -avahi -doc -gnome -hal -jack* -lirc (-oss) -realtime (-system-wide) -test" 0 kB
[ebuild   R   ] sys-power/pm-utils-1.2.6.1  USE="networkmanager -alsa* -debug -ntp" VIDEO_CARDS="-intel -radeon" 0 kB
[ebuild   R   ] net-libs/xulrunner-1.9.2-r5  USE="dbus java libnotify startup-notification -alsa* -custom-optimization -debug -gnome -system-sqlite -wifi" 0 kB
[ebuild   R   ] www-client/mozilla-firefox-3.6-r5  USE="dbus java libnotify startup-notification -alsa* -bindist -custom-optimization -gnome -system-sqlite -wifi" LINGUAS="en -af -ar -as -be -bg -bn -bn_BD -bn_IN -ca -cs -cy -da -de -el -en_GB -en_US -eo -es -es_AR -es_CL -es_ES -es_MX -et -eu -fa -fi -fr -fy -fy_NL -ga -ga_IE -gl -gu -gu_IN -he -hi -hi_IN -hr -hu -id -is -it -ja -ka -kk -kn -ko -ku -lt -lv -mk -ml -mr -nb -nb_NO -nl -nn -nn_NO -oc -or -pa -pa_IN -pl -pt -pt_BR -pt_PT -rm -ro -ru -si -sk -sl -sq -sr -sv -sv_SE -ta -ta_LK -te -th -tr -uk -vi -zh_CN -zh_TW" 0 kB
[ebuild   R   ] media-libs/libsdl-1.2.14-r1  USE="X aalib audio dga directfb fbcon joystick libcaca nas opengl video xv -alsa* -custom-cflags -ggi -oss (-ps3) -pulseaudio* -svga -tslib -xinerama" 0 kB
[ebuild   R   ] media-video/ffmpeg-0.5_p21602  USE="3dnow 3dnowext X encode hardcoded-tables jpeg2k mmx mmxext mp3 network sdl speex ssse3 theora threads vorbis x264 xvid zlib -alsa* (-altivec) -bindist -cpudetection -custom-cflags -debug -dirac -doc -faac -faad -gsm -ieee1394 -jack* -opencore-amr -oss -pic -schroedinger -test -v4l -v4l2 -vdpau" VIDEO_CARDS="nvidia" 0 kB
[ebuild   R   ] media-sound/mpg123-1.10.1  USE="ipv6 mmx nas network sdl sse -3dnow -3dnowext -alsa* (-altivec) -jack* -oss -portaudio -pulseaudio*" 0 kB
[ebuild   R   ] media-libs/libquicktime-1.1.5  USE="X aac dv encode ffmpeg gtk jpeg lame mmx opengl png vorbis x264 -alsa* -doc -schroedinger" 0 kB
[ebuild   R   ] media-video/mplayer-1.0_rc4_p20100213-r1  USE="X a52 aac aalib ass cddb cdio cdparanoia dga dirac directfb dts dv dvd dvdnav enca encode faac faad fbcon ftp gif iconv ipv6 jpeg jpeg2k libcaca live lzo mmx mng mp3 nas network opengl osdmenu png quicktime rar real rtc samba schroedinger sdl shm speex sse theora toolame tremor truetype twolame unicode vorbis win32codecs x264 xscreensaver xv xvid xvmc -3dnow -3dnowext -alsa* (-altivec) -bidi -bindist -bl -bs2b -cpudetection -custom-cpuopts -debug -doc -dvb -dxr3 -esd -ggi -gmplayer -jack* -joystick -ladspa -lirc -mad -md5sum -mmxext -nut -openal -opencore-amr -oss -pnm -pulseaudio* -pvr -radio -sse2 -ssse3 -svga -tga -v4l -v4l2 -vdpau -vidix -xanim -xinerama -zoran" VIDEO_CARDS="vesa -mga -s3virge -tdfx" 0 kB
[ebuild   R   ] media-sound/sox-14.3.0  USE="encode ffmpeg flac id3tag ogg png wavpack -alsa* -ao -debug -ladspa -mad -oss -pulseaudio* -sndfile" 0 kB
[ebuild   R   ] media-video/gpac-0.4.5-r1  USE="a52 aac ffmpeg ipv6 javascript jpeg jpeg2k ogg opengl png sdl ssl theora truetype vorbis xml xvid -alsa* -amr -debug -jack* -mad -oss -pulseaudio* -wxwidgets" 0 kB
[ebuild   R   ] app-emulation/wine-1.1.40  USE="X cups dbus fontconfig gecko gphoto2 hal jpeg ldap mp3 nas ncurses opengl perl png samba scanner ssl threads truetype xcomposite xml -alsa* -capi -custom-cflags -esd -gnutls -gsm -jack* -lcms -openal -oss -pulseaudio* -test -win64 -xinerama" 0 kB
[ebuild   R   ] net-libs/ptlib-2.6.6  USE="asn audio ffmpeg ftp ipv6 jabber ldap pch sasl sdl snmp soap ssl stun video wav xml xmlrpc -alsa* -debug -doc -dtmf -esd -examples -http -ieee1394 -mail -odbc -oss -qos -remote -serial -shmvideo -socks -telnet -tts -v4l -v4l2 -vxml" 0 kB                                                                                           
[ebuild   R   ] media-gfx/gimp-2.6.8  USE="aalib dbus exif hal jpeg mmx mng pdf png python sse svg tiff webkit wmf -alsa* (-altivec) -curl -debug -doc -gnome -lcms -smp" 0 kB           
[ebuild   R   ] media-plugins/gst-plugins-meta-0.10-r4  USE="X a52 dvd ffmpeg flac lame mpeg ogg taglib theora vorbis xv -alsa* -dvb -esd -mad -mythtv -oss -pulseaudio*" 0 kB           
[ebuild   R   ] media-libs/xine-lib-1.1.18.1  USE="X a52 aac aalib css directfb dts fbcon flac gtk imagemagick ipv6 libcaca mmap mng modplug musepack nls opengl samba sdl speex theora truetype v4l vcd vorbis wavpack win32codecs xcb xv xvmc -alsa* (-altivec) -dxr3 -esd -gnome -jack* -mad -oss -pulseaudio* (-real) -vidix (-vis) -xinerama" 0 kB                             
[ebuild   R   ] media-video/transcode-1.1.5-r1  USE="X a52 aac dv dvd iconv imagemagick jpeg lzo mjpeg mmx mp3 mpeg ogg quicktime sdl sse theora truetype vorbis x264 xml xvid -3dnow -alsa* (-altivec) -nuv -oss -postproc -sse2 -v4l2" 0 kB                                                                                                                                       
[ebuild   R   ] media-sound/phonon-4.4.0  USE="gstreamer xcb xine -alsa* (-aqua) -debug -pulseaudio*" 0 kB                                                                               
[ebuild   R   ] kde-base/kdelibs-4.4.1-r1  USE="acl bzip2 fam handbook jpeg2k kerberos mmx nls openexr opengl semantic-desktop spell sse ssl -3dnow -alsa* (-altivec) (-aqua) -bindist -debug -doc (-kdeenablefinal) (-kdeprefix) -lzma -policykit -sse2 -test -zeroconf" 0 kB                                                                                                     
[ebuild   R   ] kde-base/libkcompactdisc-4.4.1  USE="-alsa* (-aqua) -debug (-kdeenablefinal) (-kdeprefix)" 0 kB                                                                           
[ebuild   R   ] kde-base/kmix-4.4.1  USE="handbook -alsa* (-aqua) -debug (-kdeenablefinal) (-kdeprefix) -pulseaudio*" 0 kB                                                               
[ebuild   R   ] kde-base/phonon-kde-4.4.1  USE="xine -alsa* (-aqua) -debug (-kdeenablefinal) (-kdeprefix)" 0 kB


The idea is to take this list and re-emerge all these packages like so:
Code:
emerge libsndfile libao mediastreamer sun-jdk bluez pulseaudio pm-utils ...

The point is to make sure that all packages involved with or making use of sound are all on the 'same page' and that, in fact, they are properly co-ordinating with each other.

Once you've re-emerged all your sound packages, then reboot. Yep. Reboot. It's the surest way to be certain everything is running and re-started cleanly.


Start of additional relevant notes:<1>

a) Physical sound volume:

Regarding my comment above " ... test sound will play at full volume." - I'm leaving this warning 'as is' even though it's not strictly true. The reason for leaving the warning is that it's a good idea to always start your physical volume low when testing sound. It's much better to start testing sound at low volumes then gradually increase the physical volume to confirm the presence or lack of sound than it is terrify into wakefulness 4 cats, all 7 dogs, the SO and one's mother to say nothing about saving one's ears and speakers. {Long story. Don't ask.}

Back to the clarification at hand. It turns out that after further refining the kernel Intel HDA tweaks mentioned above, the alsa volume settings for PCM are now respected. {sigh} Kernel settings are critical!

b) Why use alsamixer? Why can't I use kmixer or some other gui mixer?

Alsamixer will attempt to respect ~/.asoundrc. {see 2) above} However, if ~/.asoundrc isn't present, alsamixer will open the first available physical sound chip. It will ignore pulseaudio, jack and any other soundserver you may have installed. i.e. Since you're looking for clarification of hardware information, alsamixer will directly give you this. All the other mixers I've worked with respect your system sound settings. For directly querying the hardware, other mixers are not helpful.

Note that I'm not currently recommending hardware listers. The tips and suggestions here are what most people are likely to have installed if they're working on sound issues on their systems.

c) Radeon fglrx placeholder:

This isn't yet a 'tip'. Rather, it represents something I will be checking sometime in the future. The latest proprietary ati-drivers {e.g. fglrx} either include or may include in the future support for HDMI based sound in linux. I don't know how this plays or may play with other sound drivers which may be present/active in your kernel. I point this out in the spirit of things to check for if you're having problems with sound and also happen to be running fglrx.

Currently, the only way I know to check for a problem in this area is to unmerge ati-drivers, change to fx86-video-ati and recheck your sound. Note that, in theory, this applies to all hardware with HDMI {graphics chips} support. YMMV and all the other usual disclaimers. If anyone has further clarifying information, please feel free to post.

Note that i) I will be checking the impact of ati-drivers in the fairly near future and ii) on my primary test system, kmixer currently reports two hardware tabs. The second tab is labeled 'Ati HDMI'. I'm guessing that this is the HDMI support present in the my RV730 Radeon chip on my graphics card. It only has a single IEC entry at this time so it's not currently usable.

end of this update) <1>

coda)

This ends my list of things to check if you're having problems with sound.

It should be clear that there are many reasons why sound may stop working or work for some programs and not others. Generally, when people tell me that a new release of the kernel breaks their sound or a package update of their favorite player doesn't work, I can often trace it back to an originally borked but silent configuration issue. The kernel gets fixed or the player gets fixed and the broken configuration rears it's head and says "No sound for you!". There is always a potential for conflict between sound drivers in the kernel as well. Given the number of sound chips out there, the different motherboards they can appear in and the features{bugs} a given motherboard manufacturer my have in any given motherboard revision, it's not always possible for the kernel folk to be certain that multiple sound drivers won't install themselves. This seems to be especially true for the HDA codecs.

It should also be clear that with multiple sound player backends installed, a single borked backend will result in some players working and other players failing depending on which backend a given player is configured for. You need to follow tip 4) for each and every media player you use.

The following listings are for informational purposes:

I'm including a list of related packages and their associated USE flags from my system.
Code:
emerge -pv alsa-plugins jack pulseaudio phonon xine-lib gstreamer

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild   R   ] media-sound/pulseaudio-0.9.21.1  USE="X alsa asyncns avahi caps dbus glib hal ipv6 jack libsamplerate tcpd udev -bluetooth -doc -gnome -lirc (-oss) (-system-wide) -test" 0 kB
[ebuild   R   ] media-libs/gstreamer-0.10.25  USE="nls -test" 0 kB
[ebuild   R   ] media-sound/jack-3.1.1  0 kB
[ebuild   R   ] media-libs/xine-lib-1.1.18  USE="X a52 aac aalib alsa css directfb dts fbcon flac gtk imagemagick ipv6 jack libcaca mad mmap mng modplug musepack nls opengl pulseaudio samba sdl speex theora truetype v4l vcd vorbis wavpack xcb xinerama xv xvmc (-altivec) -dxr3 -esd -gnome -oss (-real) (-vidix) (-vis) (-win32codecs)" 0 kB                                 
[ebuild   R   ] media-plugins/alsa-plugins-1.0.22  USE="ffmpeg jack libsamplerate pulseaudio speex -debug" 0 kB
[ebuild   R   ] media-sound/phonon-4.3.80-r1  USE="alsa gstreamer pulseaudio xcb xine (-aqua) -debug" 0 kB


This is what my lsmod looks like:
Code:
lsmod
Module                  Size  Used by
radeon                443856  2
ttm                    30156  1 radeon
drm_kms_helper         18389  1 radeon
drm                   125723  5 radeon,ttm,drm_kms_helper
i2c_algo_bit            4273  1 radeon
it87                   16007  0
hwmon_vid               1668  1 it87
hwmon                   1305  1 it87
snd_seq_dummy           1231  0
snd_seq_oss            23339  0
snd_seq_midi_event      4596  1 snd_seq_oss
snd_seq                40972  5 snd_seq_dummy,snd_seq_oss,snd_seq_midi_event
snd_seq_device          4475  3 snd_seq_dummy,snd_seq_oss,snd_seq
snd_pcm_oss            29843  0
snd_mixer_oss          12325  1 snd_pcm_oss
dm_mod                 50033  0
snd_hda_codec_atihdmi     2187  1
snd_hda_codec_realtek   234478  1
snd_hda_intel          17768  8
snd_hda_codec          52883  3 snd_hda_codec_atihdmi,snd_hda_codec_realtek,snd_hda_intel
snd_hwdep               5208  1 snd_hda_codec
snd_pcm                53924  4 snd_pcm_oss,snd_hda_intel,snd_hda_codec
snd_timer              15370  3 snd_seq,snd_pcm
snd                    43840  25 snd_seq_oss,snd_seq,snd_seq_device,snd_pcm_oss,snd_mixer_oss,
                                 snd_hda_codec_realtek,snd_hda_intel,snd_hda_codec,snd_hwdep,
                                 snd_pcm,snd_timer
soundcore               4431  1 snd
snd_page_alloc          5879  2 snd_hda_intel,snd_pcm
r8169                  30780  0


This list of tips just covers the tip of the iceberg regarding "no sound" and is by no means complete. I offer it in the hopes that it is informative and helpful. Suggestions for improvements, other clarifications and related tips to add would be most welcome.

<1> Edited for clarification and additions Mar 10, 2010
<2> Edited for new additions Mar 26, 2010
Applied manual line wrapping to the lsmod output to minimize layout breakage. -- desultory
_________________
People whom think M$ is mediocre, don't know the half of it.


Last edited by dufeu on Sat Mar 27, 2010 12:42 pm; edited 3 times in total
Back to top
View user's profile Send private message
Kollin
Veteran
Veteran


Joined: 25 Feb 2006
Posts: 1105
Location: Sofia/Bulgaria

PostPosted: Sat Mar 06, 2010 9:46 am    Post subject: Reply with quote

Big sigh, since every multimedia program defaults to pulseaudio i`ll have to configure it properly soon.
I'm tired(and annoyed) of losing sound from time to time just because programs prefer pulseaudio in their configs. Last victims of that behaviour was vlc and audacious.Upgrade and after that no sound, took me some time to find the source of the problem, thanx god for the alsaplayer with it i`m at least sure that the problem is not alsa it self :?
Thank you for the nice tutorial :D
_________________
"Dear Enemy: may the Lord hate you and all your kind, may you be turned orange in hue, and may your head fall off at an awkward moment."
"Linux is like a wigwam - no windows, no gates, apache inside..."
Back to top
View user's profile Send private message
dufeu
l33t
l33t


Joined: 30 Aug 2002
Posts: 738
Location: US-FL-EST

PostPosted: Sun Mar 07, 2010 1:22 am    Post subject: Reply with quote

Kollin wrote:
Big sigh, since every multimedia program defaults to pulseaudio i`ll have to configure it properly soon.
I'm tired(and annoyed) of losing sound from time to time just because programs prefer pulseaudio in their configs. Last victims of that behaviour was vlc and audacious.Upgrade and after that no sound, took me some time to find the source of the problem, thanx god for the alsaplayer with it i`m at least sure that the problem is not alsa it self :?
Thank you for the nice tutorial :D

You're quite welcome. After struggling with sound {from the days when only OSS was available} myself, I have definitely felt your pain.

FWIW, I don't use VLC anymore. You might find the this discussion of interest.

For video, I prefer smplayer or kmplayer. For large {multi-day} playlists, I use amarok. To check out new music I've downloaded, I'll use either qmmp or audacious (GTKui).

Tip: qmmp appears to use the same path for processing audio as mplayer (and related). Many times when amarok or audiacious don't provide sound but mplayer does, qmmp will provide sound as well. YMMV of course.

You shouldn't need to "configure" pulseaudio under most circumstances. The same thing applies to jack. For most people, these should "just work". The exceptions are things like multiple soundcards present or specialized software. I can't give you any first hand examples of such software but my understanding is that packages having to do with studio mixing fall under this category. However, it is important to have your USE flags match across packages regardless of which direction you want to go. That's which I included my current USE settings for selected packages.

If you want only media player playback capabilities, it should be sufficient to add USE="-pulseaudio -jack" to your /etc/make.conf file, verify there are no exceptions in your /etc/portage/package.use file which will override /etc/make.conf and then emerge -1uND world. You'll probably need to run revdep-rebuild and resolve any problems by hand before you're done. I've done this and it works.
_________________
People whom think M$ is mediocre, don't know the half of it.
Back to top
View user's profile Send private message
Gh0str1d3r
Guru
Guru


Joined: 27 May 2008
Posts: 315

PostPosted: Sat Apr 24, 2010 10:26 pm    Post subject: Reply with quote

Hi,

thank you for this very nice tutorial. I followed your guidelines, especially concerning the selection of only those drivers that are actually needed. My output sound works very well, but I cant manage to record with my microphone.

My hardware is similar to yours, its intel hd audio with the following cards

Code:
# head -n 1 /proc/asound/card0/codec*
==> /proc/asound/card0/codec#0 <==
Codec: Realtek ALC269

==> /proc/asound/card0/codec#2 <==
Codec: Intel G45 DEVCTG


I think the intel card is for playback and the realtek card for the recording. I already found out, that I have to set

Code:
options snd-hda-intel model=basic


in /etc/modprobe.d/alsa.conf. This option gave me a set of new recording devices: Mic, internal mic and line-in. I record with neither of them, but actions like pulling the cable of the external mic can be heard (I dont know if this means anything though). Of course I enabled everything in kmixer to full power, which only gives me an annoying noisy rustle. I am testing my microphone with skype.

Any ideas what I might have missed or did wrong?
Back to top
View user's profile Send private message
Gh0str1d3r
Guru
Guru


Joined: 27 May 2008
Posts: 315

PostPosted: Thu May 06, 2010 8:50 pm    Post subject: Reply with quote

Gh0str1d3r wrote:
Hi,

thank you for this very nice tutorial. I followed your guidelines, especially concerning the selection of only those drivers that are actually needed. My output sound works very well, but I cant manage to record with my microphone.

My hardware is similar to yours, its intel hd audio with the following cards

Code:
# head -n 1 /proc/asound/card0/codec*
==> /proc/asound/card0/codec#0 <==
Codec: Realtek ALC269

==> /proc/asound/card0/codec#2 <==
Codec: Intel G45 DEVCTG


I think the intel card is for playback and the realtek card for the recording. I already found out, that I have to set

Code:
options snd-hda-intel model=basic


in /etc/modprobe.d/alsa.conf. This option gave me a set of new recording devices: Mic, internal mic and line-in. I record with neither of them, but actions like pulling the cable of the external mic can be heard (I dont know if this means anything though). Of course I enabled everything in kmixer to full power, which only gives me an annoying noisy rustle. I am testing my microphone with skype.

Any ideas what I might have missed or did wrong?


Problem solved. The soundcard was simply not supported by kernels <= 2.6.31. With 2.6.32 and above, the mic works without any further settings.
Back to top
View user's profile Send private message
Mike Hunt
Watchman
Watchman


Joined: 19 Jul 2009
Posts: 5287

PostPosted: Fri May 28, 2010 1:48 pm    Post subject: Reply with quote

... and speakers... :lol:

The other day, I'm like having no sound, so I start going through all the configs and everything checks out but still NO SOUND!!!

Then I glimpse - NO SPEAKERS!

Ok, get speakers, and there is sound.

Sounds silly but this really happened.

Cheers,

MH
Back to top
View user's profile Send private message
Icer
Guru
Guru


Joined: 26 Aug 2003
Posts: 395
Location: @home

PostPosted: Sat May 29, 2010 1:44 pm    Post subject: Reply with quote

My 5 cents... :)

I have slightly different setup:
Code:

lspci | grep audio
00:14.2 Audio device: ATI Technologies Inc SBx00 Azalia (Intel HDA)
01:05.1 Audio device: ATI Technologies Inc Device 970f

Alsamixer:
Card: HDA ATI SB
Chip: VIA VT1708S
This was confirmed by looking at sound card codec information under /proc:
Code:
head -1 /proc/asound/card0/codec#0
Codec: VIA VT1708S

So I now have these kernel options selected:
Code:
--- Intel HD Audio
[*]   Support jack plugging notification via input layer
[*]   Build Realtek HD-audio codec support
[*]   Build VIA HD-audio codec support
[*]   Build ATI HDMI HD-audio codec support
[*]   Build INTEL HDMI HD-audio codec support
[*]   Enable generic HD-audio codec parser

The most important being the VIA codec. That's the one which I had not selected before.

Great :) Everything seems to work smoothly again.
_________________
Everything can be done. There's just a longer delivery time for impossible projects.
Back to top
View user's profile Send private message
gunther222
n00b
n00b


Joined: 06 Sep 2006
Posts: 19

PostPosted: Sat Sep 25, 2010 9:55 pm    Post subject: Reply with quote

Icer wrote:
My 5 cents... :)

I have slightly different setup:
.
.
.
Great :) Everything seems to work smoothly again.


Seems we have the same motherboard or at least the same chipset. My setttings are identical to yours.

Audio works fine in alsa, anything that talks to alsa directly, like mplayer, works fine.

However nothing that realies on phonon works. The audio devices show up in the system config tool, but testing any of them results in nothing being played, and long time waiting for the button to become active again.

I have no idea where to start with phonon trying to track this down.
Back to top
View user's profile Send private message
ferreirafm
Guru
Guru


Joined: 28 Jul 2005
Posts: 467
Location: Sao Paulo, Brazil

PostPosted: Fri Nov 05, 2010 7:10 pm    Post subject: Reply with quote

dufeu,
Thank you for this very nice tutorial.
All the Best,
ferreirafm
Back to top
View user's profile Send private message
emc
Guru
Guru


Joined: 02 Jul 2004
Posts: 408
Location: Cracow, Poland

PostPosted: Tue Nov 09, 2010 2:42 pm    Post subject: Reply with quote

it just fall from a sky for me.. I have some alsa problem, so its perfect for start! I will try at home!
Back to top
View user's profile Send private message
appetitus
Apprentice
Apprentice


Joined: 28 Sep 2003
Posts: 209

PostPosted: Thu Dec 02, 2010 3:05 am    Post subject: Reply with quote

Best sound help I've found, I've been missing the "Build Realtek HD-audio codec support" all this time.

Thanks for the alsamixer explanation!
_________________
Being a Gentoo user means living in a house inhabited by a family of crazed carpenters. When you wake up, the house is different. Maybe there is a new turret, or some walls have moved, or perhaps someone has removed the floor under your bed.
Back to top
View user's profile Send private message
Cr0t
l33t
l33t


Joined: 27 Apr 2002
Posts: 882
Location: USA

PostPosted: Mon Dec 27, 2010 6:47 pm    Post subject: Reply with quote

My sound is pretty quiet. It is turned up to the max through alsamixer, but it is still pretty quiet. If I try my usb headset it works great.
_________________
cya
    ©®0t
Back to top
View user's profile Send private message
appetitus
Apprentice
Apprentice


Joined: 28 Sep 2003
Posts: 209

PostPosted: Sat Jan 15, 2011 9:45 am    Post subject: Reply with quote

Cr0t wrote:
If I try my usb headset it works great.


ah, USB headsets have their own audio, which always works
_________________
Being a Gentoo user means living in a house inhabited by a family of crazed carpenters. When you wake up, the house is different. Maybe there is a new turret, or some walls have moved, or perhaps someone has removed the floor under your bed.
Back to top
View user's profile Send private message
h12
n00b
n00b


Joined: 11 Jun 2014
Posts: 7

PostPosted: Fri Jun 13, 2014 4:07 pm    Post subject: Reply with quote

i use usb exernal audio ,when i change to it from mixer its not having sound . What can i do ?? even its being recoginsed by the system

what else software can iuse in order to configure the sound options .for example pulse audio etc .
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum