Skip to content

Commit f039aac

Browse files
committed
Merge branch 'bugfix/i2s_bck_polariy' into 'master'
bugfix(i2s): fix bck polarity issue when using pll clock. See merge request !1428
2 parents 000a4f5 + a84db78 commit f039aac

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

components/driver/i2s.c

+6
Original file line numberDiff line numberDiff line change
@@ -344,6 +344,7 @@ esp_err_t i2s_set_clk(i2s_port_t i2s_num, uint32_t rate, i2s_bits_per_sample_t b
344344

345345
i2s_stop(i2s_num);
346346

347+
347348
uint32_t cur_mode = 0;
348349
if (p_i2s_obj[i2s_num]->channel_num != ch) {
349350
p_i2s_obj[i2s_num]->channel_num = (ch == 2) ? 2 : 1;
@@ -682,6 +683,11 @@ esp_err_t i2s_stop(i2s_port_t i2s_num)
682683
I2S[i2s_num]->lc_conf.in_rst = 0;
683684
I2S[i2s_num]->lc_conf.out_rst = 1;
684685
I2S[i2s_num]->lc_conf.out_rst = 0;
686+
687+
I2S[i2s_num]->conf.tx_reset = 1;
688+
I2S[i2s_num]->conf.tx_reset = 0;
689+
I2S[i2s_num]->conf.rx_reset = 1;
690+
I2S[i2s_num]->conf.rx_reset = 0;
685691
I2S_EXIT_CRITICAL();
686692
return 0;
687693
}

0 commit comments

Comments
 (0)