Skip to content

fix(board_manager): default disabled PA pin to -1 instead of GPIO0 (AUD-7247) - #43

Open
wxzed wants to merge 1 commit into
espressif:mainfrom
DFRobot-Embedded-Software:main
Open

fix(board_manager): default disabled PA pin to -1 instead of GPIO0 (AUD-7247)#43
wxzed wants to merge 1 commit into
espressif:mainfrom
DFRobot-Embedded-Software:main

Conversation

@wxzed

@wxzed wxzed commented Apr 30, 2026

Copy link
Copy Markdown

Description

Fixes the default pa_cfg initialization in dev_audio_codec.py when no PA peripheral is configured.

Problem

When an audio_codec device does not define gpio_pa_control, _parse_codec_peripherals() initializes:

  • pa_cfg.name = NULL
  • pa_cfg.port = 0

On ESP32-class targets, GPIO0 is a valid GPIO number, so 0 is ambiguous with “PA disabled” and can conflict with boards that use GPIO0 as I2S BCLK (see discussion in issue #42).

Change (this PR)

  • Change the default pa_cfg.port from 0 to -1 when PA is not configured.

Out of scope (tracked separately / follow-up)

Related

Fixes #42

Testing

  • Ran idf.py gen-bmgr-config for a board where audio_codec has no gpio_pa_control.
  • Verified generated gen_board_device_config.c shows pa_cfg.port = -1 when PA is absent.

Checklist

  • 🚨 This PR does not introduce breaking changes.
  • All CI checks (GH Actions) pass.
  • Documentation is updated as needed.
  • Tests are updated or added as necessary.
  • Code is well-commented, especially in complex areas.
  • Git history is clean — commits are squashed to the minimum necessary.

@github-actions github-actions Bot changed the title fix(board_manager): default disabled PA pin to -1 instead of GPIO0 fix(board_manager): default disabled PA pin to -1 instead of GPIO0 (AUD-7247) Apr 30, 2026
@LiuCodee

LiuCodee commented May 8, 2026

Copy link
Copy Markdown
Contributor

Processing this fix. The issue will be fixed in v0.5.10.

@LiuCodee

LiuCodee commented May 18, 2026

Copy link
Copy Markdown
Contributor

This fix has now been included in v0.5.10. Thanks again for the contribution and testing!

Also, esp_board_manager now has a standalone repository. Feel free to report future issues or submit PRs there:
https://github.com/espressif/esp-board-manager

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: dev_audio_codec generator defaults PA pin to GPIO0 when PA not configured (AUD-7246)

2 participants