Aplay not working on Sailfish OS on Xperia 10 III

Hi,
I’m using Sailfish OS on Xperia 10 III. I installed alsa-utils and tried to play audio via aplay, but got “Unable to install hw params” error. When I tried aplay --dump-hw-params command I got:

[root@Xperia10III defaultuser]# aplay --dump-hw-params
ALSA lib pulse.c:243:(pulse_connect) PulseAudio: Unable to connect: Connection refused

aplay: main:831: audio open error: Connection refused

This also happens if I’m defaultuser. Is it possible to use aplay on Xperia 10 III?
Best regards,
Nenad

Try paplay instead…

4 Likes

If you want to get overly complicated you can use the gstreamer tools:
Install gstreamer1.0-tools

Record the default sink:

gst-launch-1.0 pulsesrc ! audioconvert ! vorbisenc ! oggmux ! filesink location=blah.ogg

Play it:

gst-launch-1.0 filesrc location=blah.ogg ! oggdemux ! vorbisdec !audioconvert ! audioresample ! pulsesink

You can do conversions, streaming, etc:
https://gstreamer.freedesktop.org/documentation/tools/gst-launch.html?gi-language=c