I2S stream clk change problem
Posted: Mon Dec 16, 2019 6:43 pm
Hi All
I have a problem with i2s_stream_set_clk
I have 2 I2S streams - one for playing audio, one for recording from the line-in/mic
When I change the bitrate/samplerate on the play stream and then the rec stream to match - it hangs.
it hangs in I2S.c, play stream is waiting for RX (which is now tied up with my rec stream).
I there a easy solution around this?
Currenly I just comment those lines out and it works fine so far, but I know very little about
the internal I2S so, so I'm wondering if that's safe or a terrible hack
Shabby
I have a problem with i2s_stream_set_clk
I have 2 I2S streams - one for playing audio, one for recording from the line-in/mic
When I change the bitrate/samplerate on the play stream and then the rec stream to match - it hangs.
Code: Select all
i2s_stream_set_clk(i2s_writer, music_info.sample_rates, music_info.bits, music_info.channels);
i2s_stream_set_clk(i2s_reader, music_info.sample_rates, music_info.bits, music_info.channels);
Code: Select all
// wait all on-going writing finish
if ((p_i2s_obj[i2s_num]->mode & I2S_MODE_TX) && p_i2s_obj[i2s_num]->tx) {
xSemaphoreTake(p_i2s_obj[i2s_num]->tx->mux, (portTickType)portMAX_DELAY);
}
if ((p_i2s_obj[i2s_num]->mode & I2S_MODE_RX) && p_i2s_obj[i2s_num]->rx) {
xSemaphoreTake(p_i2s_obj[i2s_num]->rx->mux, (portTickType)portMAX_DELAY);
}
I there a easy solution around this?
Currenly I just comment those lines out and it works fine so far, but I know very little about
the internal I2S so, so I'm wondering if that's safe or a terrible hack
Shabby