LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 05-10-2016, 04:07 AM   #1
dwnthk
Member
 
Registered: May 2016
Location: Hong Kong
Distribution: Slackware 14.1 + Fluxbox
Posts: 65

Rep: Reputation: Disabled
No 2 programs can play sound at the same time?


Hi there,

Sometimes I watch movies, listen musics/radio, and tts (text-to-speech) books at the same time.

But I found whichever program I start making sound, no other programs can make a sound anymore.

Did I miss some setting?
 
Old 05-10-2016, 05:28 AM   #2
HMW
Member
 
Registered: Aug 2013
Location: Sweden
Distribution: Debian, Arch, Xubuntu, Manjaro
Posts: 745
Blog Entries: 3

Rep: Reputation: 347Reputation: 347Reputation: 347Reputation: 347
Quote:
Originally Posted by dwnthk View Post
Sometimes I watch movies, listen musics/radio, and tts (text-to-speech) books at the same time.


Congratulations! You just won the gold medal in the olympics for multitaskers.

Jokes aside, sorry, can't help you. A Slackware guru will most likely pop in soon and help you out.

Best regards,
HMW
 
Old 05-10-2016, 05:42 AM   #3
dwnthk
Member
 
Registered: May 2016
Location: Hong Kong
Distribution: Slackware 14.1 + Fluxbox
Posts: 65

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by HMW View Post


Congratulations! You just won the gold medal in the olympics for multitaskers.

Jokes aside, sorry, can't help you. A Slackware guru will most likely pop in soon and help you out.

Best regards,
HMW
That's why I always got a bad grade in school...
But I just can't help myself from doing this...

Last edited by dwnthk; 05-10-2016 at 05:59 AM.
 
Old 05-10-2016, 06:43 AM   #4
Hasek39
Member
 
Registered: Jul 2015
Location: Moscow, Russia
Distribution: Slackware
Posts: 93

Rep: Reputation: Disabled
If your profile's distribution is Slackware 14.1, I think that you use ALSA. Can you please post /etc/asound.conf? If there are no such file show "cat /proc/asound/modules" and output of "aplay -L".

P.S. Maybe the solution will be to create or edit /etc/asound.conf with something like
Code:
defaults.ctl.card 1
defaults.pcm.card 1
But I can't be sure until you post output of previous commands and files.
 
Old 05-10-2016, 07:48 AM   #5
zhjim
Senior Member
 
Registered: Oct 2004
Distribution: Debian Squeeze x86_64
Posts: 1,748
Blog Entries: 11

Rep: Reputation: 233Reputation: 233Reputation: 233
If recently nothing happened ALSA will always only give control over the sound device to one program. It just by design.

You could try pulseaudio. This is a wrapper over alsa. It takes control over the sound card and other programs give their output to pulseaudio.
 
Old 05-10-2016, 08:07 AM   #6
Hasek39
Member
 
Registered: Jul 2015
Location: Moscow, Russia
Distribution: Slackware
Posts: 93

Rep: Reputation: Disabled
Quote:
Originally Posted by zhjim View Post
If recently nothing happened ALSA will always only give control over the sound device to one program. It just by design.

You could try pulseaudio. This is a wrapper over alsa. It takes control over the sound card and other programs give their output to pulseaudio.
You aren't right. The fact that ALSA plays sound from only one program by default doesn't mean that you can't configure it to work with two or more programs at the same time at all. And there is, of course, no matter to switch to PulseAudio only because of it.
 
Old 05-10-2016, 08:23 AM   #7
zhjim
Senior Member
 
Registered: Oct 2004
Distribution: Debian Squeeze x86_64
Posts: 1,748
Blog Entries: 11

Rep: Reputation: 233Reputation: 233Reputation: 233
Always thought it was ALSA that gave only one prog the reign. But it was with OSS. Learned something new.

Two links I read up on.

http://alsa.opensrc.org/AlsaSharing
https://wiki.archlinux.org/index.php...hitecture#Dmix
 
Old 05-10-2016, 09:23 PM   #8
dwnthk
Member
 
Registered: May 2016
Location: Hong Kong
Distribution: Slackware 14.1 + Fluxbox
Posts: 65

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by zhjim View Post
Always thought it was ALSA that gave only one prog the reign. But it was with OSS. Learned something new.

Two links I read up on.

http://alsa.opensrc.org/AlsaSharing
https://wiki.archlinux.org/index.php...hitecture#Dmix

It is ok if only one program can make sound at a time.
Thanks guys.

Last edited by dwnthk; 05-10-2016 at 09:25 PM.
 
Old 05-11-2016, 05:09 AM   #9
aragorn2101
Member
 
Registered: Dec 2012
Location: Mauritius
Distribution: Slackware
Posts: 204

Rep: Reputation: 82
Hey, I have alsa and I have no problem playing movies on vlc and watching video in firefox or playing music with amarok at the same time. From what I have read somewhere, alsa takes the sound from each source and mixes them.

In fact, I once tried pulseaudio and I had that one sound per program issue. Whenever I would open vlc, any other program already playing would lose access to speakers. But with alsa it works fine.

I might be wrong, but maybe it has something to do with gstreamer and the gst plugins. I noticed that without the plugins there are less support for programs like amarok.

You could try to install the gstreamers and the gst plugins (good, bad, ugly). Just check which ones already come with Slackware.
 
Old 05-11-2016, 06:06 AM   #10
dwnthk
Member
 
Registered: May 2016
Location: Hong Kong
Distribution: Slackware 14.1 + Fluxbox
Posts: 65

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by aragorn2101 View Post
Hey, I have alsa and I have no problem playing movies on vlc and watching video in firefox or playing music with amarok at the same time. From what I have read somewhere, alsa takes the sound from each source and mixes them.

In fact, I once tried pulseaudio and I had that one sound per program issue. Whenever I would open vlc, any other program already playing would lose access to speakers. But with alsa it works fine.

I might be wrong, but maybe it has something to do with gstreamer and the gst plugins. I noticed that without the plugins there are less support for programs like amarok.

You could try to install the gstreamers and the gst plugins (good, bad, ugly). Just check which ones already come with Slackware.
It is strange. For example, if I am playing youtube in firefox, anything else can't make a sound. The same thing happens to others situations too.

Last edited by dwnthk; 05-11-2016 at 06:07 AM.
 
Old 05-11-2016, 08:25 AM   #11
Hasek39
Member
 
Registered: Jul 2015
Location: Moscow, Russia
Distribution: Slackware
Posts: 93

Rep: Reputation: Disabled
Quote:
Originally Posted by dwnthk View Post
It is strange. For example, if I am playing youtube in firefox, anything else can't make a sound. The same thing happens to others situations too.
It isn't strange. We have told you that ALSA can successfully works with more than one program at the same time. Please, read previous messages if you want to fix your problem and post output of console commands that I asked for.

Quote:
Originally Posted by Hasek39 View Post
If your profile's distribution is Slackware 14.1, I think that you use ALSA. Can you please post /etc/asound.conf? If there are no such file show "cat /proc/asound/modules" and output of "aplay -L".

P.S. Maybe the solution will be to create or edit /etc/asound.conf with something like
Code:
defaults.ctl.card 1
defaults.pcm.card 1
But I can't be sure until you post output of previous commands and files.
Quote:
Originally Posted by Hasek39 View Post
You aren't right. The fact that ALSA plays sound from only one program by default doesn't mean that you can't configure it to work with two or more programs at the same time at all. And there is, of course, no matter to switch to PulseAudio only because of it.
 
Old 05-11-2016, 09:00 AM   #12
dwnthk
Member
 
Registered: May 2016
Location: Hong Kong
Distribution: Slackware 14.1 + Fluxbox
Posts: 65

Original Poster
Rep: Reputation: Disabled
Oh...I am sorry. I wasn't paying attention here.

Here you go:

Quote:
[dw@bash-4.2]$cat /proc/asound/modules
0 snd_hda_intel
1 snd_usb_audio
29 thinkpad_acpi
[dw@bash-4.2]$

Quote:
[dw@bash-4.2]$aplay -L
null
Discard all samples (playback) or generate zero samples (capture)
sysdefault:CARD=PCH
HDA Intel PCH, CX20590 Analog
Default Audio Device
front:CARD=PCH,DEV=0
HDA Intel PCH, CX20590 Analog
Front speakers
surround40:CARD=PCH,DEV=0
HDA Intel PCH, CX20590 Analog
4.0 Surround output to Front and Rear speakers
surround41:CARD=PCH,DEV=0
HDA Intel PCH, CX20590 Analog
4.1 Surround output to Front, Rear and Subwoofer speakers
surround50:CARD=PCH,DEV=0
HDA Intel PCH, CX20590 Analog
5.0 Surround output to Front, Center and Rear speakers
surround51:CARD=PCH,DEV=0
HDA Intel PCH, CX20590 Analog
5.1 Surround output to Front, Center, Rear and Subwoofer speakers
surround71:CARD=PCH,DEV=0
HDA Intel PCH, CX20590 Analog
7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
hdmi:CARD=PCH,DEV=0
HDA Intel PCH, HDMI 0
HDMI Audio Output
sysdefault:CARD=Z205
Logitech Z205, USB Audio
Default Audio Device
front:CARD=Z205,DEV=0
Logitech Z205, USB Audio
Front speakers
surround40:CARD=Z205,DEV=0
Logitech Z205, USB Audio
4.0 Surround output to Front and Rear speakers
surround41:CARD=Z205,DEV=0
Logitech Z205, USB Audio
4.1 Surround output to Front, Rear and Subwoofer speakers
surround50:CARD=Z205,DEV=0
Logitech Z205, USB Audio
5.0 Surround output to Front, Center and Rear speakers
surround51:CARD=Z205,DEV=0
Logitech Z205, USB Audio
5.1 Surround output to Front, Center, Rear and Subwoofer speakers
surround71:CARD=Z205,DEV=0
Logitech Z205, USB Audio
7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
iec958:CARD=Z205,DEV=0
Logitech Z205, USB Audio
IEC958 (S/PDIF) Digital Audio Output
[dw@bash-4.2]
And I already have a asound.conf:
Quote:
[dw@bash-4.2]$cat /etc/asound.conf
# Force USB speaker to default
pcm.!default {
type hw
card Z205
}

ctl.!default {
type hw
card Z205
}
[dw@bash-4.2]$

Last edited by dwnthk; 05-11-2016 at 09:04 AM.
 
Old 05-11-2016, 02:44 PM   #13
Hasek39
Member
 
Registered: Jul 2015
Location: Moscow, Russia
Distribution: Slackware
Posts: 93

Rep: Reputation: Disabled
Ok, so I suggest to edit /etc/asound.conf to the
Code:
defaults.ctl.card 1
defaults.pcm.card 1
I think that may fix it. If it wouldn't fix problem than try to specify 0 or 29 instead of 1. And if after all of that there will be no result replace it with your original settings.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Wine and native Linux programs can't play sound at the same time. 54gh Linux - Software 3 06-13-2015 12:09 PM
Sound - Cannot play from multiple programs Kupo Linux - Software 7 04-30-2007 03:38 AM
midi programs play but have no sound jeff_powell Linux - Software 5 11-04-2006 10:20 PM
multiple programs play sound(audio) simultaneously mikepol Debian 7 02-12-2006 02:32 PM
KDE blocks sound? cant play sound from other programs. Smurfen Linux - Hardware 1 04-02-2005 08:14 PM


All times are GMT -5. The time now is 12:13 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration