A modern Music Player Daemon based on Rockbox open source high quality audio player
libadwaita audio rust zig deno mpris rockbox mpd

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

+645 -7
+1 -1
bootloader/SOURCES
··· 68 68 #elif defined(MPIO_HD200) || defined(MPIO_HD300) 69 69 mpio_hd200_hd300.c 70 70 #elif defined(RK27_GENERIC) || defined(HM60X) || defined(HM801) \ 71 - || defined(MA9) || defined(MA9C) 71 + || defined(MA9) || defined(MA9C) || defined(MA8) || defined(MA8C) 72 72 rk27xx.c 73 73 show_logo.c 74 74 #elif defined(SANSA_CONNECT)
+3 -1
firmware/SOURCES
··· 411 411 drivers/audio/dummy_codec.c 412 412 #elif defined (HAVE_DF1704_CODEC) 413 413 drivers/audio/df1704.c 414 + #elif defined (HAVE_PCM1792_CODEC) 415 + drivers/audio/pcm1792.c 414 416 #endif /* defined(HAVE_*) */ 415 417 #else /* PLATFORM_HOSTED */ 416 418 #if defined(SAMSUNG_YPR0) && defined(HAVE_AS3514) ··· 1745 1747 target/arm/rk27xx/hm801/power-hm801.c 1746 1748 #endif 1747 1749 1748 - #if defined(MA9) || defined(MA9C) 1750 + #if defined(MA9) || defined(MA9C) || defined(MA8) || defined(MA8C) 1749 1751 target/arm/rk27xx/ma/button-ma.c 1750 1752 target/arm/rk27xx/ma/powermgmt-ma.c 1751 1753 target/arm/rk27xx/ma/power-ma.c
+133
firmware/drivers/audio/pcm1792.c
··· 1 + /*************************************************************************** 2 + * __________ __ ___. 3 + * Open \______ \ ____ ____ | | _\_ |__ _______ ___ 4 + * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / 5 + * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < 6 + * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ 7 + * \/ \/ \/ \/ \/ 8 + * $Id$ 9 + * 10 + * Copyright (C) 2013 Andrew Ryabinin 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 + #include "system.h" 23 + #include "pcm1792.h" 24 + #include "config.h" 25 + #include "audio.h" 26 + #include "audiohw.h" 27 + 28 + /* pcm1792 registers initial values */ 29 + #define REG18_INIT_VALUE (PCM1792_ATLD_OFF|PCM1792_FMT_16_I2S| \ 30 + PCM1792_DMF_DISABLE|PCM1792_DME_OFF) 31 + 32 + #define REG19_INIT_VALUE (PCM1792_REV_ON|PCM1792_ATS_DIV1| \ 33 + PCM1792_OPE_ON|PCM1792_DFMS_MONO| \ 34 + PCM1792_FLT_SHARP|PCM1792_INZD_OFF) 35 + 36 + #define REG20_INIT_VALUE (PCM1792_SRST_NORMAL|PCM1792_DSD_OFF|\ 37 + PCM1792_DFTH_ENABLE|PCM1792_STEREO|\ 38 + PCM1792_OS_64) 39 + 40 + #define REG21_INIT_VALUE (PCM1792_DZ_DISABLE|PCM1792_PCMZ_ON) 41 + 42 + 43 + static void pcm1792_write_reg(const int reg, const unsigned int value) 44 + { 45 + int i; 46 + 47 + pcm1792_set_ml_dir(0); 48 + pcm1792_set_md(1); 49 + pcm1792_set_mc(0); 50 + pcm1792_set_ml(0); 51 + 52 + for (i = (1<<15); i; i >>= 1) { 53 + udelay(40); 54 + pcm1792_set_mc(0); 55 + 56 + if ((reg|value) & i) { 57 + pcm1792_set_md(1); 58 + } else { 59 + pcm1792_set_md(0); 60 + } 61 + 62 + udelay(40); 63 + pcm1792_set_mc(1); 64 + } 65 + 66 + udelay(40); 67 + pcm1792_set_ml(1); 68 + pcm1792_set_mc(0); 69 + udelay(130); 70 + pcm1792_set_md(1); 71 + } 72 + 73 + static int vol_tenthdb2hw(const int tdb) 74 + { 75 + if (tdb < PCM1792_VOLUME_MIN) { 76 + return 0; 77 + } else if (tdb > PCM1792_VOLUME_MAX) { 78 + return 0xff; 79 + } else { 80 + return (tdb/5+0xff); 81 + } 82 + } 83 + 84 + 85 + void audiohw_init(void) 86 + { 87 + pcm1792_write_reg(PCM1792_REG(18), REG18_INIT_VALUE); 88 + pcm1792_write_reg(PCM1792_REG(19), REG19_INIT_VALUE); 89 + pcm1792_write_reg(PCM1792_REG(20), REG20_INIT_VALUE); 90 + pcm1792_write_reg(PCM1792_REG(21), REG21_INIT_VALUE); 91 + 92 + /* Left & Right volumes */ 93 + pcm1792_write_reg(PCM1792_REG(16), 0xff); 94 + pcm1792_write_reg(PCM1792_REG(17), 0xff); 95 + } 96 + 97 + void audiohw_mute(void) 98 + { 99 + pcm1792_write_reg(PCM1792_REG(18), REG18_INIT_VALUE|PCM1792_MUTE_ON); 100 + } 101 + 102 + void audiohw_unmute(void) 103 + { 104 + pcm1792_write_reg(PCM1792_REG(18), REG18_INIT_VALUE); 105 + } 106 + 107 + void audiohw_preinit(void) 108 + { 109 + } 110 + 111 + void audiohw_set_frequency(int fsel) 112 + { 113 + (void)fsel; 114 + } 115 + 116 + void audiohw_set_volume(int vol_l, int vol_r) 117 + { 118 + pcm1792_write_reg(PCM1792_REG(16), vol_tenthdb2hw(vol_l)); 119 + pcm1792_write_reg(PCM1792_REG(17), vol_tenthdb2hw(vol_r)); 120 + } 121 + 122 + void audiohw_set_filter_roll_off(int value) 123 + { 124 + if (value == 0) { 125 + pcm1792_write_reg(PCM1792_REG(19), 126 + REG19_INIT_VALUE 127 + |PCM1792_FLT_SHARP); 128 + } else { 129 + pcm1792_write_reg(PCM1792_REG(19), 130 + REG19_INIT_VALUE 131 + |PCM1792_FLT_SLOW); 132 + } 133 + }
+2
firmware/export/audiohw.h
··· 109 109 #include "dummy_codec.h" 110 110 #elif defined(HAVE_DF1704_CODEC) 111 111 #include "df1704.h" 112 + #elif defined(HAVE_PCM1792_CODEC) 113 + #include "pcm1792.h" 112 114 #elif (CONFIG_PLATFORM & (PLATFORM_ANDROID | PLATFORM_MAEMO\ 113 115 | PLATFORM_PANDORA | PLATFORM_SDL)) 114 116 #include "hosted_codec.h"
+4
firmware/export/config.h
··· 535 535 #include "config/hifietma9.h" 536 536 #elif defined(MA9C) 537 537 #include "config/hifietma9c.h" 538 + #elif defined(MA8) 539 + #include "config/hifietma8.h" 540 + #elif defined(MA8C) 541 + #include "config/hifietma8c.h" 538 542 #elif defined(SONY_NWZE370) 539 543 #include "config/sonynwze370.h" 540 544 #elif defined(SONY_NWZE360)
+153
firmware/export/config/hifietma8.h
··· 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"
+153
firmware/export/config/hifietma8c.h
··· 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"
+142
firmware/export/pcm1792.h
··· 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) 30 + AUDIOHW_SETTING(VOLUME, "dB", 0, 1, PCM1792_VOLUME_MIN/10, PCM1792_VOLUME_MAX/10, 0) 31 + AUDIOHW_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 + 136 + void audiohw_mute(void); 137 + void pcm1792_set_ml(const int); 138 + void pcm1792_set_mc(const int); 139 + void pcm1792_set_md(const int); 140 + void pcm1792_set_ml_dir(const int); 141 + 142 + #endif
+1 -1
firmware/target/arm/rk27xx/backlight-rk27xx.c
··· 61 61 562, 579, 596, 616, 637, 660, 684, 711, 62 62 739, 770, 802, 837, 874, 914, 955, 1000 63 63 }; 64 - #elif defined(MA9) || defined(MA9C) 64 + #elif defined(MA9) || defined(MA9C) || defined(MA8) || defined(MA8C) 65 65 static const unsigned short lin_brightness[] = { 66 66 2, 4, 7, 10, 15, 21, 28, 36, 67 67 46, 58, 72, 87, 104, 124, 146, 171,
+4 -1
firmware/target/arm/rk27xx/ma/audio-ma.c
··· 29 29 { 30 30 pca9555_write_config(dir<<8, (1<<8)); 31 31 } 32 + void pcm1792_set_ml_dir (const int) __attribute__((alias("df1704_set_ml_dir"))); 32 33 33 34 void df1704_set_ml(const int val) 34 35 { 35 36 pca9555_write_output(val<<8, 1<<8); 36 37 } 38 + void pcm1792_set_ml (const int) __attribute__((alias("df1704_set_ml"))); 37 39 38 40 void df1704_set_mc(const int val) 39 41 { 40 42 pca9555_write_output(val<<1, 1<<1); 41 43 } 44 + void pcm1792_set_mc (const int) __attribute__((alias("df1704_set_mc"))); 42 45 43 46 void df1704_set_md(const int val) 44 47 { 45 48 pca9555_write_output(val<<0, 1<<0); 46 49 } 50 + void pcm1792_set_md (const int) __attribute__((alias("df1704_set_md"))); 47 51 48 52 static void pop_ctrl(const int val) 49 53 { ··· 59 63 { 60 64 pca9555_write_output(val<<4, 1<<4); 61 65 } 62 - 63 66 64 67 void audiohw_postinit(void) 65 68 {
+1 -1
firmware/target/arm/rk27xx/sd-rk27xx.c
··· 132 132 return !(GPIO_PCDR & 0x80); 133 133 #elif defined(HM60X) || defined(HM801) 134 134 return !(GPIO_PFDR & (1<<2)); 135 - #elif defined(MA9) || defined(MA9C) 135 + #elif defined(MA9) || defined(MA9C) || defined(MA8) || defined(MA8C) 136 136 return (GPIO_PCDR & 0x80); 137 137 #else 138 138 #error "Unknown target"
+48 -2
tools/configure
··· 1331 1331 201) Android ==HiFi E.T.== 191) HM-801 1332 1332 202) Nokia N8xx 210) MA9 1333 1333 203) Nokia N900 211) MA9C ==Sony== 1334 - 204) Pandora 220) NWZ-E370 series 1335 - 205) Samsung YP-R0 221) NWZ-E360 series 1334 + 204) Pandora 212) MA8 220) NWZ-E370 series 1335 + 205) Samsung YP-R0 213) MA8C 221) NWZ-E360 series 1336 1336 206) Android MIPS 1337 1337 207) Android x86 1338 1338 EOF ··· 3505 3505 memory=16 3506 3506 arm7ejscc 3507 3507 tool="$rootdir/tools/scramble -rkw -modelnum=84" 3508 + bmp2rb_mono="$rootdir/tools/bmp2rb -f 0" 3509 + bmp2rb_native="$rootdir/tools/bmp2rb -f 4" 3510 + output="rockbox.rkw" 3511 + bootoutput="bootloader.rkw" 3512 + appextra="recorder:gui" 3513 + plugins="" 3514 + swcodec="yes" 3515 + # toolset is the tools within the tools directory that we build for 3516 + # this particular target. 3517 + toolset="$genericbitmaptools" 3518 + # architecture, manufacturer and model for the target-tree build 3519 + t_cpu="arm" 3520 + t_manufacturer="rk27xx" 3521 + t_model="ma" 3522 + ;; 3523 + 3524 + 212|hifietma8) 3525 + target_id=85 3526 + modelname="hifietma8" 3527 + target="MA8" 3528 + memory=16 3529 + arm7ejscc 3530 + tool="$rootdir/tools/scramble -rkw -modelnum=85" 3531 + bmp2rb_mono="$rootdir/tools/bmp2rb -f 0" 3532 + bmp2rb_native="$rootdir/tools/bmp2rb -f 4" 3533 + output="rockbox.rkw" 3534 + bootoutput="bootloader.rkw" 3535 + appextra="recorder:gui" 3536 + plugins="" 3537 + swcodec="yes" 3538 + # toolset is the tools within the tools directory that we build for 3539 + # this particular target. 3540 + toolset="$genericbitmaptools" 3541 + # architecture, manufacturer and model for the target-tree build 3542 + t_cpu="arm" 3543 + t_manufacturer="rk27xx" 3544 + t_model="ma" 3545 + ;; 3546 + 3547 + 213|hifietma8c) 3548 + target_id=91 3549 + modelname="hifietma8c" 3550 + target="MA8C" 3551 + memory=16 3552 + arm7ejscc 3553 + tool="$rootdir/tools/scramble -rkw -modelnum=91" 3508 3554 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0" 3509 3555 bmp2rb_native="$rootdir/tools/bmp2rb -f 4" 3510 3556 output="rockbox.rkw"