Post navigation

It’s time for a big new project. It will be a Home Cinema. I have a 20m2 room in the basement that was specifically reserved for this use. There are 2 major use cases for this room

Watching movies and TV shows

Flight simulator training and racing simulations

Goals

optimised room acoustics

Frequency range (-3dB) 25-20.000Hz

Dolby Atmos and DTS/X capability

4k video playback

Room acoustics is usually a problem in normal living rooms. I’ve seen a lot of people using expensive equipment in rooms with all kinds of acoustical problems. There are 2 reasons:

Many people don’t know enough about room acoustics or they don’t care.

Acoustics optimisations often aren’t looking nice.

I can completely agree with people that don’t optimise their room acoustics because it looks ugly. It doesn’t help to have a really great sound, but you don’t want to live in this room anymore. Luckily that’s not the problem here, as the room will be exclusively used as a cinema.

Share this:

Ok guys, we are not talking about great sound right now, but we have to admit, that some very funny looking speakers recently crossed our path.

We had a good laugh seeing them and there might be situations, where they can be a funny gift or a good solution for kids.

Close your ears and open your eyes, here they are: Our top ten of the most creative speakers on the market right now.

Ice cream speaker

Summer is already there and nobody can say no to ice cream. These transportable speakers are designed for the sun-loving person, who loves to listen to music, while getting sunburned at the beach.

What song to play with?

Dog shaped speakers

You are looking for something, that is going with the dog lover as well as the music lover deep inside you, check out these very special ceramic speakers, design by Matteo Cibic.

What song to play with?

Toilet speakers

Well, we guess, there are some kind of speakers, that just sound like they look. But maybe these ones are the best to play the songs you never liked anyway.

What song to play with?

Boombox bag

If you ever dreamed about looking like a ridiculous rapper doing your weekly supermarket shopping, you should think about getting this bag with integrated speakers.

What song to play with?

Grooving monkey speaker

Did you ever dreamed about seeing a monkey dancing to a Alice Cooper song? Here is your chance. This little fella is moving as soon as you plug it.

Yes, its useless but come on … we have noticed that little smile on your face.

What song to play with?

Bike sleak speakers

Unfortunately this project never came to life but even if there are many bike speakers on the market, these ones have a great design and we can see ourself playing highway to hell on the way to … well, that’s another story.

What song to play with?

Death star speaker

Shut up and take our money.

What song to play with?

Swimming pool speaker

Honestly, don’t we all dream about the moment, where the most important question in our life is: Where do I get the matching speakers for my pool? In case, we are going to reach this point at some stage, here is the answer:

What song to play with?

Lego speaker

Three things, we would take on a lonely island.

1. Music
2. Lego
3. Who needs number three if you have music and Lego?

What song to play with?

Bath duck speaker

Well, if the plan with the pool doesn’t work out, we can still go for the bath tub.

What song to play with?

Share this:

Some people claim to have a hardware available that is able to playback 384kHz files on an I2S sound card on the Raspberry Pi. They explain, there is “some stuttering”, because “the Raspberry Pi is not fast enough”. Really? Let’s have a look on the facts. The original HiFiBerry DAC (designed in 2013) already used a DAC chip that was able to run at 384kHz sample rate. Why was it never announced as 384kHz DAC? Because the whole driver infrastructure does not support it. It is not a question of the speed of the Raspberry Pi, but a general limitation of the ASoc sound subsystem.

Checking this is easy, if you develop your own driver. Let’s have a look at the Linux kernel. The important file here is include/sound/pcm.h

These are the sample rates that the ALSA layer supports. How can it be that some people claim 384kHz support? Downsampling! That means the sample rate of a 384kHz file will be reduced before playing it back. I don’t know, if they don’t know that they do downsampling or if they don’t tell. I let you decide which is worse.

However, not having 384kHz is an non-issue. While there are a lot of discussions if there is an improvement of the sound quality from 48kHz and 192kHz, I don’t know anybody who claims, that 384kHz playback gives you better sound quality than 192kHz.

If you are looking for a proven 192kHz capable sound card for the Raspberry Pi, check out the HiFiBerry DAC+.

Share this:

I have some bad news today. As I’m very busy with the HiFiBerry business I don’t have the time anymore to sell and support PCBs in the crazy-audio shop anymore. I plan to release the Gerber files in the future to allow crazy-audio readers to order their own PCBs from a supplier of their choice. However this also takes some time and it is not on my top priorities at the moment. Therefore I ask you for some patience.

Share this:

If you want to have different programs sending their output to the same sound card (like the HiFiBerry DAC+) on the Raspberry Pi you might run into problem. The I2S sound system allows only exclusive access to the sound subsystem. The solution for this and some other issues is PulseAudio. It creates an additional abstraction layer that allows different sound sources to use is simultaneously.

Installing Pulseaudio

unfortunately the Raspbian pulseaudio package does not include some resamplers. I was not able to use the “ffmpeg” resampler with it. Therefore I decided to build my own pulseaudio package. This also allows to use PulseAudio 5 instead of version 2 that it part of the Raspbian distribution.

Note that you need to install a lot of prerequisites before you start to configure and compile pulseaudio:

Make sure you have everything that you need compiled in. The alsa-module is the most important, but you will also need at least libsamplerate.

Now compile and install pulseaudio.

make
sudo make install

It will be installed to /usr/local. If you compile it at the Raspberry Pi, you have some time for a coffee. Crosscompiling on a PC is much faster, but also much more complicated, therefore I would not recommend this.

Have a look at the output. If Pulseaudio is working correctly, you will see the AO: [pulse] as output device.

Resampling

However there are some issues, the major one is resampling. To make sure that different sound sources can be mixed all have to be synchronized to a common sample rate. This is not a big problem if you use only 44.1 and 48kHz, but if you also want to playback high-resolution music you will run into trouble with the Raspberry Pi. What is the reason for this? The biggest issue is that the Raspberry Pi CPU is not very powerful and resampling is a relatively complex procedure.
If you read about this issue on several pages on the Internet, many people suggest to use the “trivial” resampling method. It does not need a lot of calculations and therefore works on the Raspberry Pi without a lot of problems. However how trivial is trivial? Have a look at this sine wave:

My audio analyzer shows almost 3% distortions! This is not a good method to use if you’re interested in high-quality audio.

Ok, let’s look at other resamplers. The “src-sinc-…” resamplers are too complex. Even the “src-sinc-fastest” is too complex for 192kHz material.

The “src-zero-order-hold” resampler performs as bad as “trivial”.

The two resamplers that perform quite well are “src-linear” and “ffmpeg”. While distortions are a bit less with “src-linear”, “ffmpeg” used less CPU. As distortions are still quite low with “ffmpeg” I recommend this for resampling.

Upsampling or downsampling?

Ok, we found a resampler that works. But what should be the target sample rate? Down to 44.1 or 48kHz or up to 192kHz? Some people will argue that frequencies above 20kHz are not audible and therefore 44.1kHz or 48kHz are enough. While I don’t want to discuss pros and cons of high-resolution audio format here, there are some other details to think about.

With a sound card like the HiFiBerry DAC+, the clocks are generated from the Raspberry Pi. This works quite well, but different sample rates provide better clocks to the DAC than others. The DAC shows the best performance at higher sample rates. Therefore the distortions will be lower with upsampling to 192kHz than with downsampling to 44.1kHz. There is also another effect: Playback of lower sample rates does not need a lot of processing. There is more processing possible than with 192kHz material. Playing back 192kHz material with its native sample rate does not need resampling. This balances processing power between the playback software and Pulseaudio.

Conclusion

Setting up Pulseaudio on the Raspberry Pi with support for high-resolution sound formats is not trivial. However by using the right sample rates and the right resampler, it will perform well even on the Raspberry Pi. With the configuration shown here Pulseaudio uses about 50% CPU when playing back 44.1, 48kHz and 96kHz material and 20% during playback of 192kHz streams.

Share this:

Today I had some time again to work on the new speakers for the living room. Great sound is a must, but it also has to be accepted by everyone in the household. Therefore I can’t use speakers like the 10-34. I wasn’t sure about the color, so I build 2 versions: a green and a white one. I really like the green, but unfortunately it doesn’t really fit with the other furniture in the living room. Looks like I will go on with the white one. The surface is synthetic leather. This is a good material for all people who have problems to get a good finish with painting. It is relatively easy to use.

The speaker itself is a 3-way system. It will be powered by an HiFiBerry Amp.

Share this:

Modern oscilloscopes can be used for much more than just displaying a waveform. With the some programming, you can use it as a logic analyzer, for jitter measurements or run use it as a spectrum analyzer. In a later article I will show how to do jitter measurements with a digital storage oscilloscope (DSO). You can argue that there are instruments that are more specialized for these use cases than an oscilloscope. You’re right. However if you don’t need the all the features and the superior performance of these instruments (like a logic analyzer or a spectrum analyzer), a DSO might be a cheap alternative. For some specific use cases it might be even superior.

Even relatively cheap scopes like a Rigol DS2072 can already sample data with rates of 2GSamples/s which means one sample every 0.5 nanoseconds. The resolution is usually limited to 8 bit, but the first scopes are already available with 12bit resolution. For many use cases, even 8 bit are more than enough.

The basic approach is to let the scope sample into its internal memory with the sample rate you need, then load the data to a PC and do all the post-processing on the PC. My Rigol scope has an internal memory of 56MSamples – that’s a lot.

The example code at the end of this picture shows how to do this with a Rigol DS2xx2 scope. The standard version of this scope has a memory of only 14MSamples. You can upgrade the memory with a license key. However, for most tasks even the 14MSamples are enough.

There are some things you have to do to get the data from the scope and use the full 56MSamples memory:

Timing is important
I had quite some problems getting the program to work. In most cases I was sending new command to fast. If the scope still processes the last command, it ignores new commands.
In worst case it is not even responding anymore.
As a rule of thumb I use 100ms delay after every command and one second after some commands like “AUTO”, “RUN” or “STOP”. This has been found by trial-and-error.

Activate only one channel if you don’t need the second
If you use both channels, the sample memory per channel is only the half.

Stop the recording
With live display only 1400 samples are available.

One characteristic I don’t like with this specific Rigol oscilloscope: data transfers over the network are quite slow. I was able to transfer 110kSamples/s over TCP/IP. That means reading out the full memory of the scope takes over 8 minutes! That’s not really fast. If you don’t need all the samples, reduce the number of samples with the “:WAVeform:POINts” command.
Now some example code how to get the data. You will see, that some parts are missing. It should just give you an idea how to do it by yourself. I have programmed my own measurement toolkit. However the code still needs some cleanup, therefore I won’t publish it now. I plan to publish it later. Note that this is not a high-priority task, therefore I can’t say when it will be ready.