[pulseaudio-discuss] Seeking advice on use of padsp
Sean Greenslade
sean at seangreenslade.com
Fri Feb 11 07:49:36 UTC 2022
On Mon, Feb 07, 2022 at 01:21:34PM +0000, Geoff Browne wrote:
> If I type the following at the terminal I get the expected tone..
>
> /usr/bin/padsp /usr/bin/tones sine 100 900
>
> ...but if I try this from within some C code on a R-Pi Zero...
>
> system("/usr/bin/padsp /usr/bin/tones sine 100 900");
>
> I get...
> [tones] Connection refused : /dev/dsp
Are these commands both being run on the same device, same user, etc.?
What distro of linux are you running on the RPi?
> and with -d on...
>
> utils/padsp.c: dsp_open()
> utils/padsp.c: fd_info_new()
> utils/padsp.c: pa_context_connect() failed: Connection refused
> utils/padsp.c: freeing fd info (fd=4)
> utils/padsp.c: Draining.
> utils/padsp.c: dsp_open()
> utils/padsp.c: fd_info_new()
> utils/padsp.c: pa_context_connect() failed: Connection refused
> utils/padsp.c: freeing fd info (fd=4)
> utils/padsp.c: Draining.
> [tones] Connection refused : /dev/dsp
>
> Can anyone please put me right ?
"pa_context_connect() failed: Connection refused" typically means that
pulseaudio is not running. You can confirm this by running a pactl
command, for example:
$ pactl list sinks
Would output the following if pulse is not running:
Connection failure: Connection refused
pa_context_connect() failed: Connection refused
--Sean
More information about the pulseaudio-discuss
mailing list