# sound [solved]

## idella4

my system is freshly upgraded, from kde3 to kde4 and a new kernel.  It's caused a few posts to get it to this stage.  I have no sound.  It wasn't hard to find out why.  lsmod listed one single module, the graphics driver.

So no sound drivers.

First I suppose is the hardware.

```

genny idella # lspci

00:00.0 Host bridge: nVidia Corporation Device 07c3 (rev a2)

00:00.1 RAM memory: nVidia Corporation nForce 630i memory controller (rev a2)

00:01.0 RAM memory: nVidia Corporation nForce 630i memory controller (rev a1)

00:01.1 RAM memory: nVidia Corporation nForce 630i memory controller (rev a1)

00:01.2 RAM memory: nVidia Corporation nForce 630i memory controller (rev a1)

00:01.3 RAM memory: nVidia Corporation nForce 630i memory controller (rev a1)

00:01.4 RAM memory: nVidia Corporation nForce 630i memory controller (rev a1)

00:01.5 RAM memory: nVidia Corporation nForce 630i memory controller (rev a1)

00:01.6 RAM memory: nVidia Corporation nForce 630i memory controller (rev a1)

00:02.0 RAM memory: nVidia Corporation nForce 630i memory controller (rev a1)

00:03.0 ISA bridge: nVidia Corporation MCP73 LPC Bridge (rev a2)

00:03.1 SMBus: nVidia Corporation MCP73 SMBus (rev a1)

00:03.2 RAM memory: nVidia Corporation MCP73 Memory Controller (rev a1)

00:03.4 RAM memory: nVidia Corporation MCP73 Memory Controller (rev a1)

00:04.0 USB Controller: nVidia Corporation GeForce 7100/nForce 630i (rev a1)

00:04.1 USB Controller: nVidia Corporation GeForce 7100/nForce 630i (rev a1)

00:08.0 IDE interface: nVidia Corporation MCP73 IDE (rev a1)

00:09.0 Audio device: nVidia Corporation MCP73 High Definition Audio (rev a1)

```

I cut it off at the sound device since that's what this is about.  genny ran a long time ago om a 2.6.25 kernel, and the sound driver required and used is snd_hda_intel.  So I reviewed my kernel config.  It was created by defconfig at first, then I changed a few vitals to get it to boot, didn't address sound at the time.

In the config, from 2.6.25, my sound device is Intel HD audio, compiled as a module.  In this new config, the sound device selected is Intel HD audio also, but compiled in the kernel, built in.

I never have understood the reasons why it should be compiled one vs the other and what the difference is.  It would be good if someone could clarify that.  Anyway, viewing the audio setup in kde. it reports

HDA Nvidia Analog not working.  It also has a HDA Nvidia Digital under advanced settings.  So despite them being built in the kernel, they weren't being used. 

Taking the hint from the kernel that worked, I recompiled them as modules, like in the other kernel.  The result is 

```

genny linux # modprobe snd_hda_intel

FATAL: Error inserting snd_hda_intel (/lib/modules/2.6.30-gentoo-r8/kernel/sound/pci/hda/snd-hda-intel.ko): Invalid argument

```

So kernel 2.6.25 was ok, but it doesn't work on the current system, too old.  The new kernel doesn't work with built in and makes this error using modules.

Can anyone help rectify please?

----------

## DONAHUE

does 

```
grep -i CONFIG_SND_HDA_CODEC_REALTEK /usr/src/linux/.config
```

 give  *Quote:*   

> CONFIG_SND_HDA_CODEC_REALTEK=y

  If not, I think it should.

The following is overkill in codecs but should work:

mount /boot partition if you have one and if it is not mounted: 

run

```
fdisk -l

mount
```

if not sure.

```
cd /usr/src/linux

make menuconfig
```

edit menuconfig to:

 *Quote:*   

> Device Drivers  --->
> 
> <M> Sound card support  --->
> 
> --- Sound card support
> ...

 

```
make && make modules_install

cp arch/x86/boot/bzImage /boot/<your choice of kernel name>
```

verify /boot/<your choice of kernel name> is a menu choice in /boot/grub/grub.conf

```
reboot
```

```
emerge alsa-utils

alsaconf

alsamixer
```

alsaconf should identify your sound card and install modules

If no luck:

boot a current ubuntu cd run 

```
lspci -k
```

 and see what it reports  as a driver for sound card.

----------

## idella4

DONAHUE, thanks for your reply.  I followed your setup.  I had made virtually the same setup myself and made one error it appears.  On recompiling the kernel I issued modprobe snd_hda_intel straight after modules_install.   I got the cited error, so I posted. 

Seeing your suggested config made me think it should be right, so I recompiled, and again issued modprobe snd_hda_intel straight away. and again got the error.  This time I decided to actually use the new kernel and boot on the chance that it would be ok.  So I did, and it comes up ok.  I need not have posted this query, however all is not yet sweet.

I've got all the modules for sound present, but still no sound.  Using kde's system settings gui, I test for sound and sometimes get the message HDA Nvidia ALC662 Anaolog not working.  I've run alsaconf and it's done what it does.

Dolphin correctly identifies a music cd when placed in the cd drive.  After supplying it with a symling to find /dev/cdrom, it accesses the content of the music cd.  I click play and it plays, but no sound.  The kernel is ok, but how do you setup sound properly?  It always has been a demanding task.

----------

## DONAHUE

http://www.gentoo.org/doc/en/alsa-guide.xml part 3 may be of help.

----------

## idella4

DONAHUE,

I followed the guide and it's turned out to be confusing and messy.  There are conflicts in all the basics.   Here is what it states is expected

 *Quote:*   

> 
> 
> This is how the ALSA Mixer might look the first time you open it. Pay attention to the Master and PCM channels which both have an MM below them. That means they are muted. If you try to play anything with alsamixer in this state, you will not hear anything on your speakers.
> 
> Figure 3.1: The Alsa Mixer Main Window, Muted
> ...

 

It shows an image of alsamixer in a shell.  It has sections for Master,  Headphones, Tone, Base Treble, 2 for 3D Contr and PCM.  In contrast, here is my alsamixer

 *Quote:*   

> 
> 
> ┌──────────────────[AlsaMixer v1.0.20 (Press Escape to quit)]───────────────────┐
> 
> │ Card: HDA NVidia                                                              │
> ...

 

There are a few more sections, but there is no PCM!  What type of alsamixer do I have?  The sections are mostly all different.  So not surprisingly, I have no sound.  kscd still plays the music on the cd with no sound.  Just to demo it a little more,

```

idella@genny ~ $ aplay audiocd:/Enya - 01 - The Celts.wav

ALSA lib confmisc.c:768:(parse_card) cannot find card '0'

ALSA lib conf.c:3513:(_snd_config_evaluate) function snd_func_card_driver returned error: No such file or directory

ALSA lib confmisc.c:392:(snd_func_concat) error evaluating strings

ALSA lib conf.c:3513:(_snd_config_evaluate) function snd_func_concat returned error: No such file or directory

ALSA lib confmisc.c:1251:(snd_func_refer) error evaluating name

ALSA lib conf.c:3513:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory

ALSA lib conf.c:3985:(snd_config_expand) Evaluate error: No such file or directory

ALSA lib pcm.c:2211:(snd_pcm_open_noupdate) Unknown PCM default

aplay: main:608: audio open error: No such file or directory

```

I have little idea how to approach it from here.  The setup doesn't match anything in the example.

This is no longer a kernel problem.  Shall I post afresh in 'Multimedia'?

----------

## VoidMage

Paste something human readable first, i.e. output of amixer for your card,

'aplay -l'.

For trivial sound test (if it works at all), 'aplay -d 3 < /dev/urandom' works nicely.

Some of the cards have only 'Master', no 'PCM'.

----------

## NeddySeagoon

idella4,

If you use code tags rather than quote tags your alsamixer image would have been preserved.

----------

## idella4

sorry to VoidImage and Neddy and all who perused,  I got it wrong again.  I don't know what I was looking at on the 6th.,

but the PCM section was in fact there.  Since I used quote instead of code (neddy), I can't even check on my mistake.

I've just looked at alsamixer again, and it's there all right.  I've adjusted it accordingly.  I cancel my comments about the guide, it is perfectly all right.  It's me that is confused and not right.   :Sad: 

(KsCD needs a sym link made; it looks for /dev/cdrom)  It now plays.

hello and thanks again NeddySeagoon.  I've been a persistent helpee to you.

I have sound.  genny is in good order.

----------

## NeddySeagoon

idella4,

udev should make that symlink to whatever your real CD device is.

----------

