summaryrefslogtreecommitdiff
path: root/firmware/export
diff options
context:
space:
mode:
authorSolomon Peachy <pizza@shaftnet.org>2018-06-29 16:09:28 -0400
committerSolomon Peachy <pizza@shaftnet.org>2019-01-02 08:10:01 -0500
commitd4942cc74c82c465ea395637c77ed06565b8b497 (patch)
tree8c1fa737c93f8a2ade5a1566857dc4dc8f578bd6 /firmware/export
parentaf9459a7992596e932c6d8cc0a6366ff0f0b0fca (diff)
downloadrockbox-d4942cc74c82c465ea395637c77ed06565b8b497.tar.gz
rockbox-d4942cc74c82c465ea395637c77ed06565b8b497.zip
Add Xuelin iHIFI 770/770C/800 support
Taken from the xvortex fork (Roman Stolyarov) Ported, rebased, and cleaned up by myself. Change-Id: I7b2bca2d29502f2e4544e42f3d122786dd4b7978
Diffstat (limited to 'firmware/export')
-rw-r--r--firmware/export/audiohw.h6
-rw-r--r--firmware/export/config.h17
-rw-r--r--firmware/export/config/ihifi770.h197
-rw-r--r--firmware/export/config/ihifi770c.h197
-rw-r--r--firmware/export/config/ihifi800.h198
-rw-r--r--firmware/export/config/rk27generic.h2
-rw-r--r--firmware/export/es9018.h39
-rw-r--r--firmware/export/rk27xx.h5
-rw-r--r--firmware/export/wm8740.h83
9 files changed, 738 insertions, 6 deletions
diff --git a/firmware/export/audiohw.h b/firmware/export/audiohw.h
index 09001c8045..458fba3412 100644
--- a/firmware/export/audiohw.h
+++ b/firmware/export/audiohw.h
@@ -165,6 +165,8 @@ struct sound_settings_info
165#include "uda1380.h" 165#include "uda1380.h"
166#elif defined(HAVE_UDA1341) 166#elif defined(HAVE_UDA1341)
167#include "uda1341.h" 167#include "uda1341.h"
168#elif defined(HAVE_WM8740)
169#include "wm8740.h"
168#elif defined(HAVE_WM8750) || defined(HAVE_WM8751) 170#elif defined(HAVE_WM8750) || defined(HAVE_WM8751)
169#include "wm8751.h" 171#include "wm8751.h"
170#elif defined(HAVE_WM8978) 172#elif defined(HAVE_WM8978)
@@ -211,6 +213,8 @@ struct sound_settings_info
211#include "nwzlinux_codec.h" 213#include "nwzlinux_codec.h"
212#elif defined(HAVE_CS4398) 214#elif defined(HAVE_CS4398)
213#include "cs4398.h" 215#include "cs4398.h"
216#elif defined(HAVE_ES9018)
217#include "es9018.h"
214#elif (CONFIG_PLATFORM & (PLATFORM_ANDROID | PLATFORM_MAEMO\ 218#elif (CONFIG_PLATFORM & (PLATFORM_ANDROID | PLATFORM_MAEMO\
215 | PLATFORM_PANDORA | PLATFORM_SDL)) 219 | PLATFORM_PANDORA | PLATFORM_SDL))
216#include "hosted_codec.h" 220#include "hosted_codec.h"
@@ -571,7 +575,7 @@ void audiohw_set_depth_3d(int val);
571#ifdef AUDIOHW_HAVE_FILTER_ROLL_OFF 575#ifdef AUDIOHW_HAVE_FILTER_ROLL_OFF
572/** 576/**
573 * Set DAC's oversampling filter roll-off. 577 * Set DAC's oversampling filter roll-off.
574 * @param val 0 - sharp roll-off, 1 - slow roll-off. 578 * @param val 0 - sharp roll-off, 1 - slow roll-off, 2 - short roll-off, 3 - bypass.
575 * NOTE: AUDIOHW_CAPS need to contain 579 * NOTE: AUDIOHW_CAPS need to contain
576 * FILTER_ROLL_OFF_CAP 580 * FILTER_ROLL_OFF_CAP
577 */ 581 */
diff --git a/firmware/export/config.h b/firmware/export/config.h
index 8b177963d3..2db12bea4a 100644
--- a/firmware/export/config.h
+++ b/firmware/export/config.h
@@ -169,6 +169,8 @@
169#define SONY_NWZA860_PAD 64 /* The NWZ-A860 is too different (touchscreen) */ 169#define SONY_NWZA860_PAD 64 /* The NWZ-A860 is too different (touchscreen) */
170#define AGPTEK_ROCKER_PAD 65 170#define AGPTEK_ROCKER_PAD 65
171#define XDUOO_X3_PAD 66 171#define XDUOO_X3_PAD 66
172#define IHIFI_770_PAD 67
173#define IHIFI_800_PAD 68
172 174
173/* CONFIG_REMOTE_KEYPAD */ 175/* CONFIG_REMOTE_KEYPAD */
174#define H100_REMOTE 1 176#define H100_REMOTE 1
@@ -284,6 +286,9 @@
284#define LCD_NWZ_LINUX 63 /* as used in the Linux-based NWZ series */ 286#define LCD_NWZ_LINUX 63 /* as used in the Linux-based NWZ series */
285#define LCD_INGENIC_LINUX 64 287#define LCD_INGENIC_LINUX 64
286#define LCD_XDUOOX3 65 /* as used by the xDuoo X3 */ 288#define LCD_XDUOOX3 65 /* as used by the xDuoo X3 */
289#define LCD_IHIFI770 66 /* as used by IHIFI 770 */
290#define LCD_IHIFI770C 67 /* as used by IHIFI 770C */
291#define LCD_IHIFI800 68 /* as used by IHIFI 800 */
287 292
288/* LCD_PIXELFORMAT */ 293/* LCD_PIXELFORMAT */
289#define HORIZONTAL_PACKING 1 294#define HORIZONTAL_PACKING 1
@@ -581,6 +586,12 @@ Lyre prototype 1 */
581#include "config/samsungypz5.h" 586#include "config/samsungypz5.h"
582#elif defined(IHIFI760) 587#elif defined(IHIFI760)
583#include "config/ihifi760.h" 588#include "config/ihifi760.h"
589#elif defined(IHIFI770)
590#include "config/ihifi770.h"
591#elif defined(IHIFI770C)
592#include "config/ihifi770c.h"
593#elif defined(IHIFI800)
594#include "config/ihifi800.h"
584#elif defined(IHIFI960) 595#elif defined(IHIFI960)
585#include "config/ihifi960.h" 596#include "config/ihifi960.h"
586#elif defined(CREATIVE_ZENXFISTYLE) 597#elif defined(CREATIVE_ZENXFISTYLE)
@@ -974,7 +985,6 @@ Lyre prototype 1 */
974#define USB_STATUS_BY_EVENT 985#define USB_STATUS_BY_EVENT
975#define USB_DETECT_BY_REQUEST 986#define USB_DETECT_BY_REQUEST
976#elif CONFIG_USBOTG == USBOTG_RK27XX 987#elif CONFIG_USBOTG == USBOTG_RK27XX
977#define USB_STATUS_BY_EVENT
978#define USB_DETECT_BY_REQUEST 988#define USB_DETECT_BY_REQUEST
979#endif /* CONFIG_USB == */ 989#endif /* CONFIG_USB == */
980#endif /* HAVE_USBSTACK */ 990#endif /* HAVE_USBSTACK */
@@ -1193,7 +1203,7 @@ Lyre prototype 1 */
1193#endif /* HAVE_USB_CHARGING_ENABLE && HAVE_USBSTACK */ 1203#endif /* HAVE_USB_CHARGING_ENABLE && HAVE_USBSTACK */
1194 1204
1195#ifndef SIMULATOR 1205#ifndef SIMULATOR
1196#if defined(HAVE_USBSTACK) || (CONFIG_STORAGE & STORAGE_NAND) 1206#if defined(HAVE_USBSTACK) || (CONFIG_STORAGE & STORAGE_NAND) || (CONFIG_STORAGE & STORAGE_RAMDISK)
1197#define STORAGE_GET_INFO 1207#define STORAGE_GET_INFO
1198#endif 1208#endif
1199#endif 1209#endif
@@ -1211,7 +1221,8 @@ Lyre prototype 1 */
1211 (CONFIG_USBOTG == USBOTG_JZ4760) || \ 1221 (CONFIG_USBOTG == USBOTG_JZ4760) || \
1212 (CONFIG_USBOTG == USBOTG_M66591) || \ 1222 (CONFIG_USBOTG == USBOTG_M66591) || \
1213 (CONFIG_USBOTG == USBOTG_DESIGNWARE) || \ 1223 (CONFIG_USBOTG == USBOTG_DESIGNWARE) || \
1214 (CONFIG_USBOTG == USBOTG_AS3525) 1224 (CONFIG_USBOTG == USBOTG_AS3525) || \
1225 (CONFIG_USBOTG == USBOTG_RK27XX)
1215#define USB_HAS_BULK 1226#define USB_HAS_BULK
1216#define USB_HAS_INTERRUPT 1227#define USB_HAS_INTERRUPT
1217#elif defined(CPU_TCC780X) || defined(CPU_TCC77X) 1228#elif defined(CPU_TCC780X) || defined(CPU_TCC77X)
diff --git a/firmware/export/config/ihifi770.h b/firmware/export/config/ihifi770.h
new file mode 100644
index 0000000000..af7acff206
--- /dev/null
+++ b/firmware/export/config/ihifi770.h
@@ -0,0 +1,197 @@
1/*
2 * This config file is for IHIFI 770
3 */
4
5/* For Rolo and boot loader */
6#define MODEL_NUMBER 108
7
8#define MODEL_NAME "IHIFI 770"
9
10/* Define bitmask of input sources - recordable bitmask can be defined
11 explicitly if different */
12/* #define INPUT_SRC_CAPS (SRC_CAP_MIC | SRC_CAP_FM) */
13
14/* define the bitmask of hardware sample rates */
15#define HW_SAMPR_CAPS (SAMPR_CAP_96 | SAMPR_CAP_48 | SAMPR_CAP_44 | \
16 SAMPR_CAP_32 | SAMPR_CAP_24 | SAMPR_CAP_22 | \
17 SAMPR_CAP_16 | SAMPR_CAP_12 | SAMPR_CAP_11 | SAMPR_CAP_8)
18
19#define HAVE_WM8740
20#define CODEC_SLAVE
21
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 would like tagcache to build on this target */
47#define HAVE_TAGCACHE
48
49/* define this if you have a flash memory storage */
50#define HAVE_FLASH_STORAGE
51
52#define CONFIG_STORAGE (STORAGE_SD | STORAGE_NAND)
53
54#define CONFIG_NAND NAND_RK27XX
55#define HAVE_SW_TONE_CONTROLS
56
57#define HAVE_HOTSWAP
58
59#define NUM_DRIVES 1
60#define SECTOR_SIZE 512
61
62/* for small(ish) SD cards */
63#define HAVE_FAT16SUPPORT
64
65/* LCD dimensions */
66#define LCD_WIDTH 320
67#define LCD_HEIGHT 240
68/* sqrt(320^2 + 240^2) / 2.4 = 166.7 */
69#define LCD_DPI 167
70#define LCD_DEPTH 16 /* pseudo 262.144 colors */
71#define LCD_PIXELFORMAT RGB565 /* rgb565 */
72
73/* Define this if the LCD can shut down */
74/* #define HAVE_LCD_SHUTDOWN */
75
76/* Define this if your LCD can be enabled/disabled */
77#define HAVE_LCD_ENABLE
78
79/* Define this if your LCD can be put to sleep. HAVE_LCD_ENABLE
80 should be defined as well. */
81#ifndef BOOTLOADER
82/* TODO: #define HAVE_LCD_SLEEP */
83/* TODO: #define HAVE_LCD_SLEEP_SETTING */
84#endif
85
86#define CONFIG_KEYPAD IHIFI_770_PAD
87
88/* define this if the target has volume keys which can be used in the lists */
89#define HAVE_VOLUME_IN_LIST
90
91/* Define this if a programmable hotkey is mapped */
92/* #define HAVE_HOTKEY */
93
94/* Define this if you do software codec */
95#define CONFIG_CODEC SWCODEC
96
97/* define this if you have a real-time clock */
98/* #define CONFIG_RTC RTC_NANO2G */
99
100/* Define if the device can wake from an RTC alarm */
101/* #define HAVE_RTC_ALARM */
102
103/* Define the type of audio codec */
104/*#define HAVE_RK27XX_CODEC */
105
106/* #define HAVE_PCM_DMA_ADDRESS */
107
108/* Define this for LCD backlight available */
109#define HAVE_BACKLIGHT
110#define HAVE_BACKLIGHT_BRIGHTNESS
111#define MIN_BRIGHTNESS_SETTING 0
112#define MAX_BRIGHTNESS_SETTING 31
113#define DEFAULT_BRIGHTNESS_SETTING 31
114#define CONFIG_BACKLIGHT_FADING BACKLIGHT_FADING_SW_HW_REG
115
116/* Define this if you have a software controlled poweroff */
117#define HAVE_SW_POWEROFF
118
119/* The number of bytes reserved for loadable codecs */
120#define CODEC_SIZE 0x100000
121
122/* The number of bytes reserved for loadable plugins */
123#define PLUGIN_BUFFER_SIZE 0x80000
124
125#define BATTERY_CAPACITY_DEFAULT 1050 /* default battery capacity */
126#define BATTERY_CAPACITY_MIN 500 /* min. capacity selectable */
127#define BATTERY_CAPACITY_MAX 1050 /* max. capacity selectable */
128#define BATTERY_CAPACITY_INC 10 /* capacity increment */
129#define BATTERY_TYPES_COUNT 1 /* only one type */
130
131#define CONFIG_BATTERY_MEASURE VOLTAGE_MEASURE
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/* Define this if your LCD can set contrast */
145/* #define HAVE_LCD_CONTRAST */
146
147/* Offset ( in the firmware file's header ) to the file CRC */
148#define FIRMWARE_OFFSET_FILE_CRC 0
149
150/* Offset ( in the firmware file's header ) to the real data */
151#define FIRMWARE_OFFSET_FILE_DATA 8
152
153#define STORAGE_NEEDS_ALIGN
154
155/* Define this if you have adjustable CPU frequency */
156#define HAVE_ADJUSTABLE_CPU_FREQ
157
158/* Virtual LED (icon) */
159#define CONFIG_LED LED_VIRTUAL
160
161/** Non-simulator section **/
162#ifndef SIMULATOR
163
164/* The exact type of CPU */
165#define CONFIG_CPU RK27XX
166
167/* Define this to the CPU frequency */
168#define CPU_FREQ 200000000
169
170/* I2C interface */
171#define CONFIG_I2C I2C_RK27XX
172
173/* define this if the hardware can be powered off while charging */
174/* #define HAVE_POWEROFF_WHILE_CHARGING */
175
176/* Type of LCD */
177#define CONFIG_LCD LCD_IHIFI770
178
179/* USB On-the-go */
180#define CONFIG_USBOTG USBOTG_RK27XX
181
182/* enable these for the experimental usb stack */
183#define HAVE_USBSTACK
184
185#define USB_VENDOR_ID 0x071b
186#define USB_PRODUCT_ID 0x3202
187#define HAVE_BOOTLOADER_USB_MODE
188
189#define RKW_FORMAT
190#define BOOTFILE_EXT "rkw"
191#define BOOTFILE "rockbox." BOOTFILE_EXT
192#define BOOTDIR "/.rockbox"
193
194/* disabled for now */
195#undef HAVE_HOTSWAP
196
197#endif /* SIMULATOR */
diff --git a/firmware/export/config/ihifi770c.h b/firmware/export/config/ihifi770c.h
new file mode 100644
index 0000000000..c4058f337b
--- /dev/null
+++ b/firmware/export/config/ihifi770c.h
@@ -0,0 +1,197 @@
1/*
2 * This config file is for IHIFI 770C
3 */
4
5/* For Rolo and boot loader */
6#define MODEL_NUMBER 108
7
8#define MODEL_NAME "IHIFI 770C"
9
10/* Define bitmask of input sources - recordable bitmask can be defined
11 explicitly if different */
12/* #define INPUT_SRC_CAPS (SRC_CAP_MIC | SRC_CAP_FM) */
13
14/* define the bitmask of hardware sample rates */
15#define HW_SAMPR_CAPS (SAMPR_CAP_96 | SAMPR_CAP_48 | SAMPR_CAP_44 | \
16 SAMPR_CAP_32 | SAMPR_CAP_24 | SAMPR_CAP_22 | \
17 SAMPR_CAP_16 | SAMPR_CAP_12 | SAMPR_CAP_11 | SAMPR_CAP_8)
18
19#define HAVE_WM8740
20#define CODEC_SLAVE
21
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 would like tagcache to build on this target */
47#define HAVE_TAGCACHE
48
49/* define this if you have a flash memory storage */
50#define HAVE_FLASH_STORAGE
51
52#define CONFIG_STORAGE (STORAGE_SD | STORAGE_NAND)
53
54#define CONFIG_NAND NAND_RK27XX
55#define HAVE_SW_TONE_CONTROLS
56
57#define HAVE_HOTSWAP
58
59#define NUM_DRIVES 1
60#define SECTOR_SIZE 512
61
62/* for small(ish) SD cards */
63#define HAVE_FAT16SUPPORT
64
65/* LCD dimensions */
66#define LCD_WIDTH 320
67#define LCD_HEIGHT 240
68/* sqrt(320^2 + 240^2) / 2.4 = 166.7 */
69#define LCD_DPI 167
70#define LCD_DEPTH 16 /* pseudo 262.144 colors */
71#define LCD_PIXELFORMAT RGB565 /* rgb565 */
72
73/* Define this if the LCD can shut down */
74/* #define HAVE_LCD_SHUTDOWN */
75
76/* Define this if your LCD can be enabled/disabled */
77#define HAVE_LCD_ENABLE
78
79/* Define this if your LCD can be put to sleep. HAVE_LCD_ENABLE
80 should be defined as well. */
81#ifndef BOOTLOADER
82/* TODO: #define HAVE_LCD_SLEEP */
83/* TODO: #define HAVE_LCD_SLEEP_SETTING */
84#endif
85
86#define CONFIG_KEYPAD IHIFI_770_PAD
87
88/* define this if the target has volume keys which can be used in the lists */
89#define HAVE_VOLUME_IN_LIST
90
91/* Define this if a programmable hotkey is mapped */
92/* #define HAVE_HOTKEY */
93
94/* Define this if you do software codec */
95#define CONFIG_CODEC SWCODEC
96
97/* define this if you have a real-time clock */
98/* #define CONFIG_RTC RTC_NANO2G */
99
100/* Define if the device can wake from an RTC alarm */
101/* #define HAVE_RTC_ALARM */
102
103/* Define the type of audio codec */
104/*#define HAVE_RK27XX_CODEC */
105
106/* #define HAVE_PCM_DMA_ADDRESS */
107
108/* Define this for LCD backlight available */
109#define HAVE_BACKLIGHT
110#define HAVE_BACKLIGHT_BRIGHTNESS
111#define MIN_BRIGHTNESS_SETTING 0
112#define MAX_BRIGHTNESS_SETTING 31
113#define DEFAULT_BRIGHTNESS_SETTING 31
114#define CONFIG_BACKLIGHT_FADING BACKLIGHT_FADING_SW_HW_REG
115
116/* Define this if you have a software controlled poweroff */
117#define HAVE_SW_POWEROFF
118
119/* The number of bytes reserved for loadable codecs */
120#define CODEC_SIZE 0x100000
121
122/* The number of bytes reserved for loadable plugins */
123#define PLUGIN_BUFFER_SIZE 0x80000
124
125#define BATTERY_CAPACITY_DEFAULT 1050 /* default battery capacity */
126#define BATTERY_CAPACITY_MIN 500 /* min. capacity selectable */
127#define BATTERY_CAPACITY_MAX 1050 /* max. capacity selectable */
128#define BATTERY_CAPACITY_INC 10 /* capacity increment */
129#define BATTERY_TYPES_COUNT 1 /* only one type */
130
131#define CONFIG_BATTERY_MEASURE VOLTAGE_MEASURE
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/* Define this if your LCD can set contrast */
145/* #define HAVE_LCD_CONTRAST */
146
147/* Offset ( in the firmware file's header ) to the file CRC */
148#define FIRMWARE_OFFSET_FILE_CRC 0
149
150/* Offset ( in the firmware file's header ) to the real data */
151#define FIRMWARE_OFFSET_FILE_DATA 8
152
153#define STORAGE_NEEDS_ALIGN
154
155/* Define this if you have adjustable CPU frequency */
156#define HAVE_ADJUSTABLE_CPU_FREQ
157
158/* Virtual LED (icon) */
159#define CONFIG_LED LED_VIRTUAL
160
161/** Non-simulator section **/
162#ifndef SIMULATOR
163
164/* The exact type of CPU */
165#define CONFIG_CPU RK27XX
166
167/* Define this to the CPU frequency */
168#define CPU_FREQ 200000000
169
170/* I2C interface */
171#define CONFIG_I2C I2C_RK27XX
172
173/* define this if the hardware can be powered off while charging */
174/* #define HAVE_POWEROFF_WHILE_CHARGING */
175
176/* Type of LCD */
177#define CONFIG_LCD LCD_IHIFI770C
178
179/* USB On-the-go */
180#define CONFIG_USBOTG USBOTG_RK27XX
181
182/* enable these for the experimental usb stack */
183#define HAVE_USBSTACK
184
185#define USB_VENDOR_ID 0x071b
186#define USB_PRODUCT_ID 0x3202
187#define HAVE_BOOTLOADER_USB_MODE
188
189#define RKW_FORMAT
190#define BOOTFILE_EXT "rkw"
191#define BOOTFILE "rockbox." BOOTFILE_EXT
192#define BOOTDIR "/.rockbox"
193
194/* disabled for now */
195#undef HAVE_HOTSWAP
196
197#endif /* SIMULATOR */
diff --git a/firmware/export/config/ihifi800.h b/firmware/export/config/ihifi800.h
new file mode 100644
index 0000000000..eb1c2015ad
--- /dev/null
+++ b/firmware/export/config/ihifi800.h
@@ -0,0 +1,198 @@
1/*
2 * This config file is for IHIFI 800
3 */
4
5/* For Rolo and boot loader */
6#define MODEL_NUMBER 109
7
8#define MODEL_NAME "IHIFI 800"
9
10/* Define bitmask of input sources - recordable bitmask can be defined
11 explicitly if different */
12/* #define INPUT_SRC_CAPS (SRC_CAP_MIC | SRC_CAP_FM) */
13
14/* define the bitmask of hardware sample rates */
15#define HW_SAMPR_CAPS (SAMPR_CAP_96 | SAMPR_CAP_48 | SAMPR_CAP_44 | \
16 SAMPR_CAP_32 | SAMPR_CAP_24 | SAMPR_CAP_22 | \
17 SAMPR_CAP_16 | SAMPR_CAP_12 | SAMPR_CAP_11 | SAMPR_CAP_8)
18
19#define HAVE_ES9018
20#define CODEC_SLAVE
21
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 would like tagcache to build on this target */
47#define HAVE_TAGCACHE
48
49/* define this if you have a flash memory storage */
50#define HAVE_FLASH_STORAGE
51
52#define CONFIG_STORAGE (STORAGE_SD | STORAGE_NAND)
53
54#define CONFIG_NAND NAND_RK27XX
55#define HAVE_SW_TONE_CONTROLS
56
57#define HAVE_HOTSWAP
58
59#define NUM_DRIVES 1
60#define SECTOR_SIZE 512
61
62/* for small(ish) SD cards */
63#define HAVE_FAT16SUPPORT
64
65/* LCD dimensions */
66#define LCD_WIDTH 240
67#define LCD_HEIGHT 320
68/* sqrt(240^2 + 320^2) / 2.4 = 166.7 */
69#define LCD_DPI 167
70#define LCD_DEPTH 16 /* pseudo 262.144 colors */
71#define LCD_PIXELFORMAT RGB565 /* rgb565 */
72
73/* Define this if the LCD can shut down */
74/* #define HAVE_LCD_SHUTDOWN */
75
76/* Define this if your LCD can be enabled/disabled */
77#define HAVE_LCD_ENABLE
78
79/* Define this if your LCD can be put to sleep. HAVE_LCD_ENABLE
80 should be defined as well. */
81#ifndef BOOTLOADER
82/* TODO: #define HAVE_LCD_SLEEP */
83/* TODO: #define HAVE_LCD_SLEEP_SETTING */
84#endif
85
86#define CONFIG_KEYPAD IHIFI_800_PAD
87
88/* define this if the target has volume keys which can be used in the lists */
89#define HAVE_VOLUME_IN_LIST
90
91/* Define this if a programmable hotkey is mapped */
92/* #define HAVE_HOTKEY */
93
94/* Define this if you do software codec */
95#define CONFIG_CODEC SWCODEC
96
97/* define this if you have a real-time clock */
98/* #define CONFIG_RTC RTC_NANO2G */
99
100/* Define if the device can wake from an RTC alarm */
101/* #define HAVE_RTC_ALARM */
102
103/* Define the type of audio codec */
104/*#define HAVE_RK27XX_CODEC */
105
106/* #define HAVE_PCM_DMA_ADDRESS */
107
108/* Define this for LCD backlight available */
109#define HAVE_BACKLIGHT
110#define HAVE_BACKLIGHT_BRIGHTNESS
111#define MIN_BRIGHTNESS_SETTING 0
112#define MAX_BRIGHTNESS_SETTING 31
113#define DEFAULT_BRIGHTNESS_SETTING 31
114#define CONFIG_BACKLIGHT_FADING BACKLIGHT_FADING_SW_HW_REG
115
116/* Define this if you have a software controlled poweroff */
117#define HAVE_SW_POWEROFF
118
119/* The number of bytes reserved for loadable codecs */
120#define CODEC_SIZE 0x100000
121
122/* The number of bytes reserved for loadable plugins */
123#define PLUGIN_BUFFER_SIZE 0x80000
124
125/* TODO: Figure out real values */
126#define BATTERY_CAPACITY_DEFAULT 1400 /* default battery capacity */
127#define BATTERY_CAPACITY_MIN 700 /* min. capacity selectable */
128#define BATTERY_CAPACITY_MAX 1400 /* max. capacity selectable */
129#define BATTERY_CAPACITY_INC 10 /* capacity increment */
130#define BATTERY_TYPES_COUNT 1 /* only one type */
131
132#define CONFIG_BATTERY_MEASURE VOLTAGE_MEASURE
133
134/* Hardware controlled charging with monitoring */
135#define CONFIG_CHARGING CHARGING_MONITOR
136
137/* define current usage levels */
138/* TODO: #define CURRENT_NORMAL
139 * TODO: #define CURRENT_BACKLIGHT 23
140 */
141
142/* define this if the unit can be powered or charged via USB */
143#define HAVE_USB_POWER
144
145/* Define this if your LCD can set contrast */
146/* #define HAVE_LCD_CONTRAST */
147
148/* Offset ( in the firmware file's header ) to the file CRC */
149#define FIRMWARE_OFFSET_FILE_CRC 0
150
151/* Offset ( in the firmware file's header ) to the real data */
152#define FIRMWARE_OFFSET_FILE_DATA 8
153
154#define STORAGE_NEEDS_ALIGN
155
156/* Define this if you have adjustable CPU frequency */
157#define HAVE_ADJUSTABLE_CPU_FREQ
158
159/* Virtual LED (icon) */
160#define CONFIG_LED LED_VIRTUAL
161
162/** Non-simulator section **/
163#ifndef SIMULATOR
164
165/* The exact type of CPU */
166#define CONFIG_CPU RK27XX
167
168/* Define this to the CPU frequency */
169#define CPU_FREQ 200000000
170
171/* I2C interface */
172#define CONFIG_I2C I2C_RK27XX
173
174/* define this if the hardware can be powered off while charging */
175/* #define HAVE_POWEROFF_WHILE_CHARGING */
176
177/* Type of LCD */
178#define CONFIG_LCD LCD_IHIFI800
179
180/* USB On-the-go */
181#define CONFIG_USBOTG USBOTG_RK27XX
182
183/* enable these for the experimental usb stack */
184#define HAVE_USBSTACK
185
186#define USB_VENDOR_ID 0x071b
187#define USB_PRODUCT_ID 0x3202
188#define HAVE_BOOTLOADER_USB_MODE
189
190#define RKW_FORMAT
191#define BOOTFILE_EXT "rkw"
192#define BOOTFILE "rockbox." BOOTFILE_EXT
193#define BOOTDIR "/.rockbox"
194
195/* disabled for now */
196#undef HAVE_HOTSWAP
197
198#endif /* SIMULATOR */
diff --git a/firmware/export/config/rk27generic.h b/firmware/export/config/rk27generic.h
index 503857bd43..69cf9f3758 100644
--- a/firmware/export/config/rk27generic.h
+++ b/firmware/export/config/rk27generic.h
@@ -63,7 +63,7 @@
63/* commented for now */ 63/* commented for now */
64/* #define HAVE_HOTSWAP */ 64/* #define HAVE_HOTSWAP */
65 65
66#define NUM_DRIVES 2 66#define NUM_DRIVES 1
67#define SECTOR_SIZE 512 67#define SECTOR_SIZE 512
68 68
69/* for small(ish) SD cards */ 69/* for small(ish) SD cards */
diff --git a/firmware/export/es9018.h b/firmware/export/es9018.h
new file mode 100644
index 0000000000..41ea0d0b1c
--- /dev/null
+++ b/firmware/export/es9018.h
@@ -0,0 +1,39 @@
1/***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id$
9 *
10 * Copyright (C) 2016 by Roman Stolyarov
11 *
12 * This program is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU General Public License
14 * as published by the Free Software Foundation; either version 2
15 * of the License, or (at your option) any later version.
16 *
17 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
18 * KIND, either express or implied.
19 *
20 ****************************************************************************/
21
22#ifndef _ES9018_H
23#define _ES9018_H
24
25#define ES9018_VOLUME_MIN -1270
26#define ES9018_VOLUME_MAX 0
27
28#define AUDIOHW_CAPS (FILTER_ROLL_OFF_CAP)
29#define AUDIOHW_HAVE_SHORT_ROLL_OFF
30AUDIOHW_SETTING(VOLUME, "dB", 0, 1, ES9018_VOLUME_MIN/10, ES9018_VOLUME_MAX/10, 0)
31AUDIOHW_SETTING(FILTER_ROLL_OFF, "", 0, 1, 0, 3, 0)
32
33void es9018_write_reg(uint8_t reg, uint8_t val);
34uint8_t es9018_read_reg(uint8_t reg);
35
36void audiohw_mute(void);
37void audiohw_unmute(void);
38
39#endif
diff --git a/firmware/export/rk27xx.h b/firmware/export/rk27xx.h
index 58b3fe8166..dc6bca7cbd 100644
--- a/firmware/export/rk27xx.h
+++ b/firmware/export/rk27xx.h
@@ -8,7 +8,8 @@
8#define FLASH_BANK1 0x11000000 8#define FLASH_BANK1 0x11000000
9 9
10#define USB_NUM_ENDPOINTS 16 10#define USB_NUM_ENDPOINTS 16
11#define USB_DEVBSS_ATTR 11/* cache aligned */
12#define USB_DEVBSS_ATTR __attribute__((aligned(CACHEALIGN_SIZE)))
12 13
13/* Timers */ 14/* Timers */
14#define APB0_TIMER (ARM_BUS0_BASE + 0x00000000) 15#define APB0_TIMER (ARM_BUS0_BASE + 0x00000000)
@@ -811,6 +812,7 @@
811#define RXVOIDINTEN (1<<5) 812#define RXVOIDINTEN (1<<5)
812#define RXERRINTEN (1<<6) 813#define RXERRINTEN (1<<6)
813#define RXACKINTEN (1<<7) 814#define RXACKINTEN (1<<7)
815#define RXCFINTE (1<<12)
814/* bits 31:8 reserved for EP0 */ 816/* bits 31:8 reserved for EP0 */
815/* bits 31:14 reserved for others */ 817/* bits 31:14 reserved for others */
816 818
@@ -833,6 +835,7 @@
833#define TXERRINTEN (1<<5) 835#define TXERRINTEN (1<<5)
834#define TXACKINTEN (1<<6) 836#define TXACKINTEN (1<<6)
835#define TXDMADNEN (1<<7) /* reserved for EP0 */ 837#define TXDMADNEN (1<<7) /* reserved for EP0 */
838#define TXCFINTE (1<<12)
836/* bits 31:8 reserved */ 839/* bits 31:8 reserved */
837 840
838/* TXnBUF bits */ 841/* TXnBUF bits */
diff --git a/firmware/export/wm8740.h b/firmware/export/wm8740.h
new file mode 100644
index 0000000000..ff27a7e41e
--- /dev/null
+++ b/firmware/export/wm8740.h
@@ -0,0 +1,83 @@
1/***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id$
9 *
10 * Copyright (C) 2016 by Roman Stolyarov
11 *
12 * This program is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU General Public License
14 * as published by the Free Software Foundation; either version 2
15 * of the License, or (at your option) any later version.
16 *
17 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
18 * KIND, either express or implied.
19 *
20 ****************************************************************************/
21
22#ifndef _WM8740_H
23#define _WM8740_H
24
25#define WM8740_VOLUME_MIN -1270
26#define WM8740_VOLUME_MAX 0
27
28#define AUDIOHW_CAPS (FILTER_ROLL_OFF_CAP)
29AUDIOHW_SETTING(VOLUME, "dB", 0, 1, WM8740_VOLUME_MIN/10, WM8740_VOLUME_MAX/10, 0)
30AUDIOHW_SETTING(FILTER_ROLL_OFF, "", 0, 1, 0, 1, 0)
31
32#define WM8740_REG0 0x0000
33#define WM8740_REG1 0x0200
34#define WM8740_REG2 0x0400
35#define WM8740_REG3 0x0600
36#define WM8740_REG4 0x0C00
37
38/**
39 * Register #0
40 */
41#define WM8740_LDL (1<<8)
42
43/**
44 * Register #1
45 */
46#define WM8740_LDR (1<<8)
47
48/**
49 * Register #2
50 */
51#define WM8740_MUT (1<<0)
52#define WM8740_DEM (1<<1)
53#define WM8740_OPE (1<<2)
54#define WM8740_IW0 (1<<3)
55#define WM8740_IW1 (1<<4)
56
57/**
58 * Register #3
59 */
60#define WM8740_I2S (1<<0)
61#define WM8740_LRP (1<<1)
62#define WM8740_ATC (1<<2)
63#define WM8740_SR0 (1<<3)
64#define WM8740_REV (1<<4)
65#define WM8740_SF0 (1<<6)
66#define WM8740_SF1 (1<<7)
67#define WM8740_IZD (1<<8)
68
69/**
70 * Register #4
71 */
72#define WM8740_DIFF0 (1<<4)
73#define WM8740_DIFF1 (1<<5)
74#define WM8740_CDD (1<<6)
75
76void audiohw_mute(void);
77void audiohw_unmute(void);
78
79void wm8740_set_ml(const int);
80void wm8740_set_mc(const int);
81void wm8740_set_md(const int);
82
83#endif