Skip to content

Commit 97b1146

Browse files
committed
Merge branch 'bugfix/workaround_of_i2s_half_sample_rate_issue' into 'master'
fix(i2s): fix i2s half sample rate issue Closes IDF-11278 See merge request espressif/esp-idf!33837
2 parents 16d99f3 + 5030977 commit 97b1146

File tree

9 files changed

+244
-200
lines changed

9 files changed

+244
-200
lines changed

components/esp_driver_i2s/test_apps/i2s_multi_dev/main/test_i2s_multi_dev.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ static const char *TAG = "i2s_multi_dev_test";
2323

2424
#define TEST_I2S_FRAME_SIZE (128) // Frame numbers in every writing / reading
2525
#define TEST_I2S_ARRAY_LENGTH (1024) // The loop data length for verification
26-
#define TEST_I2S_MAX_DATA (256) // The maximum data value in the data buffer
26+
#define TEST_I2S_MAX_DATA (128) // The maximum data value in the data buffer
2727
#define TEST_I2S_MAX_FAIL_CNT (3) // Max broken packet count
2828
#define TEST_I2S_FRAME_TIMEOUT_SEC (10.0f) // Timeout seconds of waiting for a correct frame
2929

components/hal/esp32/include/hal/i2s_ll.h

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -350,11 +350,6 @@ static inline void i2s_ll_set_raw_mclk_div(i2s_dev_t *hw, uint32_t mclk_div, uin
350350
*/
351351
static inline void i2s_ll_tx_set_mclk(i2s_dev_t *hw, const hal_utils_clk_div_t *mclk_div)
352352
{
353-
/* Workaround for inaccurate clock while switching from a relatively low sample rate to a high sample rate
354-
* Set to particular coefficients first then update to the target coefficients,
355-
* otherwise the clock division might be inaccurate.
356-
* the general idea is to set a value that unlike to calculate from the regular decimal */
357-
i2s_ll_set_raw_mclk_div(hw, 7, 47, 3);
358353
i2s_ll_set_raw_mclk_div(hw, mclk_div->integer, mclk_div->denominator, mclk_div->numerator);
359354
}
360355

@@ -659,7 +654,7 @@ static inline void i2s_ll_tx_set_bits_mod(i2s_dev_t *hw, uint32_t val)
659654
}
660655

661656
/**
662-
* @brief Congfigure TX chan bit and audio data bit, on ESP32, sample_bit should equals to data_bit
657+
* @brief Configure TX chan bit and audio data bit, on ESP32, sample_bit should equals to data_bit
663658
*
664659
* @param hw Peripheral I2S hardware instance address.
665660
* @param chan_bit The chan bit width
@@ -672,7 +667,7 @@ static inline void i2s_ll_tx_set_sample_bit(i2s_dev_t *hw, uint8_t chan_bit, int
672667
}
673668

674669
/**
675-
* @brief Congfigure RX chan bit and audio data bit, on ESP32, sample_bit should equals to data_bit
670+
* @brief Configure RX chan bit and audio data bit, on ESP32, sample_bit should equals to data_bit
676671
*
677672
* @param hw Peripheral I2S hardware instance address.
678673
* @param chan_bit The chan bit width

components/hal/esp32c3/include/hal/i2s_ll.h

Lines changed: 38 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* SPDX-FileCopyrightText: 2021-2023 Espressif Systems (Shanghai) CO LTD
2+
* SPDX-FileCopyrightText: 2021-2024 Espressif Systems (Shanghai) CO LTD
33
*
44
* SPDX-License-Identifier: Apache-2.0
55
*/
@@ -285,15 +285,21 @@ static inline void i2s_ll_tx_set_bck_div_num(i2s_dev_t *hw, uint32_t val)
285285
*/
286286
static inline void i2s_ll_tx_set_raw_clk_div(i2s_dev_t *hw, uint32_t div_int, uint32_t x, uint32_t y, uint32_t z, uint32_t yn1)
287287
{
288-
/* Set the integer part of mclk division */
288+
/* Workaround for the double division issue.
289+
* The division coefficients must be set in particular sequence.
290+
* And it has to switch to a small division first before setting the target division. */
291+
HAL_FORCE_MODIFY_U32_REG_FIELD(hw->tx_clkm_conf, tx_clkm_div_num, 2);
292+
hw->tx_clkm_div_conf.tx_clkm_div_yn1 = 0;
293+
hw->tx_clkm_div_conf.tx_clkm_div_y = 1;
294+
hw->tx_clkm_div_conf.tx_clkm_div_z = 0;
295+
hw->tx_clkm_div_conf.tx_clkm_div_x = 0;
296+
297+
/* Set the target mclk division coefficients */
298+
hw->tx_clkm_div_conf.tx_clkm_div_yn1 = yn1;
299+
hw->tx_clkm_div_conf.tx_clkm_div_z = z;
300+
hw->tx_clkm_div_conf.tx_clkm_div_y = y;
301+
hw->tx_clkm_div_conf.tx_clkm_div_x = x;
289302
HAL_FORCE_MODIFY_U32_REG_FIELD(hw->tx_clkm_conf, tx_clkm_div_num, div_int);
290-
/* Set the decimal part of the mclk division */
291-
typeof(hw->tx_clkm_div_conf) div = {};
292-
div.tx_clkm_div_x = x;
293-
div.tx_clkm_div_y = y;
294-
div.tx_clkm_div_z = z;
295-
div.tx_clkm_div_yn1 = yn1;
296-
hw->tx_clkm_div_conf.val = div.val;
297303
}
298304

299305
/**
@@ -308,15 +314,21 @@ static inline void i2s_ll_tx_set_raw_clk_div(i2s_dev_t *hw, uint32_t div_int, ui
308314
*/
309315
static inline void i2s_ll_rx_set_raw_clk_div(i2s_dev_t *hw, uint32_t div_int, uint32_t x, uint32_t y, uint32_t z, uint32_t yn1)
310316
{
311-
/* Set the integer part of mclk division */
317+
/* Workaround for the double division issue.
318+
* The division coefficients must be set in particular sequence.
319+
* And it has to switch to a small division first before setting the target division. */
320+
HAL_FORCE_MODIFY_U32_REG_FIELD(hw->rx_clkm_conf, rx_clkm_div_num, 2);
321+
hw->rx_clkm_div_conf.rx_clkm_div_yn1 = 0;
322+
hw->rx_clkm_div_conf.rx_clkm_div_y = 1;
323+
hw->rx_clkm_div_conf.rx_clkm_div_z = 0;
324+
hw->rx_clkm_div_conf.rx_clkm_div_x = 0;
325+
326+
/* Set the target mclk division coefficients */
327+
hw->rx_clkm_div_conf.rx_clkm_div_yn1 = yn1;
328+
hw->rx_clkm_div_conf.rx_clkm_div_z = z;
329+
hw->rx_clkm_div_conf.rx_clkm_div_y = y;
330+
hw->rx_clkm_div_conf.rx_clkm_div_x = x;
312331
HAL_FORCE_MODIFY_U32_REG_FIELD(hw->rx_clkm_conf, rx_clkm_div_num, div_int);
313-
/* Set the decimal part of the mclk division */
314-
typeof(hw->rx_clkm_div_conf) div = {};
315-
div.rx_clkm_div_x = x;
316-
div.rx_clkm_div_y = y;
317-
div.rx_clkm_div_z = z;
318-
div.rx_clkm_div_yn1 = yn1;
319-
hw->rx_clkm_div_conf.val = div.val;
320332
}
321333

322334
/**
@@ -327,12 +339,6 @@ static inline void i2s_ll_rx_set_raw_clk_div(i2s_dev_t *hw, uint32_t div_int, ui
327339
*/
328340
static inline void i2s_ll_tx_set_mclk(i2s_dev_t *hw, const hal_utils_clk_div_t *mclk_div)
329341
{
330-
/* Workaround for inaccurate clock while switching from a relatively low sample rate to a high sample rate
331-
* Set to particular coefficients first then update to the target coefficients,
332-
* otherwise the clock division might be inaccurate.
333-
* the general idea is to set a value that impossible to calculate from the regular decimal */
334-
i2s_ll_tx_set_raw_clk_div(hw, 7, 317, 7, 3, 0);
335-
336342
uint32_t div_x = 0;
337343
uint32_t div_y = 0;
338344
uint32_t div_z = 0;
@@ -367,12 +373,6 @@ static inline void i2s_ll_rx_set_bck_div_num(i2s_dev_t *hw, uint32_t val)
367373
*/
368374
static inline void i2s_ll_rx_set_mclk(i2s_dev_t *hw, const hal_utils_clk_div_t *mclk_div)
369375
{
370-
/* Workaround for inaccurate clock while switching from a relatively low sample rate to a high sample rate
371-
* Set to particular coefficients first then update to the target coefficients,
372-
* otherwise the clock division might be inaccurate.
373-
* the general idea is to set a value that impossible to calculate from the regular decimal */
374-
i2s_ll_rx_set_raw_clk_div(hw, 7, 317, 7, 3, 0);
375-
376376
uint32_t div_x = 0;
377377
uint32_t div_y = 0;
378378
uint32_t div_z = 0;
@@ -467,7 +467,7 @@ static inline void i2s_ll_rx_set_eof_num(i2s_dev_t *hw, int eof_num)
467467
}
468468

469469
/**
470-
* @brief Congfigure TX chan bit and audio data bit
470+
* @brief Configure TX chan bit and audio data bit
471471
*
472472
* @param hw Peripheral I2S hardware instance address.
473473
* @param chan_bit The chan bit width
@@ -480,7 +480,7 @@ static inline void i2s_ll_tx_set_sample_bit(i2s_dev_t *hw, uint8_t chan_bit, int
480480
}
481481

482482
/**
483-
* @brief Congfigure RX chan bit and audio data bit
483+
* @brief Configure RX chan bit and audio data bit
484484
*
485485
* @param hw Peripheral I2S hardware instance address.
486486
* @param chan_bit The chan bit width
@@ -880,23 +880,23 @@ static inline void i2s_ll_tx_set_pdm_fpfs(i2s_dev_t *hw, uint32_t fp, uint32_t f
880880
}
881881

882882
/**
883-
* @brief Get I2S TX PDM fp configuration paramater
883+
* @brief Get I2S TX PDM fp configuration parameter
884884
*
885885
* @param hw Peripheral I2S hardware instance address.
886886
* @return
887-
* - fp configuration paramater
887+
* - fp configuration parameter
888888
*/
889889
static inline uint32_t i2s_ll_tx_get_pdm_fp(i2s_dev_t *hw)
890890
{
891891
return hw->tx_pcm2pdm_conf1.tx_pdm_fp;
892892
}
893893

894894
/**
895-
* @brief Get I2S TX PDM fs configuration paramater
895+
* @brief Get I2S TX PDM fs configuration parameter
896896
*
897897
* @param hw Peripheral I2S hardware instance address.
898898
* @return
899-
* - fs configuration paramater
899+
* - fs configuration parameter
900900
*/
901901
static inline uint32_t i2s_ll_tx_get_pdm_fs(i2s_dev_t *hw)
902902
{
@@ -922,7 +922,7 @@ static inline void i2s_ll_rx_enable_pdm(i2s_dev_t *hw, bool pdm_enable)
922922
* @brief Configura TX a/u-law decompress or compress
923923
*
924924
* @param hw Peripheral I2S hardware instance address.
925-
* @param pcm_cfg PCM configuration paramater
925+
* @param pcm_cfg PCM configuration parameter
926926
*/
927927
static inline void i2s_ll_tx_set_pcm_type(i2s_dev_t *hw, i2s_pcm_compress_t pcm_cfg)
928928
{
@@ -934,7 +934,7 @@ static inline void i2s_ll_tx_set_pcm_type(i2s_dev_t *hw, i2s_pcm_compress_t pcm_
934934
* @brief Configure RX a/u-law decompress or compress
935935
*
936936
* @param hw Peripheral I2S hardware instance address.
937-
* @param pcm_cfg PCM configuration paramater
937+
* @param pcm_cfg PCM configuration parameter
938938
*/
939939
static inline void i2s_ll_rx_set_pcm_type(i2s_dev_t *hw, i2s_pcm_compress_t pcm_cfg)
940940
{
@@ -1106,7 +1106,7 @@ static inline void i2s_ll_tx_pdm_dma_take_mode(i2s_dev_t *hw, bool is_mono, bool
11061106
* @param is_mono The DMA data only has one slot (mono) or contains two slots (stereo)
11071107
* @param is_copy Whether the un-selected slot copies the data from the selected one
11081108
* If not, the un-selected slot will transmit the data from 'conf_single_data'
1109-
* @param mask The slot mask to selet the slot
1109+
* @param mask The slot mask to select the slot
11101110
*/
11111111
static inline void i2s_ll_tx_pdm_slot_mode(i2s_dev_t *hw, bool is_mono, bool is_copy, i2s_pdm_slot_mask_t mask)
11121112
{

components/hal/esp32c5/include/hal/i2s_ll.h

Lines changed: 28 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -316,13 +316,21 @@ static inline void i2s_ll_tx_set_bck_div_num(i2s_dev_t *hw, uint32_t val)
316316
static inline void i2s_ll_tx_set_raw_clk_div(i2s_dev_t *hw, uint32_t div_int, uint32_t x, uint32_t y, uint32_t z, uint32_t yn1)
317317
{
318318
(void)hw;
319+
/* Workaround for the double division issue.
320+
* The division coefficients must be set in particular sequence.
321+
* And it has to switch to a small division first before setting the target division. */
322+
HAL_FORCE_MODIFY_U32_REG_FIELD(PCR.i2s_tx_clkm_conf, i2s_tx_clkm_div_num, 2);
323+
PCR.i2s_tx_clkm_div_conf.i2s_tx_clkm_div_yn1 = 0;
324+
PCR.i2s_tx_clkm_div_conf.i2s_tx_clkm_div_y = 1;
325+
PCR.i2s_tx_clkm_div_conf.i2s_tx_clkm_div_z = 0;
326+
PCR.i2s_tx_clkm_div_conf.i2s_tx_clkm_div_x = 0;
327+
328+
/* Set the target mclk division coefficients */
329+
PCR.i2s_tx_clkm_div_conf.i2s_tx_clkm_div_yn1 = yn1;
330+
PCR.i2s_tx_clkm_div_conf.i2s_tx_clkm_div_z = z;
331+
PCR.i2s_tx_clkm_div_conf.i2s_tx_clkm_div_y = y;
332+
PCR.i2s_tx_clkm_div_conf.i2s_tx_clkm_div_x = x;
319333
HAL_FORCE_MODIFY_U32_REG_FIELD(PCR.i2s_tx_clkm_conf, i2s_tx_clkm_div_num, div_int);
320-
typeof(PCR.i2s_tx_clkm_div_conf) div = {};
321-
div.i2s_tx_clkm_div_x = x;
322-
div.i2s_tx_clkm_div_y = y;
323-
div.i2s_tx_clkm_div_z = z;
324-
div.i2s_tx_clkm_div_yn1 = yn1;
325-
PCR.i2s_tx_clkm_div_conf.val = div.val;
326334
}
327335

328336
/**
@@ -338,13 +346,21 @@ static inline void i2s_ll_tx_set_raw_clk_div(i2s_dev_t *hw, uint32_t div_int, ui
338346
static inline void i2s_ll_rx_set_raw_clk_div(i2s_dev_t *hw, uint32_t div_int, uint32_t x, uint32_t y, uint32_t z, uint32_t yn1)
339347
{
340348
(void)hw;
349+
/* Workaround for the double division issue.
350+
* The division coefficients must be set in particular sequence.
351+
* And it has to switch to a small division first before setting the target division. */
352+
HAL_FORCE_MODIFY_U32_REG_FIELD(PCR.i2s_rx_clkm_conf, i2s_rx_clkm_div_num, 2);
353+
PCR.i2s_rx_clkm_div_conf.i2s_rx_clkm_div_yn1 = 0;
354+
PCR.i2s_rx_clkm_div_conf.i2s_rx_clkm_div_y = 1;
355+
PCR.i2s_rx_clkm_div_conf.i2s_rx_clkm_div_z = 0;
356+
PCR.i2s_rx_clkm_div_conf.i2s_rx_clkm_div_x = 0;
357+
358+
/* Set the target mclk division coefficients */
359+
PCR.i2s_rx_clkm_div_conf.i2s_rx_clkm_div_yn1 = yn1;
360+
PCR.i2s_rx_clkm_div_conf.i2s_rx_clkm_div_z = z;
361+
PCR.i2s_rx_clkm_div_conf.i2s_rx_clkm_div_y = y;
362+
PCR.i2s_rx_clkm_div_conf.i2s_rx_clkm_div_x = x;
341363
HAL_FORCE_MODIFY_U32_REG_FIELD(PCR.i2s_rx_clkm_conf, i2s_rx_clkm_div_num, div_int);
342-
typeof(PCR.i2s_rx_clkm_div_conf) div = {};
343-
div.i2s_rx_clkm_div_x = x;
344-
div.i2s_rx_clkm_div_y = y;
345-
div.i2s_rx_clkm_div_z = z;
346-
div.i2s_rx_clkm_div_yn1 = yn1;
347-
PCR.i2s_rx_clkm_div_conf.val = div.val;
348364
}
349365

350366
/**
@@ -355,12 +371,6 @@ static inline void i2s_ll_rx_set_raw_clk_div(i2s_dev_t *hw, uint32_t div_int, ui
355371
*/
356372
static inline void i2s_ll_tx_set_mclk(i2s_dev_t *hw, const hal_utils_clk_div_t *mclk_div)
357373
{
358-
/* Workaround for inaccurate clock while switching from a relatively low sample rate to a high sample rate
359-
* Set to particular coefficients first then update to the target coefficients,
360-
* otherwise the clock division might be inaccurate.
361-
* the general idea is to set a value that impossible to calculate from the regular decimal */
362-
i2s_ll_tx_set_raw_clk_div(hw, 7, 317, 7, 3, 0);
363-
364374
uint32_t div_x = 0;
365375
uint32_t div_y = 0;
366376
uint32_t div_z = 0;
@@ -395,12 +405,6 @@ static inline void i2s_ll_rx_set_bck_div_num(i2s_dev_t *hw, uint32_t val)
395405
*/
396406
static inline void i2s_ll_rx_set_mclk(i2s_dev_t *hw, const hal_utils_clk_div_t *mclk_div)
397407
{
398-
/* Workaround for inaccurate clock while switching from a relatively low sample rate to a high sample rate
399-
* Set to particular coefficients first then update to the target coefficients,
400-
* otherwise the clock division might be inaccurate.
401-
* the general idea is to set a value that impossible to calculate from the regular decimal */
402-
i2s_ll_rx_set_raw_clk_div(hw, 7, 317, 7, 3, 0);
403-
404408
uint32_t div_x = 0;
405409
uint32_t div_y = 0;
406410
uint32_t div_z = 0;

components/hal/esp32c6/include/hal/i2s_ll.h

Lines changed: 28 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -306,13 +306,21 @@ static inline void i2s_ll_tx_set_bck_div_num(i2s_dev_t *hw, uint32_t val)
306306
static inline void i2s_ll_tx_set_raw_clk_div(i2s_dev_t *hw, uint32_t div_int, uint32_t x, uint32_t y, uint32_t z, uint32_t yn1)
307307
{
308308
(void)hw;
309+
/* Workaround for the double division issue.
310+
* The division coefficients must be set in particular sequence.
311+
* And it has to switch to a small division first before setting the target division. */
312+
HAL_FORCE_MODIFY_U32_REG_FIELD(PCR.i2s_tx_clkm_conf, i2s_tx_clkm_div_num, 2);
313+
PCR.i2s_tx_clkm_div_conf.i2s_tx_clkm_div_yn1 = 0;
314+
PCR.i2s_tx_clkm_div_conf.i2s_tx_clkm_div_y = 1;
315+
PCR.i2s_tx_clkm_div_conf.i2s_tx_clkm_div_z = 0;
316+
PCR.i2s_tx_clkm_div_conf.i2s_tx_clkm_div_x = 0;
317+
318+
/* Set the target mclk division coefficients */
319+
PCR.i2s_tx_clkm_div_conf.i2s_tx_clkm_div_yn1 = yn1;
320+
PCR.i2s_tx_clkm_div_conf.i2s_tx_clkm_div_z = z;
321+
PCR.i2s_tx_clkm_div_conf.i2s_tx_clkm_div_y = y;
322+
PCR.i2s_tx_clkm_div_conf.i2s_tx_clkm_div_x = x;
309323
HAL_FORCE_MODIFY_U32_REG_FIELD(PCR.i2s_tx_clkm_conf, i2s_tx_clkm_div_num, div_int);
310-
typeof(PCR.i2s_tx_clkm_div_conf) div = {};
311-
div.i2s_tx_clkm_div_x = x;
312-
div.i2s_tx_clkm_div_y = y;
313-
div.i2s_tx_clkm_div_z = z;
314-
div.i2s_tx_clkm_div_yn1 = yn1;
315-
PCR.i2s_tx_clkm_div_conf.val = div.val;
316324
}
317325

318326
/**
@@ -328,13 +336,21 @@ static inline void i2s_ll_tx_set_raw_clk_div(i2s_dev_t *hw, uint32_t div_int, ui
328336
static inline void i2s_ll_rx_set_raw_clk_div(i2s_dev_t *hw, uint32_t div_int, uint32_t x, uint32_t y, uint32_t z, uint32_t yn1)
329337
{
330338
(void)hw;
339+
/* Workaround for the double division issue.
340+
* The division coefficients must be set in particular sequence.
341+
* And it has to switch to a small division first before setting the target division. */
342+
HAL_FORCE_MODIFY_U32_REG_FIELD(PCR.i2s_rx_clkm_conf, i2s_rx_clkm_div_num, 2);
343+
PCR.i2s_rx_clkm_div_conf.i2s_rx_clkm_div_yn1 = 0;
344+
PCR.i2s_rx_clkm_div_conf.i2s_rx_clkm_div_y = 1;
345+
PCR.i2s_rx_clkm_div_conf.i2s_rx_clkm_div_z = 0;
346+
PCR.i2s_rx_clkm_div_conf.i2s_rx_clkm_div_x = 0;
347+
348+
/* Set the target mclk division coefficients */
349+
PCR.i2s_rx_clkm_div_conf.i2s_rx_clkm_div_yn1 = yn1;
350+
PCR.i2s_rx_clkm_div_conf.i2s_rx_clkm_div_z = z;
351+
PCR.i2s_rx_clkm_div_conf.i2s_rx_clkm_div_y = y;
352+
PCR.i2s_rx_clkm_div_conf.i2s_rx_clkm_div_x = x;
331353
HAL_FORCE_MODIFY_U32_REG_FIELD(PCR.i2s_rx_clkm_conf, i2s_rx_clkm_div_num, div_int);
332-
typeof(PCR.i2s_rx_clkm_div_conf) div = {};
333-
div.i2s_rx_clkm_div_x = x;
334-
div.i2s_rx_clkm_div_y = y;
335-
div.i2s_rx_clkm_div_z = z;
336-
div.i2s_rx_clkm_div_yn1 = yn1;
337-
PCR.i2s_rx_clkm_div_conf.val = div.val;
338354
}
339355

340356
/**
@@ -345,12 +361,6 @@ static inline void i2s_ll_rx_set_raw_clk_div(i2s_dev_t *hw, uint32_t div_int, ui
345361
*/
346362
static inline void i2s_ll_tx_set_mclk(i2s_dev_t *hw, const hal_utils_clk_div_t *mclk_div)
347363
{
348-
/* Workaround for inaccurate clock while switching from a relatively low sample rate to a high sample rate
349-
* Set to particular coefficients first then update to the target coefficients,
350-
* otherwise the clock division might be inaccurate.
351-
* the general idea is to set a value that impossible to calculate from the regular decimal */
352-
i2s_ll_tx_set_raw_clk_div(hw, 7, 317, 7, 3, 0);
353-
354364
uint32_t div_x = 0;
355365
uint32_t div_y = 0;
356366
uint32_t div_z = 0;
@@ -385,12 +395,6 @@ static inline void i2s_ll_rx_set_bck_div_num(i2s_dev_t *hw, uint32_t val)
385395
*/
386396
static inline void i2s_ll_rx_set_mclk(i2s_dev_t *hw, const hal_utils_clk_div_t *mclk_div)
387397
{
388-
/* Workaround for inaccurate clock while switching from a relatively low sample rate to a high sample rate
389-
* Set to particular coefficients first then update to the target coefficients,
390-
* otherwise the clock division might be inaccurate.
391-
* the general idea is to set a value that impossible to calculate from the regular decimal */
392-
i2s_ll_rx_set_raw_clk_div(hw, 7, 317, 7, 3, 0);
393-
394398
uint32_t div_x = 0;
395399
uint32_t div_y = 0;
396400
uint32_t div_z = 0;

0 commit comments

Comments
 (0)