LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 10-24-2003, 11:01 PM   #1
flashingcurser
Member
 
Registered: Jan 2003
Distribution: many win/nix/mac
Posts: 259

Rep: Reputation: 32
Alsa and 2.6


My sound will not work---I have only used alsa once in the past so I dont have great experience with it.

Anyway enough babbeling

Hardware:
sblive

Software:
2.6.0pre8
alsa
slack 9.1

Clues:
From dmesg:

Quote:
Advanced Linux Sound Architecture Driver Version 0.9.7 (Thu Sep 25 19:16:36 2003
UTC).
ALSA device list:
No soundcards found.
From alsamixer:

Quote:
dan@darkstar:~$ alsamixer

alsamixer: function snd_ctl_open failed for default: No such device
dan@darkstar:~$
From cat /prc/pci

Quote:
Bus 0, device 18, function 0:
Multimedia audio controller: Creative Labs SB Live! EMU10k1 (rev 4).
IRQ 9.
Master Capable. Latency=64. Min Gnt=2.Max Lat=20.
I/O at 0xbc00 [0xbc1f].
From lsmod

PHP Code:
dan@darkstar:~$ lsmod
Module                  Size  Used by
snd_pcm_oss            49092  0
snd_pcm                88160  1 snd_pcm_oss
snd_page_alloc          9124  1 snd_pcm
snd_timer              21696  1 snd_pcm
snd_mixer_oss          17088  1 snd_pcm_oss
ide_scsi               12128  0
agpgart                26888  0
apm                    15820  2
dan
@darkstar:~$ 
Any thoughts guys?


Thanks

Last edited by flashingcurser; 10-24-2003 at 11:04 PM.
 
Old 10-24-2003, 11:13 PM   #2
Dabria
Member
 
Registered: Jul 2003
Location: Caraquet, New-Brunswick
Distribution: Slackware - Current
Posts: 35

Rep: Reputation: 15
This was posted on the www.dropline.net forums for a sound problem I had. Hope this might be helpfull to you. I eventually fixed my problem by going with a 2.6.x kernel but anyways...here goes

This is a run-down of how to get sound working with the included kernel OSS drivers.

Verify that the sound isn't already loaded. Hotplug on Slackware 9 systems will generally determine the correct module. Type "lsmod" as root to see if a module is loaded with soundcore. It may say something like "i_810_audio" if you have an Intel sound chip. It is definately the most common Intel chip. If you don't see a sound module listed, but you know which chip you have, then go onto the next step.

If you know which sound chip that you have (lspci might show you this), then you can load the correct module. The modules are usually located in /lib/modules/2.4.20/kernel/drivers/sound. You can browse this directory to determine the correct module that you need to use. Then, as root, load the module with "modprobe modulename". If you don't get any errors, then everything should be fine. Verify that it is working by typing "lsmod".

You can try to use the sound now, however, users may not be able to access the DSP device unless you do a few things. There are two ways that you can do this.

Method A: This is the most secure way. First, you need to create a group called "sound". You can do this as root by typing "groupadd sound". Then, edit the /etc/group file with your favorite editor (I use pico), and add the names of all of the people that you'd like to have sound to the group at the bottom of the file. For example: My sound line in the /etc/group file says:

Code:

sound:x:102:root,zborgerd



This makes it so that I can access the DSP. The final step is to change the group of the DSP device. You do this, as root, by typing:

Code:

chgrp sound /dev/dsp*
chgrp sound /dev/mixer*
chgrp sound /dev/midi*



That will make it so that all members of the sound group will have access to the sound and mixer devices.

Method B: This is the less secure, but very simple method. This gives everyone with an account on the box access to the DSP device. I don't suggest using this if you plan on having remote access like SSH or telnet available to friends or other people. But that's entirely up to you. It's as simple as typing:

Code:

chmod 666 /dev/dsp*
chmod 666 /dev/mixer*
chmod 666 /dev/midi*



Remember. This gives everyone with an account access this device. I don't know if there are any potential exploits that can occur, but I usually don't like to give world-writable access to devices.

-------------

There is another important note. Most sound chips are like Winmodems. They really only allow a single stream of PCM audio to the DSP device. Systems like Windows use DirectX to mix audio streams in software, using the CPU. In Linux, you'll get hang-ups on the DSP if two programs try to access it at one time... That is, if your sound chip doesn't support multiple sound streams at one time. This can be remedied (a bit) by having programs like XMMS, GAIM, and others, use an output plugin that mixes audio. Such programs are ESD (Gnome) and ARTSD (KDE).

There is a second option... If you want an easier way of getting sound to work, try the OSS Commercial drivers from 4-Front. You can get these commercial drivers from http://www.opensound.com. They aren't very expensive ($35 USD). They have some unique advanced features, like a professional quality real-time mixer that works like DirectSound does in Windows. It allows multiple audio streams at one time. It has some advanced loopback recording features in the Pro driver version. Installation is very simple. You just have to run a curses-based setup program from a console. It will auto-detect your sound chip and will test and load the proper module. The only thing that you might need to do to se it up is disable any old sound drivers (these tend to load through hotplug's kernel module loader), and tell it to load the new module on start-up. I use these OSS drivers on my machine, and they are great. But I'll probably switch to ALSA when the 2.6 kernel becomes mainstream. There is a demo version available from their web site.

The third option is ALSA (as mentioned above). Many people are using those drivers but I find them to be a bit unstable at this time. They are great if you have the right soundcard, but most modules are a little immature at this time (in my opinion), and the ALSA drivers must emulate the OSS format for 99% of programs these days. I don't feel that now is the right time to use ALSA, but many people are pretty successful with it. I'll likely wait until they are part of the 2.6 kernel before I begin to use them at home. ALSA is a good choice if you want free drivers with support for the newest sound chips.

So, those are the choices...
A) Kernel OSS drivers: Stable, easy to install, poorest sound quality, proven, lacks features.
B) Commercial OSS drivers: Stable, easiest to install, great sound quality, professional quality mixer, proven design (mixer acts strange with the occasional mmap() programs like Quake), many features including things like SPDIF and surround.
C) ALSA: Free, more difficult to install, great sound quality (for most chips), supports plug-ins like JACK, has emulation for the OSS API, will be the future of Linux audio (when 2.6 kernel is released), kinda buggy (in my opinion).
 
Old 10-25-2003, 01:15 AM   #3
flashingcurser
Member
 
Registered: Jan 2003
Distribution: many win/nix/mac
Posts: 259

Original Poster
Rep: Reputation: 32
From my previous post:

Quote:
Software:
2.6.0pre8
alsa
slack 9.1
Thanks

Any thoughts about slack9.1 (that includes alsa) and 2.6.0pre8 kernel that includes alsa built in.



(PS setting up a group for oss devices is slackware sound 101 )
 
Old 10-25-2003, 06:24 AM   #4
320mb
Senior Member
 
Registered: Nov 2002
Location: pikes peak
Distribution: Slackware, LFS
Posts: 2,577

Rep: Reputation: 48
ya, on Slack 9.1 I use the emu10k1 driver and emu-tools.
SB live 5.1 works perfect.........I un-installed the alsa stuff altogether.
you can get these from sourceforge.net
 
Old 10-27-2003, 02:41 PM   #5
flashingcurser
Member
 
Registered: Jan 2003
Distribution: many win/nix/mac
Posts: 259

Original Poster
Rep: Reputation: 32
I have a program that only supports alsa---anyone else?

bump


 
Old 10-27-2003, 04:05 PM   #6
smokybobo
LQ Newbie
 
Registered: Feb 2003
Posts: 29

Rep: Reputation: 15
Did you compile the alsa stuff as modules?

For your reference, I'm using an sblive card as well with the 2.6.0-test9 kernel; the following is relevant output from lsmod:

Code:
snd_emu10k1            77764  1 
snd_rawmidi            22880  1 snd_emu10k1
snd_pcm                87076  2 snd_pcm_oss,snd_emu10k1
snd_timer              22852  1 snd_pcm
snd_seq_device          7560  2 snd_emu10k1,snd_rawmidi
snd_ac97_codec         45828  1 snd_emu10k1
snd_page_alloc         10948  2 snd_emu10k1,snd_pcm
snd_util_mem            4288  1 snd_emu10k1
snd_hwdep               8864  1 snd_emu10k1
snd                    45924  10 snd_pcm_oss,snd_mixer_oss,snd_emu10k1,snd_rawmi
di,snd_pcm,snd_timer,snd_seq_device,snd_ac97_codec,snd_util_mem,snd_hwdep
and from the relevant sound section in /lib/modules/modprobe.conf:

Code:
# ALSA portion
alias /dev/sequencer* snd-emu10k1
alias /dev/dsp* snd-emu10k1
alias /dev/mixer* snd-emu10k1
alias /dev/midi* snd-emu10k1

alias    char-major-116         snd
alias snd-card-0 snd-emu10k1
options snd cards_limit=1

#For Alsa OSS/Free emulation
alias   char-major-14          soundcore
alias sound-slot-0 snd-emu10k1

# OSS/Free portion - card #1
alias sound-service-0-0 snd-mixer-oss
alias sound-service-0-1 snd-seq-oss
alias sound-service-0-3 snd-pcm-oss
alias sound-service-0-8 snd-seq-oss
alias sound-service-0-12 snd-pcm-oss

install sound-slot-0 /sbin/modprobe --ignore-install snd-emu10k1; \
/sbin/modprobe snd-seq-oss;/sbin/modprobe snd-mixer-oss; \
/sbin/modprobe snd-pcm-oss;/sbin/modprobe snd-seq-midi
As you can see, you've got quite a few modules not loaded particularly snd_emu10k1, assuming you did compile all the alsa stuff as modules...

Hope these examples help!
 
Old 10-27-2003, 07:59 PM   #7
flashingcurser
Member
 
Registered: Jan 2003
Distribution: many win/nix/mac
Posts: 259

Original Poster
Rep: Reputation: 32
Thanks smoky,
That got me a little further. I now have the modules loading up, but still no sound. I can now access the mixer--every thing is unmuted and at half volume. I still get the message on startup that Alsa found no sound card. Also when I do a alsaconf it doesnt find a sound card.

Any other thoughts?

Thanks
 
Old 10-27-2003, 09:54 PM   #8
smokybobo
LQ Newbie
 
Registered: Feb 2003
Posts: 29

Rep: Reputation: 15
If you're sure you've got all the necessary modules loaded up, you can check /proc/asound/cards to see if your card is recognized by alsa.

Hmmm.... do you have the sox package installed? What I did when I was troubleshooting and learning how to write the new modprobe.conf file, I used the command-line program 'play' that's distributed with the sox package. Most of the errors I got with this command were something to the effect that /dev/dsp was not a valid device. This meant I had not a module loaded that I needed loaded. Of course, you're free to use any commandline (or even gui) sound program you want, just as long as whatever program will display a useful error message.

For getting your sound system initialized on boot, make sure the 'alsactl' command is somewhere in your startup scripts, or you could test the command yourself on the commandline. After unmuting and setting volume settings with alsamixer, alsactl is what saves and restores your volume settings. 'alsactl -f /etc/asound.state store' to save, 'alsactl -F -f /etc/asound.state restore' to restore.

Note that I don't need nor use alsaconf. If I've got it correctly, alsaconf is used to create $HOME/.asoundrc and/or /etc/asound.conf? As I understand it, practically nothing is dependent on these two configuration files...

I would say the best indication of whether or not alsa loaded properly is to check out all the stuff in the /proc/asound directory. I would also say that at least while troubleshooting not to rely on any startup scripts to load up your sound system on boot and to do things manually (only so that if the problem is in the scripts, you can at least code the 'alsactl' command yourself later on). I would also say if everything looks alright, and no sound player gives any errors (whether it be commandline like 'play' or gui like 'xmms' using the alsa OR the OSS output plugin) in playback, then you've eliminated at least any obvious problems with alsa.

This all assumes you're only trying to get wav output (wav, mp3, ogg, etc). If you want to load up some nice custom soundfonts and play some midi files, that's a slightly different type of fish, but easy once you can play wav files.

Hope this helps, and I hope I haven't been too redundant with information you may or may not already know.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
kernel-2.6.3 compiled with alsa but xmms alsa output dont plays demmylls Linux - General 3 09-01-2006 04:32 AM
Alsa sound *jumpy*: alsa-space: xrun of at least 11.449 msecs. resetting stream qwijibow Linux - General 6 04-22-2006 07:35 PM
ALSA-oss compatability works, but not programs intended for alsa ? qwijibow Linux - Software 5 03-14-2004 07:28 AM
ALSA on Debian, Kernel Source is There Alsa dosent see it? pfizur Linux - Software 3 12-27-2003 08:46 AM
2.6.0 minus built-in ALSA drivers + ALSA 1.0.0rc2 Tino27 Slackware 3 12-19-2003 05:13 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 05:15 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration