LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
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-26-2014, 09:51 PM   #1
maples
Member
 
Registered: Oct 2013
Location: IN, USA
Distribution: Arch, Debian Jessie
Posts: 814

Rep: Reputation: 265Reputation: 265Reputation: 265
ALSA- only one program can use sound at a time- no PCM in alsamixer


Hi!
I recently installed Arch on my laptop. At first there was no sound output, but that was due to the wrong audio card being set as the default. I fixed that with the /etc/asound.conf, and so far it's worked. Today I was messing around with VirtualBox. I usually have music in the background, and Vbox kept giving me an error that the sound device was busy. I noticed that I got a similar error if I tried to start the music player after I started the VM. So at this point, only one program can output to the sound card.

I tried to add something about "dmix" to my ~/.asoundrc according to what the Arch wiki suggested, but after a reboot I can still only have one program output audio.

When I open alsamixer, I noticed that there is no PCM entry. I also noticed that when I change the volume in a program, it directly changes the 'Master' volume.

My laptop is a Dell Inspiron 15r.

Code:
[anthony@newerLaptop ~]$ lspci | grep audio -i
00:03.0 Audio device: Intel Corporation Device 0a0c (rev 09)
00:1b.0 Audio device: Intel Corporation Lynx Point-LP HD Audio Controller (rev 04)
Code:
[anthony@newerLaptop ~]$ cat /etc/asound.conf 
pcm.!default {
	type hw
	card 1
}

ctl.!default {
	type hw
	card 1
}
Code:
[anthony@newerLaptop ~]$ cat .asoundrc 
pcm.dsp {
	type plug
	slave.pcm "dmix"
}

Sorry if I didn't post something I should have, I'm lost at this point!

Thanks for helping!

Last edited by maples; 05-26-2014 at 09:53 PM.
 
Old 05-27-2014, 10:14 AM   #2
gengisdave
Member
 
Registered: Dec 2013
Location: Turin, Italy
Distribution: slackware
Posts: 328

Rep: Reputation: 74
I'm not fully experienced in alsa, but I had the same problem as you, resolved with use of "dmixer"; this is my .asoundrc, as you can see it's little different from you; I have just a little problem: phonon (I use it only for amarok) sees an audio card called "alsa", that reset everytime I plug a USB device (my phone, not a pendrive), so I need to close and open amarok to get the "new" audio card.

Code:
pcm.!default {
  type plug
  slave.pcm "dmixer"
}

pcm.dsp0 {
  type plug
  slave.pcm "dmixer"
}

pcm.dmixer {
  type dmix
  ipc_key 1024
  slave {
    pcm hw:2
    #card 2 #front:VSL
    format S32_LE
    rate 48000
  }
}
ignore "format" and "rate", they're needed on my card (PreSonus AudioBox 22VSL), I don't remember why I added pcm.dsp0 but I think it's related to multiple mplayer (it locks dsp device)
 
1 members found this post helpful.
Old 05-27-2014, 10:32 AM   #3
Shadow_7
Senior Member
 
Registered: Feb 2003
Distribution: debian
Posts: 4,137
Blog Entries: 1

Rep: Reputation: 874Reputation: 874Reputation: 874Reputation: 874Reputation: 874Reputation: 874Reputation: 874
The naming convention of PCM doesn't always apply. For some cards it's DAC for digital to analog converter. And ADC for analog to digital converter. Digital being the computer, and Analog being the speakers or microphone. So DAC would be audio OUT and ADC would be audio IN.

Some applications use the OSS layer and you might find more success with launching those applications prefixed with aoss. Although dmix should be a default in most recent incarnations and doesn't need to be explicitly stated in the .asoundrc. YMMV depending on distro and the age of it. Pulseaudio can also be used to better share a soundcard across applications.

You might try using an .asoundrc file with just one line in it.

Code:
defaults.pcm.card 1
 
1 members found this post helpful.
Old 05-27-2014, 12:27 PM   #4
maples
Member
 
Registered: Oct 2013
Location: IN, USA
Distribution: Arch, Debian Jessie
Posts: 814

Original Poster
Rep: Reputation: 265Reputation: 265Reputation: 265
Quote:
Originally Posted by gengisdave View Post
I'm not fully experienced in alsa, but I had the same problem as you, resolved with use of "dmixer"; this is my .asoundrc, as you can see it's little different from you; I have just a little problem: phonon (I use it only for amarok) sees an audio card called "alsa", that reset everytime I plug a USB device (my phone, not a pendrive), so I need to close and open amarok to get the "new" audio card.

Code:
pcm.!default {
  type plug
  slave.pcm "dmixer"
}

pcm.dsp0 {
  type plug
  slave.pcm "dmixer"
}

pcm.dmixer {
  type dmix
  ipc_key 1024
  slave {
    pcm hw:2
    #card 2 #front:VSL
    format S32_LE
    rate 48000
  }
}
ignore "format" and "rate", they're needed on my card (PreSonus AudioBox 22VSL), I don't remember why I added pcm.dsp0 but I think it's related to multiple mplayer (it locks dsp device)
Thanks! This works! The music player (cmus) still directly controls the master volume, but it works now!! Thank you!
 
1 members found this post helpful.
  


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
Low sound with alsa (alsamixer options set to 100%) daf1kpp Linux - Software 2 07-25-2013 11:55 AM
Alsamixer has no PCM option dellthinker Debian 12 08-24-2010 02:40 PM
linuxant alsa-driver killed sound and alsamixer keokiboy Slackware 1 08-01-2009 07:06 PM
Alsa don't work, can show alsamixer but no PCM or Master jazzi Linux - Hardware 3 07-23-2008 08:48 PM
xine plugin lowering PCM sound for ALSA. phunkymunky Slackware 1 03-03-2006 07:03 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

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