summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSolomon Peachy <pizza@shaftnet.org>2020-10-25 21:00:50 -0400
committerSolomon Peachy <pizza@shaftnet.org>2020-10-26 01:07:59 +0000
commit28b9c8bfeb13748abcb850884e538d4a5ca3d5ce (patch)
tree8fa30594285c98a2fc05e7e33bf2a9980a7701ee
parentbde72efa30218d6467f07cd0b0a223899484d640 (diff)
downloadrockbox-28b9c8bfeb13748abcb850884e538d4a5ca3d5ce.tar.gz
rockbox-28b9c8bfeb13748abcb850884e538d4a5ca3d5ce.zip
rocker: Disable mute-on-pause, due to a platform kernel bug.
In short, the display fading back in after a pause resuming interferes with the audio codec, causing BadThings(tm) that cannot be recovered from This really is just avoiding a known trigger; there's no guarantee this condition won't occur under random circumstances during normal use, and there's no good way to work around this from within rockbox. I suspect the underlying problem is that both the display control and codec control share an i2c bus, but the kernel drivers implementing them isn't using proper linux bus access/locking. Change-Id: Id4f56f9cb269ed74aac2f041146b3630cef09030
-rw-r--r--firmware/drivers/audio/rocker_codec.c4
-rw-r--r--firmware/export/rocker_codec.h7
2 files changed, 9 insertions, 2 deletions
diff --git a/firmware/drivers/audio/rocker_codec.c b/firmware/drivers/audio/rocker_codec.c
index abe13be285..4beda4b572 100644
--- a/firmware/drivers/audio/rocker_codec.c
+++ b/firmware/drivers/audio/rocker_codec.c
@@ -71,7 +71,11 @@ void audiohw_preinit(void)
71{ 71{
72 alsa_controls_init(); 72 alsa_controls_init();
73 hw_open(); 73 hw_open();
74#if defined(AUDIOHW_MUTE_ON_PAUSE) || defined (AUDIOHW_NEEDS_INITIAL_UNMUTE)
74 audiohw_mute(true); /* Start muted to avoid the POP */ 75 audiohw_mute(true); /* Start muted to avoid the POP */
76#else
77 audiohw_mute(false);
78#endif
75} 79}
76 80
77void audiohw_postinit(void) 81void audiohw_postinit(void)
diff --git a/firmware/export/rocker_codec.h b/firmware/export/rocker_codec.h
index 48e280a4e4..c1ee7b87bc 100644
--- a/firmware/export/rocker_codec.h
+++ b/firmware/export/rocker_codec.h
@@ -2,9 +2,12 @@
2#define __ROCKER_CODEC__ 2#define __ROCKER_CODEC__
3 3
4#define AUDIOHW_CAPS 0 4#define AUDIOHW_CAPS 0
5AUDIOHW_SETTING(VOLUME, "dB", 1, 5, -102*10, 0, -30*10) 5AUDIOHW_SETTING(VOLUME, "dB", 1, 5, -115*10, 0, -30*10)
6#endif 6#endif
7 7
8#define AUDIOHW_MUTE_ON_PAUSE 8//#define AUDIOHW_MUTE_ON_PAUSE
9//#define AUDIOHW_NEEDS_INITIAL_UNMUTE
10
11/* Note: Due to Kernel bug, we can't use MUTE_ON_PAUSE with backlight fading */
9 12
10void audiohw_mute(int mute); 13void audiohw_mute(int mute);