diff options
author | Thomas Martitz <kugel@rockbox.org> | 2011-12-24 17:59:43 +0000 |
---|---|---|
committer | Thomas Martitz <kugel@rockbox.org> | 2011-12-24 17:59:43 +0000 |
commit | a1d3ed25346ab4174cb7fd066158cebc8e29fc79 (patch) | |
tree | 9418cafbf4dbbc9b34ab31f1fc5123446204f645 /firmware/drivers/audio/as3514.c | |
parent | 2ec443df12cda09bd5fee6f9857bca17b7e6aa3f (diff) | |
download | rockbox-a1d3ed25346ab4174cb7fd066158cebc8e29fc79.tar.gz rockbox-a1d3ed25346ab4174cb7fd066158cebc8e29fc79.zip |
ypr0: Cleanup and simplify ascodec functions. Fix audiohw_{pre,post}init() not being called.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31423 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/drivers/audio/as3514.c')
-rw-r--r-- | firmware/drivers/audio/as3514.c | 28 |
1 files changed, 1 insertions, 27 deletions
diff --git a/firmware/drivers/audio/as3514.c b/firmware/drivers/audio/as3514.c index 0fe3070c19..a430afdf88 100644 --- a/firmware/drivers/audio/as3514.c +++ b/firmware/drivers/audio/as3514.c @@ -78,13 +78,12 @@ const struct sound_settings_info audiohw_settings[] = { #endif }; -#ifndef SAMSUNG_YPR0 /* Shadow registers */ static uint8_t as3514_regs[AS3514_NUM_AUDIO_REGS]; /* 8-bit registers */ /* * little helper method to set register values. - * With the help of as3514_regs, we minimize i2c + * With the help of as3514_regs, we minimize i2c/syscall * traffic. */ static void as3514_write(unsigned int reg, unsigned int value) @@ -111,29 +110,7 @@ static void as3514_write_masked(unsigned int reg, unsigned int bits, { as3514_write(reg, (as3514_regs[reg] & ~mask) | (bits & mask)); } -#else -static void as3514_write(unsigned int reg, unsigned int value) -{ - ascodec_write(reg, value); -} -/* Helpers to set/clear bits */ -static void as3514_set(unsigned int reg, unsigned int bits) -{ - ascodec_write(reg, ascodec_read(reg) | bits); -} - -static void as3514_clear(unsigned int reg, unsigned int bits) -{ - ascodec_write(reg, ascodec_read(reg) & ~bits); -} - -static void as3514_write_masked(unsigned int reg, unsigned int bits, - unsigned int mask) -{ - ascodec_write(reg, (ascodec_read(reg) & ~mask) | (bits & mask)); -} -#endif /* convert tenth of dB volume to master volume register value */ int tenthdb2master(int db) { @@ -168,11 +145,8 @@ int sound_val2phys(int setting, int value) */ void audiohw_preinit(void) { - -#ifndef SAMSUNG_YPR0 /* read all reg values */ ascodec_readbytes(0x0, AS3514_NUM_AUDIO_REGS, as3514_regs); -#endif #ifdef HAVE_AS3543 |