You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/* Check if the configuration is correct. Use float for check in case the mclk division might be carried up in the fine division calculation */
63
-
ESP_RETURN_ON_FALSE(clk_info->sclk / (float)clk_info->mclk>min_mclk_div, ESP_ERR_INVALID_ARG, TAG, "sample rate or mclk_multiple is too large for the current clock source");
63
+
ESP_RETURN_ON_FALSE((float)clk_info->sclk>clk_info->mclk*min_mclk_div, ESP_ERR_INVALID_ARG, TAG, "sample rate is too large");
64
+
ESP_RETURN_ON_FALSE(clk_info->mclk_div<I2S_LL_CLK_FRAC_DIV_N_MAX, ESP_ERR_INVALID_ARG, TAG, "sample rate is too small");
/* Check if the configuration is correct. Use float for check in case the mclk division might be carried up in the fine division calculation */
69
-
ESP_RETURN_ON_FALSE(clk_info->sclk / (float)clk_info->mclk>min_mclk_div, ESP_ERR_INVALID_ARG, TAG, "sample rate or mclk_multiple is too large for the current clock source");
69
+
ESP_RETURN_ON_FALSE((float)clk_info->sclk>clk_info->mclk*min_mclk_div, ESP_ERR_INVALID_ARG, TAG, "sample rate is too large");
70
+
ESP_RETURN_ON_FALSE(clk_info->mclk_div<I2S_LL_CLK_FRAC_DIV_N_MAX, ESP_ERR_INVALID_ARG, TAG, "sample rate is too small");
0 commit comments