You should be able to do something similar with the Gem Stereo by using the I2S lines that would be normally used by the Multi:
These are the available inSerializers:
{4, 0x3}, P1.2,
{5, 0x3}, P1.35
So, in core/I2c_Codec.cpp, find this block:
#if defined(IS_AM62_SK)
mcaspConfig.params.inSerializers = {{3, 0x3}};
mcaspConfig.params.outSerializers = {{2, 0x3}};
#elif defined(IS_AM62_BP)
mcaspConfig.params.inSerializers = {{2, 0x3}};
mcaspConfig.params.outSerializers = {{1, 0x3}};
#elif defined(IS_AM62_PB2)
#ifdef BELA_PB2_UPGRADE_REVA_NOREWORK
// data lines are swapped, oops!
mcaspConfig.params.inSerializers = {{0, 0x3}};
mcaspConfig.params.outSerializers = {{1, 0x3}};
#else
mcaspConfig.params.inSerializers = {{1, 0x3}}; // CHANGE THIS
mcaspConfig.params.outSerializers = {{0, 0x3}};
#endif
#else
mcaspConfig.params.inSerializers = {{0, 0x3}};
mcaspConfig.params.outSerializers = {{2, 0x3}};
#endif
and replace the line marked CHANGE THIS above with this:
mcaspConfig.params.inSerializers = {{4, 0x3}}; // P1.2
Use P1.2 for I2S data input, then take WCLK from P2.10 and the BCLK from P2.19.
If instead you want to use these microphones alongside the built-in codec's inputs, you'd need to modify core/ I2c_MultiI2sCodec.cpp and core/board_detect.cpp as follows:
diff --git a/core/I2c_MultiI2sCodec.cpp b/core/I2c_MultiI2sCodec.cpp
index 57a97fa2..85fdbbb4 100644
--- a/core/I2c_MultiI2sCodec.cpp
+++ b/core/I2c_MultiI2sCodec.cpp
@@ -11,12 +11,11 @@ I2c_MultiI2sCodec::I2c_MultiI2sCodec(int i2cBus, int i2cAddress, CodecType type,
setParameters(p);
I2c_Codec::getMcaspConfig();
mcaspConfig.params.inSerializers = {
- {0, 0x3},
- {1, 0x3}
+ {1, 0x3}, // on-board codec
+ {4, 0x3}, // P1.2
};
mcaspConfig.params.outSerializers = {
- {2, 0x3},
- {3, 0x3}
+ {0, 0x3}, // on-board codec
};
}
diff --git a/core/board_detect.cpp b/core/board_detect.cpp
index 52856fdf..d6612282 100644
--- a/core/board_detect.cpp
+++ b/core/board_detect.cpp
@@ -273,7 +273,7 @@ bool Bela_checkHwCompatibility(BelaHw userHw, BelaHw detectedHw)
return true;
else if (userHw == BelaHw_BelaMultiTdm && Bela_hwContains(detectedHw, BelaCape))
return true;
- else if (userHw == BelaHw_BelaMiniMultiI2s && Bela_hwContains(detectedHw, BelaMiniCape))
+ else if (userHw == BelaHw_BelaMiniMultiI2s)
return true;
else if (userHw == BelaHw_BelaMini && Bela_hwContains(detectedHw, BelaMiniCape))
return true;
and run with --board=BelaMiniMultiI2s
All of the above untested and unsupported.