prepare 4.4 migration + esp32s3 + mck on 0,1,3

This commit is contained in:
philippe44
2023-05-15 15:29:16 +02:00
parent 9d7044f30c
commit e78e5a4df7
17 changed files with 75 additions and 44 deletions

View File

@@ -39,7 +39,7 @@
static const char TAG[] = "TAS5713";
static bool init(char *config, int i2c_port_num, i2s_config_t *i2s_config);
static bool init(char *config, int i2c_port_num, i2s_config_t *i2s_config, bool *mck);
static void speaker(bool active) { };
static void headset(bool active) { } ;
static bool volume(unsigned left, unsigned right);
@@ -65,7 +65,7 @@ typedef enum {
/****************************************************************************************
* init
*/
static bool init(char *config, int i2c_port, i2s_config_t *i2s_config) {
static bool init(char *config, int i2c_port, i2s_config_t *i2s_config, bool *mck) {
/* find if there is a tas5713 attached. Reg 0 should read non-zero but not 255 if so */
adac_init(config, i2c_port);
if (adac_read_byte(TAS5713, 0x00) == 255) {

View File

@@ -23,7 +23,7 @@
static const char TAG[] = "TAS575x/8x";
static bool init(char *config, int i2c_port_num, i2s_config_t *i2s_config);
static bool init(char *config, int i2c_port_num, i2s_config_t *i2s_config, bool *mck);
static void speaker(bool active);
static void headset(bool active);
static bool volume(unsigned left, unsigned right);
@@ -71,7 +71,7 @@ static int tas57_detect(void);
/****************************************************************************************
* init
*/
static bool init(char *config, int i2c_port, i2s_config_t *i2s_config) {
static bool init(char *config, int i2c_port, i2s_config_t *i2s_config, bool *mck) {
// find which TAS we are using (if any)
tas57_addr = adac_init(config, i2c_port);
if (!tas57_addr) tas57_addr = tas57_detect();