summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
Diffstat (limited to 'apps')
-rw-r--r--apps/debug_menu.c12
-rw-r--r--apps/plugin.c4
-rw-r--r--apps/plugin.h4
-rw-r--r--apps/plugins/splitedit.c8
-rw-r--r--apps/recorder/recording.c5
-rw-r--r--apps/settings.c4
6 files changed, 20 insertions, 17 deletions
diff --git a/apps/debug_menu.c b/apps/debug_menu.c
index 7a1c2a3df8..57554d8c6f 100644
--- a/apps/debug_menu.c
+++ b/apps/debug_menu.c
@@ -790,7 +790,7 @@ bool dbg_mas(void)
790 return false; 790 return false;
791} 791}
792 792
793#if CONFIG_HWCODEC == MAS3587F 793#if (CONFIG_HWCODEC == MAS3587F) || (CONFIG_HWCODEC == MAS3539F)
794bool dbg_mas_codec(void) 794bool dbg_mas_codec(void)
795{ 795{
796 char buf[32]; 796 char buf[32];
@@ -1050,22 +1050,22 @@ bool dbg_mas_info(void)
1050 snprintf(buf, 32, "6f: %05x ", mas_readreg(0x6f) & 0xfffff); 1050 snprintf(buf, 32, "6f: %05x ", mas_readreg(0x6f) & 0xfffff);
1051 break; 1051 break;
1052 case 8: 1052 case 8:
1053 mas_readmem(MAS_BANK_D0, 0x300, &val, 1); 1053 mas_readmem(MAS_BANK_D0, MAS_D0_MPEG_FRAME_COUNT, &val, 1);
1054 lcd_puts(0, 0, "Frame Count"); 1054 lcd_puts(0, 0, "Frame Count");
1055 snprintf(buf, 32, "0/300: %04x", val & 0xffff); 1055 snprintf(buf, 32, "0/300: %04x", val & 0xffff);
1056 break; 1056 break;
1057 case 9: 1057 case 9:
1058 mas_readmem(MAS_BANK_D0, 0x301, &val, 1); 1058 mas_readmem(MAS_BANK_D0, MAS_D0_MPEG_STATUS_1, &val, 1);
1059 lcd_puts(0, 0, "Status1 "); 1059 lcd_puts(0, 0, "Status1 ");
1060 snprintf(buf, 32, "0/301: %04x", val & 0xffff); 1060 snprintf(buf, 32, "0/301: %04x", val & 0xffff);
1061 break; 1061 break;
1062 case 10: 1062 case 10:
1063 mas_readmem(MAS_BANK_D0, 0x302, &val, 1); 1063 mas_readmem(MAS_BANK_D0, MAS_D0_MPEG_STATUS_2, &val, 1);
1064 lcd_puts(0, 0, "Status2 "); 1064 lcd_puts(0, 0, "Status2 ");
1065 snprintf(buf, 32, "0/302: %04x", val & 0xffff); 1065 snprintf(buf, 32, "0/302: %04x", val & 0xffff);
1066 break; 1066 break;
1067 case 11: 1067 case 11:
1068 mas_readmem(MAS_BANK_D0, 0x303, &val, 1); 1068 mas_readmem(MAS_BANK_D0, MAS_D0_CRC_ERROR_COUNT, &val, 1);
1069 lcd_puts(0, 0, "CRC Count "); 1069 lcd_puts(0, 0, "CRC Count ");
1070 snprintf(buf, 32, "0/303: %04x", val & 0xffff); 1070 snprintf(buf, 32, "0/303: %04x", val & 0xffff);
1071 break; 1071 break;
@@ -1539,7 +1539,7 @@ bool debug_menu(void)
1539 { "View MAS info", dbg_mas_info }, 1539 { "View MAS info", dbg_mas_info },
1540#endif 1540#endif
1541 { "View MAS regs", dbg_mas }, 1541 { "View MAS regs", dbg_mas },
1542#if CONFIG_HWCODEC == MAS3587F 1542#if (CONFIG_HWCODEC == MAS3587F) || (CONFIG_HWCODEC == MAS3539F)
1543 { "View MAS codec", dbg_mas_codec }, 1543 { "View MAS codec", dbg_mas_codec },
1544#endif 1544#endif
1545#ifdef HAVE_LCD_BITMAP 1545#ifdef HAVE_LCD_BITMAP
diff --git a/apps/plugin.c b/apps/plugin.c
index 51f7a610dd..24a9dd4da6 100644
--- a/apps/plugin.c
+++ b/apps/plugin.c
@@ -211,7 +211,7 @@ static const struct plugin_api rockbox_api = {
211 mas_writemem, 211 mas_writemem,
212 mas_readreg, 212 mas_readreg,
213 mas_writereg, 213 mas_writereg,
214#if CONFIG_HWCODEC == MAS3587F 214#if (CONFIG_HWCODEC == MAS3587F) || (CONFIG_HWCODEC == MAS3539F)
215 mas_codec_writereg, 215 mas_codec_writereg,
216 mas_codec_readreg, 216 mas_codec_readreg,
217#endif 217#endif
@@ -244,7 +244,7 @@ static const struct plugin_api rockbox_api = {
244 /* new stuff at the end, sort into place next time 244 /* new stuff at the end, sort into place next time
245 the API gets incompatible */ 245 the API gets incompatible */
246 246
247#if CONFIG_HWCODEC == MAS3587F 247#if (CONFIG_HWCODEC == MAS3587F) || (CONFIG_HWCODEC == MAS3539F)
248 mpeg_set_pitch, 248 mpeg_set_pitch,
249 249
250 peak_meter_scale_value, 250 peak_meter_scale_value,
diff --git a/apps/plugin.h b/apps/plugin.h
index 445427ffd5..52a060d428 100644
--- a/apps/plugin.h
+++ b/apps/plugin.h
@@ -239,7 +239,7 @@ struct plugin_api {
239 int (*mas_writemem)(int bank, int addr, const unsigned long* src, int len); 239 int (*mas_writemem)(int bank, int addr, const unsigned long* src, int len);
240 int (*mas_readreg)(int reg); 240 int (*mas_readreg)(int reg);
241 int (*mas_writereg)(int reg, unsigned int val); 241 int (*mas_writereg)(int reg, unsigned int val);
242#if CONFIG_HWCODEC == MAS3587F 242#if (CONFIG_HWCODEC == MAS3587F) || (CONFIG_HWCODEC == MAS3539F)
243 int (*mas_codec_writereg)(int reg, unsigned int val); 243 int (*mas_codec_writereg)(int reg, unsigned int val);
244 int (*mas_codec_readreg)(int reg); 244 int (*mas_codec_readreg)(int reg);
245#endif 245#endif
@@ -277,7 +277,7 @@ struct plugin_api {
277 /* new stuff at the end, sort into place next time 277 /* new stuff at the end, sort into place next time
278 the API gets incompatible */ 278 the API gets incompatible */
279 279
280#if CONFIG_HWCODEC == MAS3587F 280#if (CONFIG_HWCODEC == MAS3587F) || (CONFIG_HWCODEC == MAS3539F)
281 void (*mpeg_set_pitch)(int pitch); 281 void (*mpeg_set_pitch)(int pitch);
282 282
283 unsigned short (*peak_meter_scale_value)(unsigned short val, 283 unsigned short (*peak_meter_scale_value)(unsigned short val,
diff --git a/apps/plugins/splitedit.c b/apps/plugins/splitedit.c
index b76a08cb80..24b2b6939f 100644
--- a/apps/plugins/splitedit.c
+++ b/apps/plugins/splitedit.c
@@ -230,7 +230,7 @@ static void update_icons(void)
230 LCD_WIDTH/3 + LCD_WIDTH/3 / 2 - BMPWIDTH/2, LCD_HEIGHT - BMPHEIGHT, 230 LCD_WIDTH/3 + LCD_WIDTH/3 / 2 - BMPWIDTH/2, LCD_HEIGHT - BMPHEIGHT,
231 BMPWIDTH, BMPHEIGHT, true); 231 BMPWIDTH, BMPHEIGHT, true);
232 232
233#if CONFIG_HWCODEC == MAS3587F 233#if (CONFIG_HWCODEC == MAS3587F) || (CONFIG_HWCODEC == MAS3539F)
234 /* The scale icon */ 234 /* The scale icon */
235 rb->lcd_bitmap(SCALE_BMP[rb->peak_meter_get_use_dbfs()], 235 rb->lcd_bitmap(SCALE_BMP[rb->peak_meter_get_use_dbfs()],
236 2 *LCD_WIDTH/3 + LCD_WIDTH/3 / 2 - BMPWIDTH/2, LCD_HEIGHT - BMPHEIGHT, 236 2 *LCD_WIDTH/3 + LCD_WIDTH/3 / 2 - BMPWIDTH/2, LCD_HEIGHT - BMPHEIGHT,
@@ -849,7 +849,7 @@ unsigned long splitedit_editor(struct mp3entry * mp3_to_split,
849 { 849 {
850 /* read volume info */ 850 /* read volume info */
851 unsigned short volume; 851 unsigned short volume;
852#if CONFIG_HWCODEC == MAS3587F 852#if (CONFIG_HWCODEC == MAS3587F) || (CONFIG_HWCODEC == MAS3539F)
853 volume = rb->mas_codec_readreg(0x0c); 853 volume = rb->mas_codec_readreg(0x0c);
854 volume += rb->mas_codec_readreg(0x0d); 854 volume += rb->mas_codec_readreg(0x0d);
855 volume = volume / 2; 855 volume = volume / 2;
@@ -1003,7 +1003,7 @@ unsigned long splitedit_editor(struct mp3entry * mp3_to_split,
1003 lastx = time_to_xpos(mp3->elapsed); 1003 lastx = time_to_xpos(mp3->elapsed);
1004 break; 1004 break;
1005 1005
1006#if CONFIG_HWCODEC == MAS3587F 1006#if (CONFIG_HWCODEC == MAS3587F) || (CONFIG_HWCODEC == MAS3539F)
1007 case BUTTON_ON | BUTTON_RIGHT: 1007 case BUTTON_ON | BUTTON_RIGHT:
1008 rb->mpeg_set_pitch(1500); 1008 rb->mpeg_set_pitch(1500);
1009 splitedit_invalidate_osci(); 1009 splitedit_invalidate_osci();
@@ -1060,7 +1060,7 @@ unsigned long splitedit_editor(struct mp3entry * mp3_to_split,
1060 break; 1060 break;
1061 1061
1062 case BUTTON_F3: 1062 case BUTTON_F3:
1063#if CONFIG_HWCODEC == MAS3587F 1063#if (CONFIG_HWCODEC == MAS3587F) || (CONFIG_HWCODEC == MAS3539F)
1064 rb->peak_meter_set_use_dbfs(rb->peak_meter_get_use_dbfs() +1); 1064 rb->peak_meter_set_use_dbfs(rb->peak_meter_get_use_dbfs() +1);
1065#endif 1065#endif
1066 splitedit_invalidate_osci(); 1066 splitedit_invalidate_osci();
diff --git a/apps/recorder/recording.c b/apps/recorder/recording.c
index 98c2b27008..8bec6e81de 100644
--- a/apps/recorder/recording.c
+++ b/apps/recorder/recording.c
@@ -49,6 +49,8 @@
49#include "errno.h" 49#include "errno.h"
50#include "talk.h" 50#include "talk.h"
51 51
52#ifdef HAVE_RECORDING
53
52bool f2_rec_screen(void); 54bool f2_rec_screen(void);
53bool f3_rec_screen(void); 55bool f3_rec_screen(void);
54 56
@@ -539,7 +541,7 @@ bool recording_screen(void)
539 { 541 {
540 gain = MAX(global_settings.rec_left_gain, 542 gain = MAX(global_settings.rec_left_gain,
541 global_settings.rec_right_gain); 543 global_settings.rec_right_gain);
542 544
543 snprintf(buf, 32, "%s: %s", str(LANG_RECORDING_GAIN), 545 snprintf(buf, 32, "%s: %s", str(LANG_RECORDING_GAIN),
544 fmt_gain(SOUND_LEFT_GAIN, gain, 546 fmt_gain(SOUND_LEFT_GAIN, gain,
545 buf2, sizeof(buf2))); 547 buf2, sizeof(buf2)));
@@ -819,3 +821,4 @@ bool f3_rec_screen(void)
819 return false; 821 return false;
820} 822}
821#endif 823#endif
824#endif /* HAVE_RECORDING */
diff --git a/apps/settings.c b/apps/settings.c
index a13abecfc7..b3b9ef1db8 100644
--- a/apps/settings.c
+++ b/apps/settings.c
@@ -164,7 +164,7 @@ static const struct bit_entry rtc_bits[] =
164 {8 | SIGNED, S_O(balance), 0, "balance", NULL }, /* -100...100 */ 164 {8 | SIGNED, S_O(balance), 0, "balance", NULL }, /* -100...100 */
165 {5 | SIGNED, S_O(bass), 0, "bass", NULL }, /* -15..+15 / -12..+12 */ 165 {5 | SIGNED, S_O(bass), 0, "bass", NULL }, /* -15..+15 / -12..+12 */
166 {5 | SIGNED, S_O(treble), 0, "treble", NULL }, /* -15..+15 / -12..+12 */ 166 {5 | SIGNED, S_O(treble), 0, "treble", NULL }, /* -15..+15 / -12..+12 */
167#if CONFIG_HWCODEC == MAS3587F 167#if (CONFIG_HWCODEC == MAS3587F) || (CONFIG_HWCODEC == MAS3539F)
168 {5, S_O(loudness), 0, "loudness", NULL }, /* 0...17 */ 168 {5, S_O(loudness), 0, "loudness", NULL }, /* 0...17 */
169 {3, S_O(avc), 0, "auto volume", "off,20ms,2,4,8" }, 169 {3, S_O(avc), 0, "auto volume", "off,20ms,2,4,8" },
170 {1, S_O(superbass), false, "superbass", off_on }, 170 {1, S_O(superbass), false, "superbass", off_on },
@@ -710,7 +710,7 @@ void sound_settings_apply(void)
710 mpeg_sound_set(SOUND_BALANCE, global_settings.balance); 710 mpeg_sound_set(SOUND_BALANCE, global_settings.balance);
711 mpeg_sound_set(SOUND_VOLUME, global_settings.volume); 711 mpeg_sound_set(SOUND_VOLUME, global_settings.volume);
712 mpeg_sound_set(SOUND_CHANNELS, global_settings.channel_config); 712 mpeg_sound_set(SOUND_CHANNELS, global_settings.channel_config);
713#if CONFIG_HWCODEC == MAS3587F 713#if (CONFIG_HWCODEC == MAS3587F) || (CONFIG_HWCODEC == MAS3539F)
714 mpeg_sound_set(SOUND_LOUDNESS, global_settings.loudness); 714 mpeg_sound_set(SOUND_LOUDNESS, global_settings.loudness);
715 mpeg_sound_set(SOUND_AVC, global_settings.avc); 715 mpeg_sound_set(SOUND_AVC, global_settings.avc);
716 mpeg_sound_set(SOUND_MDB_STRENGTH, global_settings.mdb_strength); 716 mpeg_sound_set(SOUND_MDB_STRENGTH, global_settings.mdb_strength);