Comments (5)
What do you see if you aplay -l
and aplay -L
in terminal?
Edit: Have set up the latest release and managed to replicate this. I believe the cross over the speaker is normal, since the i2s device has no volume control. You should still get audio through pHAT BEAT?
from phat-beat.
Here is the the output for each command:
pi@rpi-r:~ $ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: sndrpihifiberry [snd_rpi_hifiberry_dac], device 0: HifiBerry DAC HiFi pcm5102a-hifi-0 []
Subdevices: 0/1
Subdevice #0: subdevice #0
pi@rpi-r:~ $ aplay -L
null
Discard all samples (playback) or generate zero samples (capture)
pivumeter
softvol_and_pivumeter
default
Playback/recording through the PulseAudio sound server
sysdefault:CARD=sndrpihifiberry
snd_rpi_hifiberry_dac,
Default Audio Device
dmix:CARD=sndrpihifiberry,DEV=0
snd_rpi_hifiberry_dac,
Direct sample mixing device
dsnoop:CARD=sndrpihifiberry,DEV=0
snd_rpi_hifiberry_dac,
Direct sample snooping device
hw:CARD=sndrpihifiberry,DEV=0
snd_rpi_hifiberry_dac,
Direct hardware device without any conversions
plughw:CARD=sndrpihifiberry,DEV=0
snd_rpi_hifiberry_dac,
Hardware device with all software conversions
After a bit more research, I've determined that the problem is with pulseaudio. More specifically, the problem is with pulseaudio when connecting to the pi via VNC... which was not a problem prior to the April '19 release of stretch.
Initially, I discovered the following errors in syslog:
Apr 16 15:40:51 rpi-r pulseaudio[967]: Using device: phat-beat
Apr 16 15:40:51 rpi-r pulseaudio[967]: [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
Apr 16 15:40:51 rpi-r pulseaudio[967]: [pulseaudio] main.c: Unable to contact D-Bus: org.freedesktop.DBus.Error.NotSupported: Unable to autolaunch a dbus-daemon without a $DISPLAY for X11
I was able to address this by adding:
Environment=DISPLAY=:0
to the [Service] section in file: /etc/systemd/system/pulseaudio.service.
Now I see the following errors:
Apr 16 15:46:19 rpi-r pulseaudio[949]: Using device: phat-beat
Apr 16 15:46:19 rpi-r pulseaudio[949]: [pulseaudio] server-lookup.c: Unable to contact D-Bus: org.freedesktop.DBus.Error.Spawn.ExecFailed: /usr/bin/dbus-launch terminated abnormally with the following error: No protocol specified
Apr 16 15:46:19 rpi-r pulseaudio[949]: [pulseaudio] server-lookup.c: Autolaunch error: X11 initialization failed.
Apr 16 15:46:19 rpi-r pulseaudio[949]: [pulseaudio] main.c: Unable to contact D-Bus: org.freedesktop.DBus.Error.Spawn.ExecFailed: /usr/bin/dbus-launch terminated abnormally with the following error: No protocol specified
Apr 16 15:46:19 rpi-r pulseaudio[949]: [pulseaudio] main.c: Autolaunch error: X11 initialization failed.
From what I've uncovered so far, this should be fixed by insuring that this:
load-module module-native-protocol-unix auth-anonymous=1 socket=/tmp/pulseaudio.socket
is in file: /etc/pulse/default.pa
and that this:
default-server = unix:/tmp/pulseaudio.socket
is in file: /etc/pulse/client.conf.
The problem is, these are already in place with the default files. So at the moment, I'm stuck.
It appears that the phatbeat script is only uninstalling and then reinstalling pulseaudio. Since stretch is no longer distributed with pulseaudio installed by default, the net effect of the script is to do a new install of pulseaudio on a newly installed pi. Unfortunately, this disables audio in the desktop environment if accessing via VNC with the newest release (I've confirmed that it works fine if I access via x11 using a local x-server, and I suspect that it would be fine if a monitor/keyboard/mouse are plugged into the pi as well).
Update: I did run through a new install again, and did notice this time around that the phatbeat script does indeed modify the default.pa and client.conf files as I detailed above (I didn't think that the socket modifications were in the default configuration files... mystery solved!).
Is pulseaudio required for the phatbeat? Thanks...
from phat-beat.
pulseaudio was required for earlier versions of pHAT BEAT where ALSA alone would end up running the PCM clock without sending any data- causing the speakers to just sit and heat up. We added a hardware system to prevent this on subsequent versions though, so it's very likely you can run without pulse.
from phat-beat.
Related Issues (18)
- Update to Raspbian Stretch HOT 1
- Swtching from phat-beat to internal audio and vice versa HOT 1
- [Suggestion] vlc-radio: save volume and last station across shutdown/start cycle HOT 8
- Error in the vlcd script HOT 1
- PhatBeat - Change colors of led display HOT 3
- Add a sleep timer HOT 1
- Build a customised Raspbian image for vlc radio. HOT 7
- The VLC Radio installer does not work on this version of Raspbian... HOT 2
- Integrate MQTT HOT 1
- vlcradio installation scripty fails on Rasbian Buster HOT 2
- Audio plays too fast on Zero W HOT 1
- vlcradio script doesn't work with raspbian buster HOT 10
- Change Port of VLC HOT 1
- Url to install Raspbian VLC Radio not working HOT 1
- wiringpi not available on bullseye HOT 6
- Occasional hang when closing a audio device. HOT 7
- 'Unary operator expected' when running phatbeat install script
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from phat-beat.