# alsaconf problem nvidia pci card not recognized [solved]

## h2sammo

i reinstalled gentoo on my system and now i have the same alsaconf - no legacy drivers available problem i hit in the past.

```
localhost bobby # lspci -v | grep -i audio

00:0e.1 Audio device: nVidia Corporation MCP55 High Definition Audio (rev a2)

        Subsystem: nVidia Corporation MCP55 High Definition Audio

01:00.1 Audio device: nVidia Corporation Device 0be5 (rev a1)
```

```

00:0e.1 Audio device: nVidia Corporation MCP55 High Definition Audio (rev a2)

        Subsystem: nVidia Corporation MCP55 High Definition Audio

        Kernel driver in use: HDA Intel

        Kernel modules: snd-hda-intel

01:00.1 Audio device: nVidia Corporation Device 0be5 (rev a1)

        Subsystem: eVga.com. Corp. Device 1467

        Kernel driver in use: HDA Intel

        Kernel modules: snd-hda-inte
```

my .config  http://ompldr.org/vN3drYg

 *Quote:*   

> 
> 
>   --- Sound card support                                                            | |  
> 
>   | |            [ ]   Preclaim OSS device numbers                                                 | |  
> ...

 

```

localhost linux # lsmod

Module                  Size  Used by

snd_pcm_oss            39129  0 

snd_mixer_oss          17403  1 snd_pcm_oss

snd_seq_dummy           1622  0 

snd_seq_oss            28514  0 

snd_seq_midi_event      6484  1 snd_seq_oss

snd_seq                51685  5 snd_seq_dummy,snd_seq_oss,snd_seq_midi_event

snd_hda_codec_nvhdmi    14633  4 

nvidia              10273921  28 

snd_hda_codec_realtek   294932  1 

snd_hda_intel          22905  0 

snd_hda_codec          75910  3 snd_hda_codec_nvhdmi,snd_hda_codec_realtek,snd_hda_intel

snd_usb_audio         101792  0 

snd_pcm                79669  4 snd_pcm_oss,snd_hda_intel,snd_hda_codec,snd_usb_audio

snd_timer              20865  2 snd_seq,snd_pcm

snd_hwdep               6442  2 snd_hda_codec,snd_usb_audio

firewire_ohci          26979  0 

snd_usbmidi_lib        19630  1 snd_usb_audio

firewire_core          53854  1 firewire_ohci

ohci1394               28994  0 

snd_rawmidi            21022  1 snd_usbmidi_lib

snd_seq_device          6073  4 snd_seq_dummy,snd_seq_oss,snd_seq,snd_rawmidi

snd                    63105  14 snd_pcm_oss,snd_mixer_oss,snd_seq_oss,snd_seq,snd_hda_codec_realtek,snd_hda_intel,snd_hda_codec,snd_usb_audio,snd_pcm,snd_timer,snd_hwdep,snd_usbmidi_lib,snd_rawmidi,snd_seq_device

ieee1394               82044  1 ohci1394

uvcvideo               61031  0 

videodev               71252  1 uvcvideo

v4l1_compat            15716  2 uvcvideo,videodev

i2c_nforce2             5469  0 

v4l2_compat_ioctl32     9969  1 videodev

forcedeth              52991  0 

b43                   149528  0 

k8temp                  3803  0 

ssb                    35788  1 b43

snd_page_alloc          7989  2 snd_hda_intel,snd_pcm
```

```

localhost linux # aplay -l

**** List of PLAYBACK Hardware Devices ****

card 1: NVidia [HDA NVidia], device 0: ALC889A Analog [ALC889A Analog]

  Subdevices: 1/1

  Subdevice #0: subdevice #0

card 1: NVidia [HDA NVidia], device 1: ALC889A Digital [ALC889A Digital]

  Subdevices: 1/1

  Subdevice #0: subdevice #0

card 2: NVidia_1 [HDA NVidia], device 3: NVIDIA HDMI [NVIDIA HDMI]

  Subdevices: 1/1

  Subdevice #0: subdevice #0

card 2: NVidia_1 [HDA NVidia], device 7: NVIDIA HDMI [NVIDIA HDMI]

  Subdevices: 1/1

  Subdevice #0: subdevice #0

card 2: NVidia_1 [HDA NVidia], device 8: NVIDIA HDMI [NVIDIA HDMI]

  Subdevices: 1/1

  Subdevice #0: subdevice #0

card 2: NVidia_1 [HDA NVidia], device 9: NVIDIA HDMI [NVIDIA HDMI]

  Subdevices: 1/1

  Subdevice #0: subdevice #0
```

```
localhost linux # alsactl init

Found hardware: "USB-Audio" "USB Mixer" "USB046d:0808" "" ""

Hardware is initialized using a generic method

Found hardware: "HDA-Intel" "Realtek ALC889A" "HDA:10ec0885,10ec0885,00100101" "0x10de" "0x0371"

Hardware is initialized using a generic method

Found hardware: "HDA-Intel" "Nvidia GPU 10 HDMI/DP" "HDA:10de0010,10de0101,00100100" "0x3842" "0x1467"

Hardware is initialized using a generic method
```

```

localhost linux # cat /proc/asound/cards

 0 [U0x46d0x808    ]: USB-Audio - USB Device 0x46d:0x808

                      USB Device 0x46d:0x808 at usb-0000:00:0a.1-6, high speed

 1 [NVidia         ]: HDA-Intel - HDA NVidia

                      HDA NVidia at 0xfe020000 irq 23

 2 [NVidia_1       ]: HDA-Intel - HDA NVidia

                      HDA NVidia at 0xfbffc000 irq 16
```

Last edited by h2sammo on Mon Mar 28, 2011 12:25 pm; edited 1 time in total

----------

## NeddySeagoon

h2sammo,

From your module load order, on this boot, your USB sound card is the default sound card - even if its a webcam.   	

```
Postsnd_hda_intel          22905  0

snd_hda_codec          75910  3 snd_hda_codec_nvhdmi,snd_hda_codec_realtek,snd_hda_intel

snd_usb_audio         101792  0 
```

Modules at the bottom of the list are loaded first. Thsi is confirmed by your alsactl init output.

You need to edit /etc/modprobe.d/alsa.conf to force sound card ordering or build snd-hda-intel into the kernel and leave snd-usb-audio as a module, so that  snd-hda-intel is always initalised first.  That may not be quite what you want either as you have two snd_hda_intel sound cards.  They will always be found in PCD device order, so 00:0e.1 will be sound card 0 and 01:00.1 will be sound card 1.

alsaconf tries to set up /etc/modprobe.d/alsa.conf but it only seems to work with a single sound card.

----------

## h2sammo

this is my /etc/modprobe.d/alsa.conf . i have never messed with it  manually. actually, isnt this what alsaconf edits? - but alsaconf has never worked for me so i understand, but how do i specify module loading order?

 *Quote:*   

> 
> 
> # Alsa kernel modules' configuration file.
> 
> # ALSA portion
> ...

 

----------

## NeddySeagoon

h2sammo,

You have three sound cards. so that needs a little expansion.

```
alias snd-card-0 snd_hda_intel

alias snd-card-1 snd_hda_intel

alias snd-card 2 snd-usb-audio 
```

goes in place of 

```
## alias snd-card-0 snd-interwave

## alias snd-card-1 snd-ens1371 
```

The following

```
## alias sound-slot-0 snd-card-0

## alias sound-slot-1 snd-card-1
```

needs to be uncommented and expanded to cover three sound cards.

```
## alias sound-service-1-0 snd-mixer-oss

## alias sound-service-1-3 snd-pcm-oss

## alias sound-service-1-12 snd-pcm-oss 
```

needs to be uncommented, so you have OSS support for the second sound device. It also needs to be duplicated (almost) for the third sound device.

Lastly 

```
options snd cards_limit=1
```

is correct for a single sound card but you have three.

----------

## h2sammo

thank you. my new alsa.conf

 *Quote:*   

> 
> 
> # Alsa kernel modules' configuration file.
> 
> # ALSA portion
> ...

 

problem is alsaconf still wont pick up any PCI cards so i still have no sound. i tried playing with the module order with 

```
modprobe -rv snd_hda_xxx
```

 and 

```
modprobe -v snd_hda_xxx
```

 and then ran alsaconf but it never picked up anything, no matter if i have only snd_hda_intel OR snd_hda_codec_realtek loaded at a time (usb module removed in both instances).

any more ideas? i always have problems with sound, on every machine i put gentoo on, i have to pass this hurdle.

----------

## NeddySeagoon

h2sammo,

Don't use alsaconf ... it will have trashed your alsa.conf.  What you posted looks right.

You will need to reboot for the changes to take effect. Well, you can unpick the sound modules and manually regenerate modules.conf but its not worth the effort.

After the reboot, what does 

```
ls -l /dev/snd
```

show?

Are you in the audio group (or are you root)?

Lastly you may need to pass the model=<hardware>  to the snd_hda_intel module when it loads, more on that later, if needed.

----------

## h2sammo

alsaconf did not make any changes in the configuration file.

after reboot /dev/sdn does not exist 

```
localhost bobby # ls -l /dev/snd

ls: cannot access /dev/snd: No such file or directory
```

```

localhost bobby # groups

root bin daemon sys adm disk wheel floppy dialout tape video

localhost bobby # groups bobby

wheel audio cdrom video usb users portage bobby
```

weird... root is not in audio grp... does this matter?

----------

## NeddySeagoon

h2sammo,

```
# ls -l /dev/snd

ls: cannot access /dev/snd: No such file or directory
```

tells that your kernel modules did not load so you have no sound drivers.

root does not need to be in the audio group, as root owns all the files in /dev/ anyway.

When /dev/snd is missing, what does modprobe snd-hda-intel  produce?

If /dev/snd is still empty, is there anything useful in dmesg ?

Ahhh ...

```
alias snd-card-0 snd_hda_intel

alias snd-card-1 snd_hda_intel 
```

I have  a feeling that those four underscores should be hyphens.

----------

## h2sammo

ok i have stuff in /dev/snd. i have rebooted and now 

```
localhost bobby # ls -l /dev/snd

total 0

drwxr-xr-x  2 root root       60 Mar 24 12:10 by-id

drwxr-xr-x  2 root root      100 Mar 24 12:10 by-path

crw-rw----+ 1 root audio 116,  4 Mar 24 12:10 controlC0

crw-rw----+ 1 root audio 116, 10 Mar 24 12:10 controlC1

crw-rw----+ 1 root audio 116, 11 Mar 24 12:10 controlC2

crw-rw----+ 1 root audio 116,  3 Mar 24 12:10 pcmC0D0c

crw-rw----+ 1 root audio 116,  9 Mar 24 12:10 pcmC1D0c

crw-rw----+ 1 root audio 116,  8 Mar 24 12:10 pcmC1D0p

crw-rw----+ 1 root audio 116,  7 Mar 24 12:10 pcmC1D1c

crw-rw----+ 1 root audio 116,  6 Mar 24 12:10 pcmC1D1p

crw-rw----+ 1 root audio 116,  5 Mar 24 12:10 pcmC1D2c

crw-rw----+ 1 root audio 116, 12 Mar 24 12:13 seq

crw-rw----+ 1 root audio 116,  2 Mar 24 12:10 timer
```

i think you are right about snd_hda_intel  being snd-hda-intel since this is how the example is being given in the same configuration file. this is how it looks like now:  *Quote:*   

> alias snd-card-0 snd-hda-intel
> 
> alias snd-card-1 snd-hda-intel
> 
> alias snd-card-2 snd-usb-audio

 

can i remove all the OSS associations from alsa.conf? i do not have OSS selected in kernel

however, i have to manually select the card from alsamixer, press F6 i can select from 3 sound cards, 0 (USB) 1 and 2 both hda-intel. only selection 1 has controls.  is there any way to have this being picked up automatically at boot?

a few reboots ago i had sound in chromium youtube, etc but now i do not. sound does work on my machine because i tried a a game i had installed and it renders the sound with no problem.

also, tried a movie... cant open alsa-lib:

```
bobby@localhost ~ $ mplayer Downloads/202.mpg

MPlayer SVN-r32624-4.4.5 (C) 2000-2010 MPlayer Team

Playing Downloads/202.mpg.

MPEG-PS file format detected.

VIDEO:  MPEG1  640x480  (aspect 1)  29.970 fps    0.0 kbps ( 0.0 kbyte/s)

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

Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family

Selected video codec: [ffmpeg1] vfm: ffmpeg (FFmpeg MPEG-1)

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

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

Opening audio decoder: [mp3lib] MPEG layer-2, layer-3

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

Selected audio codec: [mp3] afm: mp3lib (mp3lib MPEG layer-2, layer-3)

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

[AO_ALSA] alsa-lib: pcm_dmix.c:1018:(snd_pcm_dmix_open) unable to open slave

[AO_ALSA] Playback open error: No such file or directory

[AO SDL] Samplerate: 44100Hz Channels: Stereo Format s16le

[AO_ALSA] alsa-lib: pcm_dmix.c:1018:(snd_pcm_dmix_open) unable to open slave

[AO SDL] Unable to open audio: No available audio device

DVB card number must be between 1 and 4

AO: [null] 44100Hz 2ch s16le (2 bytes per sample)

Starting playback...

Movie-Aspect is 1.33:1 - prescaling to correct movie aspect.

VO: [vdpau] 640x480 => 640x480 Planar YV12 

A:   9.9 V:   9.9 A-V:  0.003 ct: -0.068 283/283  4%  3%  0.4% 1 0
```

----------

## NeddySeagoon

h2sammo,

The OSS stuff in alsa.conf relates to alsas oss emulation.

Games and sound daemons often use this. It needs the OSS options under ALSA in the kernel, not the OSS (Depreciated) menu.

0 (USB) 1 and 2 both hda-intel, isn't right.

```
alias snd-card-0 snd-hda-intel

alias snd-card-1 snd-hda-intel

alias snd-card-2 snd-usb-audio
```

is supposed to set the sound card order.

snd-usb-audio should be loaded after snd-hda-intel and be nearer the top of the lsmd output.

----------

## h2sammo

i put snd-card-2 in the middle in alsa.conf but had to unplug my video cam in order for me to have sound and for the modules to load properly. I can now restart and everything boots in order. i plugged my cam back in.

thank you for the help.

----------

