HQPlayer Upsampling Runs on a Pi4 - Invigorate your digital audio!

Discussion in 'Computer Audiophile: Software, Configs, Tools' started by Woland, Jul 20, 2021.

  1. Woland

    Woland Friend

    Friend
    Joined:
    Jan 13, 2021
    Likes Received:
    1,030
    Trophy Points:
    93
    Location:
    a friendly land
    No.
     
  2. Woland

    Woland Friend

    Friend
    Joined:
    Jan 13, 2021
    Likes Received:
    1,030
    Trophy Points:
    93
    Location:
    a friendly land
    I've been playing around with a DAC today which supports high PCM rates over USB, and DSD.

    The Pi4 seems able to upsample to PCM 768k without problems.

    The Pi4 seem to be able to convert from PCM to DSD 128 without problems. DSD 256 and 512 stuttered. Results may depend on the specific filter settings, take these as a starting point only.

    Either way this setup looks like a great way to greatly enhance performance from a cheap DAC, using the beefy Pi CPUs and a bit of buffering to crunch the data. It enhances sound quality by bypassing / replacing the constrained upsampling and DSD conversion in the DAC.
     
  3. GoodEnoughGear

    GoodEnoughGear Evil Dr. Shultz‎

    Friend
    Joined:
    Oct 25, 2015
    Likes Received:
    3,004
    Trophy Points:
    113
    Location:
    Cape Town, South Africa
    PCM upsampling is pretty CPU light in HQPlayer, it's DSD that will get as heavy as you like (as in there are some upsampling+modulators that can't run on current consumer CPUs). I agree, this should make a big difference on a crappier DAC.
     
  4. Yossarian

    Yossarian Rando

    Joined:
    Jul 13, 2021
    Likes Received:
    0
    Trophy Points:
    3
    Location:
    South Africa
    thanks for the guide I might add you will need to enable HQ player in Roon (Duh :) ) but this tripped me up a little this morning.

    I have been playing around with this and am not sure yet if i want to make it permanent.

    For background, I have an Audio-GD R8mk2 DAC that feeds a Valve Tube amp into a Classe Power amp. I love the richness and presence of the DAC, the upsampling (poly since short) does improve air and separation but I find it losses a little of the realistic magic.

    Any recommendation on filters for the NAA in pi 4. I tried the much loved Poly since Gauss XLA but my PI could not render it so will ask for recommendation that will work on HQplayer on a PI :)
     
  5. androxylo

    androxylo Acquaintance

    Joined:
    Jul 9, 2019
    Likes Received:
    32
    Trophy Points:
    18
    Location:
    New York
    You said in the 1st post HQPlayer cannot work with Spotify. I want to check the current status - still can't?
     
  6. Woland

    Woland Friend

    Friend
    Joined:
    Jan 13, 2021
    Likes Received:
    1,030
    Trophy Points:
    93
    Location:
    a friendly land
    HQPlayer can take input from USB or any other digital input such as from an audio interface or loopback device. If you send Spotify (or any other app) data to HQPlayer one of those ways, HQPlayer will upsample normally.

    While I have Spotify over USB working with rough fixes, a robust solution to the technical challenges requires someone more skilled in Linux audio and the Linux kernel. If interested, a good starting point is to google "Linux USB-Audio Gadget (RPi4 OTG)"
     
  7. Woland

    Woland Friend

    Friend
    Joined:
    Jan 13, 2021
    Likes Received:
    1,030
    Trophy Points:
    93
    Location:
    a friendly land
    I use sinc-Mx or similar (Mx = 250k taps upsampling 44k to 196k) with NS9 dither. I couldn't get sinc-M (1000k taps) to operate reliably. As far as I can tell, no-one aside from Bob Stuart likes minimum-phase, so I would ignore all "MP" options but be open to intermediate "IP" options. Closed-form is like a Schiit DAC's internal Super-Combo Burrito filter.
     
  8. dericchan1

    dericchan1 Acquaintance

    Joined:
    Sep 14, 2021
    Likes Received:
    61
    Trophy Points:
    28
    Location:
    Canada
    Thanks for the tutorial and sharing your experiences.

    I set up the trial version on my rpi4 connected through USB to a Marantz dac and had no issues using the built-in player and upsampling to 384k with sinc-m lsn15.

    I plan to use hqplayer in the future to my ifi neo idsd dac that supports 32/768k and dsd512. Will the pi4 be powerful enough to run upsampling to 32/768k with sinc-m lsn15 or ns5 or ns9?

    Will the Pi 4 be powerful enough to be used as a hqplayer server for upsampling and filters and I can use another Pi 4 or nuc with jriver or maybe moode as a player and library management?
    Thanks

    Deric
     
  9. soumya

    soumya Rando

    Joined:
    Jun 24, 2018
    Likes Received:
    25
    Trophy Points:
    8
    Location:
    Mordor, Middle Earth
    I am waiting on Henrik (camilladsp author) to complete a feature enhancement which would eliminate the need of SoX in my DSP pipeline.
    Post that, I intend to make my DietPi based Rpi 4 image open source which serves as a Spotify Connect client or as a DLNA renderer (Tidal/Qobuz via Bubble UPnP) and then up-samples using my custom coefficients.
    It's by no means a finished polished product like HQPlayer. But it sounds much better to me (actually my dissatisfaction with HQPlayer was the sole reason I embarked on this journey, but I digress :) ).
    Presently, doing 16x up-sampling for only Redbook content (705.6K) on Rpi 4. Avg load lingers around 15-30 %. While I am not a fan of quoting taps as an indication of how good a reconstruction filter is; quoting them here since gullible audiophiles will eventually ask.
    It can either do single stage 1M taps at 705600. Or do in 2 cascaded stages with different custom window techniques. I prefer the 2nd approach personally.
    There are several things to optimize - latency being the #1 issue (by decreasing the buffer size in the pipeline. I am hoping making it open source will engage other devs to contribute to this project.
     
  10. soumya

    soumya Rando

    Joined:
    Jun 24, 2018
    Likes Received:
    25
    Trophy Points:
    8
    Location:
    Mordor, Middle Earth
    Here's what to expect. Currently using as Spotify Connect - upsampling 16x to USB DAC
    [​IMG]
     
  11. Garns

    Garns Friend

    Friend
    Joined:
    Jul 9, 2016
    Likes Received:
    2,166
    Trophy Points:
    93
    Location:
    Sydney, AUS
    Sounds interesting. Any way of conveniently doing offline upsampling? Real-time upsampling is uninteresting to me as the increased CPU load partially offsets the advantages of doing upsampling in the first place. Camilladsp doesn't seem to support reading or writing from flac files, only raw samples, but maybe there is a front end or wrapper which can do this.

    EDIT: I guess you can pipe sox into camilladsp into sox to handle the format conversion at each end. Then you'd need to copy the metadata over. Should be easily scriptable.
     
    Last edited: Nov 1, 2021
  12. Woland

    Woland Friend

    Friend
    Joined:
    Jan 13, 2021
    Likes Received:
    1,030
    Trophy Points:
    93
    Location:
    a friendly land
    There's a HQPlayer Pro version which does it.. but the pricing makes no sense for a consumer.
     
  13. Woland

    Woland Friend

    Friend
    Joined:
    Jan 13, 2021
    Likes Received:
    1,030
    Trophy Points:
    93
    Location:
    a friendly land
    Realtime is the only option for those of us who rely on music streaming services..
     
  14. soumya

    soumya Rando

    Joined:
    Jun 24, 2018
    Likes Received:
    25
    Trophy Points:
    8
    Location:
    Mordor, Middle Earth
    My stance on offline vs real-time conversion is somewhat divided.
    Here's what I feel

    PCM Conversion

    I feel offline PCM conversion makes little sense.
    a. PCM up-sampling even with long filters is still not as taxing as PCM-DSD modulation. An Rpi 4 will easily handle the load with more than enough room to spare in terms of CPU utilization.
    b. Vast majority of DACs are Delta-Sigma chip based DACs which do 8x digital interpolation internally. Which means if we intend to defeat the internal digital reconstruction of the DAC chip, the sampling rate should be at least 352.8 / 384 kHz. While FLAC and ALAC can handle sampling rates till 384 kHz, the file sizes are ridiculously big. For 16x up-sampling, there is no option other than storing gigantic 705.6 / 786 kHz wave files.
    c. As Woland mentioned, if you totally rely on streaming services, keeping offline copies gets cumbersome.

    DSD Conversion
    Offline DSD conversion makes total sense since it's a very taxing processing specially when working with higher order modulators.
    Without getting in to infamous PCM vs DSD war, I can say with DSD we at least get to bypass the internal digital interpolation filter that (most) PCM is subjected to in delta sigma DAC chips. Whether or not it will bypasses the internal delta sigma modulation of the DAC chip depends on the chip manufacturer and/or DAC designer. With ESS you can never get rid of the HyperStream modulator for better or worse. With AKM, whether or not the DSD Direct feature is enabled depends on the DAC implementation.
    Back to the subject, DSD64 when compressed with WavPack creates very manageable file sizes as opposed to say FLAC compressed PCM 352.8 / 24 sources. And this is what I have been doing when it comes to playing music I carry in my DAPs. Quite a few players support playback of WavPack compressed DSD
     
    Last edited: Nov 1, 2021
  15. MisterRogers

    MisterRogers Ethernet Nervosa

    Friend
    Joined:
    Sep 27, 2015
    Likes Received:
    1,828
    Trophy Points:
    93
    Location:
    Aurora, CO
    Home Page:
    @Woland - question. For HQPlayer (embedded), how do I set it up for DOP pass through for DSD's?
     
  16. Woland

    Woland Friend

    Friend
    Joined:
    Jan 13, 2021
    Likes Received:
    1,030
    Trophy Points:
    93
    Location:
    a friendly land
    Sorry, I haven't explored the DSD options.
     
  17. CranBB

    CranBB Rando

    Joined:
    Nov 18, 2021
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Hong Kong
    Did you try to connect iphone? I wonder apple music bitrate auto switching would work for this solution.
     
  18. sa3999

    sa3999 Rando

    Joined:
    Nov 30, 2021
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    UK
    Hi All

    New here and I have spare Pi4 lying around and thought I would give HQPlayer a go.

    However, when I try to download the embedded install files for the Raspberry Pi, I get a "403 forbidden" error and I can;t download the image file.

    Anyone else had this issue? Is there a "work-around" or am I being an idiot?

    Thanks - SA
     
  19. sa3999

    sa3999 Rando

    Joined:
    Nov 30, 2021
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    UK
    I've solved this. I WAS being an idiot !!

    I was trying to download an old Embedded Install file. Sorted now

    Rgds - SA
     
  20. leafy

    leafy Acquaintance

    Contributor
    Joined:
    Jul 18, 2017
    Likes Received:
    75
    Trophy Points:
    18
    Location:
    Taiwan
    I am running into an issue that I don't quite understand. Setting the fixed volume at 0 dbFS and initial volume at 0 dbFS, but the volume output is quieter compared to a direct bitperfect output by Ropieee on the same HW (RPi4->Pi2AES-> AES/EBU -> Yggdrasil), am I missing anything?
     

Share This Page