Tag Archives: dac

HiFiBerry DAC + Digi on the same Raspberry Pi

A HiFiBerry DAC owner asked us, if it is possible to mount the DAC and the Digi board onto the same Raspberry Pi. Sounds crazy? Cool! We thought about it. With one board running as the I2S master and the other as slave, this could work. Let’s test it:
HiFiBerry DAC and Digi
And yes, it worked!

Note: This does not mean, that you can stack any I2S sound cards on the Raspberry Pi. It works here, because one board acts as the master (the Digi) and the other as slave. Also the configuration is a bit tricky. Only the HiFiBerry Digi is configured as a sound card. Linux doesn’t know, that there is another card connected.

P.S. We’re in the last phase of the HiFiBerry Digi production tests. Everything looks good at the moment.

Hardware vs. Software Volume Control

Some users asked why the HiFiBerry DAC does not support volume control. It is true that the card itself does not come with the volume control widget that can be used by “amixer”. However, most music playback software has its own volume control. How does this work? Basically, the incoming audio samples will be scaled by dividing them by a given value. Dividing by 2 gives an output voltage reduction of 6 dB.

The following picture shows what happens. At the left side is the original, unscaled signal and on the right side a signal that has been reduced by factor 3 (which is roughly a 9db voltage reduction).

sin-fullpfeil200sin-half

With volume control in the playback software, the software will do this scaling and feed the data on the right side to the DAC.

But many people tell me, that is bad! Why is it bad? Because you will lose some resolution. Reducing the volume by 50% means that you will lose 1 bit. The resulting resolution will be only 23 bits now. If you decrease the volume further, you will lose more bits of resolution.

Is it really that bad? Remember, that most music that is available today is still recorded with 44.1kHz and 16bit. That means you can “lose” 8 bit with volume control on the DAC without really loosing anything from your music.

There is another downside of digital volume control: signal-to-noise ratio will decrease. That might be an issue in some areas. But many modern DACs have the noise floor at -110dB or even lower. If this increases to e.g. -90dB it is still a good value.

But some DACs have a “hardware” volume control. Having a mixer control in Linux means, that your software does not have to scale down the samples. The DAC will reduce the output volume. But how does it do this? Just have a look at the datasheets of the chips used on these sound cards. You will notice, that almost all chips with integrated volume control also use digital volume control, that means reduce the volume by dividing the digital data by some number.  This is not better than doing it purely in software.

Summary: Software volume control might have an impact on the audible performance, but with modern 24bit DACs, it often works quite well. Not every “hardware” volume control is really hardware. In many cases, it means that the software scaling is done inside a chip, but works exactly like a software volume control.

Build your Squeezebox client with piCorePlayer

Steen Pedersen has updated his piCorePlayer to support our HiFiBerry DAC. piCorePlayer is a Squeezebox client based on a minimal Linux system. It boots from the SD card, but runs completely in the RAM after booting. It also supports WiFi dongles. We tested it with the small Raspberry Pi Model A, that has only a single USB port and used a small LogiLink USB WiFi adapter – it worked very well.

picoreplayer

We can recommend piCorePlayer for all Squeezebox fans!

HiFiBerry DAC support in Raspbmc

logoSam Nazarko has released a new version of the Raspbmc distribution. There are a lot of interesting changes but one is especially exciting to us: It now has ALSA sound card support including a kernel with HiFiBerry DAC support.

We did not have the time to test it yet but we will do this soon! Did somebody test it already?

Are you interested in buying the HiFiBerry DAC – check out our HiFiBerry website. You can order the DAC kit there.

Update 29.12.: It seems that one necessary kernel module for HiFiBerry is still missing in the Rasmbmc december release.  We will check with the Raspbmc developer to see how this can be fixed.

Link

I’ve compile the Linux 3.10 kernel with HiFiBerry support. You can download the tar file from the HiFiBerry website.  The archive includes the updated Raspberry Pi firmware for kernel version 3.10. Therefore it should work even on systems that run Linux 3.8 now. However I cannot guarantee, that it will work on all configurations. Therefore use it on your own risk.