I recently acquired the Wolfson Pi Audio Card from Newark. Awesome! In this post I’m simply exploring the functionality of the new device, with some more ambitious projects to come.
The Wolfson Pi brings audio support to the raspberry pi – see this page for detailed specs. What got me excited about the Wolfson Pi, is the ability to add enhanced audio capabilities and potentially incorporate this with JACK or other linux-based real-time audio processing.
The first step is to download and install the wolfson SD card image ( available here ). I found that the unzip utility in Ubuntu could not unzip the file properly… I wound up using 7zip instead, and it worked fine. For those of us using a *nix-based OS, the following can be used to flash your SD card (note that a class 6 is recommended at minimum):
- Insert SD card – use the output of dmesg to determine its device file (/dev/sdb for example). It should be the last one mentioned.
- use dd to write the card – be very careful to select the right device!! dd bs=4M if=wolfson.img of=/dev/sdb. This will take a while. Physically install the Wolfson Pi onto the raspberry pi while you wait.
- Once dd is done, plug it into the pi and you should be ready to go.
If you are like me and want to access it via ssh, the credentials are still the same as the raspbian distro – username pi, password raspberry. The OS uses DHCP by default.
Once you log in, you will see a number of shell scripts in your home directory. Playback_to_*.sh are used to configure the default output device. For my tests, I wanted to test recording with the built-in DMIC (onboard microphone) and output to the Line out connection. To record and play a test file:
- ./Playback_to_Lineout.sh
- ./Record_From_DMIC.sh
- arecord -Dhw:0 -r 44100 -c 2 -f S32_LE test.wav , use Ctrl+C to stop recording
- aplay -Dhw:0 -r 44100 -c 2 -f S32_LE test.wav
Note – don’t try to play FLAC files with aplay, the sound of mismatched formats will hurt your ears…
That’s all for now, stay tuned for more experiments with the Wolfson Pi!