rockbox/firmware/target/arm
Sebastian Leonhardt 9aafbf9ca9 STMP37xx/iMX233: reduce popping noise on power on/off (Version 1)
Version 1: this patch prolongs startup time by 2 seconds, because the
sleep happens early before other threads have started.

The patch is tested on CreativeZEN and Fuze+.

The datasheet was not very helpfull, so some experimentation was needed.
I came to the following conclusions:
* setting HP to ground:
  to prevent popping noises, the headphone output can be set to ground.
  This however must be done before any part of the audioout module is
  powered up (setting HP to ground itself will lead to a pop otherwise).
  This consequently means that HP must NOT be set to ground for powerdown
  sequence!
  Further study showed that setting HP out to ground has no audible benefit,
  controversly not setting/resetting allows for noiseless RoLo-ing.
* headphone amp class A/AB mode:
  initially the HP amp is in class A mode, and should be set to
  class AB before playing audio, as the datasheet mentions.
  If the HP output is set to ground, it must be released BEFORE
  setting class AB! Releasing from ground while in AB mode leads
  to a very loud pop!
* release HP from ground:
  as said before: never release the HP from ground if the HP amp is
  set to class AB mode. Therefore the correct order is to power up the
  headphone amp, wait some time, release HP from ground, and then
  set the amp to class AB mode.
  To prevent pop, some time is needed before releasing the HP from gnd.
  On CreativeZEN 2 sec seems to be ideal; 1 sec have no audible effect,
  1.5 sec softenes the pop to some degree.
* shutting player off
  The popping noise when shutting off is much quieter that on power up,
  so depopping measures are not absolutely necessary.
  However the power off pop can be silenced by inserting a wait time
  after the audioout block is closed and before the rest of the chip
  is powered down. The longer the better, a time of 5 sec practically
  eliminates the pop.

Note that RoLo-ing can still produce noise, because the audio device
is not properly shut down.

Change-Id: Ib20e1d613b346433d2a711c442e303ededc26e78
2025-11-12 16:07:23 -05:00
..
as3525 as3525: Fix build warning with newer toolchains 2025-09-09 10:03:22 -04:00
at91sam Get rid of stupid _backlight_* function names 2015-01-12 11:09:27 +01:00
cortex-m arm: add ARM Cortex-M register definitions 2025-04-20 20:19:10 -04:00
imx31 gigabeats: Fix compilation with -fno-common 2025-08-05 07:25:23 -04:00
imx233 STMP37xx/iMX233: reduce popping noise on power on/off (Version 1) 2025-11-12 16:07:23 -05:00
ipod ipod: Small cleanup of piezo code on PP502x-based iPods 2025-10-01 20:46:43 -04:00
iriver Remove BATTERY_TYPES 2025-03-11 02:26:38 -04:00
olympus Remove BATTERY_TYPES 2025-03-11 02:26:38 -04:00
pbell Remove BATTERY_TYPES 2025-03-11 02:26:38 -04:00
philips Remove BATTERY_TYPES 2025-03-11 02:26:38 -04:00
pp IAP: First steps towards true multiport state 2025-08-20 07:56:43 -04:00
rk27xx misc: Ensure stacks are always aligned with the native pointer size. 2025-09-05 19:43:11 -04:00
s3c2440 arm: split ARM cache maintenance functions to separate header 2025-04-21 12:39:47 -04:00
s5l8700 IAP: First steps towards true multiport state 2025-08-20 07:56:43 -04:00
s5l8702 ipod6g: Improve power management with CE-ATA devices 2025-09-17 08:23:41 -04:00
samsung Remove BATTERY_TYPES 2025-03-11 02:26:38 -04:00
sandisk Remove BATTERY_TYPES 2025-03-11 02:26:38 -04:00
stm32 echoplayer: fix incorrect button reporting 2025-10-01 18:28:12 +01:00
tcc780x arm: split ARM cache maintenance functions to separate header 2025-04-21 12:39:47 -04:00
tms320dm320 misc: Fix some build warnings with gcc9 2025-09-21 00:18:28 -04:00
ata-as-arm.S arm: Use -masm-syntax-unified when compiling with gcc8 or newer 2024-05-08 21:45:42 -04:00
ata-nand-telechips.c storage: 64-bit sector offsets 2024-08-12 14:23:44 -04:00
bits-armv4.S Make atomic bit modification functions return previous value. 2017-10-30 21:43:15 -04:00
bits-armv6.S Make atomic bit modification functions return previous value. 2017-10-30 21:43:15 -04:00
cpucache-arm.h arm: split ARM cache maintenance functions to separate header 2025-04-21 12:39:47 -04:00
cpucache-armv7m.c arm: implement cache maintenance ops for ARMv7-M 2025-04-21 13:07:38 -04:00
cpucache-armv7m.h arm: implement cache maintenance ops for ARMv7-M 2025-04-21 13:07:38 -04:00
crt0.S Add boot data to MOST AS3525 Devices 2017-10-29 17:52:40 +01:00
i2c-telechips.c Remove bad mutex_* calls in telechips i2c driver 2017-08-10 21:53:55 -04:00
lcd-c200_c200v2.c Revert "Remove YUV blitting functions and LCD modes" 2022-10-13 11:08:06 -04:00
lcd-ssd1815.c Lcd save function pointer to frame buffer get_address_fn before loops 2022-03-21 23:53:48 -04:00
mmu-arm.h arm: split ARM cache maintenance functions to separate header 2025-04-21 12:39:47 -04:00
mmu-arm.S imx233: define HAVE_TEST_AND_CLEAN_CACHE 2012-06-07 14:48:43 +02:00
mmu-armv6.S S5L8720: Add support for TTB and MMU 2024-12-06 22:00:04 +02:00
nvic-arm.h arm: add NVIC utility functions 2025-04-21 13:07:38 -04:00
pcm-telechips.c Fix unified syntax in ARM inline assembly 2023-03-23 18:16:33 +00:00
powermgmt-ascodec.c ascodec (sansas) add a 10 minute delay before re-enabling charge 2024-12-19 12:11:38 -05:00
system-arm-classic.c arm: add initial ARM Cortex-M support 2025-04-18 13:19:42 -04:00
system-arm-classic.h arm: add initial ARM Cortex-M support 2025-04-18 13:19:42 -04:00
system-arm-micro.c New WIP port: Echo R1 2025-04-22 20:08:08 -04:00
system-arm-micro.h arm: add initial ARM Cortex-M support 2025-04-18 13:19:42 -04:00
system-arm.h arm: add initial ARM Cortex-M support 2025-04-18 13:19:42 -04:00
uc87xx.c Rename UC870x to UC87xx 2024-11-21 20:07:50 -05:00
usb-drv-arc.c usb: introduce new control request API 2021-10-16 15:58:43 -04:00
usb-s3c6400x.c usb: introduce new control request API 2021-10-16 15:58:43 -04:00
usb-tcc.c usb: introduce new control request API 2021-10-16 15:58:43 -04:00
vectors-arm-micro.S arm: add initial ARM Cortex-M support 2025-04-18 13:19:42 -04:00
wmcodec-telechips.c Nuke all TCC77x targets: iAudio 7, Sansa C100, M200(v1-3), Logik DAX 2021-04-26 07:41:51 -04:00