If you’re having sound issues installing Windows 7, Vista and earlier versions of Windows with Bootcamp on your Macbook Pro. Then you can try the drivers below at your own risk. The drivers are for Realtek chips and Cirrus Logic chips. If are trying to install Windows 10 then you should first start by looking for the latest version of the Bootcamp drivers on Apples website. New Method:https://www.youtube.com/watch?v=c9qAq6MeJdQ.
There is more green space and trees around me where I am now, with many more garden birds, though no sparrows1, and occasionally some tawny owls in the night.
http://www.richardmudhar.com/blog/wp-content/uploads/2018/02/tawny_owls_somerset_170828_0125_ed.mp3Tawny owls, recorded ME66 handheld
So thoughts turn to a garden recording gizmo again. I have enough power, and a network connection to a shed, a oddly wind-sheltered location and many trees nearby. For short term recordings in the field I am still in favour of the timed field recorder approach, but for the garden where I have power and data the Pi still scores. You don’t have to fiddle with it, it’s entirely remote controlled. Many years ago I had a PC in the garage which was the music server, I used a piece of software called loop recorder on that. This cat fight is one of my favourite urban recordings from that time.
http://www.richardmudhar.com/sounds/audio/071020_cats.mp3although I was really trying to record a hedge full of sparrows. A loop recorder lets you go back and catch things like that, and the microphone would be much closer to the area where the owls are.
So I thought I’d revisit this Cirrus Logic audio card, particularly as a case for a Pi with this mounted was being sold off cheap for £5
The Cirrus is the only audio card for the Raspberry Pi that lets you record sound with it, as opposed to the legion of DAC cards for the Pi. You can, of course, use a USB sound card instead, though that precludes using a Model A if you want to use wifi and have the lowest power.
The good news is that a hero hacker, Matthias Reichl, has sorted out the drivers, it’s now a RPI-update rather than patching kernels and esoteric crap.
The bad news is that the manufacturer discontinued the card 🙁 Having said that, it still seems to be available for about £60 if you work hard enough, GIYF. That’s dear – a Behringer UCA202 is a good Pi compatible USB sound card for about £24, line level input. The Cirrus Logic card offers a bit more sensitivity and on board mic bias.
Installation process
It’s not absolutely futz-free, though it’s far better than it used to be. I’ve never managed to blow a Raspberry Pi board, so I have a fine collection of old boards from my Pi history, the very first one is still in service collecting sensor data.
For this job I will select a Raspberry Pi B+ with Ethernet, the first model with the 40-pin GPIO and the HAT physical format, because that’s what the Cirrus wants. I could use an A+, but I want Ethernet, because paradoxically trunking WiFi to the shed with some patch antennas works fine but doesn’t give me WiFi at the shed, and I want lots of USB connectors spare, because I will probably be recording using real spinning HDD, because – well SD cards burn out whereas spinning metal seems to last. Plus the latter is fast, although recording audio really shouldn’t be an I/O challenge even for SD these days.
- Get new raspi-stretch lite, load without card attached
- works, enable ssh, enable key, test key login
- sudo apt-get update, sudo apt-get upgrade
- Now visit http://www.horus.com/~hias/cirrus-driver.html and do as the man says
- sudo nano /boot/config.txt, can the internal audio and add the line as instructed
- sudo nano /etc/modprobe.d/cirrus.conf, add line
- wget http://www.horus.com/~hias/tmp/cirrus/cirrus-ng-scripts.tgz, make bin directory, do it
- sudo shutdown -h now, wait for green blinkenlights, pull power and attach card
- Restart Pi, log in
- execute the bin/Record_from_Linein_Micbias.sh file, which terminated silently
Now I run alsamixer, knowing that I have killed off the internal sound card. I’m only interested in record, if I wanted just play I’d go buy myself a cheap DAC HAT and save myself a ton of trouble. Don’t even think of using the F4 button to switch to Capture, use the arrow key to get to the relevant section and then the tab key to select in section, because alsamixer is ratty and will crash if you press F4. You get this
but in fact what you actually want is all the way to the right, so make with the right arrow key, past all that equaliser crap
The implication is that I am looking at IN3L and IN3R, because IN1L,R and IN2 L,R are set to 0, and hopefully nobody’s tossing anything in on DIG 1,2,3, although in a perfect world it would be nice to see them set to 0 too. Nice that the noise generator is set to 0, though the noise gate is worrying, apparently that means
Noise Gate Threshold: [dB Gain: -90.00]
What that means in real life, well, your guess is as good as mine, but I’ll leave it well alone for now.
To get to record from the card you need to know what you’re recording from, so I set 1kHz tone going in and do this
It’s either RPiCirrus or it’s RPi-Cirrus, I’ll save you the experimentation, it’s the former
when I FTP the result off the Pi and look at it I get
Which looks OK – there’s a slight phase difference and the usual DC bump at the start – try and start recording at least a quarter second of deadspace to let that die off.
So it does basically work, with a stock Pi with a minimum of fiddling about. Win.
Adjusting levels
The nominal gain of IN3 is 8dB (displayed as 16). If I crank it all the way I can get up to 31dB, displayed as 100. So I will try that on IN3R.
This confirms IN3 is the input I am dealing with. I wasn’t really able to convince myself the mic bias ever came on. I could have had this information easier if I’d used the Source, because in the file rpi-cirrus-functions.sh is the section
but where’s the fun in that, eh? You can find the original of the scripts on Github. Apparently Matthias’ sterling work is all to do with LibreELEC which is designed to be just enough OS to run KODI, so the fact that recording is looked at at all is impressive, since you don’t normally record anything with a media server.
buffer overruns
Everyone and his dog starts off recording to the same SD card that the OS is on, and you get buffer overruns. There are all sorts of reasons why you shouldn’t record audio to the OS SD card, but overruns seems to be the obvious one. This thread seems to confirm this, the OS is busy with the SD card at times so it can’t write your audio.
So I mounted a USB stick. You get to run as sudo because you’re writing to a device, there’s probably a way to fix that but for now I’ll run with it
Nice try but no cigar. How about using FLAC? It reduces the IO, but it also offers the possibility of using jstsch’s massive interpass buffer trick.
Hmm, looks OK2 without the buffer on the USB drive for 5 mins (set to 48k to be the same as previous ones where it barfed). Flac gets the sudo this time because it has the job of writing to the USB stick.
input buffer trick (onto the normal disk)
which seemed to go OK for the 5 sec duration, so if it turns out I need it I have the command line. It’s a lot of faff to go to if it’s not needed.
Analogue issues
There are three problems with using this for an electret mike:
- The mic bias
doesn’t work - sensitivity is low, it is a line input after all. OTOH I can boost it by 23dB
- I tested it playing from a Behringer 302 sound card main mix output (phono unbalanced) in parallel with the input to an amplifier. I hear a distinct change in tone and level for the duration of the recording, not huge, but implying the input impedance of this is low. Behringer claim these outputs are 470Ω
It occurred to me that if the circuit conditions change such that I can hear a difference with it bridged across a 470Ω bus, perhaps the mic bias also only comes on on record. Measurement confirmed this, an open-loop voltage of 2.7V appears if I execute Record_from_Linein_Micbias.sh, but only for the duration of the recording. It seems I need a deeper understanding of the analogue performance of this board.
At maximum gain (100) I applied 133mV p-p (~47mV rms) which when replayed was -2.8dBFS, so 0dBFS ~ 64mVrms
That’s low sensitivity for a mic input, typical electrets will give 25mV/Pa @1kHz. Trouble is 1Pa is pretty damn loud, a diesel truck at 10m. Conversational speech at 1m is 2% of that, about 34dB down. You’ll get some signal if you holler at at electret mic with mic bias on, but the birds won’t shift the needle on the dial. I am probably about 40dB off. Sure, it’s a digital system and you want 12-20dB of headroom to 0dBFS, but that’s still a shortfall of 30dB, I want a mic gain of about 30 times.
OPPO HA-2SE Images (Hi-Res) (36mb) OPPO HA-2SE Asynchronous USB DAC Driver for Windows XP / Windows Vista v2.24 (build 16).MAC does not require any drivers to connect (1.9mb) OPPO HA-2SE Asynchronous USB DAC Driver for Windows 7 / 8 / 10 v3.34 (build 23) (2.2mb) OPPO HA-2SE Asynchronous USB DAC Driver for Windows 10 build 1607 or higher. Popular Hardware drivers downloads. 01 Microsoft® ODBC Driver 13.1 for SQL Server® - Windows, Linux, & macOS. The Microsoft ODBC Driver for SQL Server provides native connectivity from Windows, Linux, & macOS to Microsoft SQL Server and Microsoft Azure SQL Database. 02 Surface Pro 4 Drivers. 2se driver download for windows 10 pro. OPPO HA-2 Asynchronous USB DAC Driver for Windows XP / Windows Vista v2.24 (build 16).MAC does not require any drivers to connect (1.9mb) OPPO HA-2 Asynchronous USB DAC Driver for Windows 7 / 8 / 10 v3.34 (build 23) (2.2mb) OPPO HA-2 Asynchronous USB DAC Driver for Windows.
My microphone is going to be about 20 yards from the Pi. I had fondly thought it would be as simple as running a coax cable with mic bias out to the mic from an input more sensitive than this. If I need to amplify, I may as well run the Pi at the lowest sensitivity and make the head amplifier work for its living.
Which would also work for running the Pi with a standard USB sound card like the Behringer UCA202, which is a line level sensitivity one… This project has metamorphosed from a Pi project to a remote mic preamp project. I am ok with the Pi side of things now, once I get the case, time to box the sucker up, and think about a gizmo to sort out the mic interface. If I take a typical audio coax cable I get a capacitance of 340pf/m, so 20m of that will be 6.8nF.
Cirrus Logic Sound Cards Amazon
Your typical electret is a audio variable current source developing a voltage across the plug-in-power bias resistor of about 6k8 in parallel with the input impedance of the amplifier input. Let’s guess about 5k.
Across that is the cable capacitance. The impedance of that 6.8nF is about 1.2k at 20kHz, so it will clobber high frequencies. At least I can feel better about the Cirrus Logic not being sensitive enough to run an electret mic barefoot – things like robins will get rolled off, although the tawny will probably make it OK. I need to do better here.
Cirrus Logic Sound Cards Redeem
Interestingly enough, Frank the binaural head guy has used the Cirrus Logic and the UCA202 barefoot with electret capsules, and is doing well. I don’t feel happy with the gain distribution running such a low signal into these cards, but he is out there and doing it… Perhaps I am missing something here, but the sound recordist in me just can’t relate to running a rig normalised to 40dB down on 0dBFS.
He seems to advocate listening at a low level, but somehow I feel it’s good to get the gain up early to capture with a higher SNR and attenuate later if the desire is low SPL. His feed is here, and in fairness ambient noise swamps mic and input stage hiss, which speaks for his technique in Ormskirk anyway.
Cirrus Logic Sound Cards Generator
- there are sparrows a few houses down from me, which pleases me. ↩
- There is a possibility in the back of my mind that perhaps piping the output of arecord into flac is masking the error messages to stdout. I don’t know enough about linux to say if that is the case, or how to test it. ↩