You are not logged in.

#1 2004-08-05 11:42:53

ovihc
Member
Registered: 2004-06-16
Posts: 62

alsa problems even after following guides

i really can't get alsamixer or any type of other sound device to work.
when i'm root, i can listen to music and anything else. when i'm a normal user and i
type 'aplay', i get this:

aplay: main:507: audio open error: Permission denied

when i play a mp3 file with mpg321, it plays the file!

when i type "alsamixer", it says:

alsamixer: function snd_ctl_open failed for default: Permission denied

i followed all the guides that are similar to this.  I followed every step with the #'s.

Howto Setup alsa?


For the 2.6.X kernel you will need this package:
- alsa-lib

These are suggested:
- alsa-oss
- alsa-utils (some very usefull utils for testing alsa)


#1)
Configuring alsa:

- modprobe and-ali5451
- modprobe snd-pcm-oss

#2)Unmute the channels of your soundcard:

- amixer set Master 100 unmute
- amixer set PCM 100 unmute


##### aplay works only if I'm root
## i DONT have the snd-pcm-oss compiled in my kernel 2.6.7 at all. the guide says that it's optional.

#3) - aplay <yourwavfile>

Now that you have some sound, you most likely want it to be loaded at startup.
You can start by adding the right modules to your /etc/rc.conf.
If you open your rc.conf you will find a line in it starting with,

Add your sound module to this line and do not forget to add snd-pcm-oss. In my case i

#4)MODULES=(...... snd-ali5451 .......)

Setting up permissions:
In most cases you probably want a user to have access to your soundcard.
Make a group:

#5)
- groupadd sound
Add users to the group:
- gpasswd -a <username> sound

#6)Set the permissions:
Edit /etc/devfsd.conf and add these lines:
# Alsa Permisions
REGISTER sound/.* PERMISSIONS root.sound 660
REGISTER snd/.* PERMISSIONS root.sound 660

#7)Reload the devfsd.conf config file:
- killall -HUP devfsd

#8 )Copy alsamixer to /etc/rc.d and make it world-executable:
- cp alsamixer /etc/rc.d
- chmod 755 /etc/rc.d/alsamixer
Add alsamixer to you daemons line in /etc/rc.conf

and still alsamixer doesn't work, and aplay doesn't work. what is wrong?

Offline

#2 2004-08-05 11:59:33

Mr Green
Forum Fellow
From: U.K.
Registered: 2003-12-21
Posts: 5,912
Website

Re: alsa problems even after following guides

Have you got alsa installed

pacman -Qi alsa-oss alsa-lib asla-utils

check modules for your card are loaded....

lsmod

are they shown in the list ?

HTH


Mr Green

Offline

#3 2004-08-05 12:46:06

ovihc
Member
Registered: 2004-06-16
Posts: 62

Re: alsa problems even after following guides

they are shown on the list. trust me, i have done this before. but it's weird because now, even when i have everything loaded, it still won't give the normal users permission for alsamixer.

Offline

#4 2004-08-05 13:03:38

Mr Green
Forum Fellow
From: U.K.
Registered: 2003-12-21
Posts: 5,912
Website

Re: alsa problems even after following guides

I do not use sound as a group name only users (me being the only user here  smile )

check permissions because it might be your problem.....

HTH


Mr Green

Offline

#5 2004-08-05 13:08:13

ovihc
Member
Registered: 2004-06-16
Posts: 62

Re: alsa problems even after following guides

I know it's permissions problem, but I just can't figure out where.

Offline

#6 2004-08-05 13:11:17

dp
Member
From: Zürich, Switzerland
Registered: 2003-05-27
Posts: 3,378
Website

Re: alsa problems even after following guides

if you are using udev, make sure your permissions there are ok - the docs speak mostly about devfs, but we all should slowly switch to udev


The impossible missions are the only ones which succeed.

Offline

#7 2004-08-05 13:12:31

Mr Green
Forum Fellow
From: U.K.
Registered: 2003-12-21
Posts: 5,912
Website

Re: alsa problems even after following guides

/etc/group


Mr Green

Offline

#8 2004-08-05 13:14:05

yowwww
Member
Registered: 2003-09-04
Posts: 112

Re: alsa problems even after following guides

imho, alsa is *now* very easy to get to work usually, in the past it was garbage.

Here is what I do:

build my own kernel with my alsa device enabled (it's usually under the PCI section below but sometimes can be ISA for older cards) and these entries selected in the main alsa support section:

 <*> Advanced Linux Sound Architecture                          x x  
  x x                       <*> Sequencer support                                          x x  
  x x                       < >   Sequencer dummy client                                   x x  
  x x                       <*> OSS Mixer API                                              x x  
  x x                       <*> OSS PCM (digital audio) API                                x x  
  x x                       [*] OSS Sequencer API                                          x x  
  x x                       < > RTC Timer support                                          x x  
  x x                       [ ] Verbose printk                                             x x  
  x x                       [ ] Debug                                                      x x  
  x x                           Generic devices  --->                                      x x  
  x x                           ISA devices  --->                                          x x  
  x x                           PCI devices  --->                                          x x  
  x x                           ALSA USB devices  --->  

Then I also make sure that my permissions are set correctly for my users.

This involves either going into:

/etc/devfsd.conf (if u are using devfs) and adding the bottom line into this section:

# Uncomment this if you want permissions to be saved and restored
# Do not do this for pseudo-terminal devices
REGISTER        ^pt[sy]         IGNORE
CREATE          ^pt[sy]         IGNORE
CHANGE          ^pt[sy]         IGNORE
DELETE          ^pt[sy]         IGNORE
REGISTER        .*              COPY    /dev-state/$devname $devpath
CREATE          .*              COPY    $devpath /dev-state/$devname
CHANGE          .*              COPY    $devpath /dev-state/$devname
DELETE          .*              CFUNCTION GLOBAL unlink /dev-state/$devname
RESTORE         /dev-state
REGISTER sound/.* PERMISSIONS root.users 660

OR if u are using udev, going into /etc/udev/permissions.d/udev.permissions and replacing root with users for sound and or snd in this section:

# audio devices
dsp*:root:users:0660
audio*:root:users:0660
midi*:root:root:0660
mixer*:root:users:0660
sequencer*:root:root:0660
sound/*:root:users:0660
snd/*:root:users:0660

I have a couple others using users there also, but they are normally root by default.

As long as you have alsa installed and **your sound card is built into the kernel properly and it supports using Alsa** it should work. Some sound cards will only really work with OSS, so try using aumix to see your volumes as well. If it works as root but not as user, it is likely a permissions issue. If it still doesnt work and you've done whats mentioned above and all of the no brainer stuff that should be obvious, then I would suggest trying a different kernel (earlier perhaps like 2.6.2 or even the latest 2.4 version) or just use a different sound card. You could also try a live cd that uses alsa to see if it would work with a newer kernel at all. If u use knoppix, dont forget to boot into the 2.6 kernel by typing in knoppix26 at the boot prompt iirc.

Good luck smile

Offline

#9 2004-08-05 13:19:02

Mr Green
Forum Fellow
From: U.K.
Registered: 2003-12-21
Posts: 5,912
Website

Re: alsa problems even after following guides

Knoppix to the rescue again lol

I would suggest AMLUG live CD over knoppix  smile .....


Mr Green

Offline

#10 2004-08-05 17:23:02

sarah31
Member
From: Middle of Canada
Registered: 2002-08-20
Posts: 2,975
Website

Re: alsa problems even after following guides

if you created the group "sound" did you also remember to add your user to it? According to your post your permissions are for root:sound so make sure your user is part of the sound group.


AKA uknowme

I am not your friend

Offline

Board footer

Powered by FluxBB