···11+/*
22+ * This config file is for HiFi E.T. MA8 reference design
33+ */
44+55+/* For Rolo and boot loader */
66+#define MODEL_NUMBER 85
77+88+#define MODEL_NAME "HiFi E.T. MA8"
99+1010+/* define the bitmask of hardware sample rates */
1111+#define HW_SAMPR_CAPS (SAMPR_CAP_96 | SAMPR_CAP_48 | SAMPR_CAP_44 | \
1212+ SAMPR_CAP_32 | SAMPR_CAP_24 | SAMPR_CAP_22 | \
1313+ SAMPR_CAP_16 | SAMPR_CAP_12 | SAMPR_CAP_11 | SAMPR_CAP_8)
1414+1515+#define HAVE_PCM1792_CODEC
1616+1717+#define CODEC_SLAVE
1818+/* define this if you have a bitmap LCD display */
1919+#define HAVE_LCD_BITMAP
2020+2121+/* define this if you can flip your LCD */
2222+/* #define HAVE_LCD_FLIP */
2323+2424+/* define this if you have a colour LCD */
2525+#define HAVE_LCD_COLOR
2626+2727+/* define this if you want album art for this target */
2828+#define HAVE_ALBUMART
2929+3030+/* define this to enable bitmap scaling */
3131+#define HAVE_BMP_SCALING
3232+3333+/* define this to enable JPEG decoding */
3434+#define HAVE_JPEG
3535+3636+/* define this if you can invert the colours on your LCD */
3737+/* #define HAVE_LCD_INVERT */
3838+3939+/* define this if you have access to the quickscreen */
4040+#define HAVE_QUICKSCREEN
4141+4242+/* define this if you would like tagcache to build on this target */
4343+#define HAVE_TAGCACHE
4444+4545+/* define this if you have a flash memory storage */
4646+#define HAVE_FLASH_STORAGE
4747+4848+#define CONFIG_STORAGE (STORAGE_SD | STORAGE_NAND)
4949+5050+#define CONFIG_NAND NAND_RK27XX
5151+#define HAVE_SW_TONE_CONTROLS
5252+5353+/* commented for now */
5454+/* #define HAVE_HOTSWAP */
5555+5656+#define NUM_DRIVES 2
5757+#define SECTOR_SIZE 512
5858+5959+/* for small(ish) SD cards */
6060+#define HAVE_FAT16SUPPORT
6161+6262+/* LCD dimensions */
6363+#define LCD_WIDTH 320
6464+#define LCD_HEIGHT 240
6565+#define LCD_DEPTH 16 /* pseudo 262.144 colors */
6666+#define LCD_PIXELFORMAT RGB565 /* rgb565 */
6767+6868+/* Define this if your LCD can be enabled/disabled */
6969+#define HAVE_LCD_ENABLE
7070+7171+#define CONFIG_KEYPAD MA_PAD
7272+7373+/* Define this to enable morse code input */
7474+#define HAVE_MORSE_INPUT
7575+7676+/* Define this if you do software codec */
7777+#define CONFIG_CODEC SWCODEC
7878+7979+#define CONFIG_LCD LCD_ILI9342
8080+8181+/* Define this for LCD backlight available */
8282+#define HAVE_BACKLIGHT
8383+#define HAVE_BACKLIGHT_BRIGHTNESS
8484+#define MIN_BRIGHTNESS_SETTING 0
8585+#define MAX_BRIGHTNESS_SETTING 31
8686+#define DEFAULT_BRIGHTNESS_SETTING 31
8787+#define CONFIG_BACKLIGHT_FADING BACKLIGHT_FADING_SW_HW_REG
8888+8989+/* Define this if you have a software controlled poweroff */
9090+#define HAVE_SW_POWEROFF
9191+9292+/* The number of bytes reserved for loadable codecs */
9393+#define CODEC_SIZE 0x100000
9494+9595+/* The number of bytes reserved for loadable plugins */
9696+#define PLUGIN_BUFFER_SIZE 0x80000
9797+9898+/* TODO: Figure out real values */
9999+#define BATTERY_CAPACITY_DEFAULT 600 /* default battery capacity */
100100+#define BATTERY_CAPACITY_MIN 300 /* min. capacity selectable */
101101+#define BATTERY_CAPACITY_MAX 600 /* max. capacity selectable */
102102+#define BATTERY_CAPACITY_INC 10 /* capacity increment */
103103+#define BATTERY_TYPES_COUNT 1 /* only one type */
104104+105105+#define CONFIG_BATTERY_MEASURE VOLTAGE_MEASURE
106106+107107+/* Hardware controlled charging with monitoring */
108108+#define CONFIG_CHARGING CHARGING_MONITOR
109109+110110+/* USB On-the-go */
111111+#define CONFIG_USBOTG USBOTG_RK27XX
112112+113113+/* enable these for the experimental usb stack */
114114+#define HAVE_USBSTACK
115115+116116+#define USE_ROCKBOX_USB
117117+#define USB_VENDOR_ID 0x071b
118118+#define USB_PRODUCT_ID 0x3202
119119+#define HAVE_BOOTLOADER_USB_MODE
120120+121121+/* Define this if your LCD can set contrast */
122122+/* #define HAVE_LCD_CONTRAST */
123123+124124+/* The exact type of CPU */
125125+#define CONFIG_CPU RK27XX
126126+127127+/* I2C interface */
128128+#define CONFIG_I2C I2C_RK27XX
129129+130130+/* Define this to the CPU frequency */
131131+#define CPU_FREQ 200000000
132132+133133+/* define this if the hardware can be powered off while charging */
134134+/* #define HAVE_POWEROFF_WHILE_CHARGING */
135135+136136+/* Offset ( in the firmware file's header ) to the file CRC */
137137+#define FIRMWARE_OFFSET_FILE_CRC 0
138138+139139+/* Offset ( in the firmware file's header ) to the real data */
140140+#define FIRMWARE_OFFSET_FILE_DATA 8
141141+142142+#define STORAGE_NEEDS_ALIGN
143143+144144+/* Define this if you have adjustable CPU frequency */
145145+#define HAVE_ADJUSTABLE_CPU_FREQ
146146+147147+/* Virtual LED (icon) */
148148+#define CONFIG_LED LED_VIRTUAL
149149+150150+#define RKW_FORMAT
151151+#define BOOTFILE_EXT "rkw"
152152+#define BOOTFILE "rockbox." BOOTFILE_EXT
153153+#define BOOTDIR "/.rockbox"
+153
firmware/export/config/hifietma8c.h
···11+/*
22+ * This config file is for HiFi E.T. MA8 reference design
33+ */
44+55+/* For Rolo and boot loader */
66+#define MODEL_NUMBER 91
77+88+#define MODEL_NAME "HiFi E.T. MA8C"
99+1010+/* define the bitmask of hardware sample rates */
1111+#define HW_SAMPR_CAPS (SAMPR_CAP_96 | SAMPR_CAP_48 | SAMPR_CAP_44 | \
1212+ SAMPR_CAP_32 | SAMPR_CAP_24 | SAMPR_CAP_22 | \
1313+ SAMPR_CAP_16 | SAMPR_CAP_12 | SAMPR_CAP_11 | SAMPR_CAP_8)
1414+1515+#define HAVE_PCM1792_CODEC
1616+1717+#define CODEC_SLAVE
1818+/* define this if you have a bitmap LCD display */
1919+#define HAVE_LCD_BITMAP
2020+2121+/* define this if you can flip your LCD */
2222+/* #define HAVE_LCD_FLIP */
2323+2424+/* define this if you have a colour LCD */
2525+#define HAVE_LCD_COLOR
2626+2727+/* define this if you want album art for this target */
2828+#define HAVE_ALBUMART
2929+3030+/* define this to enable bitmap scaling */
3131+#define HAVE_BMP_SCALING
3232+3333+/* define this to enable JPEG decoding */
3434+#define HAVE_JPEG
3535+3636+/* define this if you can invert the colours on your LCD */
3737+/* #define HAVE_LCD_INVERT */
3838+3939+/* define this if you have access to the quickscreen */
4040+#define HAVE_QUICKSCREEN
4141+4242+/* define this if you would like tagcache to build on this target */
4343+#define HAVE_TAGCACHE
4444+4545+/* define this if you have a flash memory storage */
4646+#define HAVE_FLASH_STORAGE
4747+4848+#define CONFIG_STORAGE (STORAGE_SD | STORAGE_NAND)
4949+5050+#define CONFIG_NAND NAND_RK27XX
5151+#define HAVE_SW_TONE_CONTROLS
5252+5353+/* commented for now */
5454+/* #define HAVE_HOTSWAP */
5555+5656+#define NUM_DRIVES 2
5757+#define SECTOR_SIZE 512
5858+5959+/* for small(ish) SD cards */
6060+#define HAVE_FAT16SUPPORT
6161+6262+/* LCD dimensions */
6363+#define LCD_WIDTH 320
6464+#define LCD_HEIGHT 240
6565+#define LCD_DEPTH 16 /* pseudo 262.144 colors */
6666+#define LCD_PIXELFORMAT RGB565 /* rgb565 */
6767+6868+/* Define this if your LCD can be enabled/disabled */
6969+#define HAVE_LCD_ENABLE
7070+7171+#define CONFIG_KEYPAD MA_PAD
7272+7373+/* Define this to enable morse code input */
7474+#define HAVE_MORSE_INPUT
7575+7676+/* Define this if you do software codec */
7777+#define CONFIG_CODEC SWCODEC
7878+7979+#define CONFIG_LCD LCD_ILI9342C
8080+8181+/* Define this for LCD backlight available */
8282+#define HAVE_BACKLIGHT
8383+#define HAVE_BACKLIGHT_BRIGHTNESS
8484+#define MIN_BRIGHTNESS_SETTING 0
8585+#define MAX_BRIGHTNESS_SETTING 31
8686+#define DEFAULT_BRIGHTNESS_SETTING 31
8787+#define CONFIG_BACKLIGHT_FADING BACKLIGHT_FADING_SW_HW_REG
8888+8989+/* Define this if you have a software controlled poweroff */
9090+#define HAVE_SW_POWEROFF
9191+9292+/* The number of bytes reserved for loadable codecs */
9393+#define CODEC_SIZE 0x100000
9494+9595+/* The number of bytes reserved for loadable plugins */
9696+#define PLUGIN_BUFFER_SIZE 0x80000
9797+9898+/* TODO: Figure out real values */
9999+#define BATTERY_CAPACITY_DEFAULT 600 /* default battery capacity */
100100+#define BATTERY_CAPACITY_MIN 300 /* min. capacity selectable */
101101+#define BATTERY_CAPACITY_MAX 600 /* max. capacity selectable */
102102+#define BATTERY_CAPACITY_INC 10 /* capacity increment */
103103+#define BATTERY_TYPES_COUNT 1 /* only one type */
104104+105105+#define CONFIG_BATTERY_MEASURE VOLTAGE_MEASURE
106106+107107+/* Hardware controlled charging with monitoring */
108108+#define CONFIG_CHARGING CHARGING_MONITOR
109109+110110+/* USB On-the-go */
111111+#define CONFIG_USBOTG USBOTG_RK27XX
112112+113113+/* enable these for the experimental usb stack */
114114+#define HAVE_USBSTACK
115115+116116+#define USE_ROCKBOX_USB
117117+#define USB_VENDOR_ID 0x071b
118118+#define USB_PRODUCT_ID 0x3202
119119+#define HAVE_BOOTLOADER_USB_MODE
120120+121121+/* Define this if your LCD can set contrast */
122122+/* #define HAVE_LCD_CONTRAST */
123123+124124+/* The exact type of CPU */
125125+#define CONFIG_CPU RK27XX
126126+127127+/* I2C interface */
128128+#define CONFIG_I2C I2C_RK27XX
129129+130130+/* Define this to the CPU frequency */
131131+#define CPU_FREQ 200000000
132132+133133+/* define this if the hardware can be powered off while charging */
134134+/* #define HAVE_POWEROFF_WHILE_CHARGING */
135135+136136+/* Offset ( in the firmware file's header ) to the file CRC */
137137+#define FIRMWARE_OFFSET_FILE_CRC 0
138138+139139+/* Offset ( in the firmware file's header ) to the real data */
140140+#define FIRMWARE_OFFSET_FILE_DATA 8
141141+142142+#define STORAGE_NEEDS_ALIGN
143143+144144+/* Define this if you have adjustable CPU frequency */
145145+#define HAVE_ADJUSTABLE_CPU_FREQ
146146+147147+/* Virtual LED (icon) */
148148+#define CONFIG_LED LED_VIRTUAL
149149+150150+#define RKW_FORMAT
151151+#define BOOTFILE_EXT "rkw"
152152+#define BOOTFILE "rockbox." BOOTFILE_EXT
153153+#define BOOTDIR "/.rockbox"
+142
firmware/export/pcm1792.h
···11+/***************************************************************************
22+ * __________ __ ___.
33+ * Open \______ \ ____ ____ | | _\_ |__ _______ ___
44+ * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
55+ * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
66+ * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
77+ * \/ \/ \/ \/ \/
88+ * $Id$
99+ *
1010+ *
1111+ * Copyright (c) 2013 Andrew Ryabinin
1212+ *
1313+ * This program is free software; you can redistribute it and/or
1414+ * modify it under the terms of the GNU General Public License
1515+ * as published by the Free Software Foundation; either version 2
1616+ * of the License, or (at your option) any later version.
1717+ *
1818+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
1919+ * KIND, either express or implied.
2020+ *
2121+ ****************************************************************************/
2222+2323+#ifndef _PCM1792_H
2424+#define _PCM1792_H
2525+2626+#define PCM1792_VOLUME_MIN -1270
2727+#define PCM1792_VOLUME_MAX 0
2828+2929+#define AUDIOHW_CAPS (FILTER_ROLL_OFF_CAP)
3030+AUDIOHW_SETTING(VOLUME, "dB", 0, 1, PCM1792_VOLUME_MIN/10, PCM1792_VOLUME_MAX/10, 0)
3131+AUDIOHW_SETTING(FILTER_ROLL_OFF, "", 0, 1, 0, 1, 0)
3232+3333+#define PCM1792_REG(x) (((x)&0x1f)<<8)
3434+3535+/**
3636+ * Register #18
3737+ */
3838+/* Attenuation Load Control */
3939+#define PCM1792_ATLD_OFF (0<<7)
4040+#define PCM1792_ATLD_ON (1<<7)
4141+4242+/* Audio Interface Data Format */
4343+#define PCM1792_FMT_16_RJ (0<<4) /* 16-bit standard format, right-justified data */
4444+#define PCM1792_FMT_20_RJ (1<<4) /* 20-bit standard format, right-justified data */
4545+#define PCM1792_FMT_24_RJ (2<<4) /* 24-bit standard format, right-justified data */
4646+#define PCM1792_FMT_24_MSB_I2S (3<<4) /* 24-bit MSB-first, left-justified format data */
4747+#define PCM1792_FMT_16_I2S (4<<4) /* 16-bit I2S format data */
4848+#define PCM1792_FMT_24_I2S (5<<4) /* 24-bit I2S format data */
4949+5050+/* Sampling Frequency Selection for the De-Emphasis Function */
5151+#define PCM1792_DMF_DISABLE (0<<2)
5252+#define PCM1792_DMF_48 (1<<2)
5353+#define PCM1792_DMF_44 (2<<2)
5454+#define PCM1792_DMF_32 (2<<2)
5555+5656+/* Digital De-Emphasis Control */
5757+#define PCM1792_DME_OFF (0<<1)
5858+#define PCM1792_DME_ON (1<<1)
5959+6060+/* Soft Mute Control */
6161+#define PCM1792_MUTE_OFF (0<<0)
6262+#define PCM1792_MUTE_ON (1<<0)
6363+6464+6565+/**
6666+ * Register #19
6767+ */
6868+/* Output Phase Reversal */
6969+#define PCM1792_REV_OFF (0<<7)
7070+#define PCM1792_REV_ON (1<<7)
7171+7272+/* Attenuation Rate Select */
7373+#define PCM1792_ATS_DIV1 (0<<5)
7474+#define PCM1792_ATS_DIV2 (1<<5)
7575+#define PCM1792_ATS_DIV4 (2<<5)
7676+#define PCM1792_ATS_DIV8 (4<<5)
7777+7878+/* DAC Operation Control */
7979+#define PCM1792_OPE_ON (0<<4)
8080+#define PCM1792_OPE_OFF (1<<4)
8181+8282+/* Stereo DF Bypass Mode Select */
8383+#define PCM1792_DFMS_MONO (0<<2)
8484+#define PCM1792_DFMS_STERO (1<<2)
8585+8686+/* Digital Filter Rolloff Control */
8787+#define PCM1792_FLT_SHARP (0<<1)
8888+#define PCM1792_FLT_SLOW (1<<1)
8989+9090+/* Infinite Zero Detect Mute Control */
9191+#define PCM1792_INZD_OFF (0<<0)
9292+#define PCM1792_INZD_ON (1<<0)
9393+9494+9595+/**
9696+ * Register #20
9797+ */
9898+/* System Reset Control */
9999+#define PCM1792_SRST_NORMAL (0<<6)
100100+#define PCM1792_SRST_RESET (1<<6)
101101+102102+/* DSD Interface Mode Control */
103103+#define PCM1792_DSD_OFF (0<<5)
104104+#define PCM1792_DSD_ON (1<<5)
105105+106106+/* Digital Filter Bypass (or Through Mode) Control */
107107+#define PCM1792_DFTH_ENABLE (0<<4) /* Digital filter enabled */
108108+#define PCM1792_DFTH_BYPASS (1<<4) /* Digital filter bypassed
109109+ for external digital filter */
110110+111111+/* Monaural Mode Selection */
112112+#define PCM1792_STEREO (0<<3)
113113+#define PCM1792_MONO (1<<3)
114114+115115+/* Channel Selection for Monaural Mode */
116116+#define PCM1792_CHSL_L (0<<2)
117117+#define PCM1792_CHSL_R (1<<2)
118118+119119+/* Delta-Sigma Oversampling Rate Selection */
120120+#define PCM1792_OS_64 (0<<0)
121121+#define PCM1792_OS_32 (1<<0)
122122+#define PCM1792_OS_128 (2<<0)
123123+124124+/**
125125+ * Register #21
126126+ */
127127+/* DSD Zero Output Enable */
128128+#define PCM1792_DZ_DISABLE (0<<1)
129129+#define PCM1792_DZ_EVEN (1<<1) /* Even pattern detect */
130130+#define PCM1792_DZ_96H (2<<1) /* 96h pattern detect */
131131+132132+/* PCM Zero Output Enable */
133133+#define PCM1792_PCMZ_OFF (0<<0)
134134+#define PCM1792_PCMZ_ON (1<<0)
135135+136136+void audiohw_mute(void);
137137+void pcm1792_set_ml(const int);
138138+void pcm1792_set_mc(const int);
139139+void pcm1792_set_md(const int);
140140+void pcm1792_set_ml_dir(const int);
141141+142142+#endif