# baffled by (no) sound: alsa, driver, what? [SOLVED]

## rsa4046

Long story short: got a new (to me) motherboard (Tyan K8WE S2893 to replace a S2877), recompiled the kernel with appropriate drivers, but have been unable to get sound to work properly for long. It's not just that there is no sound output, but clients seems to literally hang suspended: mplayer, ogg123, etc., whatever format of file. ogg123 literally hangs in its konsole window, shows no sign of reading the file, even Control-C won't return control. For example, here's as far as mplayer gets on an ogg file:

```
$ mplayer All*                                                                   

MPlayer 29040-4.3.3 (C) 2000-2009 MPlayer Team                                   

Playing All Blues.ogg.

[Ogg] stream 0: audio (Vorbis), -aid 0

Ogg file format detected.

Clip info:

 Artist: Miles Davis

 Name: All Blues

 Track: 04

 Album: Kind Of Blue

 Creation Date: 1959

 Genre: Jazz

==========================================================================

Opening audio decoder: [ffmpeg] FFmpeg/libavcodec audio decoders

AUDIO: 44100 Hz, 2 ch, s16le, 128.0 kbit/9.07% (ratio: 16000->176400)

Selected audio codec: [ffvorbis] afm: ffmpeg (FFmpeg Vorbis)

==========================================================================

AO: [alsa] 48000Hz 2ch s16le (2 bytes per sample)

Video: no video

Starting playback...

A:   0.0 (00.0) of 695.8 (11:35.7) ??,?%

```

That's it, no sound, no counter advance, nothing, until I kill it (and it takes 2 stabs at Control-C to return control): 

```
MPlayer interrupted by signal 2 in module: play_audio

MPlayer interrupted by signal 2 in module: play_audio

```

Drivers are loaded correctly (for both the onboard AC97 chip and a USB headphone, no output for either):

```
$ lsmod                                              

Module                  Size  Used by                

snd_usb_audio          99040  1                      

snd_usb_lib            18136  1 snd_usb_audio        

snd_rawmidi            23520  1 snd_usb_lib          

snd_hwdep               8768  1 snd_usb_audio        

iptable_nat             5880  0                      

nf_nat                 19692  1 iptable_nat          

iptable_mangle          3032  0                      

xt_recent              10200  2                      

nf_conntrack_ipv4      15792  6 iptable_nat,nf_nat   

nf_defrag_ipv4          2104  1 nf_conntrack_ipv4    

xt_state                2360  3                      

nf_conntrack           63592  4 iptable_nat,nf_nat,nf_conntrack_ipv4,xt_state

xt_tcpudp               3416  7                                              

xt_limit                3132  2                                              

iptable_filter          3032  1                                              

ip_tables              18472  3 iptable_nat,iptable_mangle,iptable_filter    

x_tables               20640  6 iptable_nat,xt_recent,xt_state,xt_tcpudp,xt_limit,ip_tables

snd_seq                57216  0                                                            

snd_seq_device          7308  2 snd_rawmidi,snd_seq                                        

snd_pcm_oss            30240  0                                                            

snd_mixer_oss          18040  1 snd_pcm_oss                                                

smsc47b397              6344  0                                                            

nvidia              10309992  36                                                           

snd_intel8x0           35328  1                                                            

snd_ac97_codec        121272  1 snd_intel8x0                                               

ac97_bus                1944  1 snd_ac97_codec                                             

snd_pcm                81440  4 snd_usb_audio,snd_pcm_oss,snd_intel8x0,snd_ac97_codec      

snd_timer              22984  2 snd_seq,snd_pcm                                            

snd                    65160  15 snd_usb_audio,snd_rawmidi,snd_hwdep,snd_seq,snd_seq_device,snd_pcm_oss,snd_mixer_oss,snd_intel8x0,snd_ac97_codec,snd_pcm,snd_timer                                 

soundcore               7328  1 snd                                                               

snd_page_alloc          9800  2 snd_intel8x0,snd_pcm

ppdev                   9120  0

parport_pc             25960  0

forcedeth              61604  0

i2c_nforce2             7736  0

aic7xxx               132444  0

rtc_cmos               11992  0

floppy                 62440  0

pcspkr                  2840  0

k8temp                  5464  0

i2c_core               24128  2 nvidia,i2c_nforce2

hwmon                   2728  2 smsc47b397,k8temp

rtc_core               18180  1 rtc_cmos

parport                25664  2 ppdev,parport_pc

rtc_lib                 2904  1 rtc_core
```

Have recompiled alsa several times, recompiled the kernel (2.6.30-gentoo-r4) as well. My emerge --info

```
# emerge --info                                                             

Portage 2.2_rc33 (default/linux/amd64/2008.0, gcc-4.3.3, glibc-2.9_p20081201-r2, 2.6.30-gentoo-r4 x86_64)                                                                                           

=================================================================                                 

System uname: Linux-2.6.30-gentoo-r4-x86_64-Dual_Core_AMD_Opteron-tm-_Processor_270-with-gentoo-2.0.0                                                                                               

Timestamp of tree: Sun, 02 Aug 2009 05:30:20 +0000                                                

app-shells/bash:     4.0_p28                                                                      

dev-java/java-config: 2.1.8-r1                                                                    

dev-lang/python:     2.6.2-r1                                                                     

dev-util/cmake:      2.6.4-r2                                                                     

sys-apps/baselayout: 2.0.0-r2                                                                     

sys-apps/openrc:     0.4.2-r1                                                                     

sys-apps/sandbox:    2.0                                                                          

sys-devel/autoconf:  2.13, 2.63-r1                                                                

sys-devel/automake:  1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.2, 1.11                                   

sys-devel/binutils:  2.19.1-r1                                                                    

sys-devel/gcc-config: 1.4.1                                                                       

sys-devel/libtool:   2.2.6a                                                                       

virtual/os-headers:  2.6.29                                                                       

ACCEPT_KEYWORDS="amd64 ~amd64"                                                                    

CBUILD="x86_64-pc-linux-gnu"                                                                      

CFLAGS="-march=opteron -O2 -pipe"                                                                 

CHOST="x86_64-pc-linux-gnu"                                                                       

CONFIG_PROTECT="/etc /usr/share/config"                                                           

CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c /etc/udev/rules.d"          

CXXFLAGS="-O2 -pipe"                                                                              

DISTDIR="/usr/portage/distfiles"                                                                  

FEATURES="distlocks fixpackages parallel-fetch preserve-libs protect-owned sandbox sfperms strict unmerge-orphans userfetch userpriv usersandbox usersync"                                          

GENTOO_MIRRORS="http://gentoo.osuosl.org http://www.ibiblio.org/pub/Linux/distributions/gentoo"   

LANG="en_US.UTF-8"                                                                                

LC_ALL="en_US.UTF-8"                                                                              

LDFLAGS="-Wl,-O1 -Wl,--sort-common -Wl,--as-needed"                                               

LINGUAS="en_US.UTF-8"                                                                             

MAKEOPTS="-j9"                                                                                    

PKGDIR="/usr/portage/packages"                                                                    

PORTAGE_CONFIGROOT="/"                                                                            

PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"      

PORTAGE_TMPDIR="/var/tmp"                                                                         

PORTDIR="/usr/portage"                                                                            

PORTDIR_OVERLAY="/usr/local/portage/layman/java-overlay /usr/local/portage"                       

SYNC="rsync://rsync.gentoo.org/gentoo-portage"                                                    

USE="X acl acpi alac alsa amd64 bash-completion berkdb blas bzip2 cdr cli consolekit cracklib crypt css cups cupsddk dbus dri dvd dvdr dvdread encode flac foomaticdb fortran gdbm gif gnuplot gpm hal htmlhandbook iconv imap ipv6 isdnlog java6 jpeg kpathsea lame lapack lm_sensors mad maildir mmx mp3 mpeg mtp mudflap multilib ncurses nforce2 nls nptl nptlonly nsplugin ogg opengl openmp pam pcre perl png pppd python readline reflection resolvconf samba semantic-desktop session spl sse sse2 ssl subtitles sysfs tcpd tiff tk truetype unicode usb vorbis wavpack winbind wmf x264 xml xorg zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en_US.UTF-8" USERLAND="GNU" VIDEO_CARDS="nvidia"

Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
```

Sound did work briefly at one point, but now seems completely broken. Curiously, there are no messages in dmesg or /var/log/messages that suggest any bad behavior. Hoping someone has some ideas on what to try next. In the past, I've always been able to get sound to work by recompiling kernel, alsa, running alsaconf, alsamixer, etc., etc. This feels like a hardware conflict to me, but how to check? Hoping someone has a good idea, I'm baffled   :Confused: Last edited by rsa4046 on Tue Aug 04, 2009 4:54 pm; edited 1 time in total

----------

## cruise

Have you tried with just one or the other enabled? Unplug the usb headphones, or disable the AC97 in the bios, and try a kernel with support for only one?

Might help narrow down which, if any, is causing the problem.

----------

## rsa4046

Thanks for the suggestion, cruise, I will try disabling the chip in the bios and report any change. Cheers!

----------

## rsa4046

 *cruise wrote:*   

> Have you tried with just one or the other enabled? Unplug the usb headphones, or disable the AC97 in the bios, and try a kernel with support for only one?
> 
> Might help narrow down which, if any, is causing the problem.

 OK, I disabled BIOS support for the integrated audio chip, and (lo and behold), the USB headphones work   :Very Happy:  . But what does this imply, that the NVidia CK804 AD1981B chip is bad? In the kernel, all the sound stuff is included as modules:

```
<M> Sound card support  --->

  <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

    [ ]   Support old ALSA API

    [*]   Verbose procfs contents

    [ ]   Verbose printk

    [ ]   Debug

    [ ]   Generic sound devices  --->

    [*]   PCI sound devices  --->

      <M>   Intel/SiS/nVidia/AMD/ALi AC97 Controller

    [*]   USB sound devices  ---> 

      <M>   USB Audio/MIDI driver

    < >   ALSA for SoC audio support  --->

  < >   Open Sound System (DEPRECATED)  --->
```

I'm going to re-enable the chip and unplug the phones, see if this break things again ...

Edit added after period of embarrassment:

OK: I guess this was a non issue   :Embarassed:  , as sound now works great ... the only change I had made before disabling while the system was still borked was to add OSS PCM plugin and OSS sequencer API support in the kernel, i.e.

```
    [*]     OSS PCM (digital audio) API - Include plugin system

    [*]   OSS Sequencer API
```

, so perhaps this produced some conflict   :Question:   Anyway, although I don't really understand what was wrong in the first place, I'm happy it's solved! Thanks--

----------

