Skip to content

Commit

Permalink
clean TAS57xx - release
Browse files Browse the repository at this point in the history
  • Loading branch information
philippe44 committed Apr 10, 2021
1 parent 0610e1a commit f096ee2
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions components/squeezelite/tas57xx/dac_57xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ static const struct tas57xx_cmd_s tas57xx_cmd[] = {
};

static uint8_t tas57_addr;
int i2c_port_x;

static void dac_cmd(dac_cmd_e cmd, ...);
static int tas57_detect(void);
Expand All @@ -69,10 +68,9 @@ static int tas57_detect(void);
*/
static bool init(char *config, int i2c_port, i2s_config_t *i2s_config) {
// find which TAS we are using (if any)
i2c_port_x = i2c_port;
adac_init(config, i2c_port);
tas57_addr = tas57_detect();

tas57_addr = adac_init(config, i2c_port);
if (!tas57_addr) tas57_addr = tas57_detect();

if (!tas57_addr) {
ESP_LOGW(TAG, "No TAS57xx detected");
adac_deinit();
Expand Down

0 comments on commit f096ee2

Please sign in to comment.