Linux - HardwareThis forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with 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.
I have a strange problem with my sound. The best way to summarize the error is that no two applications can mix their output to the default output channel.
When I start my computer, the first application to use to the default sound channel seems to have a lock on the channel. No other applications can use that channel until I reboot again. I can close the first application and still nothing can access that other channel.
When a second application tries to access the default channel one of two things happen. Most application's sound gets routed to the headphone channel. In other cases I get error messages that the device is busy.
I suspect that this is a related issue, whenever I use the command line command 'play' I get the following error:
Quote:
ALSA lib pcm_dmix.c1008snd_pcm_dmix_open) unable to open slave
play formats: can't open output file `default': cannot open audio device
Now when I restart the drivers using "/etc/init.d/alsasound restart". All these problems are gone. So this is not a major issue, its just a little annoying. I realize I can add a little script within init.d to do the restart, however, I am a person that likes to avoid work-around solutions. So any thoughts on this problem is greatly appreciated.
So a little information about my hardware/software:
I have been getting some help on other Forums (Thanks to BenderBendingRodriguez on the openSuse forums). I have been trying to restart the driver in the boot up sequence. If it is restarted too early then the problem still persists.
I went through a tutorial on (http://en.opensuse.org/AudioTroubleshooting) on debugging the sound card information. Like many tutorials, it is focused on getting sound, not solving the more esoteric problems like mine. Hence, many of the things (setting permissions, etc.) had no effect.
The tutorial recommended running some diagnostic scripts. So I have run them and shared the output. I have run the diagnostics before the driver restart when there is a problem, and then after when there is no longer a problem.
There are differences in the output of alsa-info.sh. I have given a diff between the two files below. The big differences that I can see is that the pulseaudio is no longer running after the restart (line 50 diff).
The next differences are in the HDA Codec information. They are on line 112 and 119 of the diagnostic output. I have given that section of the alsa-info.sh diagnostics below for inspection.
Also there is another program used in Suse called Phonom. The tutorial said this could cause problems aswell. I am not sure what role that program plays so I can't really say much more.
I am venturing into very unfamiliar territory. Could someone help interpret the diagnostics? Or, give hints on what role pulseaudio, or phonon plays in the sound processing? would they really make a difference for this problem? I have no clue and would like to know more.
Thanks
Take Care
PILOTMM
BEFORE THE DRIVER RESTART
=========================
The diagnostic scripts are showing that the problem could be with pulseaudio. So I restarted the driver, this forces pulse audio to shutdown, but not restart.
This is when I don't have the problems anymore. For experimentation purposes I restarted the pulseaudio daemon and I had the same problems again.
So I am pretty confident that the problem is with pulseaudio. It seems to be blocking other applications from using my sound system.
I rebooted, instead of re-starting the driver, I decided that I would kill the pulseaudio daemon. I did that, however that wasn't enough to stop the problem. This leads me to believe that pulse audio is not letting go of the alsa channels. Any thoughts? I am too tired to debug this problem any more. Appreciate the help so far.
You can add the following lines to $HOME/.asoundrc
Code:
pcm.!default {
type pulse
}
ctl.!default {
type pulse
}
It should use PulseAudio for everything. If your ALSA module for your sound card is using dmix by default, you have to turn that off. I do not remember the proper way of disabling dmix. In that case, set PulseAudio to use dmix. From what I read, PulseAudio should use hw:0.0 for the first card and hw:1.0 for the second card.
If the above code works, you make as the global by placing it in /etc/asound.conf.
I did take your advice. I assume we have different distro's. I am running KDE 4 on openSuse 11.1. None of the config files you mentioned exist. I did create them and add your code but it didn't work. I did find one configuration file, something called asound-local.conf. It had a similar set of code as what you suggested. I did modify it to your suggestion, but still it didn't work. Thanks for the suggestion though.
I have been reading a lot about others having pulseaudio problems. It seems to be a distribution issue though. I have started a new thread in the openSuse forums:
Well first off I just wanted to thank everyone who offered help. I finally have fixed my problem. I posted to several threads, so I have summarized them below with links. So if you are having similar problems you can read about my experience below. I have tried to give detailed accounts. So hopefully there is enough information that you can fix it a lot easier than it was for me.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.