# Help with alsa [SOLVED]

## bigdave1

I am running genkernel, and I initially compiled with no sound support. I now wish to add sound support, and I've been following the documentation for alsa at http://www.gentoo.org/doc/en/alsa-guide.xml#doc_chap2_pre3. I am somewhat new to linux and this may be a dumb question, but for the section that says "Code Listing 2.3: Kernel Options for ALSA", where do I set these options? I know that I must use the trident module because when I do lspci -v | grep -i audio, I get:

```
0000:00:01.4 Multimedia audio controller: Silicon Integrated Systems [SiS] SiS PCI Audio Accelerator (rev 02)

        Subsystem: Silicon Integrated Systems [SiS] SiS PCI Audio Accelerator
```

and the fact that I have the SiS 630 chipset. Once I have made changes to the kernel options do I need to run genkernel --menuconfig all?

Thanks!Last edited by bigdave1 on Tue Aug 09, 2005 10:48 pm; edited 1 time in total

----------

## bigdave1

Also to note, I have not /etc/modules.d/alsa file. As I mentioned before, I first installed Gentoo with no alsa support and I now wish to add it.

Thanks!

----------

## EzInKy

 *bigdave1 wrote:*   

> Also to note, I have not /etc/modules.d/alsa file. As I mentioned before, I first installed Gentoo with no alsa support and I now wish to add it.
> 
> Thanks!

 

I can't help you with genkernel because I've never used it, the entry is in the Device Drivers-->Sound section. As far as configuring alsa you will need to emerge alsa-lib, alsa-utils, alsa-tools, and alsa-headers. I also recommend alsamixer. Once everything is installed run alsaconf and see if it detects your card, then alsamixer to adjust sound.

----------

## bigdave1

 *EzInKy wrote:*   

>  *bigdave1 wrote:*   Also to note, I have not /etc/modules.d/alsa file. As I mentioned before, I first installed Gentoo with no alsa support and I now wish to add it.
> 
> Thanks! 
> 
> I can't help you with genkernel because I've never used it, the entry is in the Device Drivers-->Sound section. As far as configuring alsa you will need to emerge alsa-lib, alsa-utils, alsa-tools, and alsa-headers. I also recommend alsamixer. Once everything is installed run alsaconf and see if it detects your card, then alsamixer to adjust sound.

 

What file is Device Drivers-->Sound section in?

Thanks!

----------

## EzInKy

 *bigdave1 wrote:*   

>  *EzInKy wrote:*    *bigdave1 wrote:*   Also to note, I have not /etc/modules.d/alsa file. As I mentioned before, I first installed Gentoo with no alsa support and I now wish to add it.
> 
> Thanks! 
> 
> I can't help you with genkernel because I've never used it, the entry is in the Device Drivers-->Sound section. As far as configuring alsa you will need to emerge alsa-lib, alsa-utils, alsa-tools, and alsa-headers. I also recommend alsamixer. Once everything is installed run alsaconf and see if it detects your card, then alsamixer to adjust sound. 
> ...

 

It's in the .conf file of your kernel source directory. I really don't know how genkernel works, but I would think you would just run it again and choose the sound options. If you want to do it the more traditional way you would:

```

# cd /usr/src/linux

# make menuconfig

```

Then configure your options. The interface is quite intuitive and options that you chose earlier are read in from the .conf file. After it is configured you build your kernel.

```

# make bzImage && make modules modules_install

```

Then move your kernel to the boot directory. Some people do this by hand so they can use unique names for their kernels, but I prefer:

```

# make install

```

Which sets up a nice new vmlinuz while and marking the old one vmlinuz.old.

----------

## bigdave1

Ok, I did as you mentioned above and I made the change it suggests to the menu.lst file to say bzImage instead of kernel. When I do, I get file not found and I have to manually change the entry in order to get my linux box to boot.

Here is my grub.conf file:

```
default 0

timeout 30

splashimage=(hd0,0)/boot/grub/splash.xpm.gz

title=Gentoo Linux 2.6.11-r6

root (hd0,0)

kernel /boot/bzImage-2.6.11-gentoo-r6 root=/dev/ram0 init=/linuxrc ramdisk=8192 real_root=/dev/hda3 udev

initrd /boot/initrd-2.6.11-gentoo-r6

```

And here is my menu.lst file:

```
default 0

timeout 30

splashimage=(hd0,0)/boot/grub/splash.xpm.gz

title=Gentoo Linux 2.6.11-r6

root (hd0,0)

kernel /boot/bzImage-2.6.11-gentoo-r6 root=/dev/ram0 init=/linuxrc ramdisk=8192 real_root=/dev/hda3 udev

initrd /boot/initrd-2.6.11-gentoo-r6

```

I tried doing a locate bzImage* and I don't get any entries. Any ideas?

Thanks!

----------

## EzInKy

Okay, which method....I posted a couple B-)

Check in /usr/src/linux and see if there a vmlinux. The bzImage means bzip compressed image.

----------

## bigdave1

 *EzInKy wrote:*   

>  *bigdave1 wrote:*    *EzInKy wrote:*    *bigdave1 wrote:*   Also to note, I have not /etc/modules.d/alsa file. As I mentioned before, I first installed Gentoo with no alsa support and I now wish to add it.
> 
> Thanks! 
> 
> I can't help you with genkernel because I've never used it, the entry is in the Device Drivers-->Sound section. As far as configuring alsa you will need to emerge alsa-lib, alsa-utils, alsa-tools, and alsa-headers. I also recommend alsamixer. Once everything is installed run alsaconf and see if it detects your card, then alsamixer to adjust sound. 
> ...

 

I followed the steps you mention above. I did make menuconfig and setup my driver there and then did make bzImage && make modules modules_install. After that I did make install. And there is a vmlinux in the /usr/src/linux directory. Any ideas?

Thanks!

----------

## EzInKy

 *Quote:*   

> 
> 
> I followed the steps you mention above. I did make menuconfig and setup my driver there and then did make bzImage && make modules modules_install. After that I did make install. And there is a vmlinux in the /usr/src/linux directory. Any ideas? 
> 
> 

 

Okay, so far so good B-)

Does it also exist in your /boot directory? If not, you will move it by hand following the instructions at the top of the page here.

----------

## bigdave1

There is a vmlinuz and vmlinuz-2.6.11-gentoo-r6. There is not a vmlinux file.

One thing to note is I ran alsaconf and it detected my sound card. I went through it and followed the instructions and I have alsa running. I even did cat /dev/urandom > /dev/dsp and I hear static through my headphones. I opened xmms and set it to use the ALSA plugin. When I try to play an mp3, it says "failed to open audio output: ALSA 1.2.10 output plugin". I may have jumped ahead by a lot, but if I can hear static on my speakers surely I've got something setup right and I need to figure out why I can't open the ALSA output plugin. Would this cause this problem? I've emerged alsa-drivers.

Thanks!

----------

## bigdave1

One other thing to note is when I run xmms from the command-line (after I have done su to switch to root) and try to play a mp3, it plays fine using the OSS driver and the ALSA driver. But when I run it from the command-line as my user account I still get the failed to open audio output driver error. There errors I get on the command-line are:

```
 ** WARNING **: alsa_get_mixer(): Attaching to mixer hw:0 failed: Permission denied

ALSA lib confmisc.c:560:(snd_determine_driver) could not open control for card 0

ALSA lib conf.c:3479:(_snd_config_evaluate) function snd_func_card_driver returned error: Permission denied

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

ALSA lib conf.c:3479:(_snd_config_evaluate) function snd_func_concat returned error: Permission denied

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

ALSA lib conf.c:3479:(_snd_config_evaluate) function snd_func_refer returned error: Permission denied

ALSA lib conf.c:3948:(snd_config_expand) Evaluate error: Permission denied

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

** WARNING **: alsa_setup(): Failed to open pcm device (default): Permission denied

xmms-mad-Message: failed to open audio output: ALSA 1.2.10 output plugin
```

I have done gpasswd -a <username> audio to add myself to the audio group. I have done this for my user account and the root account. Any ideas?

Thanks!

----------

## EzInKy

 *bigdave1 wrote:*   

> There is a vmlinuz and vmlinuz-2.6.11-gentoo-r6. There is not a vmlinux file.
> 
> One thing to note is I ran alsaconf and it detected my sound card. I went through it and followed the instructions and I have alsa running. I even did cat /dev/urandom > /dev/dsp and I hear static through my headphones. I opened xmms and set it to use the ALSA plugin. When I try to play an mp3, it says "failed to open audio output: ALSA 1.2.10 output plugin". I may have jumped ahead by a lot, but if I can hear static on my speakers surely I've got something setup right and I need to figure out why I can't open the ALSA output plugin. Would this cause this problem? I've emerged alsa-drivers.
> 
> Thanks!

 

Edit:

What happens when you type /etc/init.d/alsasound start?

Hey, alright. Either your new kernel installed or you had sound support already built-in. Did you emerge alsamixer and all the alsa utilities? If so type

```

alsamixer

```

And adjust for your card. Right and Left Arrow keys move between controls, Up and Down Arrow keys adjust volumes, the M key mutes and unmutes. Hit ESC when you are done to save your settings.

----------

## EzInKy

 *bigdave1 wrote:*   

> One other thing to note is when I run xmms from the command-line (after I have done su to switch to root) and try to play a mp3, it plays fine using the OSS driver and the ALSA driver. But when I run it from the command-line as my user account I still get the failed to open audio output driver error. There errors I get on the command-line are:
> 
> ```
>  ** WARNING **: alsa_get_mixer(): Attaching to mixer hw:0 failed: Permission denied
> 
> ...

 

Whoops! We crossposted B-)

All you need to do is add yourself to the audio group.

----------

## bigdave1

I've done that. I did gpasswd -a myaccount audio.

But still nothing. Thanks!

----------

## EzInKy

 *bigdave1 wrote:*   

> I've done that. I did gpasswd -a myaccount audio.
> 
> But still nothing. Thanks!

 

Just want to be clear. It works when you are root but not when you are a normal user, right? Try logging out and logging back in.

----------

## bigdave1

Awesome.. That did it. Sound works good now. Thanks!

----------

