mirror of
https://github.com/sle118/squeezelite-esp32.git
synced 2025-12-07 20:17:04 +03:00
warning-free compile (prepare archiving) - release
This commit is contained in:
@@ -168,7 +168,7 @@ static void Update1( struct GDS_Device* Device ) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// in 1 bit mode, SSD1326 has a different memory map than SSD1306 and SH1106
|
// in 1 bit mode, SSD1326 has a different memory map than SSD1306 and SH1106
|
||||||
static void IRAM_ATTR DrawPixel1FastLocal( struct GDS_Device* Device, int X, int Y, int Color ) {
|
static void IRAM_ATTR _DrawPixel1Fast( struct GDS_Device* Device, int X, int Y, int Color ) {
|
||||||
uint32_t XBit = ( X & 0x07 );
|
uint32_t XBit = ( X & 0x07 );
|
||||||
uint8_t* FBOffset = Device->Framebuffer + ( ( Y * Device->Width + X ) >> 3 );
|
uint8_t* FBOffset = Device->Framebuffer + ( ( Y * Device->Width + X ) >> 3 );
|
||||||
|
|
||||||
@@ -188,12 +188,12 @@ static void ClearWindow( struct GDS_Device* Device, int x1, int y1, int x2, int
|
|||||||
for (int r = y1; r <= y2; r++) {
|
for (int r = y1; r <= y2; r++) {
|
||||||
int c = x1;
|
int c = x1;
|
||||||
// for a row that is not on a boundary, not column opt can be done, so handle all columns on that line
|
// for a row that is not on a boundary, not column opt can be done, so handle all columns on that line
|
||||||
while (c & 0x07 && c <= x2) DrawPixel1FastLocal( Device, c++, r, Color );
|
while (c & 0x07 && c <= x2) _DrawPixel1Fast( Device, c++, r, Color );
|
||||||
// at this point we are aligned on column boundary
|
// at this point we are aligned on column boundary
|
||||||
int chunk = (x2 - c + 1) >> 3;
|
int chunk = (x2 - c + 1) >> 3;
|
||||||
memset(optr + Width * r + (c >> 3), _Color, chunk );
|
memset(optr + Width * r + (c >> 3), _Color, chunk );
|
||||||
c += chunk * 8;
|
c += chunk * 8;
|
||||||
while (c <= x2) DrawPixel1FastLocal( Device, c++, r, Color );
|
while (c <= x2) _DrawPixel1Fast( Device, c++, r, Color );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -328,13 +328,14 @@ struct GDS_Device* SSD132x_Detect(char *Driver, struct GDS_Device* Device) {
|
|||||||
if (!Device) Device = calloc(1, sizeof(struct GDS_Device));
|
if (!Device) Device = calloc(1, sizeof(struct GDS_Device));
|
||||||
|
|
||||||
*Device = SSD132x;
|
*Device = SSD132x;
|
||||||
((struct PrivateSpace*) Device->Private)->Model = Model;
|
struct PrivateSpace *Private = (struct PrivateSpace*) Device->Private;
|
||||||
|
Private->Model = Model;
|
||||||
|
|
||||||
sscanf(Driver, "%*[^:]:%u", &Depth);
|
sscanf(Driver, "%*[^:]:%u", &Depth);
|
||||||
|
|
||||||
if (Model == SSD1326 && Depth == 1) {
|
if (Model == SSD1326 && Depth == 1) {
|
||||||
Device->Update = Update1;
|
Device->Update = Update1;
|
||||||
Device->DrawPixelFast = DrawPixel1FastLocal;
|
Device->DrawPixelFast = _DrawPixel1Fast;
|
||||||
Device->DrawBitmapCBR = DrawBitmapCBR;
|
Device->DrawBitmapCBR = DrawBitmapCBR;
|
||||||
Device->ClearWindow = ClearWindow;
|
Device->ClearWindow = ClearWindow;
|
||||||
Device->Depth = 1;
|
Device->Depth = 1;
|
||||||
|
|||||||
@@ -118,7 +118,7 @@ static void Update( struct GDS_Device* Device ) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// remember that for these ELD drivers W and H are "inverted"
|
// remember that for these ELD drivers W and H are "inverted"
|
||||||
static inline void DrawPixelLocal( struct GDS_Device* Device, int X, int Y, int Color ) {
|
static inline void _DrawPixel( struct GDS_Device* Device, int X, int Y, int Color ) {
|
||||||
uint32_t YBit = ( Y & 0x07 );
|
uint32_t YBit = ( Y & 0x07 );
|
||||||
Y>>= 3;
|
Y>>= 3;
|
||||||
|
|
||||||
@@ -129,7 +129,7 @@ static inline void DrawPixelLocal( struct GDS_Device* Device, int X, int Y, int
|
|||||||
static void ClearWindow( struct GDS_Device* Device, int x1, int y1, int x2, int y2, int Color ) {
|
static void ClearWindow( struct GDS_Device* Device, int x1, int y1, int x2, int y2, int Color ) {
|
||||||
for (int r = y1; r <= y2; r++) {
|
for (int r = y1; r <= y2; r++) {
|
||||||
for (int c = x1; c <= x2; c++) {
|
for (int c = x1; c <= x2; c++) {
|
||||||
DrawPixelLocal( Device, c, r, Color );
|
_DrawPixel( Device, c, r, Color );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -228,7 +228,7 @@ static bool Init( struct GDS_Device* Device ) {
|
|||||||
|
|
||||||
static const struct GDS_Device SSD1675 = {
|
static const struct GDS_Device SSD1675 = {
|
||||||
.DrawBitmapCBR = DrawBitmapCBR, .ClearWindow = ClearWindow,
|
.DrawBitmapCBR = DrawBitmapCBR, .ClearWindow = ClearWindow,
|
||||||
.DrawPixelFast = DrawPixelLocal,
|
.DrawPixelFast = _DrawPixel,
|
||||||
.Update = Update, .Init = Init,
|
.Update = Update, .Init = Init,
|
||||||
.Mode = GDS_MONO, .Depth = 1,
|
.Mode = GDS_MONO, .Depth = 1,
|
||||||
.Alloc = GDS_ALLOC_NONE,
|
.Alloc = GDS_ALLOC_NONE,
|
||||||
|
|||||||
@@ -282,8 +282,9 @@ struct GDS_Device* ST77xx_Detect(char *Driver, struct GDS_Device* Device) {
|
|||||||
if (!Device) Device = calloc(1, sizeof(struct GDS_Device));
|
if (!Device) Device = calloc(1, sizeof(struct GDS_Device));
|
||||||
|
|
||||||
*Device = ST77xx;
|
*Device = ST77xx;
|
||||||
((struct PrivateSpace*) Device->Private)->Model = Model;
|
|
||||||
sscanf(Driver, "%*[^:]:%u", &Depth);
|
sscanf(Driver, "%*[^:]:%u", &Depth);
|
||||||
|
struct PrivateSpace* Private = (struct PrivateSpace*) Device->Private;
|
||||||
|
Private->Model = Model;
|
||||||
|
|
||||||
if (Depth == 18) {
|
if (Depth == 18) {
|
||||||
Device->Mode = GDS_RGB666;
|
Device->Mode = GDS_RGB666;
|
||||||
|
|||||||
@@ -89,7 +89,13 @@ extern struct mdnsd* glmDNSServer;
|
|||||||
extern log_level raop_loglevel;
|
extern log_level raop_loglevel;
|
||||||
static log_level *loglevel = &raop_loglevel;
|
static log_level *loglevel = &raop_loglevel;
|
||||||
|
|
||||||
|
#ifdef WIN32
|
||||||
static void* rtsp_thread(void *arg);
|
static void* rtsp_thread(void *arg);
|
||||||
|
static void* search_remote(void *args);
|
||||||
|
#else
|
||||||
|
static void rtsp_thread(void *arg);
|
||||||
|
static void search_remote(void *args);
|
||||||
|
#endif
|
||||||
static void cleanup_rtsp(raop_ctx_t *ctx, bool abort);
|
static void cleanup_rtsp(raop_ctx_t *ctx, bool abort);
|
||||||
static bool handle_rtsp(raop_ctx_t *ctx, int sock);
|
static bool handle_rtsp(raop_ctx_t *ctx, int sock);
|
||||||
|
|
||||||
@@ -97,7 +103,7 @@ static char* rsa_apply(unsigned char *input, int inlen, int *outlen, int mode);
|
|||||||
static int base64_pad(char *src, char **padded);
|
static int base64_pad(char *src, char **padded);
|
||||||
static int base64_encode(const void *data, int size, char **str);
|
static int base64_encode(const void *data, int size, char **str);
|
||||||
static int base64_decode(const char *str, void *data);
|
static int base64_decode(const char *str, void *data);
|
||||||
static void* search_remote(void *args);
|
|
||||||
|
|
||||||
extern char private_key[];
|
extern char private_key[];
|
||||||
|
|
||||||
@@ -352,7 +358,11 @@ bool raop_cmd(struct raop_ctx_s *ctx, raop_event_t event, void *param) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
free(command);
|
free(command);
|
||||||
|
closesocket(sock);
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
/*----------------------------------------------------------------------------*/
|
/*----------------------------------------------------------------------------*/
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
static void *rtsp_thread(void *arg) {
|
static void *rtsp_thread(void *arg) {
|
||||||
@@ -397,9 +407,9 @@ static void *rtsp_thread(void *arg) {
|
|||||||
sock = -1;
|
sock = -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (sock != -1) closesocket(sock);
|
|
||||||
if (sock != -1) closesocket(sock);
|
if (sock != -1) closesocket(sock);
|
||||||
|
|
||||||
#ifndef WIN32
|
#ifndef WIN32
|
||||||
xTaskNotifyGive(ctx->joiner);
|
xTaskNotifyGive(ctx->joiner);
|
||||||
vTaskSuspend(NULL);
|
vTaskSuspend(NULL);
|
||||||
@@ -708,7 +718,7 @@ static void* search_remote(void *args) {
|
|||||||
|
|
||||||
query_mDNS(ctx->active_remote.handle, "_dacp._tcp.local", 0, 0, &search_remote_cb, (void*) ctx);
|
query_mDNS(ctx->active_remote.handle, "_dacp._tcp.local", 0, 0, &search_remote_cb, (void*) ctx);
|
||||||
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
#else
|
#else
|
||||||
@@ -741,8 +751,6 @@ static void* search_remote(void *args) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
mdns_query_results_free(results);
|
|
||||||
}
|
|
||||||
mdns_query_results_free(results);
|
mdns_query_results_free(results);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -158,8 +158,12 @@ static void buffer_reset(abuf_t *audio_buffer);
|
|||||||
static void buffer_release(abuf_t *audio_buffer);
|
static void buffer_release(abuf_t *audio_buffer);
|
||||||
static void buffer_reset(abuf_t *audio_buffer);
|
static void buffer_reset(abuf_t *audio_buffer);
|
||||||
static void buffer_push_packet(rtp_t *ctx);
|
static void buffer_push_packet(rtp_t *ctx);
|
||||||
static bool rtp_request_resend(rtp_t *ctx, seq_t first, seq_t last);
|
|
||||||
static bool rtp_request_resend(rtp_t *ctx, seq_t first, seq_t last);
|
static bool rtp_request_resend(rtp_t *ctx, seq_t first, seq_t last);
|
||||||
|
static bool rtp_request_timing(rtp_t *ctx);
|
||||||
|
static int seq_order(seq_t a, seq_t b);
|
||||||
|
#ifdef WIN32
|
||||||
|
static void *rtp_thread_func(void *arg);
|
||||||
|
#else
|
||||||
static void rtp_thread_func(void *arg);
|
static void rtp_thread_func(void *arg);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -565,7 +569,11 @@ static void buffer_push_packet(rtp_t *ctx) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*---------------------------------------------------------------------------*/
|
||||||
|
#ifdef WIN32
|
||||||
|
static void *rtp_thread_func(void *arg) {
|
||||||
#else
|
#else
|
||||||
static void rtp_thread_func(void *arg) {
|
static void rtp_thread_func(void *arg) {
|
||||||
#endif
|
#endif
|
||||||
@@ -621,6 +629,7 @@ static void *rtp_thread_func(void *arg) {
|
|||||||
|
|
||||||
// re-sent packet
|
// re-sent packet
|
||||||
case 0x56: {
|
case 0x56: {
|
||||||
|
pktp += 4;
|
||||||
plen -= 4;
|
plen -= 4;
|
||||||
}
|
}
|
||||||
// fall through
|
// fall through
|
||||||
@@ -695,7 +704,6 @@ static void *rtp_thread_func(void *arg) {
|
|||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// NTP timing packet
|
// NTP timing packet
|
||||||
case 0x53: {
|
case 0x53: {
|
||||||
@@ -712,8 +720,8 @@ static void *rtp_thread_func(void *arg) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
The expected elapsed remote time should be exactly the same as
|
||||||
elapsed local time between the two request, corrected by the
|
elapsed local time between the two request, corrected by the
|
||||||
elapsed local time between the two request, corrected by the
|
|
||||||
drifting
|
drifting
|
||||||
u64_t expected = ctx->timing.remote + MS2NTP(reference - ctx->timing.local);
|
u64_t expected = ctx->timing.remote + MS2NTP(reference - ctx->timing.local);
|
||||||
*/
|
*/
|
||||||
@@ -740,9 +748,9 @@ static void *rtp_thread_func(void *arg) {
|
|||||||
free(packet);
|
free(packet);
|
||||||
LOG_INFO("[%p]: terminating", ctx);
|
LOG_INFO("[%p]: terminating", ctx);
|
||||||
|
|
||||||
#ifndef WIN32
|
#ifndef WIN32
|
||||||
xTaskNotifyGive(ctx->joiner);
|
|
||||||
xTaskNotifyGive(ctx->joiner);
|
xTaskNotifyGive(ctx->joiner);
|
||||||
|
vTaskSuspend(NULL);
|
||||||
#else
|
#else
|
||||||
return NULL;
|
return NULL;
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -63,7 +63,6 @@ static void ac101_start(ac_module_t mode);
|
|||||||
static void ac101_stop(void);
|
static void ac101_stop(void);
|
||||||
static void ac101_set_earph_volume(uint8_t volume);
|
static void ac101_set_earph_volume(uint8_t volume);
|
||||||
static void ac101_set_spk_volume(uint8_t volume);
|
static void ac101_set_spk_volume(uint8_t volume);
|
||||||
static int ac101_get_spk_volume(void);
|
|
||||||
|
|
||||||
static int i2c_port;
|
static int i2c_port;
|
||||||
|
|
||||||
@@ -268,13 +267,6 @@ void set_sample_rate(int rate) {
|
|||||||
i2c_write_reg(I2S_SR_CTRL, rate);
|
i2c_write_reg(I2S_SR_CTRL, rate);
|
||||||
}
|
}
|
||||||
|
|
||||||
/****************************************************************************************
|
|
||||||
* Get normalized (0..100) speaker volume
|
|
||||||
*/
|
|
||||||
static int ac101_get_spk_volume(void) {
|
|
||||||
return ((i2c_read_reg(SPKOUT_CTRL) & 0x1f) * 100) / 0x1f;
|
|
||||||
}
|
|
||||||
|
|
||||||
/****************************************************************************************
|
/****************************************************************************************
|
||||||
* Set normalized (0..100) volume
|
* Set normalized (0..100) volume
|
||||||
*/
|
*/
|
||||||
@@ -285,13 +277,6 @@ static void ac101_set_spk_volume(uint8_t volume) {
|
|||||||
i2c_write_reg(SPKOUT_CTRL, value);
|
i2c_write_reg(SPKOUT_CTRL, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
/****************************************************************************************
|
|
||||||
* Get normalized (0..100) earphone volume
|
|
||||||
*/
|
|
||||||
static int ac101_get_earph_volume(void) {
|
|
||||||
return (((i2c_read_reg(HPOUT_CTRL) >> 4) & 0x3f) * 100) / 0x3f;
|
|
||||||
}
|
|
||||||
|
|
||||||
/****************************************************************************************
|
/****************************************************************************************
|
||||||
* Set normalized (0..100) earphone volume
|
* Set normalized (0..100) earphone volume
|
||||||
*/
|
*/
|
||||||
@@ -302,6 +287,21 @@ static void ac101_set_earph_volume(uint8_t volume) {
|
|||||||
i2c_write_reg(HPOUT_CTRL, value);
|
i2c_write_reg(HPOUT_CTRL, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if 0
|
||||||
|
/****************************************************************************************
|
||||||
|
* Get normalized (0..100) speaker volume
|
||||||
|
*/
|
||||||
|
static int ac101_get_spk_volume(void) {
|
||||||
|
return ((i2c_read_reg(SPKOUT_CTRL) & 0x1f) * 100) / 0x1f;
|
||||||
|
}
|
||||||
|
|
||||||
|
/****************************************************************************************
|
||||||
|
* Get normalized (0..100) earphone volume
|
||||||
|
*/
|
||||||
|
static int ac101_get_earph_volume(void) {
|
||||||
|
return (((i2c_read_reg(HPOUT_CTRL) >> 4) & 0x3f) * 100) / 0x3f;
|
||||||
|
}
|
||||||
|
|
||||||
/****************************************************************************************
|
/****************************************************************************************
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@@ -330,6 +330,27 @@ static void ac101_set_output_mixer_gain(ac_output_mixer_gain_t gain,ac_output_mi
|
|||||||
i2c_write_reg(OMIXER_BST1_CTRL,regval);
|
i2c_write_reg(OMIXER_BST1_CTRL,regval);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/****************************************************************************************
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
static void ac101_deinit(void) {
|
||||||
|
i2c_write_reg(CHIP_AUDIO_RS, 0x123); //soft reset
|
||||||
|
}
|
||||||
|
|
||||||
|
/****************************************************************************************
|
||||||
|
* Don't know when this one is supposed to be called
|
||||||
|
*/
|
||||||
|
static void ac101_i2s_config_clock(ac_i2s_clock_t *cfg) {
|
||||||
|
uint16_t regval=0;
|
||||||
|
regval = i2c_read_reg(I2S1LCK_CTRL);
|
||||||
|
regval &= 0xe03f;
|
||||||
|
regval |= (cfg->bclk_div << 9);
|
||||||
|
regval |= (cfg->lclk_div << 6);
|
||||||
|
i2c_write_reg(I2S1LCK_CTRL, regval);
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
/****************************************************************************************
|
/****************************************************************************************
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@@ -362,21 +383,3 @@ static void ac101_stop(void) {
|
|||||||
i2c_write_reg(PLL_CTRL2, value);
|
i2c_write_reg(PLL_CTRL2, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
/****************************************************************************************
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
static void ac101_deinit(void) {
|
|
||||||
i2c_write_reg(CHIP_AUDIO_RS, 0x123); //soft reset
|
|
||||||
}
|
|
||||||
|
|
||||||
/****************************************************************************************
|
|
||||||
* Don't know when this one is supposed to be called
|
|
||||||
*/
|
|
||||||
static void ac101_i2s_config_clock(ac_i2s_clock_t *cfg) {
|
|
||||||
uint16_t regval=0;
|
|
||||||
regval = i2c_read_reg(I2S1LCK_CTRL);
|
|
||||||
regval &= 0xe03f;
|
|
||||||
regval |= (cfg->bclk_div << 9);
|
|
||||||
regval |= (cfg->lclk_div << 6);
|
|
||||||
i2c_write_reg(I2S1LCK_CTRL, regval);
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -21,7 +21,9 @@
|
|||||||
|
|
||||||
// fifo bufffers
|
// fifo bufffers
|
||||||
|
|
||||||
|
#ifndef _GNU_SOURCE
|
||||||
#define _GNU_SOURCE
|
#define _GNU_SOURCE
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "squeezelite.h"
|
#include "squeezelite.h"
|
||||||
|
|
||||||
|
|||||||
@@ -102,7 +102,7 @@ DECLARE_ALL_MIN_MAX;
|
|||||||
static int _i2s_write_frames(frames_t out_frames, bool silence, s32_t gainL, s32_t gainR,
|
static int _i2s_write_frames(frames_t out_frames, bool silence, s32_t gainL, s32_t gainR,
|
||||||
s32_t cross_gain_in, s32_t cross_gain_out, ISAMPLE_T **cross_ptr);
|
s32_t cross_gain_in, s32_t cross_gain_out, ISAMPLE_T **cross_ptr);
|
||||||
static void *output_thread_i2s(void *arg);
|
static void *output_thread_i2s(void *arg);
|
||||||
static void *output_thread_i2s_stats(void *arg);
|
static void output_thread_i2s_stats(void *arg);
|
||||||
static void spdif_convert(ISAMPLE_T *src, size_t frames, u32_t *dst, size_t *count);
|
static void spdif_convert(ISAMPLE_T *src, size_t frames, u32_t *dst, size_t *count);
|
||||||
static void (*jack_handler_chain)(bool inserted);
|
static void (*jack_handler_chain)(bool inserted);
|
||||||
|
|
||||||
@@ -502,13 +502,13 @@ static void *output_thread_i2s(void *arg) {
|
|||||||
// this does not work well as set_sample_rates resets the fifos (and it's too early)
|
// this does not work well as set_sample_rates resets the fifos (and it's too early)
|
||||||
if (i2s_config.sample_rate != output.current_sample_rate) {
|
if (i2s_config.sample_rate != output.current_sample_rate) {
|
||||||
LOG_INFO("changing sampling rate %u to %u", i2s_config.sample_rate, output.current_sample_rate);
|
LOG_INFO("changing sampling rate %u to %u", i2s_config.sample_rate, output.current_sample_rate);
|
||||||
|
if (synced) {
|
||||||
/*
|
/*
|
||||||
if (synced)
|
|
||||||
// can sleep for a buffer_queue - 1 and then eat a buffer (discard) if we are synced
|
// can sleep for a buffer_queue - 1 and then eat a buffer (discard) if we are synced
|
||||||
usleep(((DMA_BUF_COUNT - 1) * DMA_BUF_LEN * BYTES_PER_FRAME * 1000) / 44100 * 1000);
|
usleep(((DMA_BUF_COUNT - 1) * DMA_BUF_LEN * BYTES_PER_FRAME * 1000) / 44100 * 1000);
|
||||||
discard = DMA_BUF_COUNT * DMA_BUF_LEN * BYTES_PER_FRAME;
|
discard = DMA_BUF_COUNT * DMA_BUF_LEN * BYTES_PER_FRAME;
|
||||||
}
|
|
||||||
*/
|
*/
|
||||||
|
}
|
||||||
i2s_config.sample_rate = output.current_sample_rate;
|
i2s_config.sample_rate = output.current_sample_rate;
|
||||||
i2s_set_sample_rates(CONFIG_I2S_NUM, spdif ? i2s_config.sample_rate * 2 : i2s_config.sample_rate);
|
i2s_set_sample_rates(CONFIG_I2S_NUM, spdif ? i2s_config.sample_rate * 2 : i2s_config.sample_rate);
|
||||||
i2s_zero_dma_buffer(CONFIG_I2S_NUM);
|
i2s_zero_dma_buffer(CONFIG_I2S_NUM);
|
||||||
@@ -552,7 +552,7 @@ static void *output_thread_i2s(void *arg) {
|
|||||||
/****************************************************************************************
|
/****************************************************************************************
|
||||||
* Stats output thread
|
* Stats output thread
|
||||||
*/
|
*/
|
||||||
static void *output_thread_i2s_stats(void *arg) {
|
static void output_thread_i2s_stats(void *arg) {
|
||||||
while (1) {
|
while (1) {
|
||||||
// no need to lock
|
// no need to lock
|
||||||
output_state state = output.state;
|
output_state state = output.state;
|
||||||
@@ -579,7 +579,6 @@ static void *output_thread_i2s_stats(void *arg) {
|
|||||||
}
|
}
|
||||||
vTaskDelay( pdMS_TO_TICKS( STATS_PERIOD_MS ) );
|
vTaskDelay( pdMS_TO_TICKS( STATS_PERIOD_MS ) );
|
||||||
}
|
}
|
||||||
return NULL;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/****************************************************************************************
|
/****************************************************************************************
|
||||||
|
|||||||
@@ -21,7 +21,9 @@
|
|||||||
|
|
||||||
// stream thread
|
// stream thread
|
||||||
|
|
||||||
|
#ifndef _GNU_SOURCE
|
||||||
#define _GNU_SOURCE
|
#define _GNU_SOURCE
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "squeezelite.h"
|
#include "squeezelite.h"
|
||||||
|
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ extern bool bypass_wifi_manager;
|
|||||||
|
|
||||||
extern EventGroupHandle_t wifi_event_group;
|
extern EventGroupHandle_t wifi_event_group;
|
||||||
extern const int CONNECTED_BIT;
|
extern const int CONNECTED_BIT;
|
||||||
static const char * TAG = "cmd_wifi";
|
//static const char * TAG = "cmd_wifi";
|
||||||
/** Arguments used by 'join' function */
|
/** Arguments used by 'join' function */
|
||||||
static struct {
|
static struct {
|
||||||
struct arg_int *timeout;
|
struct arg_int *timeout;
|
||||||
@@ -123,9 +123,8 @@ static bool wifi_join(const char *ssid, const char *pass, int timeout_ms)
|
|||||||
return (bits & CONNECTED_BIT) != 0;
|
return (bits & CONNECTED_BIT) != 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//static int set_auto_connect(int argc, char **argv)
|
||||||
static int set_auto_connect(int argc, char **argv)
|
//{
|
||||||
{
|
|
||||||
// int nerrors = arg_parse(argc, argv, (void **) &join_args);
|
// int nerrors = arg_parse(argc, argv, (void **) &join_args);
|
||||||
// if (nerrors != 0) {
|
// if (nerrors != 0) {
|
||||||
// arg_print_errors(stderr, join_args.end, argv[0]);
|
// arg_print_errors(stderr, join_args.end, argv[0]);
|
||||||
@@ -147,8 +146,9 @@ static int set_auto_connect(int argc, char **argv)
|
|||||||
// return 1;
|
// return 1;
|
||||||
// }
|
// }
|
||||||
// ESP_LOGI(__func__, "Connected");
|
// ESP_LOGI(__func__, "Connected");
|
||||||
return 0;
|
// return 0;
|
||||||
}
|
//}
|
||||||
|
|
||||||
static int connect(int argc, char **argv)
|
static int connect(int argc, char **argv)
|
||||||
{
|
{
|
||||||
int nerrors = arg_parse(argc, argv, (void **) &join_args);
|
int nerrors = arg_parse(argc, argv, (void **) &join_args);
|
||||||
|
|||||||
Reference in New Issue
Block a user