sipeed / Maixduino

Arduino port on Maix board ( k210 )
https://maixduino.sipeed.com
Other
215 stars 95 forks source link

use external I2S mems mic for Maix_Speech_Recognition #131

Closed alirezainallo closed 1 year ago

alirezainallo commented 1 year ago

https://github.com/sipeed/Maixduino/blob/aa6543538ccfb54a89e9922dd38f5b4710a9c2a4/libraries/Maix_Speech_Recognition/src/Maix_Speech_Recognition.cpp#L95-L114 Hi I want to use another I2S pin for record audio, like FUNC_I2S0_IN_D2 but i can not initial this pin. I find that maixduino i2s.h library has i2s_device_number_t and i2s_channel_num_t with: https://github.com/sipeed/kendryte-standalone-sdk/blob/1d52a1aaa05fd10ad6c5968146d408709e0f9c2c/lib/drivers/include/i2s.h#L34-L48

but I can't understand what is difference of i2s_device an i2s_channel? for example what is device and channel for use i2s device that connected to FUNC_I2S0_IN_D2 (pin 22)?

alirezainallo commented 1 year ago

https://github.com/GitJer/Some-Sipeed-MAIX-GO-k210-stuff/issues/5 this was my problem, I can't use channel mask in correct format.