Re: using dmix in KDE

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Xen schreef op 24-12-2017 10:53:
Hi,

My use case is to provide shared access to a single card for both ALSA
and Pulse/Phonon.

I want to make this a little clearer.

1) ALSA only
2) ogg123 can do either ALSA or Pulse or ALSA with "pulse"
3) KDE uses Pulse


1) ogg123 "ALSA"

--> uses default device

2) ogg123 "Pulse"

--> uses Pulse which uses ALSA default device

3) ogg123 "ALSA with pulse"

--> uses ALSA "pulse" type which uses Pulse which uses ALSA default device.


1) Hardware device is called "card":

pcm.card {
	type hw
	card CMI8762
	device 2
}

2) Dmix device on top of that:

pcm.mix {
 	type dmix
 	ipc_key 1024
 	slave.pcm card
	slave.rate 48000
	bindings.0 0
	bindings.1 1
}

3) Modify /usr/share/alsa/alsa.conf.d/pulse.conf to not load pulse-alsa.conf,
   so "pulse" is not set to pcm.!default.

#       {
#               func pulse_load_if_running
#               files [
#                       "/usr/share/alsa/pulse-alsa.conf"
#               ]
#               errors false
#       }

4) Mix is set to be default device:

pcm.!default {
	type plug
	slave.pcm mix
}

5) ~/.config/pulse/default.pa is modified to load ALSA:

load-module module-alsa-sink

6) ~/.config/pulse/client.conf is modified to set default sink to ALSA:

default-sink = alsa_output.default

7) Everything "works" but Pulse regularly fails, actually, it always fails the first time, as if it does not know how to make a good connection the first time.

-------------------------
$ ogg123 -d alsa file.ogg

Audio Device:   Advanced Linux Sound Architecture (ALSA) output

Playing: file.ogg
Ogg Vorbis stream: 2 channel, 44100 Hz

Done.
-------------------------

$ ogg123 -d pulse file.ogg

Audio Device:   PulseAudio Output

Playing: file.ogg
Ogg Vorbis stream: 2 channel, 44100 Hz

ERROR: buffer write failed.

Done.
-------------------------

Then the next time it succeeds.

This seems to be the main issue.

Lol.

And sometimes when it does run, I get corrupted audio (noise) until I run through ALSA directly again.


So my main issue is that this system of letting PulseAudio use the default ALSA device produces a lot of failed starts.

(If it uses ALSA at all; which KDE messes with).

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Alsa-user mailing list
Alsa-user@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/alsa-user



[Index of Archives]     [ALSA Devel]     [Linux Audio Users]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]

  Powered by Linux