Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/pguyot/atomvm_esp_adf

AtomVM driver for Espressif Audio Development Framework (ESP-ADF)
https://github.com/pguyot/atomvm_esp_adf

atomvm audio esp32

Last synced: 19 days ago
JSON representation

AtomVM driver for Espressif Audio Development Framework (ESP-ADF)

Awesome Lists containing this project

README

        

# AtomVM driver for Espressif Audio Development Framework

This component ports [Espressif Audio Development Framework](https://github.com/espressif/esp-adf)
to AtomVM, thus enabling audio processing to esp32-based systems powered by
AtomVM.

[![Build](https://github.com/pguyot/atomvm_esp_adf/actions/workflows/build.yml/badge.svg?branch=main)](https://github.com/pguyot/atomvm_esp_adf/actions/workflows/build.yml)

## Installation

1. Clone this repository into atomvm/src/platforms/esp32/components with
the required submodules. You can clone with recursive submodules but most
submodules are not used and the following commands will save disk space.

```bash
cd AtomVM/src/platforms/esp32/components/
git clone https://github.com/pguyot/atomvm_esp_adf.git
cd atomvm_esp_adf/
git submodule update --init components/esp-adf
cd components/esp-adf/
git submodule update --init components/esp-adf-libs/
```

2. Build and flash AtomVM

Espressif Audio Development Framework requires `CONFIG_FREERTOS_ENABLE_BACKWARD_COMPATIBILITY`
which you can set using the configuration menu or editing sdkconfig file.

You can use a command sequence such as: (port name depends on OS)

```bash
cd AtomVM/src/platforms/esp32/
idf.py set-target esp32
echo CONFIG_FREERTOS_ENABLE_BACKWARD_COMPATIBILITY=y >> sdkconfig
idf.py build
idf.py -p /dev/cu.usbmodem14401 flash
```

You will also need to flash AtomVM core libraries.

Alternatively, you can flash an image generated by the [CI of this project](https://github.com/pguyot/atomvm_esp_adf/actions/workflows/build.yml).

3. Custom builds

You can finely select the ESP ADF elements you need using the configuration menu, under `Component config` -> `ATOMVM ESP-ADF Configuration`).

Default builds include:
- audio element driver
- audio pipeline
- i2s output stream
- MP3 and AAC decoders
- resample filter

Enabling all available decoders currently yields an image that is too large for AtomVM's default partition map.

```bash
cd AtomVM/src/platforms/esp32/
idf.py menuconfig
idf.py build
```

Do not forget FreeRTOS `configENABLE_BACKWARD_COMPATIBILITY` (under `Component config` -> `FreeRTOS` -> `Kernel`).

## Usage

This project defines `esp_adf_*` modules.

You can refer to [examples](examples/) or [API documentation](https://pguyot.github.io/atomvm_esp_adf/).