summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSolomon Peachy <pizza@shaftnet.org>2020-10-03 09:08:22 -0400
committerSolomon Peachy <pizza@shaftnet.org>2020-10-03 14:41:21 +0000
commitd18157608d5aba50cf538c4853f42fce7e3731ef (patch)
treec19c50e00a80dcf03733be26d16582eb3a8012b9
parent1824f8b103ffbc20ddf5487088ed5d7a3682fb09 (diff)
xduoo codec cleanups
Change-Id: I6c3437bde2d9f781a02ffc6b3a83148b9a7af872
-rw-r--r--firmware/drivers/audio/xduoolinux_codec.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/firmware/drivers/audio/xduoolinux_codec.c b/firmware/drivers/audio/xduoolinux_codec.c
index 829b9dd334..2151d1c2e5 100644
--- a/firmware/drivers/audio/xduoolinux_codec.c
+++ b/firmware/drivers/audio/xduoolinux_codec.c
@@ -66,15 +66,13 @@ void audiohw_mute(int mute)
}
else
{
- long int ps0 = last_ps;
last_ps = 0;
xduoo_get_outputs();
-// xduoo_set_output(ps);
}
}
int xduoo_get_outputs(void){
- long int ps = 2; // headset
+ long int ps = 0; // Muted, if nothing is plugged in!
int status = 0;
@@ -121,15 +119,16 @@ void audiohw_preinit(void)
logf("hw preinit");
alsa_controls_init();
hw_open();
- audiohw_mute(true); /* Start muted */
+ audiohw_mute(true); /* Start muted to avoid the POP */
inited = 1;
}
void audiohw_postinit(void)
{
+// const char * const codec_pmdown = "/sys/devices/platform/ingenic-x3ii.0/x3ii-ak4490-i2s/pmdown_time"; // in ms, defaults 5000
+
logf("hw postinit");
- audiohw_mute(true); /* Stay muted */
- xduoo_set_output(xduoo_get_outputs());
+ xduoo_set_output(xduoo_get_outputs()); /* Unmute */
}
void audiohw_close(void)