Skip to content

Commit

Permalink
minor tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
philippe44 committed Jan 5, 2022
1 parent 1c071d0 commit d0461d5
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 18 deletions.
2 changes: 1 addition & 1 deletion components/display/core/ifaces/default_if_spi.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ bool GDS_SPIAttachDevice( struct GDS_Device* Device, int Width, int Height, int
if (CSPin >= 0) {
ESP_ERROR_CHECK_NONFATAL( gpio_set_direction( CSPin, GPIO_MODE_OUTPUT ), return false );
ESP_ERROR_CHECK_NONFATAL( gpio_set_level( CSPin, 0 ), return false );
}
}

memset( &SPIDeviceConfig, 0, sizeof( spi_device_interface_config_t ) );

Expand Down
2 changes: 1 addition & 1 deletion components/services/gpio_exp.c
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ gpio_exp_t* gpio_exp_create(const gpio_exp_config_t *config) {
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;
}

Expand Down
2 changes: 1 addition & 1 deletion components/services/services.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
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) {
spi_bus_initialize( spi_system_host, spi_config, 1 );
Expand Down
17 changes: 2 additions & 15 deletions components/squeezelite/output_i2s.c
Original file line number Diff line number Diff line change
Expand Up @@ -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_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 {
i2s_config.sample_rate = output.current_sample_rate;
i2s_config.bits_per_sample = BYTES_PER_FRAME * 8 / 2;
Expand Down Expand Up @@ -492,20 +492,7 @@ static void output_thread_i2s(void *arg) {
_output_frames( iframes );
// oframes must be a global updated by the write callback
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(_buf_used(outputbuf),o,outputbuf->size);
SET_MIN_MAX_SIZED(_buf_used(streambuf),s,streambuf->size);
Expand Down

0 comments on commit d0461d5

Please sign in to comment.