mirror of
https://github.com/sle118/squeezelite-esp32.git
synced 2025-12-09 21:17:18 +03:00
fix for broken generic i2s build - release
This commit is contained in:
@@ -452,7 +452,7 @@ static void *output_thread_i2s() {
|
|||||||
while (running) {
|
while (running) {
|
||||||
|
|
||||||
TIME_MEASUREMENT_START(timer_start);
|
TIME_MEASUREMENT_START(timer_start);
|
||||||
|
#ifdef TAS57xx
|
||||||
// handle jack insertion as a polling function (to avoid to have to do de-bouncing)
|
// handle jack insertion as a polling function (to avoid to have to do de-bouncing)
|
||||||
if (gpio_get_level(JACK_GPIO) != jack_status) {
|
if (gpio_get_level(JACK_GPIO) != jack_status) {
|
||||||
jack_status = gpio_get_level(JACK_GPIO);
|
jack_status = gpio_get_level(JACK_GPIO);
|
||||||
@@ -461,7 +461,7 @@ static void *output_thread_i2s() {
|
|||||||
LOG_INFO("Changing jack status %d", jack_status);
|
LOG_INFO("Changing jack status %d", jack_status);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
LOCK;
|
LOCK;
|
||||||
|
|
||||||
// manage led display
|
// manage led display
|
||||||
@@ -644,20 +644,22 @@ void dac_cmd(dac_cmd_e cmd, ...) {
|
|||||||
/****************************************************************************************
|
/****************************************************************************************
|
||||||
* Analogue mute
|
* Analogue mute
|
||||||
*/
|
*/
|
||||||
|
#ifdef TAS57xx
|
||||||
static void set_analogue(bool active) {
|
static void set_analogue(bool active) {
|
||||||
#ifdef TAS57xx
|
|
||||||
dac_cmd(DAC_STANDBY);
|
dac_cmd(DAC_STANDBY);
|
||||||
// need to wait a bit for TAS to execute standby before sending backend-down command
|
// need to wait a bit for TAS to execute standby before sending backend-down command
|
||||||
usleep(50*1000);
|
usleep(50*1000);
|
||||||
dac_cmd(active ? DAC_ANALOG_UP : DAC_ANALOG_DOWN);
|
dac_cmd(active ? DAC_ANALOG_UP : DAC_ANALOG_DOWN);
|
||||||
dac_cmd(DAC_ACTIVE);
|
dac_cmd(DAC_ACTIVE);
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
/****************************************************************************************
|
/****************************************************************************************
|
||||||
* TAS57 detection
|
* TAS57 detection
|
||||||
*/
|
*/
|
||||||
|
#ifdef TAS57xx
|
||||||
static int tas57_detect(void) {
|
static int tas57_detect(void) {
|
||||||
|
|
||||||
u8_t data, addr[] = {0x90, 0x98};
|
u8_t data, addr[] = {0x90, 0x98};
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
@@ -681,9 +683,10 @@ static int tas57_detect(void) {
|
|||||||
return addr[i];
|
return addr[i];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/****************************************************************************************
|
/****************************************************************************************
|
||||||
* SPDIF support
|
* SPDIF support
|
||||||
|
|||||||
Reference in New Issue
Block a user