mirror of
https://github.com/sle118/squeezelite-esp32.git
synced 2026-01-31 14:51:11 +03:00
minor tweaks
This commit is contained in:
@@ -213,7 +213,7 @@ gpio_exp_t* gpio_exp_create(const gpio_exp_config_t *config) {
|
|||||||
gpio_intr_enable(config->intr);
|
gpio_intr_enable(config->intr);
|
||||||
}
|
}
|
||||||
|
|
||||||
ESP_LOGI(TAG, "Create GPIO expander %s at base %u with INT %d at @%x on port/host %d/%d", config->model, config->base, config->intr, config->phy.addr, config->phy.port, config->phy.host);
|
ESP_LOGI(TAG, "Create GPIO expander %s at base %u with intr %d at @%x on port/host %d/%d", config->model, config->base, config->intr, config->phy.addr, config->phy.port, config->phy.host);
|
||||||
return expander;
|
return expander;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -106,7 +106,7 @@ void services_init(void) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const spi_bus_config_t * spi_config = config_spi_get((spi_host_device_t*) &spi_system_host);
|
const spi_bus_config_t * spi_config = config_spi_get((spi_host_device_t*) &spi_system_host);
|
||||||
ESP_LOGI(TAG,"Configuring SPI data:%d clk:%d host:%u dc:%d", spi_config->mosi_io_num, spi_config->sclk_io_num, spi_system_host, spi_system_dc_gpio);
|
ESP_LOGI(TAG,"Configuring SPI mosi:%d miso:%d clk:%d host:%u dc:%d", spi_config->mosi_io_num, spi_config->miso_io_num, spi_config->sclk_io_num, spi_system_host, spi_system_dc_gpio);
|
||||||
|
|
||||||
if (spi_config->mosi_io_num != -1 && spi_config->sclk_io_num != -1) {
|
if (spi_config->mosi_io_num != -1 && spi_config->sclk_io_num != -1) {
|
||||||
spi_bus_initialize( spi_system_host, spi_config, 1 );
|
spi_bus_initialize( spi_system_host, spi_config, 1 );
|
||||||
|
|||||||
@@ -282,7 +282,7 @@ void output_init_i2s(log_level level, char *device, unsigned output_buf_size, ch
|
|||||||
|
|
||||||
res = i2s_driver_install(CONFIG_I2S_NUM, &i2s_config, 0, NULL);
|
res = i2s_driver_install(CONFIG_I2S_NUM, &i2s_config, 0, NULL);
|
||||||
res |= i2s_set_pin(CONFIG_I2S_NUM, &i2s_spdif_pin);
|
res |= i2s_set_pin(CONFIG_I2S_NUM, &i2s_spdif_pin);
|
||||||
LOG_INFO("SPDIF using I2S bck:%u, ws:%u, do:%u", i2s_spdif_pin.bck_io_num, i2s_spdif_pin.ws_io_num, i2s_spdif_pin.data_out_num);
|
LOG_INFO("SPDIF using I2S bck:%d, ws:%d, do:%d", i2s_spdif_pin.bck_io_num, i2s_spdif_pin.ws_io_num, i2s_spdif_pin.data_out_num);
|
||||||
} else {
|
} else {
|
||||||
i2s_config.sample_rate = output.current_sample_rate;
|
i2s_config.sample_rate = output.current_sample_rate;
|
||||||
i2s_config.bits_per_sample = BYTES_PER_FRAME * 8 / 2;
|
i2s_config.bits_per_sample = BYTES_PER_FRAME * 8 / 2;
|
||||||
@@ -493,19 +493,6 @@ static void output_thread_i2s(void *arg) {
|
|||||||
// oframes must be a global updated by the write callback
|
// oframes must be a global updated by the write callback
|
||||||
output.frames_in_process = oframes;
|
output.frames_in_process = oframes;
|
||||||
|
|
||||||
/*
|
|
||||||
{
|
|
||||||
ISAMPLE_T *ptr = (ISAMPLE_T*) obuf;
|
|
||||||
for (int i = 0; i < oframes; i++) {
|
|
||||||
*ptr++ = 0; // L
|
|
||||||
#if BYTES_PER_FRAME == 8
|
|
||||||
*ptr++ = rand() >> 4; // R
|
|
||||||
#else
|
|
||||||
*ptr++ = (rand() % 65536) >> 4; // R
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
SET_MIN_MAX_SIZED(oframes,rec,iframes);
|
SET_MIN_MAX_SIZED(oframes,rec,iframes);
|
||||||
SET_MIN_MAX_SIZED(_buf_used(outputbuf),o,outputbuf->size);
|
SET_MIN_MAX_SIZED(_buf_used(outputbuf),o,outputbuf->size);
|
||||||
SET_MIN_MAX_SIZED(_buf_used(streambuf),s,streambuf->size);
|
SET_MIN_MAX_SIZED(_buf_used(streambuf),s,streambuf->size);
|
||||||
|
|||||||
Reference in New Issue
Block a user