Volumio Streamer Configuration Tips

Discussion in 'Computer Audiophile: Software, Configs, Tools' started by Woland, May 19, 2021.

Tags:
?

Help prioritise the tip writeups.. which would you value most?

  1. Securing Volumio

    11.5%
  2. Binaural (headphone) add-in

    13.1%
  3. DSP add-in

    21.3%
  4. Room Correction / REW add-in

    16.4%
  5. Optimizing pi hardware for audio

    52.5%
  6. Comparison of pi vs PC

    21.3%
  7. Amplifier auto power-on, power-off

    3.3%
  8. LastFM integration

    3.3%
  9. Spotify

    14.8%
  10. Streaming from PC/Mac to Volumio

    41.0%
  11. Streaming from Android to volumio

    16.4%
  12. Streaming Tidal / Qobuz

    36.1%
  13. API

    6.6%
Multiple votes are allowed.
  1. Qstik

    Qstik Acquaintance

    Joined:
    May 15, 2020
    Likes Received:
    67
    Trophy Points:
    18
    Location:
    SE Michigan
    In the case of your PC, I think of it as:

    1 CPU per socket
    12 (physical) Cores per CPU
    2 (logical) Threads per Core * 12 Cores = 24 Total Threads per CPU

    I believe the plug-in writer in your example is misusing the term CPU(s) when he really means Threads
     
  2. Thad E Ginathom

    Thad E Ginathom Friend

    Pyrate
    Joined:
    Sep 27, 2015
    Likes Received:
    14,134
    Trophy Points:
    113
    Location:
    India
    I sympathise. But I am not talking about pluginwriters, I am talking about core Linux/GNU stuff!
     
  3. MegaKen

    MegaKen New

    Joined:
    Sep 28, 2021
    Likes Received:
    24
    Trophy Points:
    8
    Location:
    Philadelphia, PA
    thanks guys for the explanation - it makes sense now.
     
  4. MegaKen

    MegaKen New

    Joined:
    Sep 28, 2021
    Likes Received:
    24
    Trophy Points:
    8
    Location:
    Philadelphia, PA
     
  5. MegaKen

    MegaKen New

    Joined:
    Sep 28, 2021
    Likes Received:
    24
    Trophy Points:
    8
    Location:
    Philadelphia, PA
    How could this be? How can the buffer size change the quality of output?
     
  6. Thad E Ginathom

    Thad E Ginathom Friend

    Pyrate
    Joined:
    Sep 27, 2015
    Likes Received:
    14,134
    Trophy Points:
    113
    Location:
    India
    It can change it in a big way, and I'm sure you are aware of that, eg, buffer size wrong causing dropouts in listening.

    As to changing the quality of the sound, I don't know, and I'm too deaf to experiment. But I have always been deeply sceptical of stuff like reading the whole track into memory.
     
  7. Garns

    Garns Friend

    Pyrate
    Joined:
    Jul 9, 2016
    Likes Received:
    2,483
    Trophy Points:
    93
    Location:
    Sydney, AUS
    Basically the PI2AES sounds better playing back from an internal SD card than streaming over ethernet. So I was trying to rig it to load files into RAM before playing them back. But changing the mpd buffer size seems to affect the sound quite dramatically. I guess I changes the way that chunks of data get sequenced into the buffers of the PI2AES, which impacts on jitter.

    Here's another tweak of a similar kind: change the hardware buffer size. Like the other tweaks, this seems to have some perceived effect on plankton retrieval.

    SSH into your volumio system and then do
    Code:
    sudo nano /volumio/app/plugins/music_service/mpd/mpd.conf.tmpl
    This is the mpd configuration template that volumio uses. Note if you edit this then volumio will have problems updating. After this line:
    Code:
                    dop                     "${dop}"
    you can add another line:
    Code:
                    buffer_time "20000"
    Now go into your volumio web interface, Playback Options, and press "Save" under General Playback Options to regenerate the mpd configuration file.

    Experiment with the number. The default is 500000. If you reduce it too much you get clicks and pops. Reducing it less than that to make the sound more immediate/engaging, though I can't quite tell if it just does this by emphasising leading edges. 20000 works for me.
     
    Last edited: Oct 17, 2021
  8. Garns

    Garns Friend

    Pyrate
    Joined:
    Jul 9, 2016
    Likes Received:
    2,483
    Trophy Points:
    93
    Location:
    Sydney, AUS
    One last mod! This implements this polarity inversion tweak: inverting one channel of your audio playback, which you then invert again at your transducer. The idea is that this balances the load on your analog components' power rails and reduces cross-talk. Generally it does have some noticeable effect. So this tweak is just how to get volumio set up to invert one channel.

    SSH into your volumio system and first enter
    Code:
    sudo nano /etc/mpd.conf
    This is your current MPD configuration file. Page down to where it says "audio_output". On mine it says
    Code:
    audio_output {
                    type            "alsa"
                    name            "alsa"
                    device          "hw:2,0"
                    dop                     "no"
    }
    Note down the text after "device" and close nano. Now enter
    Code:
    sudo nano /etc/asound.conf
    This file, which should be empty, is the ALSA configuration file. Enter the following:
    Code:
    pcm.invert {
             type route
             slave {
                     pcm "hw:2,0"
                     channels 2
             }
             ttable {
                     0.0= 1
                     1.1= -1
             }
    }
    and replace hw:2,0 with whatever you saw in your mpd.conf. Now do:
    Code:
    sudo nano /volumio/app/plugins/music_service/mpd/mpd.conf.tmpl
    This is the mpd configuration template that volumio uses. Comment out this line by prepending a #:
    Code:
                   device          "${device}"
    and add a new line after it:
    Code:
                    device          "invert"
    Now go into your volumio web interface, Playback Options, and press "Save" under General Playback Options to regenerate the mpd configuration file. Hey presto, you should have one channel inverted. Might need a reboot - I just stopped and started the volumio service from SSH:
    Code:
    sudo volumio vstop
    sudo volumio vstart
     
    • Like Like x 4
    • Epic Epic x 1
    • List
  9. MegaKen

    MegaKen New

    Joined:
    Sep 28, 2021
    Likes Received:
    24
    Trophy Points:
    8
    Location:
    Philadelphia, PA
    how do you know which file does what? configurations, templates, etc..
     
  10. MegaKen

    MegaKen New

    Joined:
    Sep 28, 2021
    Likes Received:
    24
    Trophy Points:
    8
    Location:
    Philadelphia, PA
    "Basically the PI2AES sounds better playing back from an internal SD card than streaming over ethernet."
    @Michael Kelly is this true?
     
  11. RestoredSparda

    RestoredSparda Friend

    Pyrate
    Joined:
    Jan 7, 2021
    Likes Received:
    3,638
    Trophy Points:
    93
    Location:
    WI
    Michael doesn't usually comment on sound. He just builds an awesome unit.

    Try it for yourself and let us know what you find.
     
  12. M3NTAL

    M3NTAL Friend

    Pyrate
    Joined:
    Sep 27, 2015
    Likes Received:
    1,697
    Trophy Points:
    113
    Location:
    Arizona
    I might be crazy, but I think streaming sounds glorious on the Pi2AES, but I haven't compared local files and I don't have that much nervosa. I do have nervosa and laziness over all the tweaks being implemented in this thread though - and I'd love to see a 'SBAF customized' build available to Pi2AES users. I want to turn off all the dang lights and adjust all the performance settings without all the SUDO stuff. That's just my $0.02.

    Still loving my Pi2AES (PcP Squeeze)
     
  13. MegaKen

    MegaKen New

    Joined:
    Sep 28, 2021
    Likes Received:
    24
    Trophy Points:
    8
    Location:
    Philadelphia, PA
    Hmm if he built it - he should be able to explain why it does certain things.

    Like your car manufacturer can tell you whether premium gas would be better, and why that is.
     
    • Like Like x 1
    • Dislike Dislike x 1
    • List
  14. Michael Kelly

    Michael Kelly MOT: Pi 2 Design

    Pyrate
    Joined:
    Apr 22, 2016
    Likes Received:
    4,112
    Trophy Points:
    113
    Location:
    Rhode Island, USA
    Home Page:
    Please keep that thought in mind when we come out with mercury. We are going to be releasing it with a configured version of volumio and are very open to the idea of implementing some of these tweaks and delivering it as part of the base software.
     
  15. Michael Kelly

    Michael Kelly MOT: Pi 2 Design

    Pyrate
    Joined:
    Apr 22, 2016
    Likes Received:
    4,112
    Trophy Points:
    113
    Location:
    Rhode Island, USA
    Home Page:
    if only that were true. I can tell you why I did things in order to improve the specific areas I can measure electrically. But how they eventually work their way to your brain involves a lot of other pieces parts.
     
  16. Garns

    Garns Friend

    Pyrate
    Joined:
    Jul 9, 2016
    Likes Received:
    2,483
    Trophy Points:
    93
    Location:
    Sydney, AUS
    That is a great point. I might look into whether any of these can be whipped up into plugins you can use through the web interface. (Not the lights, but maybe the other stuff)
     
  17. MegaKen

    MegaKen New

    Joined:
    Sep 28, 2021
    Likes Received:
    24
    Trophy Points:
    8
    Location:
    Philadelphia, PA
    @coin777 posted a hack to turn off lights a couple of pages back, no?

    Pi3B+
    CODE:
    # Disable the PWR and Activity LED
    dtparam=pwr_led_trigger=none
    dtparam=pwr_led_activelow=off
    dtparam=act_led_trigger=none
    dtparam=act_led_activelow=off

    # Disable Ethernet LEDs
    dtparam=eth_led0=14
    dtparam=eth_led1=14



    Pi4
    CODE:
    # Disable Ethernet LEDs
    dtparam=eth_led0=14
    dtparam=eth_led1=14

    # Disable the PWR LED
    dtparam=pwr_led_trigger=none
    dtparam=pwr_led_activelow=off

    # Disable the Activity LED
    dtparam=act_led_trigger=none
     
  18. Thad E Ginathom

    Thad E Ginathom Friend

    Pyrate
    Joined:
    Sep 27, 2015
    Likes Received:
    14,134
    Trophy Points:
    113
    Location:
    India
    Code:
    sudo nano
    
    Ahh, come on guys, if you're going to do Linux fiddling, learn vi! :D
     
  19. coin777

    coin777 Acquaintance

    Joined:
    Feb 8, 2019
    Likes Received:
    34
    Trophy Points:
    18
    Location:
    poland
    Not a chance. I hate my life enough as it is.
     
  20. Thad E Ginathom

    Thad E Ginathom Friend

    Pyrate
    Joined:
    Sep 27, 2015
    Likes Received:
    14,134
    Trophy Points:
    113
    Location:
    India
    Oh god, don't tell me you're an emacs guy! :eek: :D

    I really wish I had not lost a lot of the every-day-use fluency I had with vi. Unix was love at first sight for me, and vi was part of that.

    In about 1991, I was working in company doing installation and support of Unix machines, a handful of accounting packages, and a couple of other miscellaneous bit of software including Wordperfect.

    Two of us had to be officially told to use WP, not vi, for all of our correspondence. lol: I moved from a manual typewriter to vi :p. /offtopic.

    Here's a more practical piece of advice. When editing config files, that might actually prevent machine booting or vital software running, always keep a copy, right there. So, for configfile, I would have configfile.install (out of the box) configfile.0, configfile.1, configfile.2 etc.

    just, eg
    Code:
    $ cp configfile configfile.3
    
    sudo if you need to.

    So easy to undo. You have a history too. Copy the file that doesn't work to another name, and figure out the problem/typo at leisure.

    (there are one or two places where every file in a directory will be executed: in those places, keep the copies somewhere else or it might be ok to chmod -x them.)
     

Share This Page