adac.h 768 B

123456789101112131415161718192021222324252627282930
  1. /*
  2. * Squeezelite for esp32
  3. *
  4. * (c) Sebastien 2019
  5. * Philippe G. 2019, philippe_44@outlook.com
  6. *
  7. * This software is released under the MIT License.
  8. * https://opensource.org/licenses/MIT
  9. *
  10. */
  11. #include "freertos/FreeRTOS.h"
  12. #include "driver/i2s.h"
  13. typedef enum { ADAC_ON = 0, ADAC_STANDBY, ADAC_OFF } adac_power_e;
  14. struct adac_s {
  15. char *model;
  16. bool (*init)(char *config, int i2c_port_num, i2s_config_t *i2s_config);
  17. void (*deinit)(void);
  18. void (*power)(adac_power_e mode);
  19. void (*speaker)(bool active);
  20. void (*headset)(bool active);
  21. bool (*volume)(unsigned left, unsigned right);
  22. };
  23. extern const struct adac_s dac_tas57xx;
  24. extern const struct adac_s dac_tas5713;
  25. extern const struct adac_s dac_ac101;
  26. extern const struct adac_s dac_external;