From 9ebe856bf4bba12f91b6e666dba043959f43570c Mon Sep 17 00:00:00 2001 From: Sebastien Date: Mon, 2 Dec 2019 11:20:07 -0500 Subject: [PATCH] fix for broken generic i2s build - release --- components/squeezelite/output_i2s.c | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/components/squeezelite/output_i2s.c b/components/squeezelite/output_i2s.c index 719c0d46..047b9122 100644 --- a/components/squeezelite/output_i2s.c +++ b/components/squeezelite/output_i2s.c @@ -452,7 +452,7 @@ static void *output_thread_i2s() { while (running) { TIME_MEASUREMENT_START(timer_start); - +#ifdef TAS57xx // handle jack insertion as a polling function (to avoid to have to do de-bouncing) if (gpio_get_level(JACK_GPIO) != jack_status) { jack_status = gpio_get_level(JACK_GPIO); @@ -461,7 +461,7 @@ static void *output_thread_i2s() { LOG_INFO("Changing jack status %d", jack_status); } } - +#endif LOCK; // manage led display @@ -644,20 +644,22 @@ void dac_cmd(dac_cmd_e cmd, ...) { /**************************************************************************************** * Analogue mute */ +#ifdef TAS57xx static void set_analogue(bool active) { -#ifdef TAS57xx + dac_cmd(DAC_STANDBY); // need to wait a bit for TAS to execute standby before sending backend-down command usleep(50*1000); dac_cmd(active ? DAC_ANALOG_UP : DAC_ANALOG_DOWN); dac_cmd(DAC_ACTIVE); -#endif } - +#endif /**************************************************************************************** * TAS57 detection */ +#ifdef TAS57xx static int tas57_detect(void) { + u8_t data, addr[] = {0x90, 0x98}; int ret; @@ -681,9 +683,10 @@ static int tas57_detect(void) { return addr[i]; } } - + return 0; -} +} +#endif /**************************************************************************************** * SPDIF support