bug fixes, remove some logs / change their verbosity
fix #94, close #94 fix #104, close #104 Signed-off-by: Karl Osterseher <karli_o@gmx.at>
This commit is contained in:
@@ -238,51 +238,52 @@ static esp_err_t player_setup_i2s(i2s_port_t i2sNum,
|
||||
i2sDmaBufMaxLen, i2sDmaBufCnt, sr, bits);
|
||||
|
||||
i2s_std_clk_config_t i2s_clkcfg = {
|
||||
.sample_rate_hz = sr,
|
||||
#if CONFIG_USE_SAMPLE_INSERTION
|
||||
.clk_src = I2S_CLK_SRC_DEFAULT,
|
||||
.sample_rate_hz = sr,
|
||||
#if USE_SAMPLE_INSERTION
|
||||
.clk_src = I2S_CLK_SRC_DEFAULT,
|
||||
#else
|
||||
.clk_src = I2S_CLK_SRC_APLL,
|
||||
.clk_src = I2S_CLK_SRC_APLL,
|
||||
#endif
|
||||
.mclk_multiple = I2S_MCLK_MULTIPLE_256,
|
||||
.mclk_multiple = I2S_MCLK_MULTIPLE_256,
|
||||
};
|
||||
i2s_std_config_t tx_std_cfg = {
|
||||
.clk_cfg = i2s_clkcfg,
|
||||
.clk_cfg = i2s_clkcfg,
|
||||
#if CONFIG_I2S_USE_MSB_FORMAT
|
||||
.slot_cfg =
|
||||
I2S_STD_MSB_SLOT_DEFAULT_CONFIG(setting->bits, I2S_SLOT_MODE_STEREO),
|
||||
.slot_cfg =
|
||||
I2S_STD_MSB_SLOT_DEFAULT_CONFIG(setting->bits, I2S_SLOT_MODE_STEREO),
|
||||
#else
|
||||
.slot_cfg = I2S_STD_PHILIPS_SLOT_DEFAULT_CONFIG(bits, I2S_SLOT_MODE_STEREO),
|
||||
.slot_cfg =
|
||||
I2S_STD_PHILIPS_SLOT_DEFAULT_CONFIG(bits, I2S_SLOT_MODE_STEREO),
|
||||
#endif
|
||||
.gpio_cfg =
|
||||
{
|
||||
.mclk = pin_config0.mck_io_num,
|
||||
.bclk = pin_config0.bck_io_num,
|
||||
.ws = pin_config0.ws_io_num,
|
||||
.dout = pin_config0.data_out_num,
|
||||
.din = pin_config0.data_in_num,
|
||||
.invert_flags =
|
||||
{
|
||||
.gpio_cfg =
|
||||
{
|
||||
.mclk = pin_config0.mck_io_num,
|
||||
.bclk = pin_config0.bck_io_num,
|
||||
.ws = pin_config0.ws_io_num,
|
||||
.dout = pin_config0.data_out_num,
|
||||
.din = pin_config0.data_in_num,
|
||||
.invert_flags =
|
||||
{
|
||||
#if CONFIG_INVERT_MCLK_LEVEL
|
||||
.mclk_inv = true,
|
||||
.mclk_inv = true,
|
||||
|
||||
#else
|
||||
.mclk_inv = false,
|
||||
.mclk_inv = false,
|
||||
#endif
|
||||
|
||||
#if CONFIG_INVERT_BCLK_LEVEL
|
||||
.bclk_inv = true,
|
||||
.bclk_inv = true,
|
||||
#else
|
||||
.bclk_inv = false,
|
||||
.bclk_inv = false,
|
||||
#endif
|
||||
|
||||
#if CONFIG_INVERT_WORD_SELECT_LEVEL
|
||||
.ws_inv = true,
|
||||
.ws_inv = true,
|
||||
#else
|
||||
.ws_inv = false,
|
||||
.ws_inv = false,
|
||||
#endif
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
ESP_ERROR_CHECK(i2s_channel_init_std_mode(tx_chan, &tx_std_cfg));
|
||||
@@ -760,6 +761,7 @@ static void tg0_timer1_start(uint64_t alarm_value) {
|
||||
// ESP_LOGI(TAG, "started age timer");
|
||||
}
|
||||
|
||||
#if !USE_SAMPLE_INSERTION
|
||||
// void rtc_clk_apll_enable(bool enable, uint32_t sdm0, uint32_t sdm1, uint32_t
|
||||
// sdm2, uint32_t o_div); apll_freq = xtal_freq * (4 + sdm2 + sdm1/256 +
|
||||
// sdm0/65536)/((o_div + 2) * 2) xtal == 40MHz on lyrat v4.3 I2S bit_clock =
|
||||
@@ -800,6 +802,7 @@ void adjust_apll(int8_t direction) {
|
||||
|
||||
currentDir = direction;
|
||||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
*
|
||||
@@ -1695,10 +1698,10 @@ static void player_task(void *pvParameters) {
|
||||
// uxQueueMessagesWaiting(pcmChkQHdl),
|
||||
// insertedSamplesCounter, chkDur_us);
|
||||
//
|
||||
ESP_LOGI(TAG, "%d, %lldus, %lldus, %lldus, q:%d, %lld, %lld", dir,
|
||||
age, shortMedian, miniMedian,
|
||||
uxQueueMessagesWaiting(pcmChkQHdl), insertedSamplesCounter,
|
||||
chunkDuration_us);
|
||||
// ESP_LOGI(TAG, "%d, %lldus, %lldus, %lldus, q:%d, %lld, %lld", dir,
|
||||
// age, shortMedian, miniMedian,
|
||||
// uxQueueMessagesWaiting(pcmChkQHdl), insertedSamplesCounter,
|
||||
// chunkDuration_us);
|
||||
|
||||
// ESP_LOGI( TAG, "8b f %d b %d",
|
||||
// heap_caps_get_free_size(MALLOC_CAP_8BIT |
|
||||
@@ -1732,7 +1735,7 @@ static void player_task(void *pvParameters) {
|
||||
usec = usec % 1000;
|
||||
|
||||
if (pcmChkQHdl != NULL) {
|
||||
ESP_LOGE(TAG,
|
||||
ESP_LOGV(TAG,
|
||||
"Couldn't get PCM chunk, recv: messages waiting %d, "
|
||||
"diff2Server: %llds, %lld.%lldms",
|
||||
uxQueueMessagesWaiting(pcmChkQHdl), sec, msec, usec);
|
||||
|
||||
13
main/main.c
13
main/main.c
@@ -17,6 +17,7 @@
|
||||
#include "freertos/FreeRTOS.h"
|
||||
#include "freertos/event_groups.h"
|
||||
#include "freertos/task.h"
|
||||
#include "hal/gpio_types.h"
|
||||
#if CONFIG_SNAPCLIENT_USE_INTERNAL_ETHERNET || \
|
||||
CONFIG_SNAPCLIENT_USE_SPI_ETHERNET
|
||||
#include "eth_interface.h"
|
||||
@@ -537,9 +538,10 @@ static void http_get_task(void *pvParameters) {
|
||||
}
|
||||
}
|
||||
|
||||
if (r->addr) {
|
||||
ip_addr_copy(remote_ip, (r->addr->addr));
|
||||
remote_ip.type = IPADDR_TYPE_V4;
|
||||
mdns_ip_addr_t *a = r->addr;
|
||||
if (a) {
|
||||
ip_addr_copy(remote_ip, (a->addr));
|
||||
remote_ip.type = a->addr.type;
|
||||
remotePort = r->port;
|
||||
ESP_LOGI(TAG, "Found %s:%d", ipaddr_ntoa(&remote_ip), remotePort);
|
||||
|
||||
@@ -2528,11 +2530,6 @@ void app_main(void) {
|
||||
gpio_set_level(pin_config0.data_out_num, 0);
|
||||
gpio_set_level(pin_config0.bck_io_num, 0);
|
||||
gpio_set_level(pin_config0.ws_io_num, 0);
|
||||
|
||||
gpioCfg.pin_bit_mask = BIT64(pin_config0.data_in_num);
|
||||
gpioCfg.mode = GPIO_MODE_INPUT;
|
||||
gpioCfg.pull_up_en = GPIO_PULLUP_ENABLE;
|
||||
gpio_config(&gpioCfg);
|
||||
}
|
||||
|
||||
#if CONFIG_SNAPCLIENT_USE_INTERNAL_ETHERNET || \
|
||||
|
||||
Reference in New Issue
Block a user