I read that the inputs can be biased for using an electret mic. I was confused on how to use the biasing.
I'm measuring 0V at the input jack between any of the pins, so the input jack doesn't seem to be biased.
I found the "audio/inconfic mic" object. From what I can tell from the object definition, this simply sets the values of the audio codec's 0x4010 register. Looking at the datasheet, that should control the voltage & max current on the codec's MICBIAS pin.
While looking into this, I found a bug in the implementation of audio/inconfig mic.axo:
The 0x4010 register is a bitfield. See datasheet. In the .axo, the values are combined like this:ADAU1961_WriteRegister(0x4010,attr_bias+attr_mperf+1);
where mperf
is 0 or 1, and bias
is 0 or 4 (from the dropdown controls).
This means that selecting "Normal" in the mperf dropdown turns bit 0 off, which disables the bias, and flips bit 1 (which is undefined). (1 + 1 = 0b10)
MPERF, which is bit 3, is never touched by the code.
I corrected this by
- including bit 0 in the
bias
field, adding a third value to disable the bias - correcting the
mperf
values (MPERF is bit 3, not bit 0) - ORing the values together instead of adding them
I tested the modified axo and measured the bias voltage, it works as intended. @johannes or whoever maintains such things, could you have a look and include the fixed object: inconfig mic.axo (1.3 KB)
So, looking at the Axoloti Schematic on page 4 and on my board... R17 and R18 are unpopulated so it is clear to me now why there is no bias voltage on the input jack. I guess I should just solder in two 1K resistors then.