mirror of
https://github.com/sle118/squeezelite-esp32.git
synced 2025-12-18 05:28:29 +03:00
Start of 5.X work
This commit is contained in:
@@ -23,14 +23,14 @@ static void speaker(bool active) { }
|
||||
static void headset(bool active) { }
|
||||
static bool volume(unsigned left, unsigned right) { return false; }
|
||||
static void power(adac_power_e mode);
|
||||
static bool init(char *config, int i2c_port_num, i2s_config_t *i2s_config, bool *mck);
|
||||
static bool init(sys_dac_config *config, i2s_config_t *i2s_config, bool *mck);
|
||||
|
||||
static esp_err_t i2c_write_shadow(uint8_t reg, uint16_t val);
|
||||
static uint16_t i2c_read_shadow(uint8_t reg);
|
||||
|
||||
static int WM8978;
|
||||
|
||||
const struct adac_s dac_wm8978 = { sys_DACModelEnum_WM8978, init, adac_deinit, power, speaker, headset, volume };
|
||||
const struct adac_s dac_wm8978 = { sys_dac_models_WM8978, init, adac_deinit, power, speaker, headset, volume };
|
||||
|
||||
// initiation table for non-readbale 9-bit i2c registers
|
||||
static uint16_t WM8978_REGVAL_TBL[58] = {
|
||||
@@ -47,8 +47,8 @@ static uint16_t WM8978_REGVAL_TBL[58] = {
|
||||
/****************************************************************************************
|
||||
* init
|
||||
*/
|
||||
static bool init(char *config, int i2c_port, i2s_config_t *i2s_config, bool *mck) {
|
||||
WM8978 = adac_init(config, i2c_port);
|
||||
static bool init(sys_dac_config *config, i2s_config_t *i2s_config, bool *mck) {
|
||||
WM8978 = adac_init(config);
|
||||
|
||||
if (!WM8978) WM8978 = 0x1a;
|
||||
ESP_LOGI(TAG, "WM8978 detected @%d", WM8978);
|
||||
|
||||
Reference in New Issue
Block a user