Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Getting sound to work -- delicately
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Multimedia
View previous topic :: View next topic  
Author Message
Ourumov
n00b
n00b


Joined: 19 Apr 2005
Posts: 48

PostPosted: Thu Jun 30, 2005 5:27 pm    Post subject: Getting sound to work -- delicately Reply with quote

I recently started a new development job working in a Gentoo envorinmnet. Because our development boxes are set up as deployment boxes, I have to be very careful bout what I emerge. For instance, we are still running firefox .8 and netbeans 3.5.1 because the latest versions break something I guess. Because our product is a hardware/software solution, we can afford that fragility for deployment. But it makes daily use a nightmare.

I need sound. I have some less than helpful ppl in the building and they won't take the time to get my ound set up correctly. If I don't have tunes so I'm going to go insane. I've got XMMS installed but don't have a /dev/sound device. I'm using onboard sound which i assume is AC3 compatible, but don't know the exact make/model. I'm guessing I need a sound driver such as alsa so I qpkg'ed alsa and got this.
Code:
qpkg -I -v alsa
media-libs/alsa-lib-0.9.8 *



How can I set up the sound in a most delicate manner? I hope I don't have to emerge too much or install any modules, but I will do what is necessary. I NEED music to work.

BTW if anyone can point out a good ftp client that works with openbox I would grately appreciate it. Command line ftp doesn't work well down browsing through 160GB of mp3's at home.
Back to top
View user's profile Send private message
BradN
Advocate
Advocate


Joined: 19 Apr 2002
Posts: 2391
Location: Wisconsin (USA)

PostPosted: Thu Jun 30, 2005 7:07 pm    Post subject: Reply with quote

First, do lspci and find what sound hardware you have (lspci is part of pciutils - it should be safe to emerge this)

check to see if /proc/asound exists - if it does, alsa is loaded (but maybe not the card driver)

Then, check in /lib/modules/<kernelversion>/drivers and see if there is any sound related stuff you can try loading

If you can't find a module for your card (or can't get alsa loaded at all), you'll have to compile it into the kernel, which I would do by emerging the sources for the exact same kernel you're running now (if possible), as this will allow you to compile modules and potentially not need to update the kernel itself. If there's no sound support at all in the current kernel, you might still need to update it - i'm not sure.

an alternative way to get the drivers installed is emerging alsa-driver. I believe this might also require the kernel sources to be installed.

In any event, make a backup of your current kernel if you'll be replacing that, and make a backup of the kernel modules in /lib/modules - it should be simple enough to restore them in the unlikely event that something gets messed up badly.

once the driver is there and loaded, you'll just have to emerge alsa-lib if you haven't already and all should be well. add alsasound to the "boot" runlevel (rc-update add alsasound boot) to have alsa save/restore your mixer settings at startup/shutdown (or don't, if you're paranoid)

That's about it - good luck
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54304
Location: 56N 3W

PostPosted: Thu Jun 30, 2005 7:27 pm    Post subject: Reply with quote

Ourumov,

You will need about 8 kernel modules, and alsa-mixer, which will also get you alsa-lib.
There is probably no need to recompile your kernel unless your admin has removed module support. If that is the case, install another kernel beside your existing kernel and put it in the grub menu.

Assuming you will be going for additional modules, you need to choose the following in make menuconfig, this means you need the source tree for your running kernel.
Code:
Sound card support
Advanced Linux Sound Architecture
Sequencer support
OSS Mixer API
OSS PCM (digital audio) API
OSS Sequencer API
RTC Timer support

and under PCI devices, choose the driver for your hardware.
Next, make and install your new modules with
Code:
make modules
make modules_install


Thats about as delecate as it gets. The setup is described here http://www.gentoo.org/doc/en/alsa-guide.xml
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Ourumov
n00b
n00b


Joined: 19 Apr 2005
Posts: 48

PostPosted: Thu Jun 30, 2005 8:02 pm    Post subject: Reply with quote

BradN wrote:
First, do lspci and find what sound hardware you have (lspci is part of pciutils - it should be safe to emerge this)

check to see if /proc/asound exists - if it does, alsa is loaded (but maybe not the card driver)

Then, check in /lib/modules/<kernelversion>/drivers and see if there is any sound related stuff you can try loading

If you can't find a module for your card (or can't get alsa loaded at all), you'll have to compile it into the kernel, which I would do by emerging the sources for the exact same kernel you're running now (if possible), as this will allow you to compile modules and potentially not need to update the kernel itself. If there's no sound support at all in the current kernel, you might still need to update it - i'm not sure.

an alternative way to get the drivers installed is emerging alsa-driver. I believe this might also require the kernel sources to be installed.

In any event, make a backup of your current kernel if you'll be replacing that, and make a backup of the kernel modules in /lib/modules - it should be simple enough to restore them in the unlikely event that something gets messed up badly.

once the driver is there and loaded, you'll just have to emerge alsa-lib if you haven't already and all should be well. add alsasound to the "boot" runlevel (rc-update add alsasound boot) to have alsa save/restore your mixer settings at startup/shutdown (or don't, if you're paranoid)

That's about it - good luck


lspci shows I have 00:1f.5 Multimedia audio controller: Intel Corp. 82801DB AC'97 Audio (rev 02) for a sound card. I do not have anything similar to /proc/asound, and there isnt anything sound related in /lib/modules/2.6.10/kernel/drivers.

I'll tried emerging alsa-driver and got the following message

Code:
Please, install the package with full kernel sources for your distribution
or use --with-kernel=dir option to specify another directory with kernel
sources (default is /usr/src/linux).
 
!!! ERROR: media-sound/alsa-driver-0.9.8 failed.
!!! Function src_compile, Line 61, Exitcode 1
!!! ./configure failed



I'm running through make menuconfig right now and I'll repost if I have issues finding the proper module I need.
Back to top
View user's profile Send private message
Ourumov
n00b
n00b


Joined: 19 Apr 2005
Posts: 48

PostPosted: Thu Jun 30, 2005 8:19 pm    Post subject: Reply with quote

[quote="NeddySeagoon"]
Code:
Sound card support
Advanced Linux Sound Architecture
Sequencer support
OSS Mixer API
OSS PCM (digital audio) API
OSS Sequencer API
RTC Timer support


Strangly I have all of these already complied in the kernel (not modules) including Intel/SiS/nVidia/AMD/ALi AC97 Controller, with the eception of RTC Timer Support (couldn't find that). But I still couldn't emerge alsa-driver. Now I'm kinda at a stand still. Everyting apears to be enabled in the kernel, unless the installation was a real slop job. Should I just try recompiling the kernel with the current configuration and try booting from that? I just have to change the symlink right?

I'ma read through the alsa faq too.


Last edited by Ourumov on Thu Jun 30, 2005 8:26 pm; edited 1 time in total
Back to top
View user's profile Send private message
BradN
Advocate
Advocate


Joined: 19 Apr 2002
Posts: 2391
Location: Wisconsin (USA)

PostPosted: Thu Jun 30, 2005 8:24 pm    Post subject: Reply with quote

If you recompile the kernel, you'll want to actually be running that kernel (and btw, alsa-drivers doesn't install anything if you included the drivers in the kernel, but I think emerging alsa-lib will still pull in alsa-drivers to do its nothingness)

Try it running under the new kernel and see what happens (as NeddySeagoon said, just add another entry in your bootloader so you don't have to delete the old kernel).
Back to top
View user's profile Send private message
Ourumov
n00b
n00b


Joined: 19 Apr 2005
Posts: 48

PostPosted: Thu Jun 30, 2005 8:34 pm    Post subject: Reply with quote

Ok.. so after all this it was a matter of emerging alsa-utils, adding alsasound to init.d, and starting it. It was there all along. WEEEE MUSIC!!!!


Thanks guys!
Back to top
View user's profile Send private message
basvanlola
n00b
n00b


Joined: 10 Oct 2004
Posts: 52
Location: Eefde, The Netherlands

PostPosted: Thu Jun 30, 2005 8:34 pm    Post subject: Reply with quote

If you're going to emerge alsa-drivers make sure that you configure the kernel with Device Drivers->Sound->Sound card support [M] and clear everything under ALSA and OSS. The guide mentioned a few post above is a bit unclear on that subject, took me a couple of attempts to get alsa-driver working...
_________________
Athlon-XP 2000 @ 2083MHz
Asus A7V8X-X
1 GB DDR-333 ram
nVidia Geforce FX-5500
120 GB Maxtor 6Y120P0
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54304
Location: 56N 3W

PostPosted: Thu Jun 30, 2005 8:39 pm    Post subject: Reply with quote

Ourumov,

To build alsa-drivers (or any kernel modules) requires the kernel source.
emerge =gentoo-sources-2.6.10.... will get you a 2.6.10 but you need to know your -r number too.

If you are going to this bother, you may as well get a whole new kernel.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
BradN
Advocate
Advocate


Joined: 19 Apr 2002
Posts: 2391
Location: Wisconsin (USA)

PostPosted: Thu Jun 30, 2005 8:41 pm    Post subject: Reply with quote

Of course, the other major gotcha with alsa is forgetting to unmute your card...
Back to top
View user's profile Send private message
Ourumov
n00b
n00b


Joined: 19 Apr 2005
Posts: 48

PostPosted: Fri Jul 01, 2005 2:55 pm    Post subject: Reply with quote

I was closer than I originally assumed.

1. emerge alsa-utils (no sources flag or anything)
2. rc-update add alsasound boot
3. /etc/init.d alsasound start
4. Unmute the sound using the alsamixer
5. PLAY TUNES!!!

Thanks for all the hlep people. Gentoo forums are the best.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Multimedia All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum