Pipo X7: An ultra low cost Windows PC as a music transport

A few days ago I received the Pipo X7 that I had pre-ordered back in January.

It took so long to source & ship because it is immensely popular – after all, for less than 100€ I got:
– An Intel Baytrail Quad Core CPU @ 2.16GHz
– 2GB of low power DDR3 RAM
– A 32GB SSD drive (Samsung MBG4GC)
– An HDMI out
– WiFi b/g/n, 10/100Mbps Ethernet & Bluetooth connectivity
– 4 x USB 2.0 ports

All of that inside a slick aluminum box, not much larger than a CD, powered by a silent 12V/2.4A power supply.

IMG_9228

But the best part is that it runs a fully activated copy of Windows 8.1 (32bit)!

Yes, Microsoft is essentially giving away Windows 8.1 for use in small devices (like set-top boxes, such as this one) with only one catch for the OEM: He is not allowed to set Google Search as the default search engine. However, this does not mean that you can not set Google as your preferred search engine if you wish (instead of the dreadful Bing).

Now, I must admit that this was largely an impulse buy for me, since I already have a full size HTPC and a Squeezebox Touch as an audio transport, but I just couldn’t resist the temptation. So, since I had it, I decided to run a series of audio-oriented tests on it.

My player of choice is Foobar, feeding a Buffalo III DAC through an Amanero Combo384. The files were stored on a file server on my LAN and the Pipo was connected to the LAN via 100Mbps Ethernet.

The first test included outputting DSD to the Amanero. All the necessary Foobar components were loaded, including of course the Super Audio CD Decoder and the necessary configuration was performed:

Pipo-X7-DSD-out-1
Note: There are several steps involved in getting Foobar to output DSD. It is not the purpose of this post to fully outline them. A Google search would turn up a number of guides / how-tos.

First up was a “plain” DSD64 file. The Pipo had no problem playing it back, with less than 1GB of RAM use and about ~13% CPU utilization:

Pipo-X7-DSD-out-3

Let’s make it more interesting. DSD128:

Pipo-X7-DSD-out-4

Still no problem. As a matter of fact, CPU load has actually decreased! That is probably because the DSD64 file was from a SACD ISO, so some CPU time was used in handling the big file.

Moving on to a worst case scenario: A DXD file:

Pipo-X7-DXD-out

Still, no sweat, with the CPU barely sweating at 16% load. RAM has not climbed above 800MBs.

Since the machine appeared to have some decent horsepower, I thought I would try the well-known SoX Resampler DSP for Foobar. I set it up as best I could, since I don’t really have much experience with the actual DSP:

Pipo-X7-SoX-config

I chose to go the “x4” upsampling way, with the “Best” quality setting. This meant that a 44.1KHz file would be upsampled to 176.4KHz and a 96KHz file would be upsampled to 384KHz, hitting the limits of the Amanero interface. A 192KHz file would not be supported, since that would mean that it would have to be upsampled to 768KHz. The idea was to do a benchmark, so I just played two versions of the same files, one at 44.1K and one at 96K. This was the result:

Pipo-X7-SoX-44.1K-x4

Pipo-X7-SoX-96K-x4

So, still no serious sweat, with the CPU averaging 29% load, with one of its cores (presumably the one doing the actual upsampling) getting about 50% usage.

At that point, I called it a day.

In conclusion, it seems that the Pipo X7 is perfectly capable of supporting audio playback, even with upsampling enabled. As a matter of fact, I might keep it as a music transport.

The Raspberry Pi: Audio out through I2S

There are currently four ways to get audio out of the RPi:

  1. Use the audio out 3.5mm jack. It’s very easy to get it to work, but the sound quality is pretty bad, since it uses PWM to generate the sound. Due to that, its real resolution is in the neighbourhood of 11 bits. We have no use for that.
  2. Use the HDMI port. It works OK, but is useless to us audiophiles.
  3. Use a USB to I2S adapter, such as an Amanero or an XMOS-based device. Now we’re talking. They work quite well, and the quality of the I2S signal is dependent largely on the technology used (CPLD vs. XMOS, etc) as well as the quality of the on-board clocks. The problem is that they add another link to the audio chain, as well as increase the cost. Remember, the RPi is supposed to be a low cost solution.
  4. Use the GPIO pins of the RPi to get direct I2S output. This sounds way more interesting, right? Let’s try that!

According to several sources on the Net, this is the pin out:

Raspberry_Pi_B_Plus_I2S_out

You will probably notice that the RPi does not support MCLK output. This means in practice that your DAC will need to have its own on-board clock (or internal PLL / oscillator or whatever). We can live with that.

Luckily, my Buffalo III has its own clock (of course it does!) and thus can be connected quite easily. Let’s try that:

IMG_8297_resize

Now we have to configure the software for I2S output. For my distribution of choice, Archphile, it’s a piece of cake: http://archphile.org/howto/i2s-dacs-and-the-raspberry-pi/

Audio playback works just fine!

Well, almost fine..

You see, in theory the RPi has a bit of a problem with its I2S output. Since the only clock onboard the RPi is a 19.2MHz crystal, it should have trouble generating proper clocks for its I2S output. For example, for 44.1KHz audio, the LR Clock must be running at precisely 44.1KHz. That is not possible, since the frequency is not a multiple of 19.2MHz. Thus, the frequency can be either 19.200.000 / 435 = 44.138KHz or 19.200.000 / 436 = 44.0366KHz. This is a limitation of the Broadcom BCM2835 in conjunction with the 19.2MHz crystal and there is nothing that can be done.

In order to confirm the theory, I decided to run a few tests. I hooked up my logic analyzer to my RPi, set it up for I2S output, and fed it some 44.1KHz music.

IMG_8453_crop_resize

I took 1 sec worth of samples with my logic analyzer, configuring it for I2S signal. I got this:

logic analyzer 4

The PCM Clock is already appearing a little dodgy. Let’s zoom in:

logic analyzer 5

logic analyzer 6

As you can see, the pulses do not have the same duration. They appear to alternate between two values. So it is obvious that the signal has jitter. A lot of jitter. Since we’re here, let’s have a look at the LR Clock signal as well:

logic analyzer 7

logic analyzer 8

The duration of the pulses appears to alternate between 11.33μS and 11.38μS, giving respectively 44.12KHz and 44.04KHz, values very close to the ones I calculated previously.

So, the theory is sound and the RPi’s clock is not up to snuff by strict standards. What this means is that the RPi’s I2S output is not capable of “Hi End” audio transmission. It is essentially not bit perfect (edit: this is not correct, strictly speaking. It is in fact bit perfect, it is just not “proper”.).

In the real world, chances are that this problematic clocking will not be particularly audible under normal circumstances, say with a normal-specc’ed sound system. But an audiophile should definitely steer clear of the RPi’s I2S output, instead opting for a USB to I2S interface.

The Raspberry Pi: Low cost music streamer

Enter the Raspberry Pi B+:

Raspberry Pi B+

It features:

  • A Broadcom BCM2835 SoC processor running at 700MHz
  • 512MB of RAM
  • A Micro SD slot for storage
  • A 10/100Mbps Ethernet port
  • 4 x USB2.0 ports
  • An HDMI output port
  • An analog audio / composite video output port
  • A 40-pin expansion header, exposing 26 x GPIO ports
  • A camera and a display interface port

Somehow they have managed to cram all that in an almost credit-card sized PCB.

And it costs less than 40€.

It runs Linux (of course..). There is a large number of general-purpose distributions available, as well as a few custom built ones. One of them is Openelec (an XBMC Media Center distro), another one is Volumio (an audiophile music player), a third one is SqueezePlug (it emulates a number of Media Servers, like Logitech Media Server, MediaTomb, MiniDLNA, etc. It also works as a Squeezebox (client)), etc.

So far, my favorite distribution is Archphile, an audiophile linux distribution. It may not have the polished look of Volumio or play 1080p video like Openelec, but is plays music wonderfully through a USB port (or through I2S if you are more of a DIYer).

So, what am I doing with it? I wanted to put a music streamer in my kitchen. I already have two Squeezeboxes in other rooms, so for the kitchen I thought I would try something more interesting.

But along the way, I discovered that it is a lot more useful than that. A very useful (and very rare) feature it has is the ability to bitstream DSD audio (a.k.a. SACDs):

RPi outputting DSD to Buffalo DAC

Raspberry Pi B+ outputting DSD to my Buffalo DAC

So now I’m considering adding an RPi network music transport to my main system.

Synology DSM 5.1 now supports Amanero!

First, a little background info.

Synology makes great NAS products. They are user friendly, fast, and multimedia oriented.

A little known feature of said products is that they support direct connection to USB enabled DACs. All you have to do is connect your DAC to your NAS with a USB cable, fire up Audio Station and tick the box for USB Speakers:

USB-Audio-out-1

Now you have a new output device, called USB Speakers:

USB-Audio-out-2

You just select that and now your Synology plays through your USB DAC. It’s that simple.

Now, this feature has been available for quite some time, so why am I making such a fuss about it now? It’s simple: Synology just started supporting my favorite USB-to-I2S interfacing board, the Amanero.

So, if you have an Amanero and a Synology NAS, just upgrade your DSM to 5.1 and enjoy full compatibility!

DS211j with Buffalo DAC