Monthly Archives: February 2015

Playing native DSD with Raspberry Pi 2 and Volumio

There are many intriguing debates within the world of audio, and one which has long interested me concerns DSD (Direct Stream Digital). This is an alternative technology for converting and recovering sound from digital storage. The more common PCM (Pulse Code Modulation) works by sampling sound at very short intervals and recording its volume. By contrast DSD records the difference between one sample and the next, sampling at an even greater frequency to compensate for the fact that it only captures a single bit of data in each sample (ie on or off). For example the standard used by CD is:

16-bit precision, 44.1 kHz sampling rate

and by SACD (a DSD format):

1-bit precision, 2.8224 MHz sampling rate

The SACD was introduced by Philips and Sony in 1999 as an upgrade to CD, since it is a higher resolution format cable of a dynamic range of 120 dB and frequency response up to 100 kHz. It was an effort, like the PCM-based DVD Audio, to convince the public that the CD is not good enough for the best quality sound.

SACD was largely unsuccessful, mainly because there was not really any dissatisfaction with CD quality among the general public, and even some experts argue that CD quality already exceeds what is required to be good enough for human hearing.

That said, SACD was popular in the niche audiophile community , more so than DVD Audio. Some listeners feel that SACD and DSD results in a more natural sound, and believe that PCM has some inherent harshness, even at higher-than-CD resolution. Enthusiasts say that DSD stands for “Doesn’t sound digital”. For this reason, there is a regular stream of new SACD releases even today, and DSD downloads are also available from sites like Native DSD Music and Blue Coast Records. Some DSD downloads are at higher resolution than SACD – Double-rate or Quad-Rate.

The resurgence of DSD has been accompanied by increasing availability of DSD DACs (Digital to Analogue Converters). While these tend to be more expensive than PCM-only DACs, prices have come down and a quick eBay search will find one from under £100.

There are several complications in the DSD vs PCM debate. While DSD is a reasonable format for storing digital audio, it is poor for processing audio, so many SACDs or DSD downloads have been converted to and from PCM at some point in their production history. If PCM really introduces harshness, it is presumably too late by the time it gets to DSD. That said, it is possible to find some examples that are captured straight to DSD; this can work well for live recording.

Another complication is that some consumer audio equipment converts DSD to PCM internally, to enable features like bass management.

Is there any value in pure DSD? I wanted to try it, preferably with DSD files rather than simply with SACD, since this is much easier for experimenting with different formats and conversions as well as enabling Double DSD and higher. Unfortunately SACD is rather hard to rip, though there is a way if you have the right early model of Sony PlayStation 3.

The first step was to get a DSD-capable DAC. I picked the Teac 301 which is a high quality design at a reasonable price. But how to get DSD to the DAC? Most DSD DACs support a feature called DSD over PCM (DoP), which conveys the DSD signal in a PCM-format wrapper. DoP is not a conversion to and from PCM, it merely looks like PCM for better compatibility with existing playback software.

Next, I used a Raspberry Pi 2 supplied by Element14 (cost around £25.00) and installed Volumio, a pre-built version of Linux which includes an audio streamer and web-based user interface. You download Volumio as a single file which you burn onto a micro SD card using a utility such as Win32DiskImager. Then you plug the card into the Pi, connect to a home network via Ethernet and to a DAC via USB, and power on.

After a minute or two I could connect to Volumio using a web browser.

image

My music is stored mostly in FLAC format but with a few DSD files in Sony’s DSF (Digital Storage Facility) format, and located on a Synology NAS (Network Attached Storage). In Volumio’s menu I went to Library and mounted the network share containing the media. Next, I tried to play some music. PCM worked, but not DSD. I changed the playback settings to enable DoP:

image

Success: My DSD files play perfectly:

image

If you squint at this image you will see that the 5.6 MHz light is illuminated, indicating that the DAC is processing Double DSD.

It sounds lovely, but is it any better than the more convenient PCM format? I am sceptical, but intend to try some experiments, using a forthcoming audio show to find some willing listeners.

That aside, I am impressed with the capability of the Raspberry Pi for enabling a simple and cost-effective means of playing DSD over the network, although with the assistance of an external DAC. It plays PCM formats too of course, and with Volumio is easily controlled using a mobile device, thanks to the touch-friendly web UI.

Restoring a system image backup on Windows 7 when system recovery fails

I was asked to look at a laptop over the weekend. It was an HP running Windows 7 Home Premium, and the user was having problems installing applications. I noticed several things about it:

  • Lots of utilities like registry cleaners, system care, driver accelerator and more were installed
  • When I tried to remove the third-party firewall and use the Windows firewall instead, the Windows firewall could not be fully enabled
  • Most applications could not be removed using Control Panel – Programs and Features
  • Right-clicking a network connection and choosing Properties gave an error

When Windows is in this kind of state it makes sense to reinstall from scratch. There was an intact recovery partition, so I backed up the data and ran system recovery. This seemed to go fine until right at the end, when it gave an error and invited me to contact HP support. Oddly, if I chose HP’s “Minimized Image Recovery” I still got an error, but it got me a working “Windows Basic” installation, but Windows Basic is not much use because of some arbitrary limitations Microsoft imposed.

Now I had a problem, in that the system recovery had successfully removed the old Windows install, but had failed to install a new one.

One solution would be to re-purchase Windows or try to get recovery media from HP, but before going down that route, I decided to use a system image backup that had been made earlier. There was a backup from a year or so ago on a USB hard drive. I booted using a Windows 7 DVD, chose Repair your computer, then System Image Recovery.

Unfortunately Windows refused to list the backed up system image, even though it was in the standard location under WindowsImageBackup. Since the backup was not listed, it could not be restored.

Fortunately there is another approach that works. A system image backup actually created a virtual hard drive (.vhd) for each of the drives you select. You can zap the contents back onto the real hard drive to restore it.

This HP has three partitions. One is a small system partition used for booting, one is the main partition (C drive) and one is the recovery partition. The main partition is the one that matters. Here is what I did.

First, I installed Drive Snapshot, a utility I’ve found reliable for this kind of work.

Next, I plugged in the USB drive and found the .vhd file. These are located in WindowsImageBackup\[NAME OF PC] and have long names with letters and numbers (actually a GUID) followed by .vhd. The old C drive will be the largest file (there are usually at least two .vhd files, the smaller one being the system partition).

Step 3 is to mount the vhd so it looks like a real drive in Windows. You do of course need a working Windows PC for this; even Windows Basic will do, or you can use a spare PC. I opened a command prompt using Run as administrator and ran DISKPART. The commands are:

select vdisk file=”path\to\vhd\filename.vhd”

attach vdisk

I generally leave DISKPART open so you can detach the vdisk when you are done.

When you enter “attach vdisk” an additional drive will appear in Windows Explorer. This is your old drive. You can copy urgent documents or data from here if you like.

The goal though is to restore your PC. Run Drive Snapshot or an equivalent utility.

image

Choose Backup Disk to File. Select your old drive and back it up to an external USB drive. I hesitate to mention it, but you also need to keep the drive with the .VHD on it attached for obvious reasons! You can back up to that same drive if there is room.

Once complete, go back to DISKPART and enter:

detach vdisk

Now you need to use Drive Snapshot to restore your old hard disk. I was lucky in this case; I could run the utility in Windows Basic on the laptop itself and restore it from there. Drive Snapshot is smart enough that you can even restore the drive where it is running, after a reboot. You could also use pretty much any old version of Windows, no need to activate it, just to run the utility.

After the restore I was able to boot Windows and all was well, apart from the hundreds of Windows Updates needed for an OS that was a year out of date. In some cases though you might need to go back into system recovery to repair the boot configuration; it usually does that pretty well.