improve on playback hiccups because of small DMA buffer
- add default values in menuconfig for ADAU1961 - remove bug in main resulting in failed i2s aquisition Signed-off-by: Karl Osterseher <karli_o@gmx.at>
This commit is contained in:
@@ -51,12 +51,14 @@ menu "Custom Audio Board"
|
||||
menu "I2S master interface"
|
||||
config MASTER_I2S_MCLK_PIN
|
||||
int "Master i2s mclk"
|
||||
default 3 if DAC_ADAU1961
|
||||
default 0
|
||||
help
|
||||
Master audio interface master clock.
|
||||
|
||||
config MASTER_I2S_BCK_PIN
|
||||
int "Master i2s bck"
|
||||
default 15 if DAC_ADAU1961
|
||||
default 23 if DAC_MAX98357
|
||||
default 23
|
||||
help
|
||||
@@ -64,6 +66,7 @@ menu "Custom Audio Board"
|
||||
|
||||
config MASTER_I2S_LRCK_PIN
|
||||
int "Master i2s lrck"
|
||||
default 13 if DAC_ADAU1961
|
||||
default 24 if DAC_MAX98357
|
||||
default 13
|
||||
help
|
||||
@@ -71,6 +74,7 @@ menu "Custom Audio Board"
|
||||
|
||||
config MASTER_I2S_DATAOUT_PIN
|
||||
int "Master i2s data out"
|
||||
default 4 if DAC_ADAU1961
|
||||
default 25 if DAC_MAX98357
|
||||
default 14
|
||||
help
|
||||
|
||||
@@ -108,7 +108,7 @@ static esp_err_t player_setup_i2s(i2s_port_t i2sNum,
|
||||
int fi2s_clk;
|
||||
|
||||
#if USE_SAMPLE_INSERTION
|
||||
i2sDmaBufMaxLen = 6;
|
||||
i2sDmaBufMaxLen = 12;
|
||||
i2sDmaBufCnt = CHNK_CTRL_CNT * (setting->chkInFrames /
|
||||
i2sDmaBufMaxLen); // 288 * CHNK_CTRL_CNT;
|
||||
#else
|
||||
@@ -1676,7 +1676,7 @@ static void player_task(void *pvParameters) {
|
||||
#if USE_SAMPLE_INSERTION
|
||||
// uint32_t sampleSizeInBytes = (uint32_t)(scSet.bits / 8) *
|
||||
// scSet.ch * (uint32_t)(miniMedian / (1E6 / scSet.sr));
|
||||
uint32_t sampleSizeInBytes = (scSet.bits / 8) * scSet.ch * 1;
|
||||
uint32_t sampleSizeInBytes = (scSet.bits / 8) * scSet.ch * 2;
|
||||
|
||||
if (dir_insert_sample == -1) {
|
||||
if (i2s_channel_write(tx_chan, p_payload, sampleSizeInBytes,
|
||||
|
||||
Reference in New Issue
Block a user