PhatDac - No mopidy sound, but speaker-test works


#1

Hi,

I am trying to get mopidy/iris to work properly with PhatDac. (headless on Pi Zero W, Using a Pimoroni Noobs SD card, followed these instructions to get started with Spotify : https://learn.pimoroni.com/tutorial/sandyj/streaming-spotify-to-your-pi )

I can browse playlists etc. from Spotify. It can play audio when connected to HDMI monitor with build in speakers.

When disconnecting HDMI display (and a reboot), no sound is coming from PhatDac when playing from mopidy/iris.

When running speaker-test -c2 -t wav sound is ok from PhatDac.

The mopidy user is member of video, audio, spi, i2c, gpio.

aplay -l output:

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

Audio section of /etc/mopidy/mopidy.conf :

[audio]
mixer = software
mixer_volume = 100
output = autoaudiosink
buffer_time = 2000

Startup sequence from /var/log/mopidy/mopidy.log:

2018-07-02 19:40:59,862 INFO [334:MainThread] mopidy.main: Starting Mopidy 2.1.0
2018-07-02 19:41:32,998 INFO [334:MainThread] mopidy.config: Loading config from builtin defaults
2018-07-02 19:41:33,156 INFO [334:MainThread] mopidy.config: Loading config from /etc/mopidy/mopidy.conf
2018-07-02 19:41:33,252 INFO [334:MainThread] mopidy.config: Loading config from command line options
2018-07-02 19:41:35,361 INFO [334:MainThread] mopidy.main: Enabled extensions: iris, mpd, alsamixer, http, ttsgpio, stream, spotify, m3u, softwaremixer, file, local-images, local-sqlite
2018-07-02 19:41:35,369 INFO [334:MainThread] mopidy.main: Disabled extensions: local
2018-07-02 19:41:35,390 WARNING [334:MainThread] mopidy.main: Found local configuration errors, the extension has been automatically disabled:
2018-07-02 19:41:35,397 WARNING [334:MainThread] mopidy.main: local/media_dir must be set.
2018-07-02 19:41:35,405 WARNING [334:MainThread] mopidy.main: Please fix the extension configuration errors or disable the extensions to silence these messages.
2018-07-02 19:41:38,706 INFO [334:MainThread] mopidy.commands: Starting Mopidy mixer: SoftwareMixer
2018-07-02 19:41:38,885 INFO [334:MainThread] mopidy.commands: Mixer volume set to 100
2018-07-02 19:41:38,923 INFO [334:MainThread] mopidy.commands: Starting Mopidy audio
2018-07-02 19:41:39,007 INFO [334:MainThread] mopidy.commands: Starting Mopidy backends: StreamBackend, M3UBackend, FileBackend, SpotifyBackend
2018-07-02 19:41:39,820 INFO [334:Audio-2] mopidy.audio.actor: Audio output set to “autoaudiosink”
2018-07-02 19:41:42,117 INFO [334:MainThread] mopidy.commands: Starting Mopidy core
2018-07-02 19:41:42,285 INFO [334:SpotifyEventLoop] spotify.session: Spotify logged in
2018-07-02 19:41:42,309 INFO [334:SpotifyEventLoop] mopidy_spotify.backend: Logged in to Spotify in offline mode
2018-07-02 19:41:43,553 INFO [334:SpotifyEventLoop] mopidy_spotify.backend: Logged in to Spotify in online mode
2018-07-02 19:41:43,605 INFO [334:MainThread] mopidy.commands: Starting Mopidy frontends: TtsGpio, IrisFrontend, MpdFrontend, HttpFrontend
2018-07-02 19:41:43,855 WARNING [334:MainThread] py.warnings: /usr/local/lib/python2.7/dist-packages/mopidy_ttsgpio/gpio_input_manager.py:31: RuntimeWarning: This channel is already in use, continuing anyway. Use GPIO.setwarnings(False) to disable warnings.
GPIO.setup(self.led_pin, GPIO.OUT)

2018-07-02 19:41:44,340 INFO [334:IrisFrontend-11] mopidy_iris.frontend: Starting Iris 3.21.4
2018-07-02 19:41:44,362 INFO [334:MainThread] mopidy.mpd.actor: MPD server running at [::ffff:10.19.20.142]:6600
2018-07-02 19:41:44,418 INFO [334:MainThread] mopidy.commands: Starting GLib mainloop
2018-07-02 19:41:44,425 INFO [334:HttpFrontend-14] mopidy.http.actor: HTTP server running at [::ffff:10.19.20.142]:6680
2018-07-02 19:41:46,890 INFO [334:HttpServer] tornado.access: 304 GET /iris/ (10.19.20.137) 144.99ms
2018-07-02 19:41:48,320 INFO [334:HttpServer] tornado.access: 200 GET /iris/http/refresh_spotify_token (10.19.20.137) 959.97ms
2018-07-02 19:41:48,389 INFO [334:HttpServer] tornado.access: 200 GET /iris/assets/favicon.ico (10.19.20.137) 24.03ms
2018-07-02 19:41:48,422 INFO [334:HttpServer] tornado.access: 304 GET /iris/assets/logo-app-192.png (10.19.20.137) 17.86ms
2018-07-02 19:41:49,210 INFO [334:HttpServer] tornado.access: 200 GET /iris/http/refresh_spotify_token (10.19.20.137) 733.72ms
2018-07-02 19:41:50,642 INFO [334:HttpServer] tornado.access: 200 GET /iris/http/refresh_spotify_token (10.19.20.137) 1205.10ms
2018-07-02 19:41:52,101 INFO [334:HttpServer] tornado.access: 200 GET /iris/http/refresh_spotify_token (10.19.20.137) 1044.98ms
p

Exerpt from /var/log/daemon.log

Jul 2 19:41:33 raspberrypi mopidy[334]: INFO Starting Mopidy 2.1.0
Jul 2 19:41:33 raspberrypi mopidy[334]: INFO Loading config from builtin defaults
Jul 2 19:41:33 raspberrypi mopidy[334]: INFO Loading config from /etc/mopidy/mopidy.conf
Jul 2 19:41:33 raspberrypi mopidy[334]: INFO Loading config from command line options
Jul 2 19:41:35 raspberrypi mopidy[334]: INFO Enabled extensions: iris, mpd, alsamixer, http, ttsgpio, stream, spotify, m3u, softwaremixer, file, local-images, local-sqlite
Jul 2 19:41:35 raspberrypi mopidy[334]: INFO Disabled extensions: local
Jul 2 19:41:35 raspberrypi mopidy[334]: WARNING Found local configuration errors, the extension has been automatically disabled:
Jul 2 19:41:35 raspberrypi mopidy[334]: WARNING local/media_dir must be set.
Jul 2 19:41:35 raspberrypi mopidy[334]: WARNING Please fix the extension configuration errors or disable the extensions to silence these messages.
Jul 2 19:41:38 raspberrypi mopidy[334]: INFO Starting Mopidy mixer: SoftwareMixer
Jul 2 19:41:38 raspberrypi mopidy[334]: INFO Mixer volume set to 100
Jul 2 19:41:38 raspberrypi mopidy[334]: INFO Starting Mopidy audio
Jul 2 19:41:39 raspberrypi mopidy[334]: INFO Starting Mopidy backends: StreamBackend, M3UBackend, FileBackend, SpotifyBackend
Jul 2 19:41:39 raspberrypi mopidy[334]: INFO Audio output set to “autoaudiosink”
Jul 2 19:41:42 raspberrypi mopidy[334]: INFO Starting Mopidy core
Jul 2 19:41:42 raspberrypi mopidy[334]: INFO Logged in to Spotify in offline mode
Jul 2 19:41:42 raspberrypi systemd[1]: Started Daily apt download activities.
Jul 2 19:41:42 raspberrypi systemd[1]: apt-daily.timer: Adding 6h 20min 48.583149s random time.
Jul 2 19:41:42 raspberrypi systemd[1]: apt-daily.timer: Adding 6h 44min 53.696129s random time.
Jul 2 19:41:43 raspberrypi mopidy[334]: INFO Logged in to Spotify in online mode
Jul 2 19:41:43 raspberrypi mopidy[334]: INFO Starting Mopidy frontends: TtsGpio, IrisFrontend, MpdFrontend, HttpFrontend
Jul 2 19:41:44 raspberrypi mopidy[334]: INFO Starting Iris 3.21.4
Jul 2 19:41:44 raspberrypi mopidy[334]: INFO MPD server running at [::ffff:10.19.20.142]:6600
Jul 2 19:41:44 raspberrypi mopidy[334]: INFO Starting GLib mainloop
Jul 2 19:41:44 raspberrypi mopidy[334]: INFO HTTP server running at [::ffff:10.19.20.142]:6680
Jul 2 19:42:08 raspberrypi mopidy[334]: sh: 1: festival: not found
Jul 2 19:42:09 raspberrypi mopidy[334]: sh: 1: festival: not found

Any suggestions on how to proceed?
(preferably using ssh, as i want to stay headless because the HDMI speakers are being used when display is connected)

best regards
Jan