diff options
author | Marcin Bukat <marcin.bukat@gmail.com> | 2011-10-17 10:32:19 +0000 |
---|---|---|
committer | Marcin Bukat <marcin.bukat@gmail.com> | 2011-10-17 10:32:19 +0000 |
commit | 32f763c39a797221a6e850704feb3743bc104d8c (patch) | |
tree | c509c38423f2efb76a13119f92c21e5e82476a42 /firmware/export | |
parent | f0311d3310e84906a6c1afaf941f2f58e2063c30 (diff) | |
download | rockbox-32f763c39a797221a6e850704feb3743bc104d8c.tar.gz rockbox-32f763c39a797221a6e850704feb3743bc104d8c.zip |
Add HiFiMAN HM-60x target(s). FS#12319 by Andrew Ryabinin with some (small) modification by me. This also splits rk27xx lcd driver into lcdif-rk27xx and lcd controller specific part. Some modifications to the pcm driver have been made to allow using codecs in slave mode (as TDA1543 used in hifiman is slave only i2s codec).
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30765 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/export')
-rw-r--r-- | firmware/export/audiohw.h | 2 | ||||
-rw-r--r-- | firmware/export/config.h | 4 | ||||
-rw-r--r-- | firmware/export/config/hifimanhm60x.h | 183 | ||||
-rw-r--r-- | firmware/export/tda1543.h | 29 |
4 files changed, 218 insertions, 0 deletions
diff --git a/firmware/export/audiohw.h b/firmware/export/audiohw.h index 9956909b5d..e40ee6ee79 100644 --- a/firmware/export/audiohw.h +++ b/firmware/export/audiohw.h | |||
@@ -74,6 +74,8 @@ | |||
74 | #include "cs42l55.h" | 74 | #include "cs42l55.h" |
75 | #elif defined(HAVE_IMX233_CODEC) | 75 | #elif defined(HAVE_IMX233_CODEC) |
76 | #include "imx233-codec.h" | 76 | #include "imx233-codec.h" |
77 | #elif defined(HAVE_TDA1543) | ||
78 | #include "tda1543.h" | ||
77 | #endif | 79 | #endif |
78 | #if (CONFIG_PLATFORM & PLATFORM_HOSTED) | 80 | #if (CONFIG_PLATFORM & PLATFORM_HOSTED) |
79 | /* #include <SDL_audio.h> gives errors in other code areas, | 81 | /* #include <SDL_audio.h> gives errors in other code areas, |
diff --git a/firmware/export/config.h b/firmware/export/config.h index 1c55d232ef..0d0617bb13 100644 --- a/firmware/export/config.h +++ b/firmware/export/config.h | |||
@@ -140,6 +140,7 @@ | |||
140 | #define MPIO_HD300_PAD 47 | 140 | #define MPIO_HD300_PAD 47 |
141 | #define SANSA_FUZEPLUS_PAD 48 | 141 | #define SANSA_FUZEPLUS_PAD 48 |
142 | #define RK27XX_GENERIC_PAD 49 | 142 | #define RK27XX_GENERIC_PAD 49 |
143 | #define HM60X_PAD 50 | ||
143 | 144 | ||
144 | /* CONFIG_REMOTE_KEYPAD */ | 145 | /* CONFIG_REMOTE_KEYPAD */ |
145 | #define H100_REMOTE 1 | 146 | #define H100_REMOTE 1 |
@@ -226,6 +227,7 @@ | |||
226 | #define LCD_FUZEPLUS 41 | 227 | #define LCD_FUZEPLUS 41 |
227 | #define LCD_SPFD5420A 42 /* rk27xx */ | 228 | #define LCD_SPFD5420A 42 /* rk27xx */ |
228 | #define LCD_CLIPZIP 43 /* as used by the Sandisk Sansa Clip Zip */ | 229 | #define LCD_CLIPZIP 43 /* as used by the Sandisk Sansa Clip Zip */ |
230 | #define LCD_HX8340B 44 /* as used by the HiFiMAN HM-601/HM-602/HM-801 */ | ||
229 | 231 | ||
230 | /* LCD_PIXELFORMAT */ | 232 | /* LCD_PIXELFORMAT */ |
231 | #define HORIZONTAL_PACKING 1 | 233 | #define HORIZONTAL_PACKING 1 |
@@ -459,6 +461,8 @@ Lyre prototype 1 */ | |||
459 | #include "config/mpiohd300.h" | 461 | #include "config/mpiohd300.h" |
460 | #elif defined(RK27_GENERIC) | 462 | #elif defined(RK27_GENERIC) |
461 | #include "config/rk27generic.h" | 463 | #include "config/rk27generic.h" |
464 | #elif defined(HM60X) | ||
465 | #include "config/hifimanhm60x.h" | ||
462 | #elif defined(SDLAPP) | 466 | #elif defined(SDLAPP) |
463 | #include "config/sdlapp.h" | 467 | #include "config/sdlapp.h" |
464 | #elif defined(ANDROID) | 468 | #elif defined(ANDROID) |
diff --git a/firmware/export/config/hifimanhm60x.h b/firmware/export/config/hifimanhm60x.h new file mode 100644 index 0000000000..88af364bc9 --- /dev/null +++ b/firmware/export/config/hifimanhm60x.h | |||
@@ -0,0 +1,183 @@ | |||
1 | /* | ||
2 | * This config file is for HiFiMAN HM-60x reference design | ||
3 | */ | ||
4 | #define TARGET_TREE /* this target is using the target tree system */ | ||
5 | |||
6 | /* For Rolo and boot loader */ | ||
7 | #define MODEL_NUMBER 79 | ||
8 | |||
9 | #define MODEL_NAME "HiFiMAN HM-60x" | ||
10 | |||
11 | /* Define bitmask of input sources - recordable bitmask can be defined | ||
12 | explicitly if different */ | ||
13 | /* #define INPUT_SRC_CAPS (SRC_CAP_MIC | SRC_CAP_FM) */ | ||
14 | |||
15 | /* define the bitmask of hardware sample rates */ | ||
16 | #define HW_SAMPR_CAPS (SAMPR_CAP_96 | SAMPR_CAP_48 | SAMPR_CAP_44 | \ | ||
17 | SAMPR_CAP_32 | SAMPR_CAP_24 | SAMPR_CAP_22 | \ | ||
18 | SAMPR_CAP_16 | SAMPR_CAP_12 | SAMPR_CAP_11 | SAMPR_CAP_8) | ||
19 | |||
20 | #define HAVE_TDA1543 | ||
21 | #define CODEC_SLAVE | ||
22 | /* define this if you have a bitmap LCD display */ | ||
23 | #define HAVE_LCD_BITMAP | ||
24 | |||
25 | /* define this if you can flip your LCD */ | ||
26 | /* #define HAVE_LCD_FLIP */ | ||
27 | |||
28 | /* define this if you have a colour LCD */ | ||
29 | #define HAVE_LCD_COLOR | ||
30 | |||
31 | /* define this if you want album art for this target */ | ||
32 | #define HAVE_ALBUMART | ||
33 | |||
34 | /* define this to enable bitmap scaling */ | ||
35 | #define HAVE_BMP_SCALING | ||
36 | |||
37 | /* define this to enable JPEG decoding */ | ||
38 | #define HAVE_JPEG | ||
39 | |||
40 | /* define this if you can invert the colours on your LCD */ | ||
41 | /* #define HAVE_LCD_INVERT */ | ||
42 | |||
43 | /* define this if you have access to the quickscreen */ | ||
44 | #define HAVE_QUICKSCREEN | ||
45 | |||
46 | /* define this if you have access to the pitchscreen */ | ||
47 | #define HAVE_PITCHSCREEN | ||
48 | |||
49 | /* define this if you would like tagcache to build on this target */ | ||
50 | #define HAVE_TAGCACHE | ||
51 | |||
52 | /* define this if you have a flash memory storage */ | ||
53 | #define HAVE_FLASH_STORAGE | ||
54 | |||
55 | #define CONFIG_STORAGE (STORAGE_SD | STORAGE_NAND) | ||
56 | |||
57 | #define CONFIG_NAND NAND_RK27XX | ||
58 | #define HAVE_SW_TONE_CONTROLS | ||
59 | |||
60 | /* commented for now */ | ||
61 | /* #define HAVE_HOTSWAP */ | ||
62 | |||
63 | #define NUM_DRIVES 2 | ||
64 | #define SECTOR_SIZE 512 | ||
65 | |||
66 | /* for small(ish) SD cards */ | ||
67 | #define HAVE_FAT16SUPPORT | ||
68 | |||
69 | /* LCD dimensions */ | ||
70 | #define LCD_WIDTH 220 | ||
71 | #define LCD_HEIGHT 176 | ||
72 | #define LCD_DEPTH 16 /* pseudo 262.144 colors */ | ||
73 | #define LCD_PIXELFORMAT RGB565 /* rgb565 */ | ||
74 | |||
75 | /* Define this if the LCD can shut down */ | ||
76 | /* #define HAVE_LCD_SHUTDOWN */ | ||
77 | |||
78 | /* Define this if your LCD can be enabled/disabled */ | ||
79 | /* #define HAVE_LCD_ENABLE */ | ||
80 | |||
81 | /* Define this if your LCD can be put to sleep. HAVE_LCD_ENABLE | ||
82 | should be defined as well. */ | ||
83 | #ifndef BOOTLOADER | ||
84 | /* TODO: #define HAVE_LCD_SLEEP */ | ||
85 | /* TODO: #define HAVE_LCD_SLEEP_SETTING */ | ||
86 | #endif | ||
87 | |||
88 | #define CONFIG_KEYPAD HM60X_PAD | ||
89 | |||
90 | /* Define this to enable morse code input */ | ||
91 | #define HAVE_MORSE_INPUT | ||
92 | |||
93 | /* Define this if you do software codec */ | ||
94 | #define CONFIG_CODEC SWCODEC | ||
95 | |||
96 | /* define this if you have a real-time clock */ | ||
97 | /* #define CONFIG_RTC RTC_NANO2G */ | ||
98 | |||
99 | /* Define if the device can wake from an RTC alarm */ | ||
100 | /* #define HAVE_RTC_ALARM */ | ||
101 | |||
102 | #define CONFIG_LCD LCD_HX8340B | ||
103 | |||
104 | /* Define the type of audio codec */ | ||
105 | /*#define HAVE_RK27XX_CODEC */ | ||
106 | |||
107 | /* #define HAVE_PCM_DMA_ADDRESS */ | ||
108 | |||
109 | /* Define this for LCD backlight available */ | ||
110 | #define HAVE_BACKLIGHT | ||
111 | #define HAVE_BACKLIGHT_BRIGHTNESS | ||
112 | #define MIN_BRIGHTNESS_SETTING 0 | ||
113 | #define MAX_BRIGHTNESS_SETTING 31 | ||
114 | #define DEFAULT_BRIGHTNESS_SETTING 20 | ||
115 | #define CONFIG_BACKLIGHT_FADING BACKLIGHT_FADING_SW_HW_REG | ||
116 | |||
117 | /* Define this if you have a software controlled poweroff */ | ||
118 | #define HAVE_SW_POWEROFF | ||
119 | |||
120 | /* The number of bytes reserved for loadable codecs */ | ||
121 | #define CODEC_SIZE 0x100000 | ||
122 | |||
123 | /* The number of bytes reserved for loadable plugins */ | ||
124 | #define PLUGIN_BUFFER_SIZE 0x80000 | ||
125 | |||
126 | /* TODO: Figure out real values */ | ||
127 | #define BATTERY_CAPACITY_DEFAULT 600 /* default battery capacity */ | ||
128 | #define BATTERY_CAPACITY_MIN 300 /* min. capacity selectable */ | ||
129 | #define BATTERY_CAPACITY_MAX 600 /* max. capacity selectable */ | ||
130 | #define BATTERY_CAPACITY_INC 10 /* capacity increment */ | ||
131 | #define BATTERY_TYPES_COUNT 1 /* only one type */ | ||
132 | |||
133 | /* Hardware controlled charging with monitoring */ | ||
134 | #define CONFIG_CHARGING CHARGING_MONITOR | ||
135 | |||
136 | /* define current usage levels */ | ||
137 | /* TODO: #define CURRENT_NORMAL | ||
138 | * TODO: #define CURRENT_BACKLIGHT 23 | ||
139 | */ | ||
140 | |||
141 | /* define this if the unit can be powered or charged via USB */ | ||
142 | #define HAVE_USB_POWER | ||
143 | |||
144 | /* USB On-the-go */ | ||
145 | #define CONFIG_USBOTG USBOTG_RK27XX | ||
146 | |||
147 | /* enable these for the experimental usb stack */ | ||
148 | #define HAVE_USBSTACK | ||
149 | |||
150 | #define USE_ROCKBOX_USB | ||
151 | #define USB_VENDOR_ID 0x071b | ||
152 | #define USB_PRODUCT_ID 0x3202 | ||
153 | #define HAVE_BOOTLOADER_USB_MODE | ||
154 | |||
155 | /* Define this if your LCD can set contrast */ | ||
156 | /* #define HAVE_LCD_CONTRAST */ | ||
157 | |||
158 | /* The exact type of CPU */ | ||
159 | #define CONFIG_CPU RK27XX | ||
160 | |||
161 | /* I2C interface */ | ||
162 | #define CONFIG_I2C I2C_RK27XX | ||
163 | |||
164 | /* Define this to the CPU frequency */ | ||
165 | #define CPU_FREQ 200000000 | ||
166 | |||
167 | /* define this if the hardware can be powered off while charging */ | ||
168 | /* #define HAVE_POWEROFF_WHILE_CHARGING */ | ||
169 | |||
170 | /* Offset ( in the firmware file's header ) to the file CRC */ | ||
171 | #define FIRMWARE_OFFSET_FILE_CRC 0 | ||
172 | |||
173 | /* Offset ( in the firmware file's header ) to the real data */ | ||
174 | #define FIRMWARE_OFFSET_FILE_DATA 8 | ||
175 | |||
176 | #define STORAGE_NEEDS_ALIGN | ||
177 | |||
178 | /* Define this if you have adjustable CPU frequency */ | ||
179 | /* #define HAVE_ADJUSTABLE_CPU_FREQ */ | ||
180 | |||
181 | #define BOOTFILE_EXT "rk27" | ||
182 | #define BOOTFILE "rockbox." BOOTFILE_EXT | ||
183 | #define BOOTDIR "/.rockbox" | ||
diff --git a/firmware/export/tda1543.h b/firmware/export/tda1543.h new file mode 100644 index 0000000000..6561f0823a --- /dev/null +++ b/firmware/export/tda1543.h | |||
@@ -0,0 +1,29 @@ | |||
1 | /*************************************************************************** | ||
2 | * __________ __ ___. | ||
3 | * Open \______ \ ____ ____ | | _\_ |__ _______ ___ | ||
4 | * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / | ||
5 | * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < | ||
6 | * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ | ||
7 | * \/ \/ \/ \/ \/ | ||
8 | * $Id$ | ||
9 | * | ||
10 | * | ||
11 | * Copyright (c) 2011 Andrew Ryabinin | ||
12 | * | ||
13 | * This program is free software; you can redistribute it and/or | ||
14 | * modify it under the terms of the GNU General Public License | ||
15 | * as published by the Free Software Foundation; either version 2 | ||
16 | * of the License, or (at your option) any later version. | ||
17 | * | ||
18 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY | ||
19 | * KIND, either express or implied. | ||
20 | * | ||
21 | ****************************************************************************/ | ||
22 | #ifndef __TDA1543_H_ | ||
23 | #define __TDA1543_H_ | ||
24 | |||
25 | #define VOLUME_MIN -1 | ||
26 | #define VOLUME_MAX 0 | ||
27 | |||
28 | |||
29 | #endif /* __TDA1543_H_ */ | ||