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)
downloadrockbox-d18157608d5aba50cf538c4853f42fce7e3731ef.tar.gz
rockbox-d18157608d5aba50cf538c4853f42fce7e3731ef.zip
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)
66 } 66 }
67 else 67 else
68 { 68 {
69 long int ps0 = last_ps;
70 last_ps = 0; 69 last_ps = 0;
71 xduoo_get_outputs(); 70 xduoo_get_outputs();
72// xduoo_set_output(ps);
73 } 71 }
74} 72}
75 73
76int xduoo_get_outputs(void){ 74int xduoo_get_outputs(void){
77 long int ps = 2; // headset 75 long int ps = 0; // Muted, if nothing is plugged in!
78 76
79 int status = 0; 77 int status = 0;
80 78
@@ -121,15 +119,16 @@ void audiohw_preinit(void)
121 logf("hw preinit"); 119 logf("hw preinit");
122 alsa_controls_init(); 120 alsa_controls_init();
123 hw_open(); 121 hw_open();
124 audiohw_mute(true); /* Start muted */ 122 audiohw_mute(true); /* Start muted to avoid the POP */
125 inited = 1; 123 inited = 1;
126} 124}
127 125
128void audiohw_postinit(void) 126void audiohw_postinit(void)
129{ 127{
128// const char * const codec_pmdown = "/sys/devices/platform/ingenic-x3ii.0/x3ii-ak4490-i2s/pmdown_time"; // in ms, defaults 5000
129
130 logf("hw postinit"); 130 logf("hw postinit");
131 audiohw_mute(true); /* Stay muted */ 131 xduoo_set_output(xduoo_get_outputs()); /* Unmute */
132 xduoo_set_output(xduoo_get_outputs());
133} 132}
134 133
135void audiohw_close(void) 134void audiohw_close(void)