mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
i2s: fix the param check on PDM mode
Closes https://github.com/espressif/esp-idf/issues/7604
This commit is contained in:
parent
a21225d86d
commit
1327a56369
@ -1550,10 +1550,10 @@ static esp_err_t i2s_check_cfg_validity(i2s_port_t i2s_num, i2s_hal_config_t *cf
|
||||
if (cfg->mode & I2S_MODE_PDM) {
|
||||
ESP_RETURN_ON_FALSE(i2s_num == I2S_NUM_0, ESP_ERR_INVALID_ARG, TAG, "I2S PDM mode only support on I2S0");
|
||||
#if !SOC_I2S_SUPPORTS_PDM_TX
|
||||
ESP_RETURN_ON_FALSE(cfg->mode & I2S_MODE_TX, ESP_ERR_INVALID_ARG, TAG, "PDM does not support TX on this chip");
|
||||
ESP_RETURN_ON_FALSE(!(cfg->mode & I2S_MODE_TX), ESP_ERR_INVALID_ARG, TAG, "PDM does not support TX on this chip");
|
||||
#endif // SOC_I2S_SUPPORTS_PDM_TX
|
||||
#if !SOC_I2S_SUPPORTS_PDM_RX
|
||||
ESP_RETURN_ON_FALSE(cfg->mode & I2S_MODE_RX, ESP_ERR_INVALID_ARG, TAG, "PDM does not support RX on this chip");
|
||||
ESP_RETURN_ON_FALSE(!(cfg->mode & I2S_MODE_RX), ESP_ERR_INVALID_ARG, TAG, "PDM does not support RX on this chip");
|
||||
#endif // SOC_I2S_SUPPORTS_PDM_RX
|
||||
}
|
||||
#else
|
||||
|
@ -80,8 +80,8 @@ I (401) I2S: APLL: Req RATE: 44100, real rate: 88199.977, BITS: 16, CLKM: 1, BCK
|
||||
I (431) I2S: APLL: Req RATE: 44100, real rate: 88199.977, BITS: 16, CLKM: 1, BCK_M: 8, MCLK: 22579194.000, SCLK: 2822399.250000, diva: 1, divb: 0
|
||||
I (431) pdm_rec_example: Initializing SD card
|
||||
I (431) pdm_rec_example: Using SDMMC peripheral
|
||||
I (441) gpio: GPIO[13]| InputEn: 0| OutputEn: 1| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0
|
||||
Name: USD
|
||||
I (441) gpio: GPIO[13]| InputEn: 0| OutputEn: 1| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0
|
||||
Name: USD
|
||||
Type: SDHC/SDXC
|
||||
Speed: 20 MHz
|
||||
Size: 3813MB
|
||||
|
Loading…
x
Reference in New Issue
Block a user