Wednesday, January 10, 2018

Raspberry Pi - Audio Engine - Part 1

Since 2013 I'm using and working with the Raspberry Pi and contributing this or that to the community.

The Raspberry PI family is by far the most successful single-board-computer (SBC).
Even if its base hardware can't be considered top notch, it can very well serve the purpose
of becoming a serious audio transport.

What makes a device like the RPI a success story is its wide market presence,
great and innovative SW (community) support and OEMs flooding the market with
all kind of (quality) gadgets.
Many other SBC companies failed to succeed (beyond becoming a niche product), because they were not able comply to these factors - even providing a potentially much better HW base wouldn't help.
Building HW is a one-off effort. Without SW these devices are worth nothing. 
Providing, evolving and maintaining SW is a continuous process over a long period in time. 
That's what many manufactures underestimate! And that's why they usually fail.

The challenge

Taking  a rather mediocre device (HW) like an RPI and make it a high quality audio transport.

With this article I'd like to give a little guidance to get you going.

Thursday, October 12, 2017

Raspberry Pi - Audio Engine - Part 2

Now I'd like to share some lines about the parameter settings of squeezelite.
Squeezelite comes with numerous options that can change it's performance
as well as its functionality.

For this exercise I'll be using  PicorePlayer3.22 as OS. 

The HW setup is described in Part 1 of this series.

The LogitechMediaServer (LMS) is basically configured as I laid out 
in the LMS configuration article.

Some words about the process:

 1. In any case set up your Audio Output = sounddevice first and save your settings
     The OS usually has to reboot to enable the newly configured audio device!

 2. Then you'll be able to set the "Audiocard control" settings.
     These are the "Alsamixer settings". Depending of the sounddevice driver
     you'll be allowed to change certain functions on your sounddevice.
     Usually it's a good idea to have a look at that! These settings will
     persist. squeezelite needs to be restarted after running certain alsamixer settings!  
     Just confirm if PcP asks you to restart squeezelite after you've saved the new settings.

3. Now you enter the squeezelite settings and ""save"" !!! them.
    If this is done you'll be asked to confirm a squeezelite restart.

4.  Reboot your device and check if all settings are properly configured! 

I. AudioCard Control

The Audio Card control settings should be configured for each and every audio device.  
Depending on the device you'll have more or less parameters to play around with.

E.g. The  TI PCM51xx dac as used on the Allo Piano2.1 and the Allo driver offers certain settings.

Note1: ABove screenshot needs slight modifcations 

           1. For Piano21 - Enable both options under "Simple Mixer Controls"
           2. For Piano21+Kali - Enable glb_mclk (using the Kali master clock for the DAC)
               in the "DToverlay parameter options" section.

Note2: Make sure all your settings are saved properly!
            You better reboot the RPI and verify that all settings are as
            you've selected them! 

II. Squeezelite parameters

1. Name
    Choose whatever you like (1 string - alphanumeric - no spaces)

2. Output setting
    We have disabled the RPI internal Audio device under I.
    Therefore only one audio device is active on the system.
    Simply enter the listed string.

3. Alsa setting

    The chosen buffer value of  "65536" (=2^16) bits will be divided into "4" chunks (=periods)
    For USB DACs you might want to try "160" instead.
    The 3rd field - if empty - lets Alsa decide what bitdepth towards the DAC to choose. 
    Most modern dacs and HAT dacs run usually 32bit.
    MMAP allows squeezelite to access the device memory directly

4. Buffer size settings

    These shouldn't be mixed up with the Alsa buffer settings.

     There are two buffers we're looking at.
     1. The stream buffer
     2. The output buffer (output from squeezelite to Alsa!)

     squeezelite puts the received audio data into the stream buffer first.
     The internal processing stages e.g. flac-pcm conversion, resampling or
     volume control will 
then be executed and stored in the output buffer.
     Data will be stored at 32bit in that output buffer.
     If you look at below setup proposal, you'll see 20000:600000.
     That means we look at a 20MBytes stream buffer and a 600MB output buffer.
     What happens is that squeezelite reads and processes the entire file
     as soon as you push the start button. You'll see a high peak load
     in the first couple of seconds of playback and then the fully processed file
     is played back from a RAM buffer. A typical CPU load will be below 1%.

Below printout shows the settings for the IMO excellent Allo Piano 2.1 in Dual-Mono mode. (The first part you can apply to pretty much all HAT DACs!).

Note: Above image shows Alsa buffer at "16384", change this to "65536".

That'll be it.

Make sure you didn't miss my LogiTechMediaServer setting article. It's mandatory to have 
squeezelite and the server performing at best!


Monday, August 28, 2017

LogitechMediaServer - Settings Guide

I consider the LogitechMediaServer (LMS) the best music server out there.

The LMS is the server part of a very powerful client/server audio streaming environment 
and requires a compatible streaming client, such as squeezelite

Here you might find some useful information and hints for a high performance setup.

Sunday, August 13, 2017

networking - RPI dongle your net

I'd like to share an - IMO - nice alternative network setup solution for the RPI3.

The solution will nicely add to or you might also call it  - enhance - earlier described networking solution.  

Tuesday, May 2, 2017

networking - my audio data highway

Years back I mentioned that the network and associated components do have quite an impact on your audio performance. 
Meanwhile this became common knowledge in - let's call it - audiophile minded circles. 

As usual, I prefer reasonably (priced) highest performance solutions. 
Usually a healthy mix of DIY efforts and commercial stuff gets me there. 

Today I'd like to introduce my "currently" preferred "audio" streaming network solution.

Tuesday, April 11, 2017

Raspberry PI - I2S-HATs @ 384k

Today I'd like to share how to introduce 352k8/384k upsampling 
via LogitechMediaServer as server and squeezelite as a client.

This post, from a hardware perspective,  pretty much relates to my 

RPI I2S HAT DAC projects I've been running over at DIY-Audio.

Some DACs (TI PCM51xx family) have shown a slightly better performance 

when running upsampled material. That's the main reason for writing all this up. 

Wednesday, April 23, 2014

Shoot the Trouble -- USB Audio Interfaces

With all the very interesting Raspberry Pis and other ARM devices around, Linux becomes more and more interesting for many people. Great audio transports can be build at 100$.
Not to forget. Tablet and Phones are mainly Androids and that is just another Linux, using the same soundlayer (Alsa) then all other Linuxes.

Manufacturers usually still do not commit to support Linux or Android properly.
Which is insane. The vast majority of mobile device out there are Androids.

However. Many devices work or partially work under Linux, because manufacturers comply to general USB Audio Standards (UAC1/UAC2). Meanwhile even Pro Audio companies like RME offer a "Class Compliant" mode for their newest generation of USB devices. (In the RME case they do officially focus on OSX though.)

Anyhow. Even though things are getting better, there are still plenty of  cases where you'll experience NO SOUND.

That doesn't necessarily mean that your device won't work under Linux.

This article outlines a little guideline for troubleshooting your USB audio interface under Linux.
It should give you certain hints what to look for.

However. Just to make it clear from the very beginning.

I won't support anybody, who got issues with his interface!!! Checkout Google or the community.

If you have comments for improving the article please let me know.

Tuesday, September 3, 2013

Hirez - Treasure Island - Part II

Today we cover HiRes (that covers DSD as well) vs. Redbook.

In the first blog about Hirez I covered the base HiRez material.

My conclusion was.:

Hirez material quite often seems to get resampled and remastered from unknown raw masters (formats).
There is usually nothing like a real "master" for sale out there.

Friday, January 25, 2013

Squeeze Me Lite

Latest update: 16-Aug-2017 


I'd like to introduce you to a my favorite audio application - a squeezebox streaming client - called squeezelite.

squeezelite is a versatile, highly efficient squeezebox emulator that runs on all PC platforms, micro computers, like a Raspberry Pi,  even on routers or NAS and also on the Squeezebox Touch .  Even commercial streamers make use of it.

It's opensource and it's free. And it's IMO been and still is a major enabler for streaming quality audio at home.  

Wednesday, October 10, 2012

The silent death...

Hi folks.

Do you sometimes have the feeling, of not feeling comfortable the way you handle and administrate your valuable music ( and video and image) collection?

You don't really know -- if all the audio file integrity is still given  (after all those years of moving files here and there) !?!?

Loundess war - finally over ???

Hi folks.

Anybody heard about EBU R128??

To be honest. I didn't until recencly.

I accidently stepped  over EBU R128 (EBU=European Broadcasting Union, R128=Recommendation 128) while looking for a better ReplayGain solution.

R128 finally defines a standard how loudness should be measured and applied in an acceptable way.

The standard was based on  ITU BS.1770 ( International Telecommunications Union) released in 2006.
ITU BS.1770  has been widely applied in the broadcasting scene.
EBU R128  significantly enhanced that standard by a function called gating (You'll learn more about it later on.)  The original ITU BS.1770 has been updated to ITU BS.1770-3 by now and includes the gating function as proposed by EBU R128.

Not only us - audio geeks - have a huge problem with low quality music and messup of audio data due to "Loudness War" - NO - broadcasters face the same challenge on a daily basis.  They can not sit down and change the volume on every piece they are broadcasting.

They have to normalize audio of much more media sources, such as speach, film, commercials, podcasts, audio asf. And by doing so, they're compressing and messing with  the audio data even further.

Wednesday, August 8, 2012

Ever heard about Full Digital Amps ??

(Sometimes they are also called PowerDACs or Direct Digital Amps or All Digital Amps btw.)

No !?!?

...the end of seperate  DAC + AMP decade might be near!!! ;)

For those of you who got tired to run after every new DAC and amp (I did), and
those who've read the 1000th review of another miracle  DAC (I did), or those
of you who got more confused then enlightened with the endless number
of DACs of choice out there (I did again), or those who look for a very small,
cost efficient and still great sounding system ... (Oh -- I'm talking about myself..)

Appendix 1: Market overview
Appendix 2: Patent
Appendix 3: DDX320 Modifications

Thursday, November 3, 2011

Touch Toolbox 3.0


Squeezebox Touch Toolbox

NO Longer Supported!!!!!!!!!!!!!!!!

Unfortunately I can't support my Touch Toolbox any longer.

Why? I don't have a working Squeezebox Touch anymore.

You'll be 100% on your own, if you continue to run the Toolbox.

If you keep running the Toolbox, you keep running it at your own risk - as always (see also Disclaimer on the right hand side).

As ususal, the Toolbox can be removed by a hardware reset (black button on the back of the Touch).

And remember: The Toolbox and EDO  shall not be installed at the same time!!

I'm still watching the Touch Toolbox Thread at
If you have any questions, meet me there. I won't answer private mails!

Thx to all of you, who tried and appreciated the Toolbox for quite a long period of time.

Note: If there is anybody out there, who would donate a SBT to me - I just need it for design, testing and support - I'd more than happy to continue this project.
I'd even consider to launch a TT4.0.



Wednesday, November 2, 2011

Touch Toolbox 3.0 - HW and Network

This blog is Part II of the Touch Toolbox blog.

Over here  I'll touch upon HW modifications, the network and server environment from a HW perspective.

I consider all this an integral part of your streaming solution. All this will also make a difference.

1. Power supply
2. Lan optimization
3. SPDIF data link
4. Onboard modifications
5. Server considerations

You really should have a look at it.  You'll also  find some easy to implement tweaks.

Thursday, May 19, 2011

Hires Audio - Treasure Island


Lets dig up some treasures. It's time to run another little study.
Writing and preparing all these articles gets you nicely into all kind of
subjects. Quite some work. But worth it.

A recent  post at Audio Asylum (by good old Dr. mercman)  referring to
an article about Hires-Audio  and the industry ethics behind it finally
inspired me to dig into another "blind side" on my side.
Usually I read all kind of stuff discussed in those forums and put it
aside with a little more than a slight touch of ignorance.
Probably it's not just me acting like that.

Since I spent quite an amount of money recently on  hirez audio-material
I thought why not spent a little time on the subject.
It shouldn't be that difficult to have a little closer look at my "HiRes treasure".

You never know, what's in your treasure box, if you keep it closed. Although sometimes it's better to keep it closed.

Saturday, May 14, 2011

CD Extraction

With this article I'd like to tackle an issue, which always makes me feel odd
when thinking about it.

"CD Extraction"...

... do I really have it 100% under control ...

... after hundreds of rips and years of active involvement in Computer based audio !?!?!

I just read two articles in the latest issue of the german audio magazine  "Stereo". Stereo is one of the biggest, if not the biggest of its kind over here in Germany.
I do think they got quite a good reputation in the market. 

This month (05/11) Stereo stuck their heads into Computer CD-drives and extraction software to compare the results generated by the tools and drives.

The real interesting thing about it was the result of it.
The soundquality ranking of extraction results on different drives and different software in particular - got my full attention.
As a matter of fact according to Stereo, drives make a difference and tools make a difference on soundquality too - and they are not talking about subtle differences if you look at the SQ-ranking. There are drives going as low as 88% (SonyOptiArc DRX-S 77 U) and extractions tools as low as 94% (EAC!!!!) on the SQ ranking.

Guess what. EAC - was the worst of all.

Do I have a reason to question that Stereo Article, assumimg somewhat professional test-cases and setups ( using Accurate Rip etc.) !?!?!


Thursday, April 21, 2011

Resampling - If you can't avoid it...

(Last update: JUL-22-2016)


I've been looking at the subject of resampling now and than during the last decade.
Somehow you can't avoid looking into it.
Looking into resampling can hardly be avoided if you strive for the best.

Inspired by some ongoing and never ending discussions out there
I wanted to figure out myself, how to approach the subject.

With this post I'm trying to cover certain aspects, such as

* What is resampling or upsampling/downsampling or oversampling?
* Why resampling ?
* Application/Devices
* Quality factors
* Implementation on LogitechMediaServer
* Offline resampling
* Resampling advise
* Sox installation/update and compilation (script)
* Conclusion

Let's get started.

Annex 1: Script to compile latest Sox for Debian/Ubuntu systems
Annex 2: Sox LMS upgrade on Debian/Ubuntu systems (a must!!)

Thursday, November 11, 2010

soundcheck on Hifi-Music-World 2010 presenting a Touch based solution

Last weekend I had been invited to present a streaming solution based around
my fully tweaked Touch to the public on the biggest german DIY fair (Hifi-Music-World 2010) in Stuttgart.

Silvercore (a manufacturer of  real great sounding tube-amps, transformers, pre-amps and now  also a DAC  and Bastanis  , who produces my all-time f
avorite speakers, were teaming up for a gig.

Surprisingly I was invited to present my streaming solution based on a Squeezebox Touch, feeding their system.

Me on the "other" side!?!? Feeding such equipment on a show.  Brave guys!

Hmmh. I thought - why not I know what I'm doing. Lets give it a try.

Wednesday, August 11, 2010

(Digital) Volume Control


There are lots of discussions ongoing if one should go or not go for digital volume control.

This is the way I see it:

It'll depend how well it performs.

First of all it doesn't cost you anything, it is easy to handle, makes certain quite expensive audio HW obsolete, resolves quite some analog volume control associated problems and it can sound damn good.

Wednesday, June 16, 2010

Computerized Audio


The "audiophile" audio world is heading towards computerized audio.

Though there'll be high hurdles to cross to evolve into the computerized audio world for the
wider "audiophile" community. 

To accomplish and maintain an audiophile setup using a PC, a network and an audio interface must be considered a pretty complex undertaking.

You need to have a pretty good understanding of computers and networks and associated audio devices and of course the software driving all that.

You need to continuously follow up on these. The entire setup  needs to be thoroughly planed,  selected and integrated to meet the high demands of the typically very demanding audiophile person.

Transferring your music data to the PC and maintaining your database
must be considered a major challenge too.

It is getting better nowadays, with automatic grabbing boxes and professional grabbing
services. Still getting a consistent database in place means a lot of extra manual extra work.

All this, just to replace a single CD player? Does all this effort makes sense?  

Honestly, I am really not sure.