summaryrefslogtreecommitdiff
path: root/firmware/export
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/export')
-rw-r--r--firmware/export/as3514.h5
-rw-r--r--firmware/export/ascodec.h4
-rw-r--r--firmware/export/audiohw.h2
-rw-r--r--firmware/export/config.h16
-rw-r--r--firmware/export/config/ypr0.h168
-rw-r--r--firmware/export/rbpaths.h5
6 files changed, 197 insertions, 3 deletions
diff --git a/firmware/export/as3514.h b/firmware/export/as3514.h
index acf13444fa..bcdb1a78c6 100644
--- a/firmware/export/as3514.h
+++ b/firmware/export/as3514.h
@@ -131,9 +131,14 @@ extern void audiohw_set_sampr_dividers(int fsel);
131/* Headphone volume goes from -81.0 ... +6dB */ 131/* Headphone volume goes from -81.0 ... +6dB */
132#define VOLUME_MIN -810 132#define VOLUME_MIN -810
133#else 133#else
134#ifdef SAMSUNG_YPR0
135/* Headphone volume goes from -40.5 ... +6dB */
136#define VOLUME_MIN -405
137#else
134/* Headphone volume goes from -73.5 ... +6dB */ 138/* Headphone volume goes from -73.5 ... +6dB */
135#define VOLUME_MIN -735 139#define VOLUME_MIN -735
136#endif 140#endif
141#endif
137#define VOLUME_MAX 60 142#define VOLUME_MAX 60
138 143
139/*** Audio Registers ***/ 144/*** Audio Registers ***/
diff --git a/firmware/export/ascodec.h b/firmware/export/ascodec.h
index 93cd767608..658153e420 100644
--- a/firmware/export/ascodec.h
+++ b/firmware/export/ascodec.h
@@ -28,4 +28,8 @@
28#include "ascodec-target.h" 28#include "ascodec-target.h"
29#endif 29#endif
30 30
31#ifdef SAMSUNG_YPR0
32#include "ascodec-target.h"
33#endif
34
31#endif 35#endif
diff --git a/firmware/export/audiohw.h b/firmware/export/audiohw.h
index 102d107d8a..304c5aa460 100644
--- a/firmware/export/audiohw.h
+++ b/firmware/export/audiohw.h
@@ -79,7 +79,7 @@
79#elif defined(HAVE_DUMMY_CODEC) 79#elif defined(HAVE_DUMMY_CODEC)
80#include "dummy_codec.h" 80#include "dummy_codec.h"
81#endif 81#endif
82#if (CONFIG_PLATFORM & PLATFORM_HOSTED) 82#if (CONFIG_PLATFORM & (PLATFORM_ANDROID|PLATFORM_MAEMO|PLATFORM_PANDORA|PLATFORM_SDL))
83/* #include <SDL_audio.h> gives errors in other code areas, 83/* #include <SDL_audio.h> gives errors in other code areas,
84 * we don't really need it here, so don't. but it should maybe be fixed */ 84 * we don't really need it here, so don't. but it should maybe be fixed */
85#ifndef SIMULATOR /* simulator gets values from the target .h files */ 85#ifndef SIMULATOR /* simulator gets values from the target .h files */
diff --git a/firmware/export/config.h b/firmware/export/config.h
index 039b48a759..542587fc9d 100644
--- a/firmware/export/config.h
+++ b/firmware/export/config.h
@@ -143,6 +143,7 @@
143#define HM60X_PAD 50 143#define HM60X_PAD 50
144#define HM801_PAD 51 144#define HM801_PAD 51
145#define SANSA_CONNECT_PAD 52 145#define SANSA_CONNECT_PAD 52
146#define SAMSUNG_YPR0_PAD 53
146 147
147/* CONFIG_REMOTE_KEYPAD */ 148/* CONFIG_REMOTE_KEYPAD */
148#define H100_REMOTE 1 149#define H100_REMOTE 1
@@ -232,6 +233,7 @@
232#define LCD_HX8340B 44 /* as used by the HiFiMAN HM-601/HM-602/HM-801 */ 233#define LCD_HX8340B 44 /* as used by the HiFiMAN HM-601/HM-602/HM-801 */
233#define LCD_CONNECT 45 /* as used by the Sandisk Sansa Connect */ 234#define LCD_CONNECT 45 /* as used by the Sandisk Sansa Connect */
234#define LCD_GIGABEATS 46 235#define LCD_GIGABEATS 46
236#define LCD_YPR0 47
235 237
236/* LCD_PIXELFORMAT */ 238/* LCD_PIXELFORMAT */
237#define HORIZONTAL_PACKING 1 239#define HORIZONTAL_PACKING 1
@@ -483,6 +485,8 @@ Lyre prototype 1 */
483#include "config/nokian900.h" 485#include "config/nokian900.h"
484#elif defined(PANDORA) 486#elif defined(PANDORA)
485#include "config/pandora.h" 487#include "config/pandora.h"
488#elif defined(SAMSUNG_YPR0)
489#include "config/ypr0.h"
486#else 490#else
487/* no known platform */ 491/* no known platform */
488#endif 492#endif
@@ -580,6 +584,10 @@ Lyre prototype 1 */
580#define CONFIG_BACKLIGHT_FADING BACKLIGHT_NO_FADING 584#define CONFIG_BACKLIGHT_FADING BACKLIGHT_NO_FADING
581#endif 585#endif
582 586
587#ifndef CONFIG_I2C
588#define CONFIG_I2C I2C_NONE
589#endif
590
583#ifndef CONFIG_TUNER 591#ifndef CONFIG_TUNER
584#define CONFIG_TUNER 0 592#define CONFIG_TUNER 0
585#endif 593#endif
@@ -600,6 +608,14 @@ Lyre prototype 1 */
600#define CONFIG_RTC 0 608#define CONFIG_RTC 0
601#endif 609#endif
602 610
611#ifndef BATTERY_TYPES_COUNT
612#define BATTERY_TYPES_COUNT 0
613#endif
614
615#ifndef BATTERY_CAPACITY_INC
616#define BATTERY_CAPACITY_INC 0
617#endif
618
603#ifndef CONFIG_ORIENTATION 619#ifndef CONFIG_ORIENTATION
604#if LCD_HEIGHT > LCD_WIDTH 620#if LCD_HEIGHT > LCD_WIDTH
605#define CONFIG_ORIENTATION SCREEN_PORTRAIT 621#define CONFIG_ORIENTATION SCREEN_PORTRAIT
diff --git a/firmware/export/config/ypr0.h b/firmware/export/config/ypr0.h
new file mode 100644
index 0000000000..25e1906a80
--- /dev/null
+++ b/firmware/export/config/ypr0.h
@@ -0,0 +1,168 @@
1/*
2 * This config file is for the RockBox as application on the Samsung YP-R0 player.
3 * The target name for ifdefs is: SAMSUNG_YPR0; or CONFIG_PLATFORM & PLAFTORM_YPR0
4 */
5
6#define TARGET_TREE /* this target is using the target tree system */
7
8/* We don't run on hardware directly */
9/* YP-R0 need it too of course */
10#define CONFIG_PLATFORM (PLATFORM_HOSTED)
11
12/* For Rolo and boot loader */
13#define MODEL_NUMBER 100
14
15#define MODEL_NAME "Samsung YP-R0"
16
17/* Indeed to check that */
18/*TODO: R0 should charge battery automatically, no software stuff to manage that. Just to know about some as3543 registers, that should be set after loading samsung's afe.ko module
19 */
20/*TODO: implement USB data transfer management -> see safe mode script and think a way to implemtent it in the code */
21#define USB_NONE
22
23/* Hardware controlled charging with monitoring */
24//#define CONFIG_CHARGING CHARGING_MONITOR
25
26/* There is only USB charging */
27//#define HAVE_USB_POWER
28
29/* define this if you have a bitmap LCD display */
30#define HAVE_LCD_BITMAP
31
32/* define this if you have a colour LCD */
33#define HAVE_LCD_COLOR
34
35/* define this if the LCD needs to be shutdown */
36/* TODO: Our framebuffer must be closed... */
37#define HAVE_LCD_SHUTDOWN
38
39/* define this if you want album art for this target */
40#define HAVE_ALBUMART
41
42/* define this to enable bitmap scaling */
43#define HAVE_BMP_SCALING
44
45/* define this to enable JPEG decoding */
46#define HAVE_JPEG
47
48/* define this if you have access to the quickscreen */
49#define HAVE_QUICKSCREEN
50
51/* define this if you have access to the pitchscreen */
52#define HAVE_PITCHSCREEN
53
54/* define this if you would like tagcache to build on this target */
55#define HAVE_TAGCACHE
56
57/* LCD dimensions
58 *
59 * overriden by configure for application builds */
60#ifndef LCD_WIDTH
61#define LCD_WIDTH 240
62#endif
63
64#ifndef LCD_HEIGHT
65#define LCD_HEIGHT 320
66#endif
67
68#define LCD_DEPTH 16
69/* Check that but should not matter */
70#define LCD_PIXELFORMAT 565
71
72/* YP-R0 has the backlight */
73#define HAVE_BACKLIGHT
74
75/* Define this for LCD backlight brightness available */
76#define HAVE_BACKLIGHT_BRIGHTNESS
77
78/* Main LCD backlight brightness range and defaults */
79/* 0 is turned off. 31 is the real maximum for the ASCODEC DCDC but samsung doesn't use any value over 15, so it safer to don't go up too much */
80#define MIN_BRIGHTNESS_SETTING 1
81#define MAX_BRIGHTNESS_SETTING 15
82#define DEFAULT_BRIGHTNESS_SETTING 4
83
84/* Which backlight fading type? */
85/* TODO: ASCODEC has an auto dim feature, so disabling the supply to leds should do the trick. But for now I tested SW fading only */
86#define CONFIG_BACKLIGHT_FADING BACKLIGHT_FADING_SW_SETTING
87
88/* define this if you have RTC RAM available for settings */
89/* TODO: in theory we could use that, ascodec offers us such a ram. we have also a small device, part of the nand of 1 MB size, that Samsung uses to store region code etc and it's almost unused space */
90//#define HAVE_RTC_RAM
91
92/* define this if you have a real-time clock */
93//#define CONFIG_RTC APPLICATION
94#define CONFIG_RTC RTC_AS3514
95#define HAVE_RTC_ALARM
96
97/* The number of bytes reserved for loadable codecs */
98#define CODEC_SIZE 0x80000
99
100/* The number of bytes reserved for loadable plugins */
101#define PLUGIN_BUFFER_SIZE 0x100000
102
103/* We can do AB-repeat -> we use User key, our hotkey */
104#define AB_REPEAT_ENABLE
105#define ACTION_WPSAB_SINGLE ACTION_WPS_HOTKEY
106
107/* Define this if you do software codec */
108#define CONFIG_CODEC SWCODEC
109
110/* R0 KeyPad configuration for plugins */
111#define CONFIG_KEYPAD SAMSUNG_YPR0_PAD
112/* It's better to close /dev/r0Btn at shutdown */
113#define BUTTON_DRIVER_CLOSE
114
115/* The YPR0 has a as3534 codec and we use that to control the volume */
116#define HAVE_AS3514
117#define HAVE_AS3543
118
119#define HAVE_SW_TONE_CONTROLS
120
121/* TODO: Make use of the si4703 tuner hardware */
122/* #define CONFIG_TUNER SI4700 */
123/* #define HAVE_TUNER_PWR_CTRL*/
124
125/*TODO: In R0 there is an interrupt for this (figure out ioctls)*/
126/* #define HAVE_HEADPHONE_DETECTION */
127
128/* Define current usage levels. */
129/* TODO: to be filled with correct values after implementing power management */
130#define CURRENT_NORMAL 88 /* 18 hours from a 1600 mAh battery */
131#define CURRENT_BACKLIGHT 30 /* TBD */
132#define CURRENT_RECORD 0 /* no recording yet */
133
134/* TODO: We need to do battery handling */
135//#define BATTERY_CAPACITY_DEFAULT 600 /* default battery capacity */
136//#define BATTERY_CAPACITY_MIN 600 /* min. capacity selectable */
137//#define BATTERY_CAPACITY_MAX 700 /* max. capacity selectable */
138//#define BATTERY_CAPACITY_INC 50 /* capacity increment */
139//#define BATTERY_TYPES_COUNT 1 /* only one type */
140
141/* TODO: We possibly can only watch linux charging */
142//#define CONFIG_CHARGING CHARGING_TARGET
143//#define HAVE_RESET_BATTERY_FILTER
144
145/* same dimensions as gigabeats */
146#define CONFIG_LCD LCD_YPR0
147
148/* Define this if a programmable hotkey is mapped */
149#define HAVE_HOTKEY
150
151/* Define this if you have a software controlled poweroff */
152#define HAVE_SW_POWEROFF
153
154/* Define this if you have adjustable CPU frequency
155 * NOTE: We could do that on this device, but it's probably better
156 * to let linux do it (we set ondemand governor before loading Rockbox) */
157/* #define HAVE_ADJUSTABLE_CPU_FREQ */
158/* Define this to the CPU frequency */
159#define CPU_FREQ 532000000
160/* 0.8Vcore using 200 MHz */
161/* #define CPUFREQ_DEFAULT 200000000 */
162/* This is 400 MHz -> not so powersaving-ful */
163/* #define CPUFREQ_NORMAL 400000000 */
164/* Max IMX37 Cpu Frequency */
165/* #define CPUFREQ_MAX CPU_FREQ */
166
167/* TODO: my idea is to create a folder in the cramfs [/.rockbox], mounting it by the starter script as the current working directory, so no issues of any type keeping the rockbox folder as in all other players */
168#define BOOTDIR "/.rockbox"
diff --git a/firmware/export/rbpaths.h b/firmware/export/rbpaths.h
index 74d26f93d3..8f554c25f4 100644
--- a/firmware/export/rbpaths.h
+++ b/firmware/export/rbpaths.h
@@ -44,7 +44,7 @@
44#define ROCKBOX_DIR_LEN (sizeof(ROCKBOX_DIR)-1) 44#define ROCKBOX_DIR_LEN (sizeof(ROCKBOX_DIR)-1)
45#endif /* def __PCTOOL__ */ 45#endif /* def __PCTOOL__ */
46 46
47#ifndef APPLICATION 47#if !defined(APPLICATION) || defined(SAMSUNG_YPR0)
48 48
49/* make sure both are the same for native builds */ 49/* make sure both are the same for native builds */
50#undef ROCKBOX_LIBRARY_PATH 50#undef ROCKBOX_LIBRARY_PATH
@@ -57,6 +57,7 @@
57#define PLAYLIST_CATALOG_DEFAULT_DIR "/Playlists" 57#define PLAYLIST_CATALOG_DEFAULT_DIR "/Playlists"
58 58
59#define paths_init() 59#define paths_init()
60
60#else /* application */ 61#else /* application */
61 62
62#define PLUGIN_DIR ROCKBOX_LIBRARY_PATH "/rockbox/rocks" 63#define PLUGIN_DIR ROCKBOX_LIBRARY_PATH "/rockbox/rocks"
@@ -80,7 +81,7 @@ extern void paths_init(void);
80#define PLUGIN_DEMOS_DIR PLUGIN_DIR "/demos" 81#define PLUGIN_DEMOS_DIR PLUGIN_DIR "/demos"
81#define VIEWERS_DIR PLUGIN_DIR "/viewers" 82#define VIEWERS_DIR PLUGIN_DIR "/viewers"
82 83
83#ifdef APPLICATION 84#if defined(APPLICATION) && !defined(SAMSUNG_YPR0)
84#define PLUGIN_DATA_DIR "/.rockbox/rocks.data" 85#define PLUGIN_DATA_DIR "/.rockbox/rocks.data"
85#define PLUGIN_GAMES_DATA_DIR PLUGIN_DATA_DIR 86#define PLUGIN_GAMES_DATA_DIR PLUGIN_DATA_DIR
86#define PLUGIN_APPS_DATA_DIR PLUGIN_DATA_DIR 87#define PLUGIN_APPS_DATA_DIR PLUGIN_DATA_DIR