Use I2C bus which controls the CODEC

aldami
Posts: 4
Joined: Thu Feb 15, 2024 9:14 am

Use I2C bus which controls the CODEC

Postby aldami » Thu Feb 15, 2024 9:21 am

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

liaifat85
Posts: 200
Joined: Wed Dec 06, 2023 2:46 pm

Re: Use I2C bus which controls the CODEC

Postby liaifat85 » 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.

aldami
Posts: 4
Joined: Thu Feb 15, 2024 9:14 am

Re: Use I2C bus which controls the CODEC

Postby aldami » Thu Feb 15, 2024 4:07 pm

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 ?

Who is online

Users browsing this forum: No registered users and 14 guests