Close

1st recording

A project log for Ultimate 4 channel audio recorder

Portable, 2 channel, balanced input, 24 bit 96khz recording

lion-mclionheadlion mclionhead 01/14/2018 at 07:180 Comments

Capturing PC audio in software sounds like a good idea until you have to monitor the PC audio in the phones.  That would require a mixing board & a bunch of wires.  The easiest way is capturing TOSLINK on the same board as the microphone & mixing it in software.  Sometimes, the best way to do more in software is more custom hardware.

The trick is the AUX I2S clock is going to drift away from the mane I2S or be at a totally different sample rate.  The only solution is to record different files for each I2S & take nearest neighbor samples for the monitoring.

Otherwise, rediscovered the raspberry pi's largest SPI buffer is 4096 bytes.  You need to add spidev.bufsiz=32768 to /boot/cmdline.txt to expand it.  

The 1st audio file recorded open circuits & showed -86.6, -87.6, -87.4, -88.08 dB for the maximums & -99.4, -99.8, -99.8, -100 dB for the RMS.  They strangely got quieter as they went down the board, but were all good enough.

4 channels magnified to 1/262144 per Y.

When recording different files for the 2 I2S streams, it overruns all the time, even at 48khz.  CPU usage is 5%.  In typical ext4 fashion, it frequently locks up while doing an extended write.  Mutex locking the 2 file writers doesn't help.  The maximum SPI buffer size which can fit in the ARM is 12296 bytes.  It needs some minimal mixing instead of writing the full ADC output & a more optimized buffer algorithm.  Partitioning the flash into a raw area might be required.

The 1st files it recorded before it crashed:

https://cdn.hackaday.io/files/287161228585344/aux01.wav

https://cdn.hackaday.io/files/287161228585344/mane01.wav

Discussions