Re: Service/user not using PulseAudio

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

 



On Wed, 8 Apr 2020, Iain Mott wrote:

Another Asterisk PBX related question. I have the Asterisk service periodically sending System commands on the host machine when particular phone extensions are called. The Asterisk service is run by the user asterisk. I made asterisk a member of the 'audio' group so that it can use 'aplay' with the System command. eg.

System(aplay -c 1 -D pulse /home/iain/sounds/line1.wav)

This plays OK but plays on the laptop's internal hardware rather via PulseAudio. Jack is running and is configured to use an external USB sound card and the PulseAudio Jack Sink.

If I run the following as user iain, it plays correctly through the USB:

aplay -c 1 -D pulse /home/iain/sounds/line1.wav

two users is going to be a problem. Jack has to run as user and is not system. pulse can be run as a system daemon but I don't know what that does to a pulse->jack bridge.

Simple solution: use wires. Run the output of the onboard audio to a spare input on the usb device and run a spare output on the usb device to the onboard input.

Less simple: use networking. both pulse and jack are able to stream audio over the network (local host is fine) so run two instances of either jack or pulse and use networking to join them. I do not know pulse well enough to give any hints what so ever on network streaming. Jack would be easier. Just use netjack or zita-njbridge.

Also, ALSA has mixer plugins that may provide an extra phseudo device. I don't know how that works.

Contrary to popular thought, pulse does not require a display, but it does require access to a user dbus. Using dbuslaunch to run a screen session works for this. (at least this has worked for me on a headless system)

--
Len Ovens
www.ovenwerks.net
_______________________________________________
Linux-audio-user mailing list
Linux-audio-user@xxxxxxxxxxxxxxxxxxxx
https://lists.linuxaudio.org/listinfo/linux-audio-user




[Index of Archives]     [Linux Sound]     [ALSA Users]     [Pulse Audio]     [ALSA Devel]     [Sox Users]     [Linux Media]     [Kernel]     [Photo Sharing]     [Gimp]     [Yosemite News]     [Linux Media]

  Powered by Linux