diff options
author | Michael Sevakis <jethead71@rockbox.org> | 2008-11-25 16:16:06 +0000 |
---|---|---|
committer | Michael Sevakis <jethead71@rockbox.org> | 2008-11-25 16:16:06 +0000 |
commit | 3511d94031d617631036742a51bc8fc9a86527d6 (patch) | |
tree | 1130bfd351ac0796999b831475b33df4d877c6d3 /firmware/target/arm | |
parent | 2b39cb4b77f2ac8ce7601e8e0673e598f8fffbe8 (diff) |
Add register bit defines for as3514 and clean stuff up. Reduce poppiness at startup and shutdown (and even powerup for e200). Really, I can't honestly say it will help anything but an e200v1 but I'm sick of the noises. ;)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19214 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/target/arm')
-rw-r--r-- | firmware/target/arm/ascodec-pp.c | 24 | ||||
-rw-r--r-- | firmware/target/arm/ascodec-target.h | 2 | ||||
-rw-r--r-- | firmware/target/arm/pcm-pp.c | 2 |
3 files changed, 21 insertions, 7 deletions
diff --git a/firmware/target/arm/ascodec-pp.c b/firmware/target/arm/ascodec-pp.c index 30b6b1f8de..ac45cddc14 100644 --- a/firmware/target/arm/ascodec-pp.c +++ b/firmware/target/arm/ascodec-pp.c @@ -39,10 +39,6 @@ void audiohw_init(void) DEV_INIT1 &=~0x3000000; /*mini2?*/ - /* device reset */ - DEV_RS |= DEV_I2S; - DEV_RS &=~DEV_I2S; - /* I2S device reset */ DEV_RS |= DEV_I2S; DEV_RS &=~DEV_I2S; @@ -56,11 +52,27 @@ void audiohw_init(void) /* external dev clock to 24MHz */ outl(inl(0x70000018) & ~0xc, 0x70000018); +#ifdef SANSA_E200 + /* Prevent pops on startup */ + GPIOG_ENABLE |= 0x08; + GPIO_SET_BITWISE(GPIOG_OUTPUT_VAL, 0x08); + GPIOG_OUTPUT_EN |= 0x08; +#endif + i2s_reset(); audiohw_preinit(); } -void audiohw_postinit(void) +void ascodec_supressor_on(bool on) { -} +#ifdef SANSA_E200 + if (on) { + /* Set pop prevention */ + GPIO_SET_BITWISE(GPIOG_OUTPUT_VAL, 0x08); + } else { + /* Release pop prevention */ + GPIO_CLEAR_BITWISE(GPIOG_OUTPUT_VAL, 0x08); + } +#endif +} diff --git a/firmware/target/arm/ascodec-target.h b/firmware/target/arm/ascodec-target.h index 3337cb78b9..e26afa840c 100644 --- a/firmware/target/arm/ascodec-target.h +++ b/firmware/target/arm/ascodec-target.h @@ -59,6 +59,8 @@ static inline void ascodec_unlock(void) i2c_unlock(); } +extern void ascodec_supressor_on(bool on); + #endif /* CPU_PP */ #endif /* !_ASCODEC_TARGET_H */ diff --git a/firmware/target/arm/pcm-pp.c b/firmware/target/arm/pcm-pp.c index 2f25353fff..c572578383 100644 --- a/firmware/target/arm/pcm-pp.c +++ b/firmware/target/arm/pcm-pp.c @@ -374,7 +374,7 @@ void pcm_play_dma_init(void) audiohw_init(); #if !defined(HAVE_WM8731) && !defined(HAVE_WM8751) && !defined(HAVE_WM8975) \ - && !defined(HAVE_WM8758) + && !defined(HAVE_WM8758) && !defined(HAVE_AS3514) /* Power on */ audiohw_enable_output(true); /* Unmute the master channel (DAC should be at zero point now). */ |