4

I would like to make pulseaudio work on my Raspberry Pi 3 without X installed. I'm using the Arch Linux ARM distribution and these are the packages I have installed related to pulseauio and alsa:

$ pacman -Qsq pulse
libao
libpulse
pulseaudio
pulseaudio-alsa
pulseaudio-zeroconf
$ pacman -Qsq alsa
alsa-firmware
alsa-lib
alsa-plugins
alsa-utils
pulseaudio-alsa
zita-alsa-pcmi

I have omxplayer installed as well and I can play sound without X very well with omxplayer -o local sample.mp3. I would like to have pulseaudio running in the background and play sound.

This is what I've done so far:

I launched pulseaudio with sudo pulseaudio --system -v and in another shell session (with my own user) I tried the following commands and none of them worked: 1. aplay sample.mp3. 2. aplay -D pulse sample.mp3. 3. ffplay sample.mp3 - Failed saying $DISPLAY is not set.

The first 2 made the pulseaudio process print the same messages saying there is a request from a process named aplay to produce sound but I recieved no.

I checked alsamixer to see if the sink is not muted or something and it is not.

This is the output of pactl list sinks:

Sink #0
    State: RUNNING
    Name: alsa_output.platform-soc_audio.analog-mono
    Description: Built-in Audio Analog Mono
    Driver: module-alsa-card.c
    Sample Specification: s16le 1ch 48000Hz
    Channel Map: mono
    Owner Module: 6
    Mute: no
    Volume: mono: 65511 / 100% / -0.01 dB
            balance 0.00
    Base Volume: 56210 /  86% / -4.00 dB
    Monitor Source: alsa_output.platform-soc_audio.analog-mono.monitor
    Latency: 120094 usec, configured 125000 usec
    Flags: HARDWARE HW_MUTE_CTRL HW_VOLUME_CTRL DECIBEL_VOLUME LATENCY 
    Properties:
        alsa.resolution_bits = "16"
        device.api = "alsa"
        device.class = "sound"
        alsa.class = "generic"
        alsa.subclass = "generic-mix"
        alsa.name = "bcm2835 ALSA"
        alsa.id = "bcm2835 ALSA"
        alsa.subdevice = "0"
        alsa.subdevice_name = "subdevice #0"
        alsa.device = "0"
        alsa.card = "0"
        alsa.card_name = "bcm2835 ALSA"
        alsa.long_card_name = "bcm2835 ALSA"
        alsa.driver_name = "snd_bcm2835"
        device.bus_path = "platform-soc:audio"
        sysfs.path = "/devices/platform/soc/soc:audio/sound/card0"
        device.form_factor = "internal"
        device.string = "hw:0"
        device.buffering.buffer_size = "131072"
        device.buffering.fragment_size = "131072"
        device.access_mode = "mmap+timer"
        device.profile.name = "analog-mono"
        device.profile.description = "Analog Mono"
        device.description = "Built-in Audio Analog Mono"
        alsa.mixer_name = "Broadcom Mixer"
        module-udev-detect.discovered = "1"
        device.icon_name = "audio-card"
    Ports:
        analog-output: Analog Output (priority: 9900)
    Active Port: analog-output
    Formats:
        pcm

Any idea why I can't get sound? I don't want to use omxplayer although it works because eventually I want to play sound through the network.

Doron Behar
  • 141
  • 1
  • 5

0 Answers0