1

I am trying to manually setup my raspberry pi 4 as a Bluetooth audio receiver, but there is no sound playback when I start the bluealsa-aplay service I created. It only works when I run the bluealsa-aplay command from the terminal. And I am not getting any errors in both cases.

I tried changing the user in the service, but that has no effect. Also choosing a different output pcm in the service has no effect.

The command I use:

    /usr/bin/bluealsa-aplay --profile-a2dp --pcm-buffer-time=250000 -v 00:00:00:00:00:00

The bluealsa-aplay service:

[Unit]
Description=BlueALSA aplay
Requires=bluealsa.service
After=bluealsa.service sound.target

[Service]
Type=simple
User=root
ExecStart=/usr/bin/bluealsa-aplay --profile-a2dp --pcm-buffer-time=250000 -v 00:00:00:00:00:00
RestartSec=5
Restart=always

[Install]
WantedBy=multi-user.target

the bluealsa service

# /lib/systemd/system/bluealsa.service
[Unit]
Description=BluezALSA proxy
Requires=bluetooth.service
After=bluetooth.service

[Service]
Type=simple
User=root
ExecStart=/usr/bin/bluealsa

# /etc/systemd/system/bluealsa.service.d/override.conf
[Service]
ExecStart=
ExecStart=/usr/bin/bluealsa -i hci0 -p a2dp-sink
RestartSec=5
Restart=always

logs

Service status

\u25cf bluealsa-aplay.service - BlueALSA aplay
   Loaded: loaded (/etc/systemd/system/bluealsa-aplay.service; enabled; vendor preset: enabled)
   Active: active (running) since Wed 2021-07-07 12:37:10 CEST; 16s ago
 Main PID: 1954 (bluealsa-aplay)
    Tasks: 2 (limit: 4915)
   CGroup: /system.slice/bluealsa-aplay.service
           \u2514\u25001954 /usr/bin/bluealsa-aplay --profile-a2dp --pcm-buffer-time=250000 -v 00:00:00:00:00:00

Jul 07 12:37:10 raspberrypi systemd[1]: Started BlueALSA aplay.

from journalctl

Jul 07 12:18:14 raspberrypi systemd[1]: Started BlueALSA aplay.
Jul 07 12:18:14 raspberrypi bluealsa-aplay[535]: /usr/bin/bluealsa-aplay: Couldn't get BlueALSA PCM list: The name org.bluea
Jul 07 12:22:08 raspberrypi systemd[1]: bluealsa-aplay.service: Current command vanished from the unit file, execution of th
Jul 07 12:22:25 raspberrypi systemd[1]: Stopping BlueALSA aplay...
Jul 07 12:22:25 raspberrypi systemd[1]: bluealsa-aplay.service: Succeeded.
Jul 07 12:22:25 raspberrypi systemd[1]: Stopped BlueALSA aplay.
Jul 07 12:22:25 raspberrypi systemd[1]: Started BlueALSA aplay.
Jul 07 12:22:58 raspberrypi bluealsa-aplay[1480]: Selected configuration:
Jul 07 12:22:58 raspberrypi bluealsa-aplay[1480]:   BlueALSA service: org.bluealsa
Jul 07 12:22:58 raspberrypi bluealsa-aplay[1480]:   PCM device: default
Jul 07 12:22:58 raspberrypi bluealsa-aplay[1480]:   PCM buffer time: 250000 us
Jul 07 12:22:58 raspberrypi bluealsa-aplay[1480]:   PCM period time: 100000 us
Jul 07 12:22:58 raspberrypi bluealsa-aplay[1480]:   Bluetooth device(s): ANY
Jul 07 12:22:58 raspberrypi bluealsa-aplay[1480]:   Profile: A2DP
Jul 07 12:22:58 raspberrypi systemd[1]: Stopping BlueALSA aplay...
Jul 07 12:22:58 raspberrypi systemd[1]: bluealsa-aplay.service: Succeeded.
Jul 07 12:22:58 raspberrypi systemd[1]: Stopped BlueALSA aplay.
Jul 07 12:37:10 raspberrypi systemd[1]: Started BlueALSA aplay.
1
  • The output from the journal is truncated at the line end. Can you please provide an output with complete lines? You can use the Edit link below the question.
    – Ingo
    Jul 8 at 7:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.