Skip to content

Call i2s_channel_enable(_tx_handle) in AudioOutputSPDIF::begin()#799

Merged
earlephilhower merged 1 commit intoearlephilhower:masterfrom
NeoCat:master
Nov 12, 2025
Merged

Call i2s_channel_enable(_tx_handle) in AudioOutputSPDIF::begin()#799
earlephilhower merged 1 commit intoearlephilhower:masterfrom
NeoCat:master

Conversation

@NeoCat
Copy link
Contributor

@NeoCat NeoCat commented Nov 12, 2025

Currently, i2s_channel_enable(_tx_handle) is only called within AudioOutputSPDIF::SetRate(), which caused i2s_channel_write() to fail with the following error when the source rate is accidentally the same with the default 44100Hz.

i2s_common: i2s_channel_write(1317): The channel is not enabled

This fixes the issue by enabling the i2s channel in AudioOutputSPDIF::begin().

i2s_channel_enable(_tx_handle) was only called within
AudioOutputSPDIF::SetRate(), which caused i2s_channel_write to fail
if the rate was the same with the default 44100Hz.
This fixes the issue by calling it in begin().
Copy link
Owner

@earlephilhower earlephilhower left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! I tested what I could when I moved to the IDF 5.x, but looks like I missed this!

@earlephilhower earlephilhower merged commit 94c68ec into earlephilhower:master Nov 12, 2025
22 checks passed
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