Overviewο
An ESP-IDF audio control implementation for the PT2258 6-Channel Electronic Volume Controller IC.
Repository Structureο
π pt2258 (I2C Driver)ο
Provides direct, stateless hardware control.
π pt2258_ctrl (Controller)ο
Provides a controller for the PT2258 driver.
π pt2258_esp_adf (ESP-ADF Adapter)ο
ESP-ADF initialization adapter that bridges the PT2258 driver to the native ESP-ADF i2c_bus transport layer. Automatically handles installation of the core PT2258 I2C driver as a dependency.
π pt2258_esp_idf (ESP-IDF Adapter)ο
ESP-IDF initialization adapter that bridges the PT2258 driver to the native ESP-IDF i2c_master transport layer. Automatically handles installation of the core PT2258 I2C driver as a dependency.
Adding to Your Projectο
Option 1: ESP Component Manager (Recommended)ο
Depending on your projectβs framework, run the appropriate command in your project directory to add the component:
# If using the native ESP-IDF v5+ New I2C Master driver:
idf.py add-dependency "romr/pt2258_esp_idf"
# If using the PT2258 Controller:
idf.py add-dependency "romr/pt2258_ctrl"
# If using the ESP-ADF audio framework i2c_bus:
idf.py add-dependency "romr/pt2258_esp_adf"
# Only if implementing a completely custom transport layer or manual callbacks:
idf.py add-dependency "romr/pt2258"
Note
Automatic Dependency Resolution
When using any of the official adapters (pt2258_esp_idf or pt2258_esp_adf), the core romr/pt2258 driver is automatically resolved and installed as a required dependency by the ESP Component Manager. You do not need to add it manually.
Direct installation of the core romr/pt2258 component is strictly reserved for projects requiring a custom, user-defined I2C transport implementation.
Option 2: Git Submoduleο
Add this entire repository into your projectβs components/ directory.
cd <your_project_root>
git submodule add https://github.com/romr/esp-idf-pt2258.git components/esp-idf-pt2258