I’m trying to get the audio output directly from the RPi4 3.5mm but it’s completely distorted to the point of being unusable. However doing audio test using the following code is fine through the same socket.
speaker-test -c2 -twav -l7
I can also output audio to a USB dac and also to a DigiHat perfectly through Plexamp but the onboard socket just doesn’t seem to work.
Is this usual? Is an audio adapter a requirement with an RPi?
I had that issue, via the Rpi.ip::32500 > Settings> Playback>Audio Output> changed it away from default to one that works,
I’m running a Zero2W with a waveshare Pi Zero 2W To 3B Adapter which is USB PnP Audo
Had to do the same when I was messing about the a RPi 3+ but I can’t remember the audio card name
I should add that I can stream audio to the RPi via Bluetooth and Airplay (via shairport-sync) without issue - the output from the 3.5mm jack sounds perfectly fine.
hmmm, any chance amixer is adding gain or something like that? you can also try turning off loudness leveling, EQ and seeing if that makes a difference.
Go to Setting → Playback → Audio Output → Audio Device and select something other than ‘Default.’ For example, ‘bcm2835 Headphones.’ Then, back out of Settings.
I’ve been messing with it on and off all day and I somehow briefly managed to get it to work but when I came back or tried it again it had stopped again. It’s like the signal is overall very quiet but completely distorted but still has the timing of the particular track.
EQ, loudness leveling, preamp all off or 0.
Simple mixer control 'Master',0
Capabilities: pvolume pswitch pswitch-joined
Playback channels: Front Left - Front Right
Limits: Playback 0 - 65536
Mono:
Front Left: Playback 65500 [100%] [on]
Front Right: Playback 65500 [100%] [on]
Did you possibly install PulseAudio, OSS, or Jack?
Any custom settings for ALSA in alsa.conf or asoundrc?
What you describe reminds me of hearing the wrong channel of an 8 ch upmix.
You might get more information using alsamixer to investigate levels.
Thanks - yes it looks Pulse Audio and Jack are both listed as options in the plexamp audio device outputs.
I’ve added Sharepoint (for Airplay) and Raspotify (for Spotify Connect) streaming. It looks like libpulse is a dependancy of Raspotify.
Is there a work-around? Hopefully I’ll be able to re-image and re-install Plexamp to confirm later.
shairport-sync (airplay) supports ALSA audio output (I don’t think it requires pulseaudio to be installed)
librespot (spotify connect) can be built with ALSA support … you might need to do this yourself, then figure out the right command options for your setup, then create your own systemd service file
but it would be good to understand how/why the presence of Pulse or Jack might cause or enable the distorted output … like @elan mentioned above, maybe in plexamp it was getting routed thru Pulse Audio and adding too much gain?
I must have tried this sequence a dozen times yesterday and it didn’t work.
I’ve just tried again but adding sudo systemctl restart plexamp after disconnecting and that seems to have helped.
It seems when I change the audio output device and do the disconnection dance it will then refuse to play anything (or immediately stop) or plexamp will become disconnected and continue playing with no way of stopping) until the service is restarted.
This behaviour made me think alternative choices weren’t working. It still seems a bit confusing and unclear.
As @pshanew suggested the ‘‘bcm2835 Headphones’ choice works, default does not.
Thanks for all the help and assistance in resolving this.