SUSE / openSUSEThis Forum is for the discussion of Suse Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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.
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 ! )
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.