Skip to content

Conversation

dkaukov
Copy link
Contributor

@dkaukov dkaukov commented Aug 19, 2025

What changed

Replaced:

  • I2S_PDM_TX_CLK_DEFAULT_CONFIGI2S_PDM_TX_CLK_DAC_DEFAULT_CONFIG
  • I2S_PDM_TX_SLOT_DEFAULT_CONFIGI2S_PDM_TX_SLOT_DAC_DEFAULT_CONFIG

These macros switch line_mode to I2S_PDM_TX_ONE_LINE_DAC and adjust other related fields.

Why

PDM output sounded too high-pitched when using mono audio. I assume the point of DriverPDM is to simulate a DAC, and this config matches that better — especially compared to the old IDF 4 “legacy” driver. Audio now sounds correct.

### What changed

Replaced:

* `I2S_PDM_TX_CLK_DEFAULT_CONFIG` → `I2S_PDM_TX_CLK_DAC_DEFAULT_CONFIG`
* `I2S_PDM_TX_SLOT_DEFAULT_CONFIG` → `I2S_PDM_TX_SLOT_DAC_DEFAULT_CONFIG`

These macros switch `line_mode` to `I2S_PDM_TX_ONE_LINE_DAC` and adjust other related fields.

### Why

PDM output sounded too high-pitched when using mono audio. I assume the point of `DriverPDM` is to simulate a DAC, and this config matches that better — especially compared to the old IDF 4 “legacy” driver. Audio now sounds correct.
@pschatzmann pschatzmann merged commit e7711ab into pschatzmann:main Aug 19, 2025
@dkaukov dkaukov deleted the patch-1 branch August 19, 2025 11:54
@pschatzmann
Copy link
Owner

pschatzmann commented Aug 23, 2025

I was getting compile errors for the ESP32 in Arduino (idf version 5.5.0), so I changed it to

image

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.

2 participants