07 June 2014

Ham Radio Audio Input into the Wolfson Pi Audio Card

The specifications of the card sounded great:
  • jack for a headset/boom mic combination
  • microphone input
  • two On-board microphones
  • stereo line input 
  • stereo line output
  • electrical S/PDIF digital input
  • class D power amplifier
Raspi with Wolfson Audio Card
I had the Raspi running with an USB-Soundcard and had no particular problems except that the overall performance of the little computer was on the lower side. The intended use was ham radio software (especially SDR). The USB Soundcard could deliver a 41 kHz resolution. Not great but for a 2,7 kHz bandwidth it was enough.

But the more the better and it was said, that the solution of the Wolfson could go up to 192 kHz.

The card arrived in a nice box - and that's all. Trained to RTFM you have to search the web for some details or instructions and I had a hard time finding something useful.  On the page of the producer I found some hints and the promise, that in the near future everything will be better. My dear ?!

Fitting the card on the Pi was no problem if you have a Raspberry Pi Model A/B Rev2 or later w/ P5 Pads. The connections are made with some sort of spring pegs forced on the pad with the help of a screw. It was said that it uses a lot of the GPIO connectors, so be careful with your experiments. You may run into problems.(But i haven't checked this point). It worked. But now came the hardest part. More or less they insisted to take an pre-build image with all patches and drivers included. But that was the least what I wanted. I did not intend to throw all the other patches and developments away and start to build them up again. (They promised, that in the "near" future the next images of Wheezy will have all necessary patches. We will see when this future will be reality.)

So I had to find the patches, which was not so difficult, but I found after some time the pdf "Building the Wolfson audio drivers into the kernel on the Raspberry Pi". And I read on some other place that it is recommended to NOT use a USB-Hub and plug in all USB-devices you need while compiling. I plugged in a HUB and all I had, what else could I do with the Raspi, when nothing is attached? 

They used the kernel 3.10 , but at this time I would not discuss with myself if I should insist on my actual kernel. The description was clear and correct. I never did any cross-compiling so I tested the statement: (This will take several hours to complete). And they were right to the point. It took all night and there were only some minor warnings which I happily ignored.

After starting the system new I have to admit, that everything went as advertised. When you download the patches you will find some scripts in your home directory to control the incoming and out-coming stream. You have to do it before you start your application.

So I tested some ham-radio applications with an audio stream coming from the transceiver. The software (e.g. fldigi) did recognize the Wolfson soundcard and I was able to see the stream as waterfall, spectrum etc. I was even able to set the sampling rate. No problem. (I didn't test the system with the intended purpose like music.)

All in all, it kind of worked, but as it has been with all my tests with the Raspberry Pi: Computing power is what you need and although I made my main tests with the 2,7 kHz bandwidth the Pi was running at about 80 % of its possible load. 

So when you consider to have an onboard line-input for ham radio-application like SDR be assured that the Wolfson Audio card will work, but the rest will be running on it's edge. I had a somewhat bettrer result with the WSJT software. The reason: Capturing sound and analyses is performed sequentially. This worked without major problems.

So for the moment I will lay the Raspi with the wolfson card aside and wait for an idea how to use it as a dedicated ham system running a less demanding software.


Stay Tuned!