pimoroni / speaker-phat

Software installer for Speaker pHAT
MIT License
52 stars 9 forks source link

No sound with raspberry pi OS lite released 2021-01-11 #32

Open luto65 opened 3 years ago

luto65 commented 3 years ago

Hardware: Raspberry Pi Zero W V1.1 (Raspberry Pi 2017); Speaker PHAT (purchased 4 july 2018 from thepihut.com, order #337344) Operating system: Raspberry Pi OS Lite released 2021-01-11 It is a "server" and therefore has no graphics and no X-11 (that is the reason for using Pi OS Lite)).

I downloaded the above mentioned imaged and created an SD card with that. Then I have added the corresponding "ssh" and "wpa_supplicant.conf" and rebooted.

ssh pi@raspberrypi 
curl -sS https://get.pimoroni.com/speakerphat | bash

rebooted

ssh pi@raspberrypi 
espeak "test"

The LED displays show up but now sound.


Jan 21 21:15:00  ####  pulseaudio[337]: [pulseaudio] main.c: This program is not intended to be run as root (unless --system is specified).
Jan 21 21:15:01  ####  pulseaudio[337]: [pulseaudio] server-lookup.c: Unable to contact D-Bus: org.freedesktop.DBus.Error.NotSupported: Unable to autolaunch a dbus-daemon without a $DISPLAY for X11
Jan 21 21:15:01  ####  pulseaudio[337]: [pulseaudio] main.c: Unable to contact D-Bus: org.freedesktop.DBus.Error.NotSupported: Unable to autolaunch a dbus-daemon without a $DISPLAY for X11

What am I doing wrong ? What needs to be done in order to have it running ?

Additional information:

aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: sndrpihifiberry [snd_rpi_hifiberry_dac], device 0: HifiBerry DAC HiFi pcm5102a-hifi-0 [HifiBerry DAC HiFi pcm5102a-hifi-0]
  Subdevices: 0/1
  Subdevice #0: subdevice #0

I then tried installing espeak-ng and executing it

espeak-ng "test"

Jan 21 21:59:58 #### pulseaudio[1145]: E: [pulseaudio] main.c: Failed to kill daemon: No such process
Jan 21 21:59:58 #### systemd[1]: pulseaudio.service: Control process exited, code=exited, status=1/FAILURE
Jan 21 21:59:58 #### systemd[1]: pulseaudio.service: Failed with result 'exit-code'.
Jan 21 21:59:58 #### systemd[1]: pulseaudio.service: Service RestartSec=100ms expired, scheduling restart.
Jan 21 21:59:58 #### systemd[1]: pulseaudio.service: Scheduled restart job, restart counter is at 5.
Jan 21 21:59:58 #### systemd[1]: Stopped PulseAudio Daemon.
Jan 21 21:59:58 #### systemd[1]: Started PulseAudio Daemon.
Jan 21 21:59:58 #### pulseaudio[1146]: [pulseaudio] main.c: This program is not intended to be run as root (unless --system is specified).
Jan 21 21:59:58 #### pulseaudio[1146]: Using device: speaker-phat
Jan 21 21:59:58 #### pulseaudio[1146]: [pulseaudio] server-lookup.c: Unable to contact D-Bus: org.freedesktop.DBus.Error.NotSupported: Unable to autolaunch a dbus-daemon without a $DISPLAY for X11
Jan 21 21:59:58 #### pulseaudio[1146]: [pulseaudio] main.c: Unable to contact D-Bus: org.freedesktop.DBus.Error.NotSupported: Unable to autolaunch a dbus-daemon without a $DISPLAY for X11

Additional debugging information

systemctl status pulseaudio
● pulseaudio.service - PulseAudio Daemon
   Loaded: loaded (/etc/systemd/system/pulseaudio.service; enabled; vendor preset: enabled)
   Active: active (running) since Thu 2021-01-21 22:01:27 GMT; 3min 46s ago
 Main PID: 1185 (pulseaudio)
    Tasks: 3 (limit: 881)
   CGroup: /system.slice/pulseaudio.service
           └─1185 /usr/bin/pulseaudio --realtime --disallow-exit --no-cpu-limit --log-target=syslog

Jan 21 22:01:27 #### systemd[1]: Started PulseAudio Daemon.
Jan 21 22:01:27 #### pulseaudio[1185]: [pulseaudio] main.c: This program is not intended to be run as root (unless --system is specified).
Jan 21 22:01:27 #### pulseaudio[1185]: Using device: speaker-phat
Jan 21 22:01:27 #### pulseaudio[1185]: [pulseaudio] server-lookup.c: Unable to contact D-Bus: org.freedesktop.DBus.Error.NotSupported: Unable to a
Jan 21 22:01:27 #### pulseaudio[1185]: [pulseaudio] main.c: Unable to contact D-Bus: org.freedesktop.DBus.Error.NotSupported: Unable to autolaunch
r0d0dendr0n commented 1 month ago

I have resolved my issue with no sound on newer pi os. Please refer to: https://github.com/pimoroni/speaker-phat/issues/26#issuecomment-2406106600