LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 06-14-2009, 10:28 PM   #1
pilotmm
LQ Newbie
 
Registered: Aug 2007
Distribution: openSuse
Posts: 26

Rep: Reputation: 2
Applications cannot share sound channels


Hello All

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:

Motherboard: Asus M3N78-VM (onboard sound)
Kernel Version: 2.6.27.23-0.1
Distro: openSuse 11.1

abridged output of /sbin/lspci:
===============================
00:07.0 Audio device: nVidia Corporation MCP78S [GeForce 8200] High Definition Audio (rev a1)
 
Old 06-16-2009, 12:31 AM   #2
pilotmm
LQ Newbie
 
Registered: Aug 2007
Distribution: openSuse
Posts: 26

Original Poster
Rep: Reputation: 2
Hello All

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
=========================

Quote:
mike@pilotLinux:/proc/asound> echo "VERSION:" ; cat version ; echo "MODULES:" ; cat modules ; echo "CARDS:" ; cat cards
VERSION:
Advanced Linux Sound Architecture Driver Version 1.0.17.
MODULES:
0 snd_hda_intel
CARDS:
0 [NVidia ]: HDA-Intel - HDA NVidia
HDA NVidia at 0xfcf78000 irq 20
alsa-info.sh output:
--------------------
http://www.alsa-project.org/db/?f=40...8c02e0f9057095

AFTER THE DRIVER RESTART
========================

Quote:
mike@pilotLinux:/proc/asound> echo "VERSION:" ; cat version ; echo "MODULES:" ; cat modules ; echo "CARDS:" ; cat cards
VERSION:
Advanced Linux Sound Architecture Driver Version 1.0.17.
MODULES:
0 snd_hda_intel
CARDS:
0 [NVidia ]: HDA-Intel - HDA NVidia
HDA NVidia at 0xfcf78000 irq 20
alsa-info.sh output:
--------------------
http://www.alsa-project.org/db/?f=ef...502b02be7abb9f

alsa-info.sh output:
====================

Quote:
mike@pilotLinux:~> diff alsaInfoBefore alsaInfoAfter
5c5
< !!Script ran on: Tue Jun 16 04:25:07 UTC 2009
---
> !!Script ran on: Tue Jun 16 04:39:02 UTC 2009
50c50
< Running - Yes
---
> Running - No
112c112
< Converter: stream=0, channel=0
---
> Converter: stream=5, channel=0
119c119
< Converter: stream=0, channel=0
---
> Converter: stream=5, channel=0
301c301
< Converter: stream=0, channel=0
---
> Converter: stream=5, channel=0
435,442c435,442
< crw-rw---- 1 root audio 116, 8 Jun 16 00:02 /dev/snd/controlC0
< crw-rw---- 1 root audio 116, 7 Jun 16 00:02 /dev/snd/hwC0D0
< crw-rw---- 1 root audio 116, 6 Jun 16 00:02 /dev/snd/hwC0D3
< crw-rw---- 1 root audio 116, 5 Jun 16 00:03 /dev/snd/pcmC0D0c
< crw-rw---- 1 root audio 116, 4 Jun 16 00:03 /dev/snd/pcmC0D0p
< crw-rw---- 1 root audio 116, 3 Jun 16 00:02 /dev/snd/pcmC0D3p
< crw-rw---- 1 root audio 116, 9 Jun 16 00:02 /dev/snd/seq
< crw-rw---- 1 root audio 116, 2 Jun 16 00:02 /dev/snd/timer
---
> crw-rw---- 1 root audio 116, 8 Jun 16 00:36 /dev/snd/controlC0
> crw-rw---- 1 root audio 116, 7 Jun 16 00:36 /dev/snd/hwC0D0
> crw-rw---- 1 root audio 116, 6 Jun 16 00:36 /dev/snd/hwC0D3
> crw-rw---- 1 root audio 116, 5 Jun 16 00:36 /dev/snd/pcmC0D0c
> crw-rw---- 1 root audio 116, 4 Jun 16 00:37 /dev/snd/pcmC0D0p
> crw-rw---- 1 root audio 116, 3 Jun 16 00:36 /dev/snd/pcmC0D3p
> crw-rw---- 1 root audio 116, 9 Jun 16 00:36 /dev/snd/seq
> crw-rw---- 1 root audio 116, 2 Jun 16 00:36 /dev/snd/timer
452c452
< Subdevices: 2/2
---
> Subdevices: 1/2
953a954,962
> snd_pcm_oss
> snd_mixer_oss
> snd_seq
> snd_seq_device
> snd_hda_intel
> snd_pcm
> snd_timer
> snd_page_alloc
> snd_hwdep
979,987d987
< snd_pcm_oss
< snd_mixer_oss
< snd_seq
< snd_seq_device
< snd_hda_intel
< snd_pcm
< snd_timer
< snd_page_alloc
< snd_hwdep
Codec info before restart:
==========================

Quote:
Node 0x10 [Audio Output] wcaps 0x411: Stereo
Converter: stream=0, channel=0
PCM:
rates [0x5e0]: 44100 48000 88200 96000 192000
bits [0xa]: 16 24
formats [0x1]: PCM
Power: setting=D0, actual=D0
Node 0x11 [Audio Output] wcaps 0x411: Stereo
Converter: stream=0, channel=0
PCM:
rates [0x5e0]: 44100 48000 88200 96000 192000
bits [0xa]: 16 24
formats [0x1]: PCM
Power: setting=D0, actual=D0
Codec info after restart:
=========================

Quote:
Node 0x10 [Audio Output] wcaps 0x411: Stereo
Converter: stream=5, channel=0
PCM:
rates [0x5e0]: 44100 48000 88200 96000 192000
bits [0xa]: 16 24
formats [0x1]: PCM
Power: setting=D0, actual=D0
Node 0x11 [Audio Output] wcaps 0x411: Stereo
Converter: stream=5, channel=0
PCM:
rates [0x5e0]: 44100 48000 88200 96000 192000
bits [0xa]: 16 24
formats [0x1]: PCM
Power: setting=D0, actual=D0
 
Old 06-16-2009, 12:49 AM   #3
pilotmm
LQ Newbie
 
Registered: Aug 2007
Distribution: openSuse
Posts: 26

Original Poster
Rep: Reputation: 2
Just a little update:

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.

Any insights would be much appreciated.

Take Care
PILOTMM
 
1 members found this post helpful.
Old 06-16-2009, 01:10 AM   #4
pilotmm
LQ Newbie
 
Registered: Aug 2007
Distribution: openSuse
Posts: 26

Original Poster
Rep: Reputation: 2
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.

Take Care
PILOTMM
 
Old 06-16-2009, 01:14 AM   #5
Electro
LQ Guru
 
Registered: Jan 2002
Posts: 6,042

Rep: Reputation: Disabled
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.
 
Old 06-20-2009, 01:52 AM   #6
pilotmm
LQ Newbie
 
Registered: Aug 2007
Distribution: openSuse
Posts: 26

Original Poster
Rep: Reputation: 2
Hello electro

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:

http://forums.opensuse.org/applicati...lse-audio.html

I will be posting my progress there from now on. Thanks a lot.

Take Care
PilotMM
 
Old 06-23-2009, 12:41 AM   #7
pilotmm
LQ Newbie
 
Registered: Aug 2007
Distribution: openSuse
Posts: 26

Original Poster
Rep: Reputation: 2
Hello All

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.

Take Care
PilotMM

Original Post when I first noticed the problem:
http://forums.opensuse.org/hardware/...o-channel.html

An attempt at using a work-around solution:
http://forums.opensuse.org/install-b...p-process.html

Armed with new information I made several posts about the debugging process:
http://www.linuxquestions.org/questi...=1#post3575436

Once the problem was identified I used this thread to discuss what I did to resolve the problem:
http://forums.opensuse.org/applicati...ml#post2003118

Last edited by pilotmm; 06-23-2009 at 12:42 AM.
 
Old 06-23-2009, 03:31 PM   #8
tredegar
LQ 5k Club
 
Registered: May 2003
Location: London, UK
Distribution: Fedora38
Posts: 6,147

Rep: Reputation: 435Reputation: 435Reputation: 435Reputation: 435Reputation: 435
Thanks for posting the follow-up and the solution that worked for you, I'm sure it'll help others in a similar situation.
 
  


Reply



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
Sound Cmedia CMI9761 - Surround Sound, only getting 2 channels stuartornum Linux - Hardware 0 01-20-2008 09:41 AM
Sound program to allocate my surround sound channels Christof999 Linux - Software 1 12-27-2006 07:04 PM
Share Sound Resources Between Applications mac57 SUSE / openSUSE 0 10-17-2005 02:04 PM
Don't know how to share channels with ALSA borrrden Linux - Hardware 14 05-07-2004 12:28 PM
Independent sound channels? Phantomas Linux - General 3 08-21-2003 02:43 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

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