LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
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 04-10-2013, 11:05 PM   #1
bmarley83
Member
 
Registered: Apr 2013
Location: Pennsylvania
Distribution: Slackware, Debian
Posts: 185

Rep: Reputation: 32
Alsa sound multiple streams


Hello I've been having a sound problem since I installed Slackware 14 x64 that I have not found a solution for after scouring the web and I was hope someone could help me. My sound device is onboard ALC888 that reports as Intel HDA in in kmix and alsamix. My problem is that without some code that I added to .asoundrc in my home directory I cannot get sound to play back on multiple programs at the same time (i.e. playing youtube video while playing vlc while using painobar etc...). In fact I cant even play pianobar and watch youtube at the same time with out that script because when one is playing the other reports a device or resource busy. Now with the code in the script first off my kmix crashes and wont load. Also my wine games wont load at all and steam games wont load. If I disable the script and logout and login again steam games play but I get skipping audio and buffer overflow errors reported in terminal from steam. So I'm at a loss its either load the script and kmix crashes and I cant play any games... boohoo you poor boy lol, or I dont and games work except tf2 in steam witch gives me buffer overflow errors from the soundcard and audio skips, and if I play youtube in ff then try to play vlc player or pianobar they report device busy and dont playback.

}
pcm.internalDmixed {
type dmix
ipc_key 1024
ipc_key_add_uid false
ipc_perm 0666
slave {
pcm "internal"
period_time 0
period_size 2048
channels 4
}
bindings {
0 0
1 1
2 2
3 3
}

there is my .asoundrc, wth am I doing wrong here?
 
Old 04-11-2013, 02:00 AM   #2
dugan
LQ Guru
 
Registered: Nov 2003
Location: Canada
Distribution: distro hopper
Posts: 11,223

Rep: Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320
To get software mixing that always works, all I do is edit /etc/rc.d/rc.alsa and comment out the load_alsa_oss_modules lines. That will prevent anything from running in OSS Emulation mode. Anything running in OSS emulation mode would get exclusive use of the sound card and block everything else from using it. Anything not running in OSS emulation mode gets software mixing, and that's been true for quite a few years.
 
5 members found this post helpful.
Old 04-11-2013, 06:29 PM   #3
bmarley83
Member
 
Registered: Apr 2013
Location: Pennsylvania
Distribution: Slackware, Debian
Posts: 185

Original Poster
Rep: Reputation: 32
Thank you, Dugan! I'm still learning Slackware obviously and I appreciate you taking the time to answer my question. Now that my sound works perfectly for everything including TF2 in Steam ... I am working on optimizing my Slackware machine for optimal performance (which I now realize I should have considered the first steps of optimization before installing! XD ). This will just give me a chance to practice backing up my system. Anyway, your solution solved all my audio problems! Thanks.

Last edited by bmarley83; 04-11-2013 at 06:31 PM.
 
Old 05-09-2013, 04:49 PM   #4
Geremia
Member
 
Registered: Apr 2011
Distribution: slackware64-current
Posts: 497

Rep: Reputation: 45
Quote:
Originally Posted by dugan View Post
To get software mixing that always works, all I do is edit /etc/rc.d/rc.alsa and comment out the load_alsa_oss_modules lines. That will prevent anything from running in OSS Emulation mode. Anything running in OSS emulation mode would get exclusive use of the sound card and block everything else from using it. Anything not running in OSS emulation mode gets software mixing, and that's been true for quite a few years.
I'm using Slackware, and I commented out all instances of load_alsa_oss_modules and this in rc.alsa:
Code:
# A function to load the ALSA OSS compat modules:                                                                             
# load_alsa_oss_modules() {                                                                                                   
#   if modprobe -c | tr _ - | grep -wq snd-pcm-oss ; then                                                                     
#     if ! cat /proc/modules | tr _ - | grep -wq snd-pcm-oss ; then                                                           
#       echo "Loading OSS compatibility modules for ALSA."                                                                    
#       modprobe snd-pcm-oss                                                                                                  
#       modprobe snd-seq-oss                                                                                                  
#       modprobe snd-mixer-oss                                                                                                
#     fi                                                                                                                      
#   fi                                                                                                                        
# }
Yet, I still can't mix multiple applications' sound together. (I've rebooted and everything.)

E.g., if I try playing audio in two difference instances of VLC, VLC gives me an error about how the "default" audio device cannot be used because the device or resource is busy.

Last edited by Geremia; 05-09-2013 at 04:50 PM.
 
Old 05-10-2013, 11:20 AM   #5
Paulo2
Member
 
Registered: Aug 2012
Distribution: Slackware64 15.0 (started with 13.37). Testing -current in a spare partition.
Posts: 928

Rep: Reputation: 515Reputation: 515Reputation: 515Reputation: 515Reputation: 515Reputation: 515
Quote:
Originally Posted by Geremia View Post
Yet, I still can't mix multiple applications' sound together. (I've rebooted and everything.)
I was having the same problem.
Be sure you've selected "default" on VLC audio out configuration (or "alsa" in SMPlayer).

My other problem was that I have this in "~/.asoundrc", this is for equalization launched by "alsamixer -D equal"
Code:
ctl.equal {
  type equal;
}

pcm.plugequal {
  type equal;
  # Modify the line below if you don't
  # want to use sound card 0.
  slave.pcm "plughw:0,0";
  # or if you want to use with multiple applications output to dmix
  slave.pcm "plug:dmix"
}

#pcm.equal {
  # Or if you want the equalizer to be your
  # default soundcard uncomment the following
  # line and comment the above line.
 pcm.!default {
  type plug;
  slave.pcm plugequal;
}
The line "slave.pcm "plug:dmix"" was commented, preventing two streams at the same time.

I would like to say thank you to dugan for the helpful post


I was thinking that could be a problem with groups and permissions, according to this post
http://www.linuxquestions.org/questi...a-dmix-823255/
but it wasn't the case.

Excuse me for any english erros.
 
Old 05-10-2013, 11:31 AM   #6
dimm0k
Member
 
Registered: May 2008
Location: Brooklyn ZOO
Distribution: Slackware64 14.2
Posts: 564

Rep: Reputation: 56
Wow, I have to give thanks to dugan and the OP for this thread. Didn't know it was so simple to get mixing to work as I have always had a pretty lengthy .asoundrc to force things. Good to know!
 
Old 05-11-2013, 12:04 AM   #7
Geremia
Member
 
Registered: Apr 2011
Distribution: slackware64-current
Posts: 497

Rep: Reputation: 45
Quote:
Originally Posted by Paulo2 View Post
Be sure you've selected "default" on VLC audio out configuration (or "alsa" in SMPlayer).
Yes, "default" is selected.
Quote:
Originally Posted by Paulo2 View Post
My other problem was that I have this in "~/.asoundrc", this is for equalization launched by "alsamixer -D equal"
I don't even have this file…
thanks for the help
 
Old 05-11-2013, 01:20 AM   #8
dugan
LQ Guru
 
Registered: Nov 2003
Location: Canada
Distribution: distro hopper
Posts: 11,223

Rep: Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320
Here's something else you can try:

http://www.linuxquestions.org/questi...0/#post4945999
 
Old 05-17-2013, 11:05 AM   #9
Geremia
Member
 
Registered: Apr 2011
Distribution: slackware64-current
Posts: 497

Rep: Reputation: 45
Quote:
Originally Posted by dugan View Post
I ended up deleting /etc/asound.conf and rebooting, and now it works!
 
  


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
Configuring alsa and multiple(?) sound cards waddles Slackware 2 02-17-2013 11:01 PM
play multiple sound streams on ALSA dmix knobby67 Programming 4 10-06-2011 12:37 PM
Multiple Sound Streams in Debian Etch richinsc Debian 1 09-29-2008 11:19 AM
Can't have multiple audio streams Dillbilly Linux - General 3 03-05-2006 10:16 PM
Are sound chips capable of multiple sound streams? SGFHK321 Linux - Hardware 1 07-29-2004 04:26 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 02:05 AM.

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