Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error: 'I2S_MODE_DAC_BUILT_IN' was not declared in this scope #41

Open
amishrabbit opened this issue Feb 1, 2024 · 2 comments
Open

Comments

@amishrabbit
Copy link

amishrabbit commented Feb 1, 2024

While attempting to compile and build the Galagino package for a ESP32-2432S028R (aka, CYD or "Cheap Yellow Display") using the Arduino IDE under Windows 10, with the 2.0.14 version of the esp32 board library installed, the following error appears.

<path-to-repo>\galagino-main\galagino\galagino.ino: In function 'void audio_init()':
<path-to-repo>\galagino-main\galagino\galagino.ino:636:58: error: 'I2S_MODE_DAC_BUILT_IN' was not declared in this scope
     .mode = (i2s_mode_t)(I2S_MODE_MASTER | I2S_MODE_TX | I2S_MODE_DAC_BUILT_IN),
                                                          ^~~~~~~~~~~~~~~~~~~~~
<path-to-repo>\galagino-main\galagino\galagino.ino:636:58: note: suggested alternative: 'I2S_MODE_MASTER'
     .mode = (i2s_mode_t)(I2S_MODE_MASTER | I2S_MODE_TX | I2S_MODE_DAC_BUILT_IN),
                                                          ^~~~~~~~~~~~~~~~~~~~~
                                                          I2S_MODE_MASTER
<path-to-repo>\galagino-main\galagino\galagino.ino:669:20: error: 'I2S_DAC_CHANNEL_RIGHT_EN' was not declared in this scope
   i2s_set_dac_mode(I2S_DAC_CHANNEL_RIGHT_EN);
                    ^~~~~~~~~~~~~~~~~~~~~~~~
<path-to-repo>\galagino-main\galagino\galagino.ino:669:20: note: suggested alternative: 'I2S_CHANNEL_FMT_RIGHT_LEFT'
   i2s_set_dac_mode(I2S_DAC_CHANNEL_RIGHT_EN);
                    ^~~~~~~~~~~~~~~~~~~~~~~~
                    I2S_CHANNEL_FMT_RIGHT_LEFT
<path-to-repo>\galagino-main\galagino\galagino.ino:669:3: error: 'i2s_set_dac_mode' was not declared in this scope
   i2s_set_dac_mode(I2S_DAC_CHANNEL_RIGHT_EN);
   ^~~~~~~~~~~~~~~~
<path-to-repo>\galagino-main\galagino\galagino.ino:669:3: note: suggested alternative: 'i2s_set_clk'
   i2s_set_dac_mode(I2S_DAC_CHANNEL_RIGHT_EN);
   ^~~~~~~~~~~~~~~~
   i2s_set_clk

exit status 1

Compilation error: 'I2S_MODE_DAC_BUILT_IN' was not declared in this scope

Attempting the changes suggested by the compiler trigger additional errors to appear in the compiler log.

Is there a workaround for this issue on this model of device?

@harbaum
Copy link
Owner

harbaum commented Feb 2, 2024

What board did you select in the IDE, what version of IDE and ESP32 BSP do you use?

It sounds like you selected a board/ESP variant that does not have a built-in DAC.

@harbaum
Copy link
Owner

harbaum commented Feb 2, 2024

You might want to join this discussion:

#18

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

No branches or pull requests

2 participants