LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > SUSE / openSUSE
User Name
Password
SUSE / openSUSE This Forum is for the discussion of Suse Linux.

Notices


Reply
  Search this Thread
Old 05-24-2007, 07:36 PM   #1
Lord_Grave
LQ Newbie
 
Registered: Aug 2005
Posts: 27

Rep: Reputation: 15
Default ALSA device in SUSE 10.0


SUSE 10.0 installs ALSA by default. I updated it with YOU to version 1.0.9-23.2 and I can't seem to configure default device in /etc/asound.conf. All I want is ALSA to use dmix plugin by default so I don't have to specify it separately for each application.

Here's my asound.conf:

pcm.ossmix {
type dmix
ipc_key 1024
slave {
pcm "hw:0,0"
period_time 0
period_size 1024
buffer_size 8192
}
}
pcm.!default {
type plug
slave.pcm "ossmix"
}
pcm.dsp0 {
type plug
slave.pcm "ossmix"
}
ctl.mixer0 {
type hw
card 0
}


Now, when I tell a sound-producing application (aplay, alsaplayer, amaroK, wine, etc) to use dsp0 or ossmix device it works fine and they can all produce sound at the same time. However, if I don't specify a device only one application works although default entry is the same as dsp0. I've also tried to define it with pcm.default or simply to enter "pcm.default pcm.dsp0" line at the end of the file but nothing works.

I've read somewhere that ALSA that comes with SUSE requires default device to be specified with pcm.default (without !) but it seems to be a bad choice because all command line applications report the same ALSA error:

ALSA lib conf.c:1179: (parse_def) default is not a compound
ALSA lib conf.c:1592: (snd_config_load1) _toplevel_:11:13:Invalid argument
ALSA lib conf.c:2837: (snd_config_hook_load) /etc/asound.conf may be old or corrupted: consider to remove or fix it
ALSA lib conf.c:2700: (snd_config_hooks_call) function snd_config_hook_load returned error: Invalid argument
ALSA lib conf.c:3066: (snd_config_update_r) hooks failed, removing configuration


Does anyone know how to configure the default device for ALSA in SUSE 10.0?

Last edited by Lord_Grave; 05-24-2007 at 07:39 PM.
 
Old 05-25-2007, 04:28 PM   #2
tytower
Member
 
Registered: Jun 2006
Location: Oz
Distribution: Mandriva 10.0,10.1,10.2,2006,Mepis 6.0,Opensuse10.2,Puppy 2.14
Posts: 250

Rep: Reputation: 30
I know nothing about the sound really but I see the following in the script
pcm.!default {
type plug
slave.pcm "ossmix"}

the "!" operator usually means "not" but maybe here its a reference to a variable or something.
as I read it it says "if pcm.default is not set" ? or "if pcm is not set to default"
Can someone explain this for me ?

Also Lord Grave where did you find asound.conf and I will have a look at mine in 10.2 ( I see above /etc/alsa.conf but in 10.2 no such file ! )

Last edited by tytower; 05-25-2007 at 04:40 PM.
 
Old 05-25-2007, 10:28 PM   #3
Lord_Grave
LQ Newbie
 
Registered: Aug 2005
Posts: 27

Original Poster
Rep: Reputation: 15
I've found the source of my problem. My default device was already defined in .asoundrc in my home folder, but I could swear it wasn't there when I looked for it before. I must have forgotten to check again after updating alsa or installing alsaplayer.

Anyway, tytower, ALSA can use different configuration files for sound devices. You can use /etc/asound.conf for systemwide settings, ~/.asoundrc for all users (this has the same effect as /etc/asound.conf and I have no idea which of the two seems to take precendence). You can also define devices for a single user with .asoundrc in a home directory. It seems that the home directory .asoundrc has the greatest priority, so you can set devices for all users and then define specific settings for specific users. If you are into programming, it's just like defining a class and then another that inherits it but can have some new or redefined properties.

Thanks for trying to help.
 
  


Reply

Tags
alsa, asound, asoundrc, default, suse



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 the alsa default device Byenary Linux - Newbie 3 06-12-2005 12:52 PM
default alsa device? tw001_tw Slackware 3 10-21-2004 11:20 AM
ALSA error: ALSA device "default" is already in use by another program. darkleaf Linux - Software 2 07-20-2004 04:34 PM
Set default ALSA device redneon Linux - Software 2 06-01-2004 09:02 AM
ALSA: Setting default device, MDK10-C. nATEmATE Linux - Software 0 05-07-2004 05:54 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > SUSE / openSUSE

All times are GMT -5. The time now is 11:37 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