diff --git a/components/driver/i2s.c b/components/driver/i2s.c index 0eb50e4738..8fda8d7864 100644 --- a/components/driver/i2s.c +++ b/components/driver/i2s.c @@ -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 diff --git a/examples/peripherals/i2s/i2s_audio_recorder_sdcard/README.md b/examples/peripherals/i2s/i2s_audio_recorder_sdcard/README.md index 85b254b2df..a23531b9d0 100644 --- a/examples/peripherals/i2s/i2s_audio_recorder_sdcard/README.md +++ b/examples/peripherals/i2s/i2s_audio_recorder_sdcard/README.md @@ -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