Page 1 of 1

i2s_event_t.size is always zero from I2S event queue

Posted: Wed Jan 08, 2020 11:01 pm
by dave_see
Hello,

I have a test application that calls i2s_driver_install with an event queue, per the documentation here:
https://docs.espressif.com/projects/esp ... onfig_tiPv

I set my buffer length to be 2.5 milliseconds at a sample rate of 48kHz. I have confirmed that I receive 400 events per second, which seems correct. These event objects on the queue are of type i2s_event_t, which has two fields:
  • type
  • size
What's strange is that the size field of i2s_event_t is always zero. Is this expected?

Many thanks,
Dave

Re: i2s_event_t.size is always zero from I2S event queue

Posted: Thu Jan 09, 2020 3:31 am
by ESP_Sprite
According to the header that defines it:

Code: Select all

typedef struct {
    i2s_event_type_t    type;   /*!< I2S event type */
    size_t              size;   /*!< I2S data size for I2S_DATA event*/
} i2s_event_t;
As there is no I2S_DATA event (yet), you can ignore this member.

Re: i2s_event_t.size is always zero from I2S event queue

Posted: Thu Jan 09, 2020 3:39 pm
by dave_see
@ESP_Sprite thank you for posting that this is currently expected behavior.