summaryrefslogtreecommitdiff
path: root/firmware/export
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/export')
-rw-r--r--firmware/export/audiohw.h2
-rw-r--r--firmware/export/config.h4
-rw-r--r--firmware/export/config/hifietma8.h153
-rw-r--r--firmware/export/config/hifietma8c.h153
-rw-r--r--firmware/export/pcm1792.h142
5 files changed, 454 insertions, 0 deletions
diff --git a/firmware/export/audiohw.h b/firmware/export/audiohw.h
index 1cabf6f782..7c5424a29d 100644
--- a/firmware/export/audiohw.h
+++ b/firmware/export/audiohw.h
@@ -109,6 +109,8 @@ struct sound_settings_info
109#include "dummy_codec.h" 109#include "dummy_codec.h"
110#elif defined(HAVE_DF1704_CODEC) 110#elif defined(HAVE_DF1704_CODEC)
111#include "df1704.h" 111#include "df1704.h"
112#elif defined(HAVE_PCM1792_CODEC)
113#include "pcm1792.h"
112#elif (CONFIG_PLATFORM & (PLATFORM_ANDROID | PLATFORM_MAEMO\ 114#elif (CONFIG_PLATFORM & (PLATFORM_ANDROID | PLATFORM_MAEMO\
113 | PLATFORM_PANDORA | PLATFORM_SDL)) 115 | PLATFORM_PANDORA | PLATFORM_SDL))
114#include "hosted_codec.h" 116#include "hosted_codec.h"
diff --git a/firmware/export/config.h b/firmware/export/config.h
index 9c6f1f73c5..ffe34fb81b 100644
--- a/firmware/export/config.h
+++ b/firmware/export/config.h
@@ -535,6 +535,10 @@ Lyre prototype 1 */
535#include "config/hifietma9.h" 535#include "config/hifietma9.h"
536#elif defined(MA9C) 536#elif defined(MA9C)
537#include "config/hifietma9c.h" 537#include "config/hifietma9c.h"
538#elif defined(MA8)
539#include "config/hifietma8.h"
540#elif defined(MA8C)
541#include "config/hifietma8c.h"
538#elif defined(SONY_NWZE370) 542#elif defined(SONY_NWZE370)
539#include "config/sonynwze370.h" 543#include "config/sonynwze370.h"
540#elif defined(SONY_NWZE360) 544#elif defined(SONY_NWZE360)
diff --git a/firmware/export/config/hifietma8.h b/firmware/export/config/hifietma8.h
new file mode 100644
index 0000000000..7d36882832
--- /dev/null
+++ b/firmware/export/config/hifietma8.h
@@ -0,0 +1,153 @@
1/*
2 * This config file is for HiFi E.T. MA8 reference design
3 */
4
5/* For Rolo and boot loader */
6#define MODEL_NUMBER 85
7
8#define MODEL_NAME "HiFi E.T. MA8"
9
10/* define the bitmask of hardware sample rates */
11#define HW_SAMPR_CAPS (SAMPR_CAP_96 | SAMPR_CAP_48 | SAMPR_CAP_44 | \
12 SAMPR_CAP_32 | SAMPR_CAP_24 | SAMPR_CAP_22 | \
13 SAMPR_CAP_16 | SAMPR_CAP_12 | SAMPR_CAP_11 | SAMPR_CAP_8)
14
15#define HAVE_PCM1792_CODEC
16
17#define CODEC_SLAVE
18/* define this if you have a bitmap LCD display */
19#define HAVE_LCD_BITMAP
20
21/* define this if you can flip your LCD */
22/* #define HAVE_LCD_FLIP */
23
24/* define this if you have a colour LCD */
25#define HAVE_LCD_COLOR
26
27/* define this if you want album art for this target */
28#define HAVE_ALBUMART
29
30/* define this to enable bitmap scaling */
31#define HAVE_BMP_SCALING
32
33/* define this to enable JPEG decoding */
34#define HAVE_JPEG
35
36/* define this if you can invert the colours on your LCD */
37/* #define HAVE_LCD_INVERT */
38
39/* define this if you have access to the quickscreen */
40#define HAVE_QUICKSCREEN
41
42/* define this if you would like tagcache to build on this target */
43#define HAVE_TAGCACHE
44
45/* define this if you have a flash memory storage */
46#define HAVE_FLASH_STORAGE
47
48#define CONFIG_STORAGE (STORAGE_SD | STORAGE_NAND)
49
50#define CONFIG_NAND NAND_RK27XX
51#define HAVE_SW_TONE_CONTROLS
52
53/* commented for now */
54/* #define HAVE_HOTSWAP */
55
56#define NUM_DRIVES 2
57#define SECTOR_SIZE 512
58
59/* for small(ish) SD cards */
60#define HAVE_FAT16SUPPORT
61
62/* LCD dimensions */
63#define LCD_WIDTH 320
64#define LCD_HEIGHT 240
65#define LCD_DEPTH 16 /* pseudo 262.144 colors */
66#define LCD_PIXELFORMAT RGB565 /* rgb565 */
67
68/* Define this if your LCD can be enabled/disabled */
69#define HAVE_LCD_ENABLE
70
71#define CONFIG_KEYPAD MA_PAD
72
73/* Define this to enable morse code input */
74#define HAVE_MORSE_INPUT
75
76/* Define this if you do software codec */
77#define CONFIG_CODEC SWCODEC
78
79#define CONFIG_LCD LCD_ILI9342
80
81/* Define this for LCD backlight available */
82#define HAVE_BACKLIGHT
83#define HAVE_BACKLIGHT_BRIGHTNESS
84#define MIN_BRIGHTNESS_SETTING 0
85#define MAX_BRIGHTNESS_SETTING 31
86#define DEFAULT_BRIGHTNESS_SETTING 31
87#define CONFIG_BACKLIGHT_FADING BACKLIGHT_FADING_SW_HW_REG
88
89/* Define this if you have a software controlled poweroff */
90#define HAVE_SW_POWEROFF
91
92/* The number of bytes reserved for loadable codecs */
93#define CODEC_SIZE 0x100000
94
95/* The number of bytes reserved for loadable plugins */
96#define PLUGIN_BUFFER_SIZE 0x80000
97
98/* TODO: Figure out real values */
99#define BATTERY_CAPACITY_DEFAULT 600 /* default battery capacity */
100#define BATTERY_CAPACITY_MIN 300 /* min. capacity selectable */
101#define BATTERY_CAPACITY_MAX 600 /* max. capacity selectable */
102#define BATTERY_CAPACITY_INC 10 /* capacity increment */
103#define BATTERY_TYPES_COUNT 1 /* only one type */
104
105#define CONFIG_BATTERY_MEASURE VOLTAGE_MEASURE
106
107/* Hardware controlled charging with monitoring */
108#define CONFIG_CHARGING CHARGING_MONITOR
109
110/* USB On-the-go */
111#define CONFIG_USBOTG USBOTG_RK27XX
112
113/* enable these for the experimental usb stack */
114#define HAVE_USBSTACK
115
116#define USE_ROCKBOX_USB
117#define USB_VENDOR_ID 0x071b
118#define USB_PRODUCT_ID 0x3202
119#define HAVE_BOOTLOADER_USB_MODE
120
121/* Define this if your LCD can set contrast */
122/* #define HAVE_LCD_CONTRAST */
123
124/* The exact type of CPU */
125#define CONFIG_CPU RK27XX
126
127/* I2C interface */
128#define CONFIG_I2C I2C_RK27XX
129
130/* Define this to the CPU frequency */
131#define CPU_FREQ 200000000
132
133/* define this if the hardware can be powered off while charging */
134/* #define HAVE_POWEROFF_WHILE_CHARGING */
135
136/* Offset ( in the firmware file's header ) to the file CRC */
137#define FIRMWARE_OFFSET_FILE_CRC 0
138
139/* Offset ( in the firmware file's header ) to the real data */
140#define FIRMWARE_OFFSET_FILE_DATA 8
141
142#define STORAGE_NEEDS_ALIGN
143
144/* Define this if you have adjustable CPU frequency */
145#define HAVE_ADJUSTABLE_CPU_FREQ
146
147/* Virtual LED (icon) */
148#define CONFIG_LED LED_VIRTUAL
149
150#define RKW_FORMAT
151#define BOOTFILE_EXT "rkw"
152#define BOOTFILE "rockbox." BOOTFILE_EXT
153#define BOOTDIR "/.rockbox"
diff --git a/firmware/export/config/hifietma8c.h b/firmware/export/config/hifietma8c.h
new file mode 100644
index 0000000000..4e2d605523
--- /dev/null
+++ b/firmware/export/config/hifietma8c.h
@@ -0,0 +1,153 @@
1/*
2 * This config file is for HiFi E.T. MA8 reference design
3 */
4
5/* For Rolo and boot loader */
6#define MODEL_NUMBER 91
7
8#define MODEL_NAME "HiFi E.T. MA8C"
9
10/* define the bitmask of hardware sample rates */
11#define HW_SAMPR_CAPS (SAMPR_CAP_96 | SAMPR_CAP_48 | SAMPR_CAP_44 | \
12 SAMPR_CAP_32 | SAMPR_CAP_24 | SAMPR_CAP_22 | \
13 SAMPR_CAP_16 | SAMPR_CAP_12 | SAMPR_CAP_11 | SAMPR_CAP_8)
14
15#define HAVE_PCM1792_CODEC
16
17#define CODEC_SLAVE
18/* define this if you have a bitmap LCD display */
19#define HAVE_LCD_BITMAP
20
21/* define this if you can flip your LCD */
22/* #define HAVE_LCD_FLIP */
23
24/* define this if you have a colour LCD */
25#define HAVE_LCD_COLOR
26
27/* define this if you want album art for this target */
28#define HAVE_ALBUMART
29
30/* define this to enable bitmap scaling */
31#define HAVE_BMP_SCALING
32
33/* define this to enable JPEG decoding */
34#define HAVE_JPEG
35
36/* define this if you can invert the colours on your LCD */
37/* #define HAVE_LCD_INVERT */
38
39/* define this if you have access to the quickscreen */
40#define HAVE_QUICKSCREEN
41
42/* define this if you would like tagcache to build on this target */
43#define HAVE_TAGCACHE
44
45/* define this if you have a flash memory storage */
46#define HAVE_FLASH_STORAGE
47
48#define CONFIG_STORAGE (STORAGE_SD | STORAGE_NAND)
49
50#define CONFIG_NAND NAND_RK27XX
51#define HAVE_SW_TONE_CONTROLS
52
53/* commented for now */
54/* #define HAVE_HOTSWAP */
55
56#define NUM_DRIVES 2
57#define SECTOR_SIZE 512
58
59/* for small(ish) SD cards */
60#define HAVE_FAT16SUPPORT
61
62/* LCD dimensions */
63#define LCD_WIDTH 320
64#define LCD_HEIGHT 240
65#define LCD_DEPTH 16 /* pseudo 262.144 colors */
66#define LCD_PIXELFORMAT RGB565 /* rgb565 */
67
68/* Define this if your LCD can be enabled/disabled */
69#define HAVE_LCD_ENABLE
70
71#define CONFIG_KEYPAD MA_PAD
72
73/* Define this to enable morse code input */
74#define HAVE_MORSE_INPUT
75
76/* Define this if you do software codec */
77#define CONFIG_CODEC SWCODEC
78
79#define CONFIG_LCD LCD_ILI9342C
80
81/* Define this for LCD backlight available */
82#define HAVE_BACKLIGHT
83#define HAVE_BACKLIGHT_BRIGHTNESS
84#define MIN_BRIGHTNESS_SETTING 0
85#define MAX_BRIGHTNESS_SETTING 31
86#define DEFAULT_BRIGHTNESS_SETTING 31
87#define CONFIG_BACKLIGHT_FADING BACKLIGHT_FADING_SW_HW_REG
88
89/* Define this if you have a software controlled poweroff */
90#define HAVE_SW_POWEROFF
91
92/* The number of bytes reserved for loadable codecs */
93#define CODEC_SIZE 0x100000
94
95/* The number of bytes reserved for loadable plugins */
96#define PLUGIN_BUFFER_SIZE 0x80000
97
98/* TODO: Figure out real values */
99#define BATTERY_CAPACITY_DEFAULT 600 /* default battery capacity */
100#define BATTERY_CAPACITY_MIN 300 /* min. capacity selectable */
101#define BATTERY_CAPACITY_MAX 600 /* max. capacity selectable */
102#define BATTERY_CAPACITY_INC 10 /* capacity increment */
103#define BATTERY_TYPES_COUNT 1 /* only one type */
104
105#define CONFIG_BATTERY_MEASURE VOLTAGE_MEASURE
106
107/* Hardware controlled charging with monitoring */
108#define CONFIG_CHARGING CHARGING_MONITOR
109
110/* USB On-the-go */
111#define CONFIG_USBOTG USBOTG_RK27XX
112
113/* enable these for the experimental usb stack */
114#define HAVE_USBSTACK
115
116#define USE_ROCKBOX_USB
117#define USB_VENDOR_ID 0x071b
118#define USB_PRODUCT_ID 0x3202
119#define HAVE_BOOTLOADER_USB_MODE
120
121/* Define this if your LCD can set contrast */
122/* #define HAVE_LCD_CONTRAST */
123
124/* The exact type of CPU */
125#define CONFIG_CPU RK27XX
126
127/* I2C interface */
128#define CONFIG_I2C I2C_RK27XX
129
130/* Define this to the CPU frequency */
131#define CPU_FREQ 200000000
132
133/* define this if the hardware can be powered off while charging */
134/* #define HAVE_POWEROFF_WHILE_CHARGING */
135
136/* Offset ( in the firmware file's header ) to the file CRC */
137#define FIRMWARE_OFFSET_FILE_CRC 0
138
139/* Offset ( in the firmware file's header ) to the real data */
140#define FIRMWARE_OFFSET_FILE_DATA 8
141
142#define STORAGE_NEEDS_ALIGN
143
144/* Define this if you have adjustable CPU frequency */
145#define HAVE_ADJUSTABLE_CPU_FREQ
146
147/* Virtual LED (icon) */
148#define CONFIG_LED LED_VIRTUAL
149
150#define RKW_FORMAT
151#define BOOTFILE_EXT "rkw"
152#define BOOTFILE "rockbox." BOOTFILE_EXT
153#define BOOTDIR "/.rockbox"
diff --git a/firmware/export/pcm1792.h b/firmware/export/pcm1792.h
new file mode 100644
index 0000000000..917599edbf
--- /dev/null
+++ b/firmware/export/pcm1792.h
@@ -0,0 +1,142 @@
1/***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id$
9 *
10 *
11 * Copyright (c) 2013 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
23#ifndef _PCM1792_H
24#define _PCM1792_H
25
26#define PCM1792_VOLUME_MIN -1270
27#define PCM1792_VOLUME_MAX 0
28
29#define AUDIOHW_CAPS (FILTER_ROLL_OFF_CAP)
30AUDIOHW_SETTING(VOLUME, "dB", 0, 1, PCM1792_VOLUME_MIN/10, PCM1792_VOLUME_MAX/10, 0)
31AUDIOHW_SETTING(FILTER_ROLL_OFF, "", 0, 1, 0, 1, 0)
32
33#define PCM1792_REG(x) (((x)&0x1f)<<8)
34
35/**
36 * Register #18
37 */
38/* Attenuation Load Control */
39#define PCM1792_ATLD_OFF (0<<7)
40#define PCM1792_ATLD_ON (1<<7)
41
42/* Audio Interface Data Format */
43#define PCM1792_FMT_16_RJ (0<<4) /* 16-bit standard format, right-justified data */
44#define PCM1792_FMT_20_RJ (1<<4) /* 20-bit standard format, right-justified data */
45#define PCM1792_FMT_24_RJ (2<<4) /* 24-bit standard format, right-justified data */
46#define PCM1792_FMT_24_MSB_I2S (3<<4) /* 24-bit MSB-first, left-justified format data */
47#define PCM1792_FMT_16_I2S (4<<4) /* 16-bit I2S format data */
48#define PCM1792_FMT_24_I2S (5<<4) /* 24-bit I2S format data */
49
50/* Sampling Frequency Selection for the De-Emphasis Function */
51#define PCM1792_DMF_DISABLE (0<<2)
52#define PCM1792_DMF_48 (1<<2)
53#define PCM1792_DMF_44 (2<<2)
54#define PCM1792_DMF_32 (2<<2)
55
56/* Digital De-Emphasis Control */
57#define PCM1792_DME_OFF (0<<1)
58#define PCM1792_DME_ON (1<<1)
59
60/* Soft Mute Control */
61#define PCM1792_MUTE_OFF (0<<0)
62#define PCM1792_MUTE_ON (1<<0)
63
64
65/**
66 * Register #19
67 */
68/* Output Phase Reversal */
69#define PCM1792_REV_OFF (0<<7)
70#define PCM1792_REV_ON (1<<7)
71
72/* Attenuation Rate Select */
73#define PCM1792_ATS_DIV1 (0<<5)
74#define PCM1792_ATS_DIV2 (1<<5)
75#define PCM1792_ATS_DIV4 (2<<5)
76#define PCM1792_ATS_DIV8 (4<<5)
77
78/* DAC Operation Control */
79#define PCM1792_OPE_ON (0<<4)
80#define PCM1792_OPE_OFF (1<<4)
81
82/* Stereo DF Bypass Mode Select */
83#define PCM1792_DFMS_MONO (0<<2)
84#define PCM1792_DFMS_STERO (1<<2)
85
86/* Digital Filter Rolloff Control */
87#define PCM1792_FLT_SHARP (0<<1)
88#define PCM1792_FLT_SLOW (1<<1)
89
90/* Infinite Zero Detect Mute Control */
91#define PCM1792_INZD_OFF (0<<0)
92#define PCM1792_INZD_ON (1<<0)
93
94
95/**
96 * Register #20
97 */
98/* System Reset Control */
99#define PCM1792_SRST_NORMAL (0<<6)
100#define PCM1792_SRST_RESET (1<<6)
101
102/* DSD Interface Mode Control */
103#define PCM1792_DSD_OFF (0<<5)
104#define PCM1792_DSD_ON (1<<5)
105
106/* Digital Filter Bypass (or Through Mode) Control */
107#define PCM1792_DFTH_ENABLE (0<<4) /* Digital filter enabled */
108#define PCM1792_DFTH_BYPASS (1<<4) /* Digital filter bypassed
109 for external digital filter */
110
111/* Monaural Mode Selection */
112#define PCM1792_STEREO (0<<3)
113#define PCM1792_MONO (1<<3)
114
115/* Channel Selection for Monaural Mode */
116#define PCM1792_CHSL_L (0<<2)
117#define PCM1792_CHSL_R (1<<2)
118
119/* Delta-Sigma Oversampling Rate Selection */
120#define PCM1792_OS_64 (0<<0)
121#define PCM1792_OS_32 (1<<0)
122#define PCM1792_OS_128 (2<<0)
123
124/**
125 * Register #21
126 */
127/* DSD Zero Output Enable */
128#define PCM1792_DZ_DISABLE (0<<1)
129#define PCM1792_DZ_EVEN (1<<1) /* Even pattern detect */
130#define PCM1792_DZ_96H (2<<1) /* 96h pattern detect */
131
132/* PCM Zero Output Enable */
133#define PCM1792_PCMZ_OFF (0<<0)
134#define PCM1792_PCMZ_ON (1<<0)
135
136void audiohw_mute(void);
137void pcm1792_set_ml(const int);
138void pcm1792_set_mc(const int);
139void pcm1792_set_md(const int);
140void pcm1792_set_ml_dir(const int);
141
142#endif