rockbox/firmware
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
..
asm arm: add ARMv7-M version of ARMv6 mixer code 2025-04-18 10:57:45 -04:00
common disk: Minor cleanups with respect to virtual<->logical sector mapping 2025-09-22 22:12:59 -04:00
drivers 3ds: 3ds port sources. Second set of two. 2025-10-23 20:09:12 -04:00
export 3ds: 3ds port sources. Second set of two. 2025-10-23 20:09:12 -04:00
include 3ds: 3ds port sources. First set of two 2025-10-23 20:09:09 -04:00
kernel 3ds: 3ds port sources. First set of two 2025-10-23 20:09:09 -04:00
libc isdigit replace with a slightly faster and shorter conditional 2025-02-02 13:57:58 -05:00
target STMP37xx/iMX233: reduce popping noise on power on/off (Version 1) 2025-11-12 16:07:23 -05:00
usbstack usb: Partial revert of previous commit 2025-10-05 15:56:00 -04:00
arabjoin.c
arabjoin.h unicode: Support characters beyond the first unicode plane 2025-09-12 09:24:30 -04:00
ata_idle_notify.c misc: Clean up a large pile of -Wexpansion-to-defined warnings 2025-04-21 21:04:05 -04:00
backlight-sw-fading.c For backlights that have a wide control, support skipping steps. 2020-10-02 02:45:43 +00:00
backlight.c [Bugfix] call lcd_awake() unconditioanlly on shutdown for devices with HAVE_LCD_SLEEP 2025-01-05 10:59:46 -05:00
bidi.c unicode: Support characters beyond the first unicode plane 2025-09-12 09:24:30 -04:00
buflib_malloc.c buflib_malloc: fixed signed/unsigned comparison 2023-01-16 16:57:23 +00:00
buflib_mempool.c buflib: Add pinned get/put data functions 2023-01-15 11:06:27 +00:00
chunk_alloc.c [BugFix] chunk_alloc pass NULL to buflib_shrink 2023-03-09 20:15:38 -05:00
COPYING
core_alloc.c hosted: Shrink audiobuffer to (MEMORY_SIZE-1) megabytes 2025-09-12 23:15:11 -04:00
debug.c [1/4] Remove SH support and all archos targets 2020-07-24 21:20:13 +00:00
eeprom_settings.c
enc_base.c FS#12378 : Remove various unused code, and comment out some unused code and data for reference or future use. 2011-12-14 21:45:25 +00:00
events.c events.c clean-up 2022-12-30 07:23:29 -05:00
firmware.make build: Various LTO fixes 2024-11-24 08:43:23 -05:00
font.c unicode: Support characters beyond the first unicode plane 2025-09-12 09:24:30 -04:00
font_cache.c unicode: Support characters beyond the first unicode plane 2025-09-12 09:24:30 -04:00
general.c replace strlcpy with strmemccpy 2022-11-14 23:56:16 -05:00
hangul.c unicode: Support characters beyond the first unicode plane 2025-09-12 09:24:30 -04:00
linuxboot.c buflib_shrink use NULL to signal start isn't changing 2023-01-13 09:50:29 -05:00
load_code.c Fix various reds. Some includes needed fixup. 2014-03-03 19:10:48 +01:00
logf.c logf: Fix an incorrect fix in 835d0c737a 2021-08-15 09:03:16 -04:00
lru.c
panic.c arm: add initial ARM Cortex-M support 2025-04-18 13:19:42 -04:00
pcm.c Rework auto playback frequency switch 2023-10-28 15:11:07 -04:00
pcm_mixer.c pcm_mixer: Fix an idle frame calculation bug introduced in 2e708c48c5 2020-10-24 02:00:50 +00:00
pcm_sampr.c pcm: Missed a file for the 192/176K playback. 2020-09-30 22:03:34 -04:00
pcm_sw_volume.c move PCM_NATIVE_BITDEPTH definiton into global config code 2021-08-07 11:18:19 -04:00
powermgmt.c misc: Ensure stacks are always aligned with the native pointer size. 2025-09-05 19:43:11 -04:00
profile.c
README
rolo.c nwze370: improve lcd & backlight 2025-10-21 16:54:57 -04:00
rom.lds h300: add support for ROM image generation 2020-10-26 01:37:42 +00:00
screendump.c Fix path buffer overflow in screendump 2021-08-06 15:46:53 +00:00
scroll_engine.c misc: Ensure stacks are always aligned with the native pointer size. 2025-09-05 19:43:11 -04:00
sdmmc.c SD: Move sd_parse_csd() into common sdmmc code 2025-08-22 14:48:28 -04:00
sound.c sound: fix volume change being reported to %mv tag on boot 2025-10-03 10:01:02 +01:00
SOURCES 3ds: 3ds port sources. First set of two 2025-10-23 20:09:09 -04:00
storage.c ata: Rework how flushing, sleeping, and power off interacts 2024-10-31 12:51:54 -04:00
system.c Add ability to dump cpu boost log to disk, include thread names 2021-09-30 21:13:22 -04:00
timer.c Fix timer Agptek Rocker (other hosted players) 2019-10-17 21:19:00 +02:00
tuner.c [1/4] Remove SH support and all archos targets 2020-07-24 21:20:13 +00:00
usb.c IAP: First steps towards true multiport state 2025-08-20 07:56:43 -04:00

See docs/README