diff options
author | Karl Kurbjun <kkurbjun@gmail.com> | 2009-10-11 06:08:14 +0000 |
---|---|---|
committer | Karl Kurbjun <kkurbjun@gmail.com> | 2009-10-11 06:08:14 +0000 |
commit | 173d854e7f10c51969ccf237074aa8dfcc083c7f (patch) | |
tree | 849e8f665ab2201ddce068bb6b0bf92ea0ce2c1d /firmware/drivers/audio | |
parent | 14079c39f0525e4ddb3951e3cf8a2aa52b170d77 (diff) |
M:Robe 500: Add support for more audio frequencies, initialize and set the touchscreen PWD pin.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23089 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/drivers/audio')
-rw-r--r-- | firmware/drivers/audio/tsc2100.c | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/firmware/drivers/audio/tsc2100.c b/firmware/drivers/audio/tsc2100.c index 8a71d57e78..a926b4464b 100644 --- a/firmware/drivers/audio/tsc2100.c +++ b/firmware/drivers/audio/tsc2100.c @@ -116,5 +116,23 @@ void audiohw_close(void) void audiohw_set_frequency(int fsel) { - (void)fsel; + int reg_val; + reg_val = tsc2100_readreg(TSAC1_PAGE, TSAC1_ADDRESS); + + reg_val &= ~(0x07<<3); + + switch(fsel) + { + case HW_FREQ_8: + reg_val |= (0x06<<3); + break; + case HW_FREQ_11: + reg_val |= (0x04<<3); + break; + case HW_FREQ_44: + default: + break; + } + + tsc2100_writereg(TSAC1_PAGE, TSAC1_ADDRESS, reg_val); } |