From 6834d1a02f1099c7dcd1428613a12f6eef0c6821 Mon Sep 17 00:00:00 2001 From: Solomon Peachy Date: Tue, 20 Oct 2020 17:03:21 -0400 Subject: xduoox20: Start unmuted, as the least-worst option Change-Id: Ie85d9df0f861315dfc9d767218d86115420aa9d7 --- firmware/drivers/audio/xduoolinux_codec.c | 6 ++++++ firmware/export/xduoolinux_codec.h | 4 ++++ 2 files changed, 10 insertions(+) diff --git a/firmware/drivers/audio/xduoolinux_codec.c b/firmware/drivers/audio/xduoolinux_codec.c index 31224abd96..5b83f0fa8c 100644 --- a/firmware/drivers/audio/xduoolinux_codec.c +++ b/firmware/drivers/audio/xduoolinux_codec.c @@ -126,7 +126,13 @@ void audiohw_preinit(void) logf("hw preinit"); alsa_controls_init(); hw_open(); + +#if defined(XDUOO_X3II) audiohw_mute(true); /* Start muted to avoid the POP */ +#else + audiohw_mute(false); /* No need */ +#endif + // const char * const codec_pmdown = "/sys/devices/platform/ingenic-x3ii.0/x3ii-ak4490-i2s/pmdown_time"; // in ms, defaults 5000 } diff --git a/firmware/export/xduoolinux_codec.h b/firmware/export/xduoolinux_codec.h index 09609d477c..cc401555ef 100644 --- a/firmware/export/xduoolinux_codec.h +++ b/firmware/export/xduoolinux_codec.h @@ -14,6 +14,10 @@ AUDIOHW_SETTING(FILTER_ROLL_OFF, "", 0, 1, 0, 4, 0) #define AUDIOHW_MUTE_ON_SRATE_CHANGE #endif +#if defined(XDUOO_X20) +//#define AUDIOHW_NEEDS_INITIAL_UNMUTE +#endif + void audiohw_mute(int mute); void xduoo_set_output(int ps); int xduoo_get_outputs(void); -- cgit v1.2.3