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

I2S communication format unclear (IDFGH-2913) #4957

Closed
callalilychen opened this issue Mar 18, 2020 · 2 comments
Closed

I2S communication format unclear (IDFGH-2913) #4957

callalilychen opened this issue Mar 18, 2020 · 2 comments

Comments

@callalilychen
Copy link
Contributor

callalilychen commented Mar 18, 2020

According to the reference manual of esp32, for I2s, 3 Audio Standards are supported, but I am not sure, how to configure the three standards using the esp-idf. Because in the i2s_types.h, 6 communication formats are defined:

typedef enum {
I2S_COMM_FORMAT_I2S = 0x01, /*!< I2S communication format I2S*/
I2S_COMM_FORMAT_I2S_MSB = 0x02, /*!< I2S format MSB*/
I2S_COMM_FORMAT_I2S_LSB = 0x04, /*!< I2S format LSB*/
I2S_COMM_FORMAT_PCM = 0x08, /*!< I2S communication format PCM*/
I2S_COMM_FORMAT_PCM_SHORT = 0x10, /*!< PCM Short*/
I2S_COMM_FORMAT_PCM_LONG = 0x20, /*!< PCM Long*/
} i2s_comm_format_t;

I can not find further information about these enums entries, so I read the code. But I can not understand, what is the difference between these configs:

.communication_format = I2S_COMM_FORMAT_I2S | I2S_COMM_FORMAT_I2S_MSB, 

or

.communication_format = I2S_COMM_FORMAT_I2S, 

To receive/send audio in MSB Alignment Standard, should I configure the communication format like this:

.communication_format = I2S_COMM_FORMAT_I2S_LSB, 

Can somebody explain it? It will be very nice to also improve the documentation for I2S https://docs.espressif.com/projects/esp-idf/en/latest/api-reference/peripherals/i2s.html#functional-overview

@github-actions github-actions bot changed the title I2S communication format unclear I2S communication format unclear (IDFGH-2913) Mar 18, 2020
@koobest
Copy link
Contributor

koobest commented Mar 19, 2020

Hi, @callalilychen
Thank you for reporting this issue. If MSB-aligned communication format is required, it should be configured as "I2S_COMM_FORMAT_I2S | I2S_COMM_FORMAT_I2S_LSB" and we will improve the documentation.

thanks !!

@Alvin1Zhang
Copy link
Collaborator

@callalilychen Thanks for reporting, we have a fix which is now under internal reviewing, will update once it is available on GitHub. Thanks.

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

3 participants