Migrate to 0.7.1
Version 0.7.1 includes the 0.7.0 migration of audio_codec to espressif/esp_codec_dev 2.0, and introduces semantic peripheral bindings and the display_lcd frame format. Regenerate code and validate the target board after updating board YAML.
Component Dependency
esp_board_manager requires espressif/esp_codec_dev ^2.0.0-beta1 when audio codec support is enabled. This constraint permits compatible 2.x versions. The resolved version is recorded in dependencies.lock.
dev_audio_codec YAML Migration
The audio_codec configuration template is:
config:
adc_enabled: true
dac_enabled: false
sys_cfg:
is_master: false
no_mclk: true
adc_cfg:
digital_mic: false
label: [FL, FR, RE, NA]
dac_cfg:
ref_enable: false
ref_dac_ch: 0
real_adc_data_ch: 0
peripherals:
- pa_name: gpio_power_amp
gain: 0.0
active_level: 1
- reset_name: gpio_codec_reset
active_level: 0
- i2s_name: i2s_audio_out
clk_src: 0
tx_aux_out_io: -1
tx_aux_out_line: 0
tx_aux_out_invert: false
- i2c_name: i2c_master
address: 0x30
frequency: 100000
adc_cfg.label uses codec-dev 2.0 channel order from LSB to MSB. Reference PA and reset GPIOs from peripherals with pa_name or reset_name and set active_level in the same entry.
Legacy Field Compatibility
Existing board YAML remains parseable with warnings:
mclk_enabledmaps to the inversesys_cfg.no_mclkvalue.adc_channel_labelsis copied without reordering. Review its legacy MSB-to-LSB order before replacing it withadc_cfg.label.adc_channel_mask,dac_channel_mask,adc_max_channel,dac_max_channel,adc_init_gain,dac_init_gain,aec,eq, andalcdo not configure codec initialization.
Semantic Peripheral Bindings
Devices should reference peripherals with the *_name field for the required semantic role, instead of depending on a peripheral-name prefix or list ordering. For example, migrate an SPI LCD binding from a mapping containing only name to spi_name:
# Legacy form
devices:
- name: display_lcd
type: display_lcd
sub_type: spi
peripherals:
- name: spi_lcd
# Version 0.7.1 form
devices:
- name: display_lcd
type: display_lcd
sub_type: spi
peripherals:
- spi_name: spi_lcd
The selector is determined by the device type and sub-type. Common selectors include i2c_name, spi_name, gpio_name, pa_name, reset_name, dsi_name, and ldo_name. Each peripheral reference entry can contain only one role-specific selector, and the referenced peripheral type must match that role.
Affected devices should replace their former string references or - name: <peripheral> mappings with the selectors shown in the following table.
Device type |
Before: |
After: |
|---|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
The peripherals of power_ctrl: custom are general references that the framework acquires before custom initialization. They do not use a role-specific selector and retain the name form.
In 0.7.0, PA references used name to identify the peripheral and pa_active_level to configure its active level. In 0.7.1, use pa_name for the PA binding and active_level for the active level; codec reset GPIO references use active_level as well.
Legacy string references and mappings that contain only name remain parseable, but BMGR infers their roles from device context and emits a compatibility warning. An unknown selector, duplicate role, combined name and *_name reference, or incompatible peripheral type is rejected during parsing. See YAML Conventions and Syntax for the complete rules.
LCD Frame Format
display_lcd now generates frame_format in its device configuration. Applications should use this field to select pixel buffers, LVGL byte swapping, or image-conversion output instead of relying on panel-driver byte-order assumptions.
When automatic derivation succeeds, frame_format is RGB565_LE, RGB565_BE, BGR888, or RGB888. An insufficient or unsupported layout generates UNKNOWN. SPI and I80 derive the value from data_endian; DSI and RGB derive it from a pixel or color format. For PARLIO configurations, whose format cannot be derived automatically, set config.frame_format explicitly:
config:
frame_format: RGB565_LE
The explicit value must be RGB565_LE, RGB565_BE, BGR888, or RGB888. When it differs from the automatically derived value, BMGR emits a warning and uses the explicit value. See LCD Display (display_lcd) for the complete derivation rules.
Runtime Settings
Set channel masks and stream-specific settings through esp_codec_dev_open() sample information. Set input gain and output volume after opening the device through esp_codec_dev_set_in_gain() and esp_codec_dev_set_out_vol(). AEC, EQ, and ALC require codec-specific runtime handling and are outside the audio_codec initialization scope.
Validation
Regenerate board code with idf.py bmgr -b <board> after updating board YAML. Then run a full build and verify playback, recording, or display operation on the target board.