Page 1 of 1

Use I2C bus which controls the CODEC

Posted: Thu Feb 15, 2024 9:21 am
by aldami
Hi, I am trying to use the same I2C bus which is used for codec controll to communicate with another IC

I cannot figure out however how the driver should be set up.
If I use i2c_driver_install for the same bus and same settings it seems to conflict with the initalization that has already been performed by the ES8388 driver (esp-adf\components\audio_hal\driver\es8388\es8388.c).

If I were able to have a shared i2c_handle between the codec driver and my code it would work, but I am hoping for a less complicated solution which does not involve modifying the driver ?

Thank you

Re: Use I2C bus which controls the CODEC

Posted: Thu Feb 15, 2024 3:18 pm
by liaifat85
You can use the I2C bus in a multi-master configuration, where both the ES8388 driver and your code can share access to the bus.

Re: Use I2C bus which controls the CODEC

Posted: Thu Feb 15, 2024 4:07 pm
by aldami
liaifat85 wrote:
Thu Feb 15, 2024 3:18 pm
You can use the I2C bus in a multi-master configuration, where both the ES8388 driver and your code can share access to the bus.
Thank you.
Would that be thread safe ?
Could you maybe point me to some docs about the multi master conf ?