LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
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 02-21-2005, 11:18 AM   #1
jp_
LQ Newbie
 
Registered: Feb 2005
Location: East Coast, USA
Distribution: Slackware
Posts: 27

Rep: Reputation: 15
Dual Soundcards in ALSA


In the older versions of slackware ( 9.0 and 10.0 ) I was able to get my sound system running ... usually without any fuss.

It seems since 10.1 though I haven't been able to get them working toghether.

Following the instructions on the ALSA site I can get either my Plantronics DSP-500 OR my Createive Audigy Gamer (emu10k1) working standalone.

The problem is when I try to get them working together. This used to work... but it doesn't seem to want to work anymore and I was hoping to get some input as to why?

Here goes!

Looks like soundcore is present.
Code:
bash-3.00# modinfo soundcore
filename:    /lib/modules/2.4.29/kernel/drivers/sound/soundcore.o.gz
description: "Core sound module"
author:      "Alan Cox"
license:     "GPL"
Cofigure with USB audio && emu10k1
Code:
./configure --with-cards=emu10k1 --with-cards=usb-audio --with-sequencer=yes;make;make install
Then...
Code:
chmod a+rw /dev/dsp /dev/mixer /dev/sequencer /dev/midi
And finally...
Code:
modprobe snd-emu10k1;modprobe snd-usb-audio;modprobe snd-pcm-oss;modprobe snd-mixer-oss;modprobe snd-seq-oss
To wrap it all up I create a modules.conf in /etc
Code:
bash-3.00# cat modules.conf
# ALSA portion
alias char-major-116 snd
alias snd-card-1 emu10k1
alias snd-card-0 snd-usb-audio
#options snd major=116 cards_limit=2
options emu10k1 index=1
options snd-usb-audio index=0

# OSS/Free portion
alias char-major-14 soundcore

# Card #0 - Plantronics DSP-500
alias sound-slot-0 snd-card-0
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

# Card #1 - Creative Audigy Gamer
alias sound-slot-1 snd-card-1
alias sound-service-1-0 snd-mixer-oss
alias sound-service-1-1 snd-seq-oss
alias sound-service-1-3 snd-pcm-oss
alias sound-service-1-8 snd-seq-oss
alias sound-service-1-12 snd-pcm-oss

#alias /dev/mixer snd-mixer-oss
#alias /dev/dsp snd-pcm-oss
#alias /dev/midi snd-seq-oss
#below snd-card-1 snd-mixer-oss snd-seq-oss snd-pcm-oss
#alias /dev/sequencer snd-seq-oss

alias char-major-195 nvidia
Keep in mind this used to work... no idea why it doesn't now. Any help would be really appreciated =)
 
Old 02-21-2005, 05:35 PM   #2
jp_
LQ Newbie
 
Registered: Feb 2005
Location: East Coast, USA
Distribution: Slackware
Posts: 27

Original Poster
Rep: Reputation: 15
**bump** anyone?
 
Old 02-22-2005, 04:08 AM   #3
linuxbuck2000
LQ Newbie
 
Registered: Nov 2004
Posts: 4

Rep: Reputation: 0
run "alsamixer" look for MM under any playback controls if so those are muted use "m M" and "<>"
to unmute. sorry cant think of anything else at moment to tired.

hope that helped.
 
Old 02-22-2005, 09:05 AM   #4
jp_
LQ Newbie
 
Registered: Feb 2005
Location: East Coast, USA
Distribution: Slackware
Posts: 27

Original Poster
Rep: Reputation: 15
Thanks for the tip. I'm very familiar with alsamixer and alsactl. I always unmute after install.

I can get sound working for either device if I compile the alsa drivers and libs seperately. The problem seems when I try to ./configure with --cards-emu10k1 and --cards-usb-audio at the same time. One of the devices will install and the other will not. Perhaps the syntax is wrong for the ./configure.


When I do an lsmod either usb-audio OR emu10k1 are missing.


In this particular case I compiled. With...

./configure --with-cards=usb-audio --with-cards=emu10k1 --with-sequencer=yes;make;make install

The USB headset works perfectly however emu10k1 doesn't show up in lsmod. Ideas?
 
Old 02-22-2005, 09:53 AM   #5
gbonvehi
Senior Member
 
Registered: Jun 2004
Location: Argentina (SR, LP)
Distribution: Slackware
Posts: 3,145

Rep: Reputation: 51
Try:
Code:
/configure --with-cards=usb-audio;emu10k1 --with-sequencer=yes;make;make install
 
Old 02-22-2005, 04:50 PM   #6
jp_
LQ Newbie
 
Registered: Feb 2005
Location: East Coast, USA
Distribution: Slackware
Posts: 27

Original Poster
Rep: Reputation: 15
Quote:
Originally posted by gbonvehi
Try:
Code:
/configure --with-cards=usb-audio;emu10k1 --with-sequencer=yes;make;make install
Almost had it... it seems to be , instead of ; for the seperator of each card.

Thanks a-bunch!
 
Old 02-23-2005, 01:01 AM   #7
jp_
LQ Newbie
 
Registered: Feb 2005
Location: East Coast, USA
Distribution: Slackware
Posts: 27

Original Poster
Rep: Reputation: 15
I suppose one last question on this matter is in order.

Now that I have 2 working soundcards. Is there an easy way to switch between then without rebooting?

I made the Plantronics DSP-500 the primary. If I boot without it connected then the Audigy Gamer (emu10k1) defaults as the primary. But that's a hassle. Any ideas?


And thanks everyone for the help =)
 
Old 12-11-2006, 03:31 PM   #8
anamericanjoe
Member
 
Registered: May 2006
Posts: 69

Rep: Reputation: 16
Make an .asoundrc file in your home directory

There is an easy way to switch between sound cards without needing to reboot. This is the solution I've come up with, and so far it works quite well.

In order to make this work, first I needed to gather some information on how ALSA looks at my sound cards. To do this, I used

Code:
aplay -l
aplay is a command-line sound recorder and player for ALSA soundcard driver. The -l option lists all soundcards and digital audio devices.

The out put I got from the command above looked something like this:

Code:
**** List of PLAYBACK Hardware Devices ****
card 0: I82801DBICH4 [Intel 82801DB-ICH4], device 0: Intel ICH [Intel 82801DB-ICH4]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: I82801DBICH4 [Intel 82801DB-ICH4], device 4: Intel ICH - IEC958 [Intel 82801DB-ICH4 - IEC958]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: Headset [Plantronics Headset], device 0: USB Audio [USB Audio]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
Notice how my integrated sound card is labeled card 0 and my Plantronics DSP 500 is labeled card 1. Depending on how ALSA loads your cards, these may be reversed. The important thing is to note that ALSA refers to one card by 0 and the other by 1.

Now, to switch between cards, simply create a file named .asoundrc in your home directory. .asoundrc is a file where you can create a customized configuration for ALSA.

Since my integrated sound card is the default, I wanted to be able to switch to my Plantronics device without rebooting. Since ALSA refers to that device as card 1, I added the following to my .asoundrc file:

Code:
pcm.!default {
        type hw 
        card 1  
}
ctl.!default {
        type hw        
        card 1  
}
Here I'm creating two rules that tell ALSA I would like card 1 to be the default device for output. Switching the output back to card 0, my integrated sound card, is trivial:

Code:
pcm.!default {
        type hw 
        card 0  
}
ctl.!default {
        type hw        
        card 0  
}
Now, sound comes through my speakers rather than my Headset.

Since I only need to change two numbers in one file to make this switch happen, I imagine it would be quite easy to create a simple script that toggles these numbers for you automatically.

Last edited by anamericanjoe; 12-11-2006 at 03:37 PM.
 
1 members found this post helpful.
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
setting up two soundcards with alsa. shorty_boy Linux - Software 0 06-29-2005 07:22 PM
multiple soundcards lead to ALSA problems?? timsch75 Slackware 8 03-13-2005 12:10 PM
Configure Two soundcards, ALSA...How? Outabux Debian 0 12-15-2004 12:48 PM
Two soundcards and ALSA josiah Linux - Hardware 0 09-11-2004 02:57 PM
ALSA Problem: 2 soundcards, wrong order PrivatePanic Linux - Hardware 4 09-04-2003 01:15 PM


All times are GMT -5. The time now is 01:57 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration