# Sound Multiplexing Issue pulseaudio



## alvaroc (Jul 19, 2021)

I am not able to play sound from multiple sources.

My hardware: Thinkpad x230. I just use heaphones since I disconnected the cable to the intern sound speaker.

Example of error: 
login -> listen to music on browser -> cannot listen on other apps, even if I close browser and try to open another app afterwards.

Already read about multimedia on the handbook, but cannot seem able to fix.









						Chapter 8. Multimedia
					

FreeBSD supports a wide variety of sound cards, allowing users to enjoy high fidelity output from a FreeBSD system




					docs.freebsd.org
				




If starting Vlc after a browser, Vlc would output something similiar to this to the terminal:


```
xxx: can’t open /dev/dsp[/ICODE][ICODE]
```

This is what I added to /etc/sysctl.conf


```
hw.snd.default_unit=4
dev.pcm.0.play.vchans=4
dev.pcm.0.rec.vchans=4
hw.snd.maxautovchans=4
```

PS: sorry for my bad english. Thanks in advance!


----------



## bsduck (Jul 19, 2021)

Try to disable PulseAudio and see if it works. If you use a desktop environment you can do this in the session/autostart settings.

If your browser is Firefox you may also want to set `media.cubeb.backend` = `oss`.


----------



## alvaroc (Jul 19, 2021)

Yes, firefox has `media.cubeb.backend=oss`
I am using DWM, i started pulseaudio with `pulseaudio -D` and this was the feedback

```
W: [(null)] caps.c: Normally all extra capabilities would be dropped now, but that's impossible because PulseAudio was built without capabilities support.
```
If I run just `pulseaudio` this is the output

```
pulseaudio W: [(null)] caps.c: Normally all extra capabilities would be dropped now, but that's impossible because PulseAudio was built without capabilities support. W: [(null)] oss-util.c: '/dev/dsp1' doesn't support full duplex W: [(null)] oss-util.c: '/dev/dsp2' doesn't support full duplex W: [(null)] oss-util.c: '/dev/dsp3' doesn't support full duplex W: [(null)] oss-util.c: '/dev/dsp4' doesn't support full duplex
```

Either pulseaudio running or not can't listen to nor Firefox nor Chrome... but Vlc is running always now :<


----------



## bsduck (Jul 19, 2021)

alvaroc said:


> ```
> hw.snd.default_unit=4
> dev.pcm.0.play.vchans=4
> dev.pcm.0.rec.vchans=4
> ...


I notice you set the virtual channels number for dev.pcm.0 while you use dev.pcm.4 as a default.
You probably want to set `dev.pcm.4.play.vchans=4` and `dev.pcm.4.rec.vchans=4` instead.


----------



## alvaroc (Jul 19, 2021)

It's fixed! Thanks!

This was the solution, setting to pcm 0.


```
hw.snd.default_unit=0
dev.pcm.0.play.vchans=4
dev.pcm.0.rec.vchans=4
hw.snd.maxautovchans=4
```

This is the output of `cat /dev/sndstat`

```
Installed devices:
pcm0: <Realtek ALC269 (Analog 2.0+HP/2.0)> (play/rec) default
pcm1: <Realtek ALC269 (Internal Analog Mic)> (rec)
pcm2: <Intel Panther Point (HDMI/DP 8ch)> (play)
pcm3: <Intel Panther Point (HDMI/DP 8ch)> (play)
pcm4: <Intel Panther Point (HDMI/DP 8ch)> (play)
No devices installed from userspace.
```

But now something weird happens...
My headphones are playing some random noise,  a very low intensity noisy sound.
And apparently I am not able to mute as before, I have a bind to a special key on my keyboard,
I load xbindkeys when Xorg starts,
These are the commands 
`# Decrease volume"pactl set-sink-volume 0 -10%"   XF86AudioLowerVolume`
`# Mute volume "pactl set-sink-mute 0 toggle"   XF86AudioMute`
`# Mute microphone "pactl set-source-mute 0 toggle"   XF86AudioMicMute`

The 1st and 2nd commands work perfectly, both on keyboard and on terminal.
But the Mute command does not do nothing now (not even output to stdout).
Any idea how this is possible?
Thanks again!


----------



## grahamperrin@ (Nov 27, 2021)

alvaroc said:


> …
> `Normally all extra capabilities would be dropped now, but that's impossible because PulseAudio was built without capabilities support. W: [(null)] oss-util.c: '/dev/dsp1' doesn't support full duplex W: [(null)] oss-util.c: '/dev/dsp2' doesn't support full duplex W: [(null)] oss-util.c: '/dev/dsp3' doesn't support full duplex W: [(null)] oss-util.c: '/dev/dsp4' doesn't support full duplex`
> …



Abraham79 FYI ▲ although I don't imagine this topic helping in your case.



alvaroc said:


> It's fixed!



You can add the _Solved_ prefix, then if you still have the other issue, begin a new topic. Thanks.


----------

