Improve replay sound quality under Debian

Cool stuff you can do with MPD. A place for you to put your hacks and patches, or be inspired by others'.
Post Reply
nbpf
Posts: 56
Joined: June 17th, 2014, 6:45 am

Improve replay sound quality under Debian

Post by nbpf » October 6th, 2015, 1:32 pm

I am very satisfied with the sound quality of MPD. But this does not mean, it cannot be further improved. This thread is meant to specifically address MPD configuration options, OS settings and BIOS settings that have been found to improve the sound quality of MPD specifically in Debian systems. Reports on settings that have negatively affected the sound quality of MPD replay in such systems, are equally welcomed. Thanks for sharing, nbpf

skidoo
Posts: 155
Joined: April 28th, 2013, 10:06 pm
Location: Western Germany

Re: Improve replay sound quality under Debian

Post by skidoo » October 6th, 2015, 11:12 pm

There is NO silver bullet. Sorry
  • Use decent speakers or headphones
  • Use fanless computer and ssd
  • Onboard sound noisy? Use decent external DAC
  • Use lossless audio codec(s)
  • Use recent MPD and kernel

nbpf
Posts: 56
Joined: June 17th, 2014, 6:45 am

Re: Improve replay sound quality under Debian

Post by nbpf » October 7th, 2015, 9:40 am

skidoo wrote:There is NO silver bullet. Sorry
  • Use decent speakers or headphones
  • Use fanless computer and ssd
  • Onboard sound noisy? Use decent external DAC
  • Use lossless audio codec(s)
  • Use recent MPD and kernel
As stated in my original post, "this thread is meant to specifically address MPD configuration options, OS settings and BIOS settings that have been found to improve the sound quality of MPD specifically in Debian systems". No search for a silver bullet is intended here. I understand that the impact of MPD configuration options, OS settings and BIOS settings has to be assessed on a system with decent headphones, fanless hardware, ssd, decent external DAC and lossless audio codecs. My current replay chain is:
  • .flac on external SSD
    =>
    USB3
    =>
    dedicated fanless, headless fit-PC3 running MPD in minimal Debian jessie (Linux fitpc3 3.16.0-4-amd64 #1 SMP Debian 3.16.7-ckt11-1+deb8u4 (2015-09-19) x86_64 GNU/Linux)
    =>
    USB3
    =>
    M2Tech hiFace Evo USB to S/PDIF converter
    =>
    Naim DAC
    =>
    Naim SN2
    =>
    Sennheiser HD800 or Naim Ovator S-400
My single audio section in /etc/mpd.conf is:

Code: Select all

audio_output { 
        type                "alsa" 
        name                "M2Tech hiFace Evo USB-SPDIF Interface" 
        device              "hw:2,0" 
        auto_resample       "no" 
        auto_format         "no" 
        mixer_type          "none"
        replay_gain_handler "none"
        use_mmap            "yes"
}
My buffering section in /etc/mpd.conf is:

Code: Select all

audio_buffer_size     "8192"
buffer_before_play    "30%"
I am interested in specific changes in MPD configuration options, OS settings and BIOS settings that might improve the sound quality given that the remaining components of the above replay chain are fixed.

Thanks for sharing, nbpf

skidoo
Posts: 155
Joined: April 28th, 2013, 10:06 pm
Location: Western Germany

Re: Improve replay sound quality under Debian

Post by skidoo » October 7th, 2015, 3:46 pm

Oh, a Naim fan :D

Is there a specific reason for your changed buffer settings?

No errors in bootlog, syslog and mpd logfiles? Great :) How about equalizing or digital room correction?

nbpf
Posts: 56
Joined: June 17th, 2014, 6:45 am

Re: Improve replay sound quality under Debian

Post by nbpf » October 7th, 2015, 6:01 pm

skidoo wrote:Oh, a Naim fan :D
Fan is parhaps a bit too much but I very much like the boxes! I replaced a 25 years old system last year. I first bought the SN2 and later a second hand DAC and the speakers. I am actually very happy with MPD, just thought it would be nice to have a place where to collect good tips for the specific OS.
skidoo wrote:Is there a specific reason for your changed buffer settings?
Not really, I just wanted to check whether doubling the buffer size had any effect. Should I better restore the default values?
skidoo wrote:No errors in bootlog, syslog and mpd logfiles? Great :) How about equalizing or digital room correction?
The logfiles are clean, no MPD related errors. I haven't yet looked into equalizing or digital room correction, good point.

What about the drive on which the music files are stored? I have played around with SSD and HDD. I used to have an external 252GB SSD. At the moment I am back to an external 1TB HDD. It seems to work fine. Would it be better to move the data to an internal SSD drive? In this case, is it of any advantage to have a separate partition for the data (I cannot have two internal drives in the fit-PC3). What about giving MPD a higher priority?

Thanks,
nbpf

Ran
Posts: 143
Joined: February 25th, 2013, 3:47 am

Re: Improve replay sound quality under Debian

Post by Ran » October 7th, 2015, 6:06 pm

Let me nitpick...

1. Your HD and DAC are running on the same USB bus... Not ideal.
2. USB 3.0 is irrelevant for audio.
3. The hiFace devices uses propriatery drivers. Not even USB Audio Class 2.0
4. Get a DAC with a USB input. Why convert USB to S/PDIF?

skidoo
Posts: 155
Joined: April 28th, 2013, 10:06 pm
Location: Western Germany

Re: Improve replay sound quality under Debian

Post by skidoo » October 7th, 2015, 7:33 pm

skidoo wrote:Is there a specific reason for your changed buffer settings?
Not really, I just wanted to check whether doubling the buffer size had any effect. Should I better restore the default values?
What about giving MPD a higher priority?
https://en.wiktionary.org/wiki/if_it_ai ... 27t_fix_it :D

SSD vs HDD... storage size vs price vs noise: choose your poison. I personally prefer built-in drives. Less clutter in my living room ;)

Separate partion for music? YES! Create ext4 partition with largefile or largefile4 option. Set reserved space on data partition to zero (tune2fs -m 0 /dev/sdXX)

Ran wrote: 3. The hiFace devices uses propriatery drivers. Not even USB Audio Class 2.0
4. Get a DAC with a USB input. Why convert USB to S/PDIF?
Why not feeding onboard S/PDIF to the Naim DAC? Eliminates another box in your living room ;)

nbpf
Posts: 56
Joined: June 17th, 2014, 6:45 am

Re: Improve replay sound quality under Debian

Post by nbpf » October 8th, 2015, 6:05 am

Ran wrote:Let me nitpick...

1. Your HD and DAC are running on the same USB bus... Not ideal.
2. USB 3.0 is irrelevant for audio.
3. The hiFace devices uses propriatery drivers. Not even USB Audio Class 2.0
4. Get a DAC with a USB input. Why convert USB to S/PDIF?
1. Right, therefore my question: would it be better to move the music files to an internal disk?
2. Agree, I just wanted to be specific about the connection. The fit-PC3 has 4 USB2 front ports and 2 USB2 + 2 USB3 rear ports. Currently, the external drive is connected to a USB3 (rear) port. The M2Tech converter is connected to a rear USB2 port.
3. Agree, any suggestions for a better USB to S/PDIF converter?
4. I am considering a new DAC, thanks. The focus of this thread, however, is on specific changes in MPD configuration options, OS settings and BIOS settings that might improve the sound quality given that the remaining components of the replay chain are fixed.

Thanks for sharing,
nbpf

nbpf
Posts: 56
Joined: June 17th, 2014, 6:45 am

Re: Improve replay sound quality under Debian

Post by nbpf » October 8th, 2015, 6:23 am

skidoo wrote:
skidoo wrote:Is there a specific reason for your changed buffer settings?
Not really, I just wanted to check whether doubling the buffer size had any effect. Should I better restore the default values?
What about giving MPD a higher priority?
https://en.wiktionary.org/wiki/if_it_ai ... 27t_fix_it :D

SSD vs HDD... storage size vs price vs noise: choose your poison. I personally prefer built-in drives. Less clutter in my living room ;)

Separate partion for music? YES! Create ext4 partition with largefile or largefile4 option. Set reserved space on data partition to zero (tune2fs -m 0 /dev/sdXX)
Thanks, I'll go back to a SSD drive for the music files and tune the fs options!
skidoo wrote:
Ran wrote: 3. The hiFace devices uses propriatery drivers. Not even USB Audio Class 2.0
4. Get a DAC with a USB input. Why convert USB to S/PDIF?
Why not feeding onboard S/PDIF to the Naim DAC? Eliminates another box in your living room ;)
Good point but the onboard S/PDIF converter of the fit-PC3 seems to be quite poor. Adding the M2Tech was a very significant improvement. I guess a viable step would be to move to a USB DAC and I am considering this step but, as mentioned, the focus here is on MPD options and OS fine tuning.

Ran
Posts: 143
Joined: February 25th, 2013, 3:47 am

Re: Improve replay sound quality under Debian

Post by Ran » October 8th, 2015, 3:19 pm

nbpf wrote:would it be better to move the music files to an internal disk?
Get a NAS.

nbpf
Posts: 56
Joined: June 17th, 2014, 6:45 am

Re: Improve replay sound quality under Debian

Post by nbpf » October 8th, 2015, 7:35 pm

Ran wrote:
nbpf wrote:would it be better to move the music files to an internal disk?
Get a NAS.
Not a coffee machine?

Ran
Posts: 143
Joined: February 25th, 2013, 3:47 am

Re: Improve replay sound quality under Debian

Post by Ran » October 9th, 2015, 3:44 pm

nbpf wrote:
Ran wrote:
nbpf wrote:would it be better to move the music files to an internal disk?
Get a NAS.
Not a coffee machine?
Only after you get a NAS.

conta
Posts: 99
Joined: October 31st, 2013, 4:59 pm

Re: Improve replay sound quality under Debian

Post by conta » October 10th, 2015, 9:37 am

Where is the benefit of a NAS in this context?

nbpf
Posts: 56
Joined: June 17th, 2014, 6:45 am

Re: Improve replay sound quality under Debian

Post by nbpf » October 10th, 2015, 12:37 pm

conta wrote:Where is the benefit of a NAS in this context?
I have no idea. I still think a coffee machine would be more useful ...

nbpf
Posts: 56
Joined: June 17th, 2014, 6:45 am

Re: Improve replay sound quality under Debian

Post by nbpf » October 10th, 2015, 12:48 pm

Ran wrote:Let me nitpick...

1. Your HD and DAC are running on the same USB bus... Not ideal.
2. USB 3.0 is irrelevant for audio.
3. The hiFace devices uses propriatery drivers. Not even USB Audio Class 2.0
4. Get a DAC with a USB input. Why convert USB to S/PDIF?
Regarding point 1: I have now made a direct comparison of external HHD vs internal SSD and I am not able to perceive differences in the sound quality. At this point I might well stay with the external HHD for convenience.

Regarding point 3: what would be better alternatives to the M2Tech hiFace Evo in the same price class? Has anyone compared the hiFace Evo to the new hiFace Evo Two or to the Teddy Pardo U2S converter?

Ran
Posts: 143
Joined: February 25th, 2013, 3:47 am

Re: Improve replay sound quality under Debian

Post by Ran » October 12th, 2015, 1:49 am

conta wrote:Where is the benefit of a NAS in this context?
First and foremost, redundancy. That is the main thing you should think about. Last I want to experience is all my music gone because of a failed drive.

skidoo
Posts: 155
Joined: April 28th, 2013, 10:06 pm
Location: Western Germany

Re: Improve replay sound quality under Debian

Post by skidoo » October 12th, 2015, 8:45 am

Ran wrote:
conta wrote:Where is the benefit of a NAS in this context?
First and foremost, redundancy. That is the main thing you should think about. Last I want to experience is all my music gone because of a failed drive.
A NAS does not protect against deleted files. A NAS is slow compared to direct-attached storage (SAS or SATA). A NAS introduces additional complexity: NAS hardware, CIFS (or NFS) and networking hardware. Redundancy can be achieved simply with dmraid and directly attached hard drives. And the most important thing: regular backups.

Ran
Posts: 143
Joined: February 25th, 2013, 3:47 am

Re: Improve replay sound quality under Debian

Post by Ran » October 12th, 2015, 7:36 pm

skidoo wrote:
Ran wrote:
conta wrote:Where is the benefit of a NAS in this context?
First and foremost, redundancy. That is the main thing you should think about. Last I want to experience is all my music gone because of a failed drive.
A NAS does not protect against deleted files. A NAS is slow compared to direct-attached storage (SAS or SATA). A NAS introduces additional complexity: NAS hardware, CIFS (or NFS) and networking hardware. Redundancy can be achieved simply with dmraid and directly attached hard drives. And the most important thing: regular backups.
When you have a RAID 5 NAS, even if one of your drives fail, you can still be in business. Indeed, NAS may be slower than direct connection but with gigabit ethernet, you have more than you need to stream music. With today's technology, you get everything i none box so no need to worry about networking hardware, NAS hardware, etc... To each his own.

nbpf
Posts: 56
Joined: June 17th, 2014, 6:45 am

Re: Improve replay sound quality under Debian

Post by nbpf » October 12th, 2015, 8:39 pm

Ran, could you please just stop littering the thread? I have not asked how to backup my data, I regularly keep several copies of my data in different locations and the suggestion of buying a NAS is completely unrelated to the requested "MPD configuration options, OS settings and BIOS settings that have been found to improve the sound quality of MPD specifically in Debian systems". Thanks, nbpf

Post Reply