bjtheone
Posts: 454
Joined: Mon May 20, 2019 11:28 pm
Location: The Frozen North (AKA Canada)

Best audio solution for Pi 4 desktop config

Thu Nov 28, 2019 5:51 pm

My current setup is a set of reasonable, but not fantastic, powered computer speakers plugged directly into the audio jack on a Pi 4. My use case is reasonable quality music when I am working in my office. Typically streaming internet radio or spotify. I would like to get better/cleaner sound with more bass. I have decent bookcase speakers that are suitable sizewise for my office configuration. I am not an audiophile, I am not looking for the perfect system.

I have read a bunch of the audio threads and the consensus seems to be get an Audio Hat for "reasonable" audio, to play to regular bookcase speakers. There are a large number of audio hats and amps. Is there any consensus on which are decent but not crazy expensive solutions.

The second solution, is to get a cleaner line out signal and feed the current mini audio system in the room. The downside to this is that the location is not optimal for wiring it.

epoch1970
Posts: 4203
Joined: Thu May 05, 2016 9:33 am
Location: Paris, France

Re: Best audio solution for Pi 4 desktop config

Thu Nov 28, 2019 9:12 pm

The Justboom amp HAT is good for about any type of speaker, but you'll need to feed it serious electrical power, 70W and more.
Besides, I don't think any of the I2S or USB options out there are ideal for a Desktop because they don't include an audio mixer. Music or Desktop notifications, not both without fiddling with Alsa or a sound server (hence resampling the digital signal, bit-perfect not more).
The built-in audio device in Pi is just a better option, there. Unfortunately you can't use a long USB lead with a DAC at the end of it any more than you should use a long analog line-in cable. 1m is plenty I'd say.

Remote-control of a chromecast dongle or a 2nd hand airport express router installed near the mini audio system might be a solution. Or another Pi running your software of choice (the super cheap "airplay adapters" you can find on the internet are unlicensed and use linux+shairplay. Better build your own.) This way you can keep Desktoping on the Desktop.
"S'il n'y a pas de solution, c'est qu'il n'y a pas de problème." Les Shadoks, J. Rouxel

dustnbone
Posts: 166
Joined: Tue Nov 05, 2019 2:49 am

Re: Best audio solution for Pi 4 desktop config

Thu Nov 28, 2019 9:34 pm

If you've already got powered speakers you don't need the Amp HAT, the DAC HAT will be the one you want. Much simpler because you don't need any fancy power arrangements for it. I use the DAC Zero on my portable music setup (with an external headphone amp) and it sounds pretty good, especially given the price.

https://www.buyapi.ca/product/justboom- ... -pi-zero/

As for getting desktop notification sounds while you play music, if that's important to you it's still possible to use the internal Pi output for those and mix it in with a cheap passive mixer. Or use a separate powered speaker(s) dedicated to that. If you can live without those sounds then none of this will be of concern. Personally I turn most of those sounds off because they're really irritating played back through the high fidelity studio monitors I have on my desk.

On my desktop Pi4 I have a USB DAC plugged in, and it works fine. Not as tidy as the HAT setup but many more options to choose from. There are tons of $25ish USB DACs that will sound amazing compared to the output of the Pi, they're tiny and get their power from USB.

For reference I'm using a Fiio E17K on mine right now, but it's basically just the portable (internal battery) version of the E10K which is considerably cheaper. Brief review of it linked below, I'm pretty snobby about my audio but I consider it to sound "extremely satisfactory" and an excellent bargain at under $80

https://www.headfonia.com/fiio-e10k-classic-reborn/

bjtheone
Posts: 454
Joined: Mon May 20, 2019 11:28 pm
Location: The Frozen North (AKA Canada)

Re: Best audio solution for Pi 4 desktop config

Fri Nov 29, 2019 12:18 pm

dustnbone wrote:
Thu Nov 28, 2019 9:34 pm
If you've already got powered speakers you don't need the Amp HAT, the DAC HAT will be the one you want. Much simpler because you don't need any fancy power arrangements for it. I use the DAC Zero on my portable music setup (with an external headphone amp) and it sounds pretty good, especially given the price.
I will be replacing the powered speakers. They are a fairly cheap pair of Logitechs. I have a number of decent 8 ohm unpowered bookcase speakers that I would like to use, rather than going out and buying a decent set of powered speakers. Thus the need for a AMP.

renice123
Posts: 152
Joined: Tue Oct 15, 2019 3:56 pm

Re: Best audio solution for Pi 4 desktop config

Sun Dec 01, 2019 5:11 pm

I think it all comes down to the convenience of connecting the DAC and amplifier, speakers to the microcomputer.
For a while I experimented with sound and Raspberries, I came to the conclusion that you must have at least two Raspberries in order to get a normal sound cabinet.
This is due to the huge number of wires that are needed for sound and other peripherals.
These are cables for acoustics, power cables of the amplifier and Raspberry, keyboard cables, network connections and hard drives and so on. It is impossible to put it on the desktop, if we are talking about high-quality amplifier, speakers and DACs.
ALSA and jack are the only way to get a high-quality sound that I think is reasonable (without too much cash infusion and attempts to cram everything you need into one computer at once).
This decision is also due to the fact that you can use the already configured sound software, for example, the Volumio OS, on one low-power computer, and put Buster on the second computer.
I have been using only such a configuration for a week now and it works for me round the clock without any problems.
https://volumio.org/
This solution is convenient - you can put a computer server with Volumio and DAC next to the speaker system, and leave the client on the desktop. No additional wires are needed, because the sound is "transmitted" over the network.
Yes, for a long time I tried to use “non-audiophile” solutions, for example, the same program pulseaudio, but alas. It turned out that jack works perfectly on Raspberry without any additional settings, and pulseaudio constantly creates problems (for example, it eats up processor resources along with Chromium or unpleasantly crackles).
Here is my topic. But now I refused to “embed” jack into the OS and install the deb package as an overlay, this is much more convenient.https://www.raspberrypi.org/forums/view ... 8&t=256841

hippy
Posts: 6687
Joined: Fri Sep 09, 2011 10:34 pm
Location: UK

Re: Best audio solution for Pi 4 desktop config

Mon Dec 02, 2019 12:51 am

epoch1970 wrote:
Thu Nov 28, 2019 9:12 pm
Unfortunately you can't use a long USB lead with a DAC at the end of it any more than you should use a long analog line-in cable. 1m is plenty I'd say.
I don't see why a long USB cable should cause problems. The maximum length without an active repeater is 5m ( 15 foot ) for USB 2.0 and I've found that to be absolutely fine.

LTolledo
Posts: 2550
Joined: Sat Mar 17, 2018 7:29 am
Location: Anime Heartland

Re: Best audio solution for Pi 4 desktop config

Mon Dec 02, 2019 9:24 am

This is MY (yes, you read it right, my) best audio solution for desktop config:
RPiDesktopSetups.jpg
RPiDesktopSetups.jpg (195.4 KiB) Viewed 1768 times

power it up with 12 to 24vDC at 2A
and connect some good bookshelf speakers

or connect the line out to some seriously powerful audio amplifiers and speaker sets....
its either I have a party and/or a police banging on my door later :mrgreen:
"Don't come to me with 'issues' for I don't know how to deal with those
Come to me with 'problems' and I'll help you find solutions"

Some people be like:
"Help me! Am drowning! But dont you dare touch me nor come near me!"

bjtheone
Posts: 454
Joined: Mon May 20, 2019 11:28 pm
Location: The Frozen North (AKA Canada)

Re: Best audio solution for Pi 4 desktop config

Mon Dec 02, 2019 12:24 pm

And what audio board would "my solution" use?

dustnbone
Posts: 166
Joined: Tue Nov 05, 2019 2:49 am

Re: Best audio solution for Pi 4 desktop config

Tue Dec 03, 2019 10:07 am

I guess it depends where you want your amp. If a neat tidy package isn't that important to you any suitable amplifier will do the job, in which case just a DAC board of some kind is what you want.


I can recommend the JustBoom DAC on my own experience with it, the sound quality is excellent for the price. It works flawlessly with Raspbian and uses very little power.

I think the AMP hat contains the same DAC, with an integrated amplifier. Again for the price it seems like a pretty good deal, and I've heard good things about the amplifier circuit.

Personally if I was looking for a small amp to drive a pair of bookshelfs, I'd hit up craigslist for something old and great. But I'm always looking for a reason to do that....

bjtheone
Posts: 454
Joined: Mon May 20, 2019 11:28 pm
Location: The Frozen North (AKA Canada)

Re: Best audio solution for Pi 4 desktop config

Tue Dec 03, 2019 12:31 pm

Sorry, the "my solution" was in reference to @LTolledo picture. It is a very nice picture, but I don't know which AMP hat it is.

While I agree that a seperate amp might provide better sound I am looking for compact and packaging. The Pi and SSD lurk up behind my monitor. Trying to keep cable clutter down, so don't really want to add another box and wires to the desktop.

LTolledo
Posts: 2550
Joined: Sat Mar 17, 2018 7:29 am
Location: Anime Heartland

Re: Best audio solution for Pi 4 desktop config

Tue Dec 03, 2019 1:43 pm

oh so wanted to know about the DAC-Amp that I used for "my solution" , its a Suptronics X400 v3.0 :D
"Don't come to me with 'issues' for I don't know how to deal with those
Come to me with 'problems' and I'll help you find solutions"

Some people be like:
"Help me! Am drowning! But dont you dare touch me nor come near me!"

User avatar
MikeDB
Posts: 166
Joined: Sun Oct 12, 2014 8:27 am

Re: Best audio solution for Pi 4 desktop config

Wed Dec 04, 2019 1:12 am

Any of the PCM5102 DAC based HATs should produce high quality line level audio to feed power speakers. These should be the easiest to set up because the 5102 generates its own master clock. As you say there are higher quality and more expensive DACs available but it doesn't sound like you need them.
Will the forthcoming MIDI-2 spec at last allow us to set the volume to 11 !!

RossDv8
Posts: 244
Joined: Thu Jan 21, 2016 12:35 pm

Re: Best audio solution for Pi 4 desktop config

Wed Dec 04, 2019 4:54 am

My current setup is a set of reasonable, but not fantastic, powered computer speakers plugged directly into the audio jack on a Pi 4. My use case is reasonable quality music when I am working in my office. Typically streaming internet radio or spotify. I would like to get better/cleaner sound with more bass.
I'm not going to get into how you can solve the desktop notification sounds thing with pulseausio volume control, because, well, you've seen my posts on two two other threads about Pi audio. However, to be fair to pulseaudio, the problem turned out to be a dead wire in one channel on my 15 year old Logitech speakers.

That said however, it just might be worth seeing what Logitech has to offer now. I had one set with a basic sub woofer and two small speakers. The sub woofer was just
in the bottom of its box.
I got another computer and decided it needed speakers, and I got a slightly dearer, but not over expensive Logitech set with a sub woofer and 2 x 3cm (approx)speakers in each case. This sub woofer is in the side of the box with a nice metal grilles about 20cm (8 ") diameter. The sound is fantastic. Or was until one channel developed an intermittent fault, causing me lots of drama because picking the Pi up to swap operating systems cause the wire to move, giving me stereo in Manjaro and Mono in Raspbian or vice versa, depending..

Anyway, the Pi, once the speaker set is decent, puts out very nice sound, Raspbian is a bit low on volume, but someone posted a way to get around that without using pulseaudio. And you can also overdrive ALSA by about 4db once you work out how to do it.

And, there is a basic alsa equalizer if you don;t mind the alsamixer style graphics.
I'm about to buy my 3rd Logitech speaker system in close to 20 years... Very reliable products.
Remember, nobody is listening to you
until you fart ...

tpylkko
Posts: 384
Joined: Tue Oct 14, 2014 5:21 pm

Re: Best audio solution for Pi 4 desktop config

Wed Dec 04, 2019 10:04 am

If you want to use a desktop and also listen to music, it might be easier to buy a pi zero w and use that as a separate audio server with something like PiMusicbox or Volumio and use the pi4 for the Desktop computing. You could then control this device with any phone or other computer, it would be dedicated to that purpose and a zero can easily run these audio software (I have done it multiple times). Then you don't have to worry about the alsa/pulseaudio setup things and such either.

I also second the idea of getting a I2S based on PCM5122 or equivalent. I got an IQaudio pi-dac+ like 5 years ago, connected it to a small lepai amp (has simple EQ and vol) and speakers that I already had. The sound is fantastic, even better than other some other audio hardware that I have had that costed much more. Very reliable, no issue ever, even though the computer and sound card was on 24/7 for 5 years. Not maybe totally first class HiFi audio stuff, but it is definitely appropriate for what you describe you need.

http://iqaudio.co.uk/3-hats

But there are other vendors with basically the same or newer versions of the same chip.

bjtheone
Posts: 454
Joined: Mon May 20, 2019 11:28 pm
Location: The Frozen North (AKA Canada)

Re: Best audio solution for Pi 4 desktop config

Wed Dec 04, 2019 12:30 pm

I had not considered a totally separate audio server. At the right price point it would solve my speaker placement issue, as I could just go line in to the bookcase system that is in the room and move it to the big stereo for house parties. Humm, so many options.

User avatar
MikeDB
Posts: 166
Joined: Sun Oct 12, 2014 8:27 am

Re: Best audio solution for Pi 4 desktop config

Wed Dec 04, 2019 3:13 pm

tpylkko wrote:
Wed Dec 04, 2019 10:04 am
I also second the idea of getting a I2S based on PCM5122 or equivalent. I got an IQaudio pi-dac+ like 5 years ago, connected it to a small lepai amp (has simple EQ and vol) and speakers that I already had. The sound is fantastic, even better than other some other audio hardware that I have had that costed much more. Very reliable, no issue ever, even though the computer and sound card was on 24/7 for 5 years. Not maybe totally first class HiFi audio stuff, but it is definitely appropriate for what you describe you need.
I'm using a custom HAT driving a pair of Sony Professional powered monitor speakers and I have to say there's little difference between the TI chip and the top-flight AKM VelvetSound devices. It's only when you have large numbers of inputs to ADCs being added together in a mixer that the lower noise floor really helps, but for DACs the TI device is definitely in the audio first class. I had assumed the Pi would put out all sorts of E-M noise so had arranged that the HAT could be located on the end of a long ribbon cable, but in the end it just sits on top of the Pi and isn't bothered by it except when booting when there is a definite click or two despite the DACs mute circuit.
Will the forthcoming MIDI-2 spec at last allow us to set the volume to 11 !!

LTolledo
Posts: 2550
Joined: Sat Mar 17, 2018 7:29 am
Location: Anime Heartland

Re: Best audio solution for Pi 4 desktop config

Wed Dec 04, 2019 9:27 pm

MikeDB wrote:
Wed Dec 04, 2019 3:13 pm
......., but in the end it just sits on top of the Pi and isn't bothered by it except when booting when there is a definite click or two despite the DACs mute circuit.
most are not bothered by this power-on click or thud on the speakers 8-)
am one of those bothered :x

to mitigate that I made several research and actual experimentations
the best that I came up was to put an Attiny13A based "power-on-delay relay" daughter board on top of the DAC
either forcing the mute function after some time, (for the Suptronics X400 v3.0)
DAC-POD.jpg
DAC-POD.jpg (147.41 KiB) Viewed 1423 times
or
delaying the "connection" to the speakers. (for the Suptronics X400 v2.0)

the latter method seemed to be the "industry standard".... (corrections welcome) :D
"Don't come to me with 'issues' for I don't know how to deal with those
Come to me with 'problems' and I'll help you find solutions"

Some people be like:
"Help me! Am drowning! But dont you dare touch me nor come near me!"

User avatar
MikeDB
Posts: 166
Joined: Sun Oct 12, 2014 8:27 am

Re: Best audio solution for Pi 4 desktop config

Fri Dec 06, 2019 12:44 am

LTolledo wrote:
Wed Dec 04, 2019 9:27 pm
.... or delaying the "connection" to the speakers. (for the Suptronics X400 v2.0)

the latter method seemed to be the "industry standard".... (corrections welcome) :D
Yes that is what those big killowatt PA amplifiers do. And they disconnect the speakers as soon as they sense the power going as well.

It sounds like you were getting more of a 'thud' which isn't good for the speaker drive units. Mine was more a gentle click.
Will the forthcoming MIDI-2 spec at last allow us to set the volume to 11 !!

crocket
Posts: 122
Joined: Thu Mar 07, 2019 12:38 pm

Re: Best audio solution for Pi 4 desktop config

Sun Dec 15, 2019 12:20 am

If you want to listen to music and notification sounds, you can use ALSA dmix.

By the way, ALSA uses dmix by default. So, you don't need any configuration.
If you disabled sound cards that you don't use, ALSA will automatically use dmix on the only sound card that you use.

Just turn off sound cards that you don't use. ALSA will take care of the rest.

If you want to minimize latency and maximize audio quality, I recommend the following setup.

Code: Select all

> aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: SB [HDA ATI SB], device 0: ALC887-VD Analog [ALC887-VD Analog]
  Subdevices: 0/1
  Subdevice #0: subdevice #0
card 0: SB [HDA ATI SB], device 1: ALC887-VD Digital [ALC887-VD Digital]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: HDMI [HDA ATI HDMI], device 3: HDMI 0 [HDMI 0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
I want to use card 0, device 0. You don't want to use card number because card number can change. You want to use card name.
The card name for card 0 is SB. Thus, my ~/.asoundrc looks like

Code: Select all

pcm.dmix {
  type dmix
  slave {
    pcm {
      type hw
      card SB
      device 0
    }
    period_size 480
    periods 3
    format S32_LE
    rate 48000
  }
}

pcm.!default {
  type plug
  slave {
    pcm "dmix"
  }
  rate_converter "samplerate_best"
}
`rate` is sampling rate used for resampling. I recommend 48000 unless you want different sampling rates.
`format` comes from

Code: Select all

> aplay --dump-hw-params -D hw:CARD=SB,DEV=0 /usr/share/sounds/alsa/Front_Center.wav
Playing WAVE '/usr/share/sounds/alsa/Front_Center.wav' : Signed 16 bit Little Endian, Rate 48000 Hz, Mono
HW Params of device "hdp":
--------------------
ACCESS:  MMAP_INTERLEAVED RW_INTERLEAVED
FORMAT:  S32_LE
SUBFORMAT:  STD
SAMPLE_BITS: 32
FRAME_BITS: 64
CHANNELS: 2
RATE: 48000
PERIOD_TIME: (333 85334)
PERIOD_SIZE: [16 4096]
PERIOD_BYTES: [128 32768]
PERIODS: [2 32]
BUFFER_TIME: (666 170667)
BUFFER_SIZE: [32 8192]
BUFFER_BYTES: [256 65536]
TICK_TIME: ALL
--------------------
aplay: set_params:1339: Sample format non available
Available formats:
- S32_LE

crocket
Posts: 122
Joined: Thu Mar 07, 2019 12:38 pm

Re: Best audio solution for Pi 4 desktop config

Sun Dec 15, 2019 3:22 am

I recommend that you buy a DAC HAT or an AMP HAT from justboom, hifiberry, or iqaudio.
If you wanted decent audio, products from any of these three companies will do the job.

InnoMaker also makes audio HATs, but I don't know much about their products.

Return to “General discussion”