mirror of
https://github.com/sle118/squeezelite-esp32.git
synced 2025-12-08 20:47:08 +03:00
tweaks
This commit is contained in:
@@ -398,7 +398,7 @@ static void buffer_put_packet(rtp_t *ctx, seq_t seqno, unsigned rtptime, bool fi
|
|||||||
|
|
||||||
pthread_mutex_lock(&ctx->ab_mutex);
|
pthread_mutex_lock(&ctx->ab_mutex);
|
||||||
|
|
||||||
if (!ctx->playing) {
|
if (!ctx->playing) {
|
||||||
if ((ctx->flush_seqno == -1 || seq_order(ctx->flush_seqno, seqno)) &&
|
if ((ctx->flush_seqno == -1 || seq_order(ctx->flush_seqno, seqno)) &&
|
||||||
(ctx->synchro.status & RTP_SYNC) && (ctx->synchro.status & NTP_SYNC)) {
|
(ctx->synchro.status & RTP_SYNC) && (ctx->synchro.status & NTP_SYNC)) {
|
||||||
ctx->ab_write = seqno-1;
|
ctx->ab_write = seqno-1;
|
||||||
@@ -641,7 +641,7 @@ static void *rtp_thread_func(void *arg) {
|
|||||||
ctx, ctx->latency, rtp_now_latency, rtp_now, remote, ctx->synchro.time, ctx->synchro.rtp, gettime_ms());
|
ctx, ctx->latency, rtp_now_latency, rtp_now, remote, ctx->synchro.time, ctx->synchro.rtp, gettime_ms());
|
||||||
|
|
||||||
if (!count--) {
|
if (!count--) {
|
||||||
rtp_request_timing(ctx);
|
rtp_request_timing(ctx);
|
||||||
count = 3;
|
count = 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -19,6 +19,7 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include "driver/gpio.h"
|
||||||
#include "squeezelite.h"
|
#include "squeezelite.h"
|
||||||
#include "perf_trace.h"
|
#include "perf_trace.h"
|
||||||
|
|
||||||
@@ -38,6 +39,7 @@ extern u8_t *silencebuf;
|
|||||||
|
|
||||||
extern void hal_bluetooth_init(const char * options);
|
extern void hal_bluetooth_init(const char * options);
|
||||||
extern void hal_bluetooth_stop(void);
|
extern void hal_bluetooth_stop(void);
|
||||||
|
extern u8_t config_spdif_gpio;
|
||||||
|
|
||||||
static log_level loglevel;
|
static log_level loglevel;
|
||||||
static bool running = false;
|
static bool running = false;
|
||||||
@@ -65,6 +67,11 @@ static int _write_frames(frames_t out_frames, bool silence, s32_t gainL, s32_t g
|
|||||||
DECLARE_ALL_MIN_MAX;
|
DECLARE_ALL_MIN_MAX;
|
||||||
|
|
||||||
void output_init_bt(log_level level, char *device, unsigned output_buf_size, char *params, unsigned rates[], unsigned rate_delay, unsigned idle) {
|
void output_init_bt(log_level level, char *device, unsigned output_buf_size, char *params, unsigned rates[], unsigned rate_delay, unsigned idle) {
|
||||||
|
#ifdef CONFIG_SQUEEZEAMP
|
||||||
|
gpio_pad_select_gpio(config_spdif_gpio);
|
||||||
|
gpio_set_direction(config_spdif_gpio, GPIO_MODE_OUTPUT);
|
||||||
|
gpio_set_level(config_spdif_gpio, 0);
|
||||||
|
#endif
|
||||||
loglevel = level;
|
loglevel = level;
|
||||||
running = true;
|
running = true;
|
||||||
output.write_cb = &_write_frames;
|
output.write_cb = &_write_frames;
|
||||||
|
|||||||
@@ -158,6 +158,8 @@ struct tas575x_cmd_s {
|
|||||||
u8_t value;
|
u8_t value;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
u8_t config_spdif_gpio = CONFIG_SPDIF_DO_IO;
|
||||||
|
|
||||||
static const struct tas575x_cmd_s tas575x_init_sequence[] = {
|
static const struct tas575x_cmd_s tas575x_init_sequence[] = {
|
||||||
{ 0x00, 0x00 }, // select page 0
|
{ 0x00, 0x00 }, // select page 0
|
||||||
{ 0x02, 0x10 }, // standby
|
{ 0x02, 0x10 }, // standby
|
||||||
|
|||||||
Reference in New Issue
Block a user