summaryrefslogtreecommitdiffstats
path: root/firmware/export
diff options
context:
space:
mode:
authorAndrew Ryabinin <ryabinin.a.a@gmail.com>2013-06-02 23:03:26 +0400
committerAndrew Ryabinin <ryabinin.a.a@gmail.com>2013-11-05 09:59:45 +0400
commit3a97e12fc58bd413c81d827c7b32a8cfd08b4d2b (patch)
tree4a827d570ab32161783d9327a748d87f601605c5 /firmware/export
parenta170c99170589488531f7f576ad5e248b1c7c589 (diff)
downloadrockbox-3a97e12fc58bd413c81d827c7b32a8cfd08b4d2b.tar.gz
rockbox-3a97e12fc58bd413c81d827c7b32a8cfd08b4d2b.zip
Introduce HiFi E.T. MA8/MA8C ports.
HiFi E.T. MA8 is almost the same as MA9 except another DAC(pcm1792 in ma8, df1704 in ma9). MA8 has ILI9342 lcd, MA8C has ILI9342C lcd. Change-Id: If2ac04f5a3382590b2a392c46286559f54b2ed6a
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
#include "dummy_codec.h"
#elif defined(HAVE_DF1704_CODEC)
#include "df1704.h"
+#elif defined(HAVE_PCM1792_CODEC)
+#include "pcm1792.h"
#elif (CONFIG_PLATFORM & (PLATFORM_ANDROID | PLATFORM_MAEMO\
| PLATFORM_PANDORA | PLATFORM_SDL))
#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 */
#include "config/hifietma9.h"
#elif defined(MA9C)
#include "config/hifietma9c.h"
+#elif defined(MA8)
+#include "config/hifietma8.h"
+#elif defined(MA8C)
+#include "config/hifietma8c.h"
#elif defined(SONY_NWZE370)
#include "config/sonynwze370.h"
#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 @@
+/*
+ * This config file is for HiFi E.T. MA8 reference design
+ */
+
+/* For Rolo and boot loader */
+#define MODEL_NUMBER 85
+
+#define MODEL_NAME "HiFi E.T. MA8"
+
+/* define the bitmask of hardware sample rates */
+#define HW_SAMPR_CAPS (SAMPR_CAP_96 | SAMPR_CAP_48 | SAMPR_CAP_44 | \
+ SAMPR_CAP_32 | SAMPR_CAP_24 | SAMPR_CAP_22 | \
+ SAMPR_CAP_16 | SAMPR_CAP_12 | SAMPR_CAP_11 | SAMPR_CAP_8)
+
+#define HAVE_PCM1792_CODEC
+
+#define CODEC_SLAVE
+/* define this if you have a bitmap LCD display */
+#define HAVE_LCD_BITMAP
+
+/* define this if you can flip your LCD */
+/* #define HAVE_LCD_FLIP */
+
+/* define this if you have a colour LCD */
+#define HAVE_LCD_COLOR
+
+/* define this if you want album art for this target */
+#define HAVE_ALBUMART
+
+/* define this to enable bitmap scaling */
+#define HAVE_BMP_SCALING
+
+/* define this to enable JPEG decoding */
+#define HAVE_JPEG
+
+/* define this if you can invert the colours on your LCD */
+/* #define HAVE_LCD_INVERT */
+
+/* define this if you have access to the quickscreen */
+#define HAVE_QUICKSCREEN
+
+/* define this if you would like tagcache to build on this target */
+#define HAVE_TAGCACHE
+
+/* define this if you have a flash memory storage */
+#define HAVE_FLASH_STORAGE
+
+#define CONFIG_STORAGE (STORAGE_SD | STORAGE_NAND)
+
+#define CONFIG_NAND NAND_RK27XX
+#define HAVE_SW_TONE_CONTROLS
+
+/* commented for now */
+/* #define HAVE_HOTSWAP */
+
+#define NUM_DRIVES 2
+#define SECTOR_SIZE 512
+
+/* for small(ish) SD cards */
+#define HAVE_FAT16SUPPORT
+
+/* LCD dimensions */
+#define LCD_WIDTH 320
+#define LCD_HEIGHT 240
+#define LCD_DEPTH 16 /* pseudo 262.144 colors */
+#define LCD_PIXELFORMAT RGB565 /* rgb565 */
+
+/* Define this if your LCD can be enabled/disabled */
+#define HAVE_LCD_ENABLE
+
+#define CONFIG_KEYPAD MA_PAD
+
+/* Define this to enable morse code input */
+#define HAVE_MORSE_INPUT
+
+/* Define this if you do software codec */
+#define CONFIG_CODEC SWCODEC
+
+#define CONFIG_LCD LCD_ILI9342
+
+/* Define this for LCD backlight available */
+#define HAVE_BACKLIGHT
+#define HAVE_BACKLIGHT_BRIGHTNESS
+#define MIN_BRIGHTNESS_SETTING 0
+#define MAX_BRIGHTNESS_SETTING 31
+#define DEFAULT_BRIGHTNESS_SETTING 31
+#define CONFIG_BACKLIGHT_FADING BACKLIGHT_FADING_SW_HW_REG
+
+/* Define this if you have a software controlled poweroff */
+#define HAVE_SW_POWEROFF
+
+/* The number of bytes reserved for loadable codecs */
+#define CODEC_SIZE 0x100000
+
+/* The number of bytes reserved for loadable plugins */
+#define PLUGIN_BUFFER_SIZE 0x80000
+
+/* TODO: Figure out real values */
+#define BATTERY_CAPACITY_DEFAULT 600 /* default battery capacity */
+#define BATTERY_CAPACITY_MIN 300 /* min. capacity selectable */
+#define BATTERY_CAPACITY_MAX 600 /* max. capacity selectable */
+#define BATTERY_CAPACITY_INC 10 /* capacity increment */
+#define BATTERY_TYPES_COUNT 1 /* only one type */
+
+#define CONFIG_BATTERY_MEASURE VOLTAGE_MEASURE
+
+/* Hardware controlled charging with monitoring */
+#define CONFIG_CHARGING CHARGING_MONITOR
+
+/* USB On-the-go */
+#define CONFIG_USBOTG USBOTG_RK27XX
+
+/* enable these for the experimental usb stack */
+#define HAVE_USBSTACK
+
+#define USE_ROCKBOX_USB
+#define USB_VENDOR_ID 0x071b
+#define USB_PRODUCT_ID 0x3202
+#define HAVE_BOOTLOADER_USB_MODE
+
+/* Define this if your LCD can set contrast */
+/* #define HAVE_LCD_CONTRAST */
+
+/* The exact type of CPU */
+#define CONFIG_CPU RK27XX
+
+/* I2C interface */
+#define CONFIG_I2C I2C_RK27XX
+
+/* Define this to the CPU frequency */
+#define CPU_FREQ 200000000
+
+/* define this if the hardware can be powered off while charging */
+/* #define HAVE_POWEROFF_WHILE_CHARGING */
+
+/* Offset ( in the firmware file's header ) to the file CRC */
+#define FIRMWARE_OFFSET_FILE_CRC 0
+
+/* Offset ( in the firmware file's header ) to the real data */
+#define FIRMWARE_OFFSET_FILE_DATA 8
+
+#define STORAGE_NEEDS_ALIGN
+
+/* Define this if you have adjustable CPU frequency */
+#define HAVE_ADJUSTABLE_CPU_FREQ
+
+/* Virtual LED (icon) */
+#define CONFIG_LED LED_VIRTUAL
+
+#define RKW_FORMAT
+#define BOOTFILE_EXT "rkw"
+#define BOOTFILE "rockbox." BOOTFILE_EXT
+#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 @@
+/*
+ * This config file is for HiFi E.T. MA8 reference design
+ */
+
+/* For Rolo and boot loader */
+#define MODEL_NUMBER 91
+
+#define MODEL_NAME "HiFi E.T. MA8C"
+
+/* define the bitmask of hardware sample rates */
+#define HW_SAMPR_CAPS (SAMPR_CAP_96 | SAMPR_CAP_48 | SAMPR_CAP_44 | \
+ SAMPR_CAP_32 | SAMPR_CAP_24 | SAMPR_CAP_22 | \
+ SAMPR_CAP_16 | SAMPR_CAP_12 | SAMPR_CAP_11 | SAMPR_CAP_8)
+
+#define HAVE_PCM1792_CODEC
+
+#define CODEC_SLAVE
+/* define this if you have a bitmap LCD display */
+#define HAVE_LCD_BITMAP
+
+/* define this if you can flip your LCD */
+/* #define HAVE_LCD_FLIP */
+
+/* define this if you have a colour LCD */
+#define HAVE_LCD_COLOR
+
+/* define this if you want album art for this target */
+#define HAVE_ALBUMART
+
+/* define this to enable bitmap scaling */
+#define HAVE_BMP_SCALING
+
+/* define this to enable JPEG decoding */
+#define HAVE_JPEG
+
+/* define this if you can invert the colours on your LCD */
+/* #define HAVE_LCD_INVERT */
+
+/* define this if you have access to the quickscreen */
+#define HAVE_QUICKSCREEN
+
+/* define this if you would like tagcache to build on this target */
+#define HAVE_TAGCACHE
+
+/* define this if you have a flash memory storage */
+#define HAVE_FLASH_STORAGE
+
+#define CONFIG_STORAGE (STORAGE_SD | STORAGE_NAND)
+
+#define CONFIG_NAND NAND_RK27XX
+#define HAVE_SW_TONE_CONTROLS
+
+/* commented for now */
+/* #define HAVE_HOTSWAP */
+
+#define NUM_DRIVES 2
+#define SECTOR_SIZE 512
+
+/* for small(ish) SD cards */
+#define HAVE_FAT16SUPPORT
+
+/* LCD dimensions */
+#define LCD_WIDTH 320
+#define LCD_HEIGHT 240
+#define LCD_DEPTH 16 /* pseudo 262.144 colors */
+#define LCD_PIXELFORMAT RGB565 /* rgb565 */
+
+/* Define this if your LCD can be enabled/disabled */
+#define HAVE_LCD_ENABLE
+
+#define CONFIG_KEYPAD MA_PAD
+
+/* Define this to enable morse code input */
+#define HAVE_MORSE_INPUT
+
+/* Define this if you do software codec */
+#define CONFIG_CODEC SWCODEC
+
+#define CONFIG_LCD LCD_ILI9342C
+
+/* Define this for LCD backlight available */
+#define HAVE_BACKLIGHT
+#define HAVE_BACKLIGHT_BRIGHTNESS
+#define MIN_BRIGHTNESS_SETTING 0
+#define MAX_BRIGHTNESS_SETTING 31
+#define DEFAULT_BRIGHTNESS_SETTING 31
+#define CONFIG_BACKLIGHT_FADING BACKLIGHT_FADING_SW_HW_REG
+
+/* Define this if you have a software controlled poweroff */
+#define HAVE_SW_POWEROFF
+
+/* The number of bytes reserved for loadable codecs */
+#define CODEC_SIZE 0x100000
+
+/* The number of bytes reserved for loadable plugins */
+#define PLUGIN_BUFFER_SIZE 0x80000
+
+/* TODO: Figure out real values */
+#define BATTERY_CAPACITY_DEFAULT 600 /* default battery capacity */
+#define BATTERY_CAPACITY_MIN 300 /* min. capacity selectable */
+#define BATTERY_CAPACITY_MAX 600 /* max. capacity selectable */
+#define BATTERY_CAPACITY_INC 10 /* capacity increment */
+#define BATTERY_TYPES_COUNT 1 /* only one type */
+
+#define CONFIG_BATTERY_MEASURE VOLTAGE_MEASURE
+
+/* Hardware controlled charging with monitoring */
+#define CONFIG_CHARGING CHARGING_MONITOR
+
+/* USB On-the-go */
+#define CONFIG_USBOTG USBOTG_RK27XX
+
+/* enable these for the experimental usb stack */
+#define HAVE_USBSTACK
+
+#define USE_ROCKBOX_USB
+#define USB_VENDOR_ID 0x071b
+#define USB_PRODUCT_ID 0x3202
+#define HAVE_BOOTLOADER_USB_MODE
+
+/* Define this if your LCD can set contrast */
+/* #define HAVE_LCD_CONTRAST */
+
+/* The exact type of CPU */
+#define CONFIG_CPU RK27XX
+
+/* I2C interface */
+#define CONFIG_I2C I2C_RK27XX
+
+/* Define this to the CPU frequency */
+#define CPU_FREQ 200000000
+
+/* define this if the hardware can be powered off while charging */
+/* #define HAVE_POWEROFF_WHILE_CHARGING */
+
+/* Offset ( in the firmware file's header ) to the file CRC */
+#define FIRMWARE_OFFSET_FILE_CRC 0
+
+/* Offset ( in the firmware file's header ) to the real data */
+#define FIRMWARE_OFFSET_FILE_DATA 8
+
+#define STORAGE_NEEDS_ALIGN
+
+/* Define this if you have adjustable CPU frequency */
+#define HAVE_ADJUSTABLE_CPU_FREQ
+
+/* Virtual LED (icon) */
+#define CONFIG_LED LED_VIRTUAL
+
+#define RKW_FORMAT
+#define BOOTFILE_EXT "rkw"
+#define BOOTFILE "rockbox." BOOTFILE_EXT
+#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 @@
+/***************************************************************************
+ * __________ __ ___.
+ * Open \______ \ ____ ____ | | _\_ |__ _______ ___
+ * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
+ * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
+ * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
+ * \/ \/ \/ \/ \/
+ * $Id$
+ *
+ *
+ * Copyright (c) 2013 Andrew Ryabinin
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+ * KIND, either express or implied.
+ *
+ ****************************************************************************/
+
+#ifndef _PCM1792_H
+#define _PCM1792_H
+
+#define PCM1792_VOLUME_MIN -1270
+#define PCM1792_VOLUME_MAX 0
+
+#define AUDIOHW_CAPS (FILTER_ROLL_OFF_CAP)
+AUDIOHW_SETTING(VOLUME, "dB", 0, 1, PCM1792_VOLUME_MIN/10, PCM1792_VOLUME_MAX/10, 0)
+AUDIOHW_SETTING(FILTER_ROLL_OFF, "", 0, 1, 0, 1, 0)
+
+#define PCM1792_REG(x) (((x)&0x1f)<<8)
+
+/**
+ * Register #18
+ */
+/* Attenuation Load Control */
+#define PCM1792_ATLD_OFF (0<<7)
+#define PCM1792_ATLD_ON (1<<7)
+
+/* Audio Interface Data Format */
+#define PCM1792_FMT_16_RJ (0<<4) /* 16-bit standard format, right-justified data */
+#define PCM1792_FMT_20_RJ (1<<4) /* 20-bit standard format, right-justified data */
+#define PCM1792_FMT_24_RJ (2<<4) /* 24-bit standard format, right-justified data */
+#define PCM1792_FMT_24_MSB_I2S (3<<4) /* 24-bit MSB-first, left-justified format data */
+#define PCM1792_FMT_16_I2S (4<<4) /* 16-bit I2S format data */
+#define PCM1792_FMT_24_I2S (5<<4) /* 24-bit I2S format data */
+
+/* Sampling Frequency Selection for the De-Emphasis Function */
+#define PCM1792_DMF_DISABLE (0<<2)
+#define PCM1792_DMF_48 (1<<2)
+#define PCM1792_DMF_44 (2<<2)
+#define PCM1792_DMF_32 (2<<2)
+
+/* Digital De-Emphasis Control */
+#define PCM1792_DME_OFF (0<<1)
+#define PCM1792_DME_ON (1<<1)
+
+/* Soft Mute Control */
+#define PCM1792_MUTE_OFF (0<<0)
+#define PCM1792_MUTE_ON (1<<0)
+
+
+/**
+ * Register #19
+ */
+/* Output Phase Reversal */
+#define PCM1792_REV_OFF (0<<7)
+#define PCM1792_REV_ON (1<<7)
+
+/* Attenuation Rate Select */
+#define PCM1792_ATS_DIV1 (0<<5)
+#define PCM1792_ATS_DIV2 (1<<5)
+#define PCM1792_ATS_DIV4 (2<<5)
+#define PCM1792_ATS_DIV8 (4<<5)
+
+/* DAC Operation Control */
+#define PCM1792_OPE_ON (0<<4)
+#define PCM1792_OPE_OFF (1<<4)
+
+/* Stereo DF Bypass Mode Select */
+#define PCM1792_DFMS_MONO (0<<2)
+#define PCM1792_DFMS_STERO (1<<2)
+
+/* Digital Filter Rolloff Control */
+#define PCM1792_FLT_SHARP (0<<1)
+#define PCM1792_FLT_SLOW (1<<1)
+
+/* Infinite Zero Detect Mute Control */
+#define PCM1792_INZD_OFF (0<<0)
+#define PCM1792_INZD_ON (1<<0)
+
+
+/**
+ * Register #20
+ */
+/* System Reset Control */
+#define PCM1792_SRST_NORMAL (0<<6)
+#define PCM1792_SRST_RESET (1<<6)
+
+/* DSD Interface Mode Control */
+#define PCM1792_DSD_OFF (0<<5)
+#define PCM1792_DSD_ON (1<<5)
+
+/* Digital Filter Bypass (or Through Mode) Control */
+#define PCM1792_DFTH_ENABLE (0<<4) /* Digital filter enabled */
+#define PCM1792_DFTH_BYPASS (1<<4) /* Digital filter bypassed
+ for external digital filter */
+
+/* Monaural Mode Selection */
+#define PCM1792_STEREO (0<<3)
+#define PCM1792_MONO (1<<3)
+
+/* Channel Selection for Monaural Mode */
+#define PCM1792_CHSL_L (0<<2)
+#define PCM1792_CHSL_R (1<<2)
+
+/* Delta-Sigma Oversampling Rate Selection */
+#define PCM1792_OS_64 (0<<0)
+#define PCM1792_OS_32 (1<<0)
+#define PCM1792_OS_128 (2<<0)
+
+/**
+ * Register #21
+ */
+/* DSD Zero Output Enable */
+#define PCM1792_DZ_DISABLE (0<<1)
+#define PCM1792_DZ_EVEN (1<<1) /* Even pattern detect */
+#define PCM1792_DZ_96H (2<<1) /* 96h pattern detect */
+
+/* PCM Zero Output Enable */
+#define PCM1792_PCMZ_OFF (0<<0)
+#define PCM1792_PCMZ_ON (1<<0)
+
+void audiohw_mute(void);
+void pcm1792_set_ml(const int);
+void pcm1792_set_mc(const int);
+void pcm1792_set_md(const int);
+void pcm1792_set_ml_dir(const int);
+
+#endif