<JAB.R />

To content | To menu | To search

Tuesday 6 June 2017

Measuring end to end close-in phase error at the DAC analogue output

Author: Jonathan Borden MD

The DAC provides a unique situation to measure a proxy for end to end phase error using nothing more than a high resolution spectrum analyzer.
A high resolution digital encoding of a sine wave at a specified frequency is fed into the DAC. The pure sine wave is generated and fed at either PCM or DSD e.g. 24/192 or 24/354 or DSD256, DSD512 in a format specific for the DAC Under Test (DUT). This may, for example, go through the DUT USB interface or Ethernet interface.
The analogue output is measured.
Close-in phase noise in the DUT will result in widening of the measured FFT peak. By measuring the width of the peak, the degree of close-in error is approximated. This is analogous to the "linewidth" measurement used in laser spectroscopy.
The frequency interval of the FFT needs to be small enough in order to allow accurate measurement e.g. < 0.01Hz
This close-in phase error is related to "flicker noise". Slightly further out phase error related to "shot noise" forms the skirt of the peak. The baseline is formed by "white" noise.

Sunday 4 June 2017

The effects of close in phase error ("jitter") on audio

"Jitter" is a term that is often used regarding digital audio, specifically the digital to analogue converter (DAC). This article aims to clarify the actual effects of phase noise on audio, and in this context presents a relatively novel way to measure.

"Jitter" can mean several things. Here we use the term to mean: phase error. Phase error is specified with respect to an offset frequency from a carrier i.e. clock.

The result of close-in phase error is a widening in the frequency domain of a pure tone. A pure tone is represented in the frequency domain as a thin line, having an amplitude at the frequency and no amplitude at any other frequency. Phase error spreads this line increasing the so-called line width.

A pure tone may be transmitted digitally to a DAC. An FFT spectrum may be taken at the analogue output of the DAC. My measuring the linewidth, the amount of jitter in the DAC is determined.

ClearFog Base as a Network Audio Adapter (NAA)

I recently received the ClearFog base, it came as a bare board (the solid-run case isn’t ready yet). Here is what I did to get it working – I suppose we could design a nice solid case from a block of aluminum and package the distro and charge some $$ but this is for free ;) It also can be a ROON bridge endpoint.

ClearFog NAA from https://www.solid-run.com/marvell-armada-family/clearfog/

Order the A388 SOM *without* eMMC. I ordered the case but it hasn’t arrived yet.

This takes a 12v PSU – I use one of the “el cheapo” linear PSU with the R-Core transformers available on eBay e.g. http://www.ebay.com/itm/Black-100VA-12V-6A-Low-Noise-R-core-DC-LPS-Linear-Power-Supply-display-HL-153-/142023546410?hash=item211143562a:g:oCIAAOSwuhhXXj3q which is overkill – you only need 25-30VA.

You can also use a low leakage current “medical” grade SMPS like: http://www.mouser.com/ds/2/191/MWA050-Class-II-Inventus-Power-892432.pdf … these are very cost effective.

Use a Class 10 8GB microSD card.

I installed “Armbian” https://www.armbian.com/clearfog-base/ – I used the Debian Jessie LTS version (4.4.45). Burn this to the SD card with “Etcher” https://etcher.io/ … pop the microSD card in the proper slot on the ClearFog. Be sure to set the DIP switches on the board to boot from SD (2 down and 3 up). See: https://wiki.solid-run.com/doku.php?id=products:a38x:clearfog

The microUSB port allows a terminal to be attached. I connect this to my laptop and run “minicom”. The problem is that the microUSB and USB ports interfere with eachother (too close for some plugs).

When booting initially the account is “root” and the password “1234″. It will automatically ask you for a new root password and then also ask for a new user account name and password. This is the account you will use to log in in the future.

Once I confirmed the initial boot, and was then able to SSH into the clearfog, that’s how I attach. But first you need to configure the network. The left RJ45 connector is eth0, the right is eth1 and the SFP connector is eth2.

$ sudo nano /etc/network/interfaces

add the lines:

auto eth2

allow-hotplug eth2

iface eth2 inet dhcp

I then attached a 1000base-SX SFP module like: http://www.cisco.com/c/en/us/products/collateral/interfaces-modules/gigabit-ethernet-gbic-sfp-modules/product_data_sheet0900aecd8033f885.html

actually I used an Intel branded https://www.finisar.com/optical-transceivers/ftlf8519p3btl because I had that handy. These are used with multimode LC-LC OM3-rated fiberoptic cables.

Once the Ethernet was up and running, I SSH’d in and disconnected the microUSB and then connected the DAC USB.

The NAA daemon prefers Debian Stretch which is an easy upgrade:

$ sudo bash

  1. apt-get update
  1. apt-get upgrade
  1. apt-get dist-upgrade
  1. cp /etc/apt/sources.list /etc/apt/sources.list_backup
  1. sed -i ’s/jessie/stretch/g’ /etc/apt/sources.list

Now do the actual upgrade to stretch:

  1. apt-get update
  1. apt-get upgrade
  1. apt-get dist-upgrade
  1. reboot now

Now to install the NAA daemon. You need the “armhf” packages:

  1. wget https://www.signalyst.eu/bins/naa/linux/stretch/networkaudiod_3.5.1-35_armhf.deb
  1. systemctl start networkaudiod

that’s what I did to get it working.

To install ROON bridge:

$ wget http://download.roonlabs.com/builds/roonbridge-installer-linuxarmv7hf.sh

$ sudo bash

  1. source roonbridge-installer-linuxarmv7hf.sh

Fiberoptic Network for Home Audio

The prices on 1 Gb fiberoptic Ethernet have plummeted over the past few years now that businesses are using 10 Gbe, 40 Gbe and 100 Gbe. You can steal used equipment on eBay but if you would prefer to buy commercial here are some options, note that there is a lengthy discussion on Computer Audiophile: https://www.computeraudiophile.com/forums/topic/24002-optical-network-configurations/

Its as easy as 1,2,3

Switch: I’d seriously consider: http://www.cisco.com/c/en/us/support/switches/sg300-10sfp-10-port-gigabit-managed-sfp-switch/model.html SFP modules: get a few 1000base-SX -these work with multimode LC-LC cables OM3 grade – often aqua colored, you can also consider 1000base-LX with single mode LC-LC cabled – often yellow colored. Be sure both ends are either 1000base-SX *or* 1000base-LX. A switch can have both on different ports. NIC: Either Intel x520 with a PC *or* a ClearFog base Regarding switch, I have a generic 8 port switch that I purchased on taobao.com for <$100 but not worth the trouble for most people. Alternatively: https://www.diablocable.com/18195.html. This site: http://www.fs.com is a good source for cables and SFP units at reasonable prices and with excellent service.

TDO archives for old HP equipment

I’m posting this in the hopes someone might find it useful for anyone who googles looking at how to deal with TELEDISK TDO format archives.

The HP site is really a terrific resource. Those TDO archives are pesky though. I was searching for the HPIB.SYS MS/DOS driver for the HP 82355A ISA card.

Here is the link: [ http://www.hpmuseum.net/display_item.php?hw=879| http://www.hpmuseum.net/display_item.php?hw=879]

and under software: [ http://www.hpmuseum.net/display_item.php?sw=57| http://www.hpmuseum.net/display_item.php?sw=57]

which leads us to HPIBTOOL.TDO

Here is how to use it:I created a very small VirtualBox client that I name “DOS” with 1 CPU held to 10%, 4mb RAM, 10Mb disk of type “Windows 98”. All acceleration turned off.I then installed DOS 6.22 by mounting the *.img files as floppies (it comes as a 3 floppy set).I then created another floppy using the command:$ dd if=/dev/zero of=myfloppy.img bs=1024 count=1440

Mounted this in the DOS client and formatted it:


I then mounted the floppy on my Mac and copies both the HPIBTOOL.TDO file as well as the Teledisk software TELEDISK.EXE obtained from:


mounted this “floppy” in DOS, and then ran TELEDISK.EXE to extract the TDO file into a second floppy, created the same way as the first. This creates an installation floppy for the HPIB driver.

Now only if there were a virtualization tool that allowed us to attach one of the USB<->GPIB converters *as if* they were an 82355A … oh well

In any case this is a general way to extract a TDO archive to a “floppy” .img in the comfort of your laptop while sipping espresso.