summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBoris Gjenero <dreamlayers@rockbox.org>2011-12-14 21:45:25 +0000
committerBoris Gjenero <dreamlayers@rockbox.org>2011-12-14 21:45:25 +0000
commit8e6030c8223bfb3102048b2daccbf6a6f4e97ba2 (patch)
tree92f6769d3fbb5936e32d5fb82480b776ea6fbfb9
parent273fbadb5537743829f9830de5247626a11aedca (diff)
downloadrockbox-8e6030c8223bfb3102048b2daccbf6a6f4e97ba2.tar.gz
rockbox-8e6030c8223bfb3102048b2daccbf6a6f4e97ba2.zip
FS#12378 : Remove various unused code, and comment out some unused code and data for reference or future use.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31256 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--apps/gui/list.c7
-rw-r--r--apps/gui/list.h2
-rw-r--r--apps/gui/skin_engine/skin_display.c33
-rw-r--r--apps/gui/skin_engine/skin_engine.h3
-rw-r--r--apps/metadata.c2
-rw-r--r--apps/metadata.h2
-rw-r--r--apps/playback.c6
-rw-r--r--apps/playback.h1
-rw-r--r--apps/playlist_viewer.c11
-rw-r--r--apps/radio/presets.c2
-rw-r--r--apps/radio/radio.h3
-rw-r--r--apps/radio/radio_skin.c4
-rw-r--r--apps/recorder/icons.c17
-rw-r--r--apps/recorder/icons.h14
-rw-r--r--apps/tagcache.c22
-rw-r--r--apps/tagcache.h3
-rw-r--r--apps/tree.c10
-rw-r--r--apps/tree.h1
-rw-r--r--firmware/enc_base.c2
-rw-r--r--firmware/export/enc_base.h2
-rw-r--r--firmware/export/usb.h1
-rw-r--r--firmware/usbstack/usb_storage.c18
22 files changed, 11 insertions, 155 deletions
diff --git a/apps/gui/list.c b/apps/gui/list.c
index 4f1d3833d6..c53a1f559c 100644
--- a/apps/gui/list.c
+++ b/apps/gui/list.c
@@ -778,13 +778,6 @@ bool list_do_action(int context, int timeout,
778 return gui_synclist_do_button(lists, action, wrap); 778 return gui_synclist_do_button(lists, action, wrap);
779} 779}
780 780
781bool gui_synclist_item_is_onscreen(struct gui_synclist *lists,
782 enum screen_type screen, int item)
783{
784 int nb_lines = list_get_nb_lines(lists, screen);
785 return (unsigned)(item - lists->start_item[screen]) < (unsigned) nb_lines;
786}
787
788/* Simple use list implementation */ 781/* Simple use list implementation */
789static int simplelist_line_count = 0; 782static int simplelist_line_count = 0;
790static char simplelist_text[SIMPLELIST_MAX_LINES][SIMPLELIST_MAX_LINELENGTH]; 783static char simplelist_text[SIMPLELIST_MAX_LINES][SIMPLELIST_MAX_LINELENGTH];
diff --git a/apps/gui/list.h b/apps/gui/list.h
index 1a713daa36..c53604659e 100644
--- a/apps/gui/list.h
+++ b/apps/gui/list.h
@@ -165,8 +165,6 @@ extern void gui_synclist_set_title(struct gui_synclist * lists, char * title,
165 enum themable_icons icon); 165 enum themable_icons icon);
166extern void gui_synclist_hide_selection_marker(struct gui_synclist *lists, 166extern void gui_synclist_hide_selection_marker(struct gui_synclist *lists,
167 bool hide); 167 bool hide);
168extern bool gui_synclist_item_is_onscreen(struct gui_synclist *lists,
169 enum screen_type screen, int item);
170/* 168/*
171 * Do the action implied by the given button, 169 * Do the action implied by the given button,
172 * returns true if the action was handled. 170 * returns true if the action was handled.
diff --git a/apps/gui/skin_engine/skin_display.c b/apps/gui/skin_engine/skin_display.c
index 206da9d9df..0613f986b3 100644
--- a/apps/gui/skin_engine/skin_display.c
+++ b/apps/gui/skin_engine/skin_display.c
@@ -95,39 +95,6 @@ void skin_update(enum skinnable_screens skin, enum screen_type screen,
95 95
96#ifdef HAVE_LCD_BITMAP 96#ifdef HAVE_LCD_BITMAP
97 97
98void skin_statusbar_changed(struct gui_wps *skin)
99{
100 if (!skin)
101 return;
102 struct wps_data *data = skin->data;
103 const struct screen *display = skin->display;
104 const int screen = display->screen_type;
105 struct skin_viewport *svp = skin_find_item(VP_DEFAULT_LABEL_STRING, SKIN_FIND_VP, data);
106
107 struct viewport *vp = &svp->vp;
108 viewport_set_defaults(vp, screen);
109
110 if (data->wps_sb_tag)
111 { /* fix up the default viewport */
112 if (data->show_sb_on_wps)
113 {
114 if (statusbar_position(screen) != STATUSBAR_OFF)
115 return; /* vp is fixed already */
116
117 vp->y = STATUSBAR_HEIGHT;
118 vp->height = display->lcdheight - STATUSBAR_HEIGHT;
119 }
120 else
121 {
122 if (statusbar_position(screen) == STATUSBAR_OFF)
123 return; /* vp is fixed already */
124 vp->y = vp->x = 0;
125 vp->height = display->lcdheight;
126 vp->width = display->lcdwidth;
127 }
128 }
129}
130
131void draw_progressbar(struct gui_wps *gwps, int line, struct progressbar *pb) 98void draw_progressbar(struct gui_wps *gwps, int line, struct progressbar *pb)
132{ 99{
133 struct screen *display = gwps->display; 100 struct screen *display = gwps->display;
diff --git a/apps/gui/skin_engine/skin_engine.h b/apps/gui/skin_engine/skin_engine.h
index 7a41063af9..ac839fff2e 100644
--- a/apps/gui/skin_engine/skin_engine.h
+++ b/apps/gui/skin_engine/skin_engine.h
@@ -57,9 +57,6 @@ void skin_update(enum skinnable_screens skin, enum screen_type screen,
57bool skin_data_load(enum screen_type screen, struct wps_data *wps_data, 57bool skin_data_load(enum screen_type screen, struct wps_data *wps_data,
58 const char *buf, bool isfile); 58 const char *buf, bool isfile);
59 59
60/* call this in statusbar toggle handlers if needed */
61void skin_statusbar_changed(struct gui_wps*);
62
63bool skin_has_sbs(enum screen_type screen, struct wps_data *data); 60bool skin_has_sbs(enum screen_type screen, struct wps_data *data);
64 61
65 62
diff --git a/apps/metadata.c b/apps/metadata.c
index efe18a74ed..7479de105f 100644
--- a/apps/metadata.c
+++ b/apps/metadata.c
@@ -250,6 +250,7 @@ const int rec_format_afmt[REC_NUM_FORMATS] =
250 [REC_FORMAT_PCM_WAV] = AFMT_PCM_WAV, 250 [REC_FORMAT_PCM_WAV] = AFMT_PCM_WAV,
251}; 251};
252 252
253#if 0 /* Currently unused, left for reference and future use */
253/* get AFMT_* corresponding REC_FORMAT_* */ 254/* get AFMT_* corresponding REC_FORMAT_* */
254const int afmt_rec_format[AFMT_NUM_CODECS] = 255const int afmt_rec_format[AFMT_NUM_CODECS] =
255{ 256{
@@ -261,6 +262,7 @@ const int afmt_rec_format[AFMT_NUM_CODECS] =
261 [AFMT_WAVPACK] = REC_FORMAT_WAVPACK, 262 [AFMT_WAVPACK] = REC_FORMAT_WAVPACK,
262 [AFMT_PCM_WAV] = REC_FORMAT_PCM_WAV, 263 [AFMT_PCM_WAV] = REC_FORMAT_PCM_WAV,
263}; 264};
265#endif
264#endif /* CONFIG_CODEC == SWCODEC && defined (HAVE_RECORDING) */ 266#endif /* CONFIG_CODEC == SWCODEC && defined (HAVE_RECORDING) */
265 267
266#if CONFIG_CODEC == SWCODEC 268#if CONFIG_CODEC == SWCODEC
diff --git a/apps/metadata.h b/apps/metadata.h
index e1f30c170d..3676bd8e24 100644
--- a/apps/metadata.h
+++ b/apps/metadata.h
@@ -149,7 +149,7 @@ enum rec_format_indexes
149/* get REC_FORMAT_* corresponding AFMT_* */ 149/* get REC_FORMAT_* corresponding AFMT_* */
150extern const int rec_format_afmt[REC_NUM_FORMATS]; 150extern const int rec_format_afmt[REC_NUM_FORMATS];
151/* get AFMT_* corresponding REC_FORMAT_* */ 151/* get AFMT_* corresponding REC_FORMAT_* */
152extern const int afmt_rec_format[AFMT_NUM_CODECS]; 152/* unused: extern const int afmt_rec_format[AFMT_NUM_CODECS]; */
153 153
154#define AFMT_ENTRY(label, root_fname, enc_root_fname, func, ext_list) \ 154#define AFMT_ENTRY(label, root_fname, enc_root_fname, func, ext_list) \
155 { label, root_fname, enc_root_fname, func, ext_list } 155 { label, root_fname, enc_root_fname, func, ext_list }
diff --git a/apps/playback.c b/apps/playback.c
index b20237cc7c..2739118aeb 100644
--- a/apps/playback.c
+++ b/apps/playback.c
@@ -3625,12 +3625,6 @@ bool audio_restore_playback(int type)
3625 } 3625 }
3626} 3626}
3627 3627
3628/* Has the playback buffer been completely claimed? */
3629bool audio_buffer_state_trashed(void)
3630{
3631 return buffer_state == AUDIOBUF_STATE_TRASHED;
3632}
3633
3634 3628
3635/** --- Miscellaneous public interfaces --- **/ 3629/** --- Miscellaneous public interfaces --- **/
3636 3630
diff --git a/apps/playback.h b/apps/playback.h
index 6e57c03fad..0571f5fe55 100644
--- a/apps/playback.h
+++ b/apps/playback.h
@@ -87,7 +87,6 @@ enum
87}; 87};
88bool audio_restore_playback(int type); /* Restores the audio buffer to handle the requested playback */ 88bool audio_restore_playback(int type); /* Restores the audio buffer to handle the requested playback */
89size_t audio_get_filebuflen(void); 89size_t audio_get_filebuflen(void);
90bool audio_buffer_state_trashed(void);
91 90
92/* Automatic transition? Only valid to call during the track change events, 91/* Automatic transition? Only valid to call during the track change events,
93 otherwise the result is undefined. */ 92 otherwise the result is undefined. */
diff --git a/apps/playlist_viewer.c b/apps/playlist_viewer.c
index ffaefebd5f..68732adcbc 100644
--- a/apps/playlist_viewer.c
+++ b/apps/playlist_viewer.c
@@ -126,7 +126,6 @@ static void format_line(const struct playlist_entry* track, char* str,
126 126
127static bool update_playlist(bool force); 127static bool update_playlist(bool force);
128static int onplay_menu(int index); 128static int onplay_menu(int index);
129static int save_playlist_func(void);
130 129
131static void playlist_buffer_init(struct playlist_buffer *pb, char *names_buffer, 130static void playlist_buffer_init(struct playlist_buffer *pb, char *names_buffer,
132 int names_buffer_size) 131 int names_buffer_size)
@@ -437,9 +436,6 @@ static bool update_playlist(bool force)
437 return true; 436 return true;
438} 437}
439 438
440MENUITEM_FUNCTION(save_playlist_item, 0, ID2P(LANG_SAVE_DYNAMIC_PLAYLIST),
441 save_playlist_func, 0, NULL, Icon_NOICON);
442
443/* Menu of playlist commands. Invoked via ON+PLAY on main viewer screen. 439/* Menu of playlist commands. Invoked via ON+PLAY on main viewer screen.
444 Returns -1 if USB attached, 0 if no playlist change, and 1 if playlist 440 Returns -1 if USB attached, 0 if no playlist change, and 1 if playlist
445 changed. */ 441 changed. */
@@ -521,13 +517,6 @@ static int onplay_menu(int index)
521 return ret; 517 return ret;
522} 518}
523 519
524/* Save playlist to disk */
525static int save_playlist_func(void)
526{
527 save_playlist_screen(viewer.playlist);
528 return 0;
529}
530
531/* View current playlist */ 520/* View current playlist */
532enum playlist_viewer_result playlist_viewer(void) 521enum playlist_viewer_result playlist_viewer(void)
533{ 522{
diff --git a/apps/radio/presets.c b/apps/radio/presets.c
index 46ce0b1b5c..9eab4901f1 100644
--- a/apps/radio/presets.c
+++ b/apps/radio/presets.c
@@ -617,6 +617,7 @@ void presets_save(void)
617 radio_save_presets(); 617 radio_save_presets();
618} 618}
619 619
620#if 0 /* disabled in draw_progressbar() */
620#ifdef HAVE_LCD_BITMAP 621#ifdef HAVE_LCD_BITMAP
621static inline void draw_vertical_line_mark(struct screen * screen, 622static inline void draw_vertical_line_mark(struct screen * screen,
622 int x, int y, int h) 623 int x, int y, int h)
@@ -643,3 +644,4 @@ void presets_draw_markers(struct screen *screen,
643 } 644 }
644} 645}
645#endif 646#endif
647#endif
diff --git a/apps/radio/radio.h b/apps/radio/radio.h
index 76615e39e7..d243cb67a5 100644
--- a/apps/radio/radio.h
+++ b/apps/radio/radio.h
@@ -62,7 +62,9 @@ struct fmstation
62 char name[MAX_FMPRESET_LEN+1]; 62 char name[MAX_FMPRESET_LEN+1];
63}; 63};
64const char* radio_get_preset_name(int preset); 64const char* radio_get_preset_name(int preset);
65#if 0 /* disabled in draw_progressbar() */
65void presets_draw_markers(struct screen *screen, int x, int y, int w, int h); 66void presets_draw_markers(struct screen *screen, int x, int y, int w, int h);
67#endif
66 68
67#ifdef HAVE_ALBUMART 69#ifdef HAVE_ALBUMART
68void radioart_init(bool entering_screen); 70void radioart_init(bool entering_screen);
@@ -79,7 +81,6 @@ enum fms_exiting {
79 81
80/* only radio.c should be using these! */ 82/* only radio.c should be using these! */
81int fms_do_button_loop(bool update_screen); 83int fms_do_button_loop(bool update_screen);
82struct gui_wps *fms_get(enum screen_type screen);
83void fms_fix_displays(enum fms_exiting toggle_state); 84void fms_fix_displays(enum fms_exiting toggle_state);
84 85
85#endif /* CONFIG_TUNER */ 86#endif /* CONFIG_TUNER */
diff --git a/apps/radio/radio_skin.c b/apps/radio/radio_skin.c
index 2c9c369979..521890c9bd 100644
--- a/apps/radio/radio_skin.c
+++ b/apps/radio/radio_skin.c
@@ -125,7 +125,3 @@ int fms_do_button_loop(bool update_screen)
125 return button; 125 return button;
126} 126}
127 127
128struct gui_wps *fms_get(enum screen_type screen)
129{
130 return skin_get_gwps(FM_SCREEN, screen);
131}
diff --git a/apps/recorder/icons.c b/apps/recorder/icons.c
index e6c3926759..03a88c9fdc 100644
--- a/apps/recorder/icons.c
+++ b/apps/recorder/icons.c
@@ -126,20 +126,3 @@ const unsigned char bitmap_icon_disk[12] =
126 {0x00,0x00,0x00,0x1c,0x2e,0x4f,0x77,0x79,0x3a,0x1c,0x00,0x00}; 126 {0x00,0x00,0x00,0x1c,0x2e,0x4f,0x77,0x79,0x3a,0x1c,0x00,0x00};
127#endif 127#endif
128 128
129/*
130 * Print play mode to status bar
131 */
132void statusbar_icon_play_mode(int mode)
133{
134 lcd_mono_bitmap(bitmap_icons_7x8[mode], ICON_PLAY_MODE_X_POS,
135 STATUSBAR_Y_POS, ICON_PLAY_MODE_WIDTH, STATUSBAR_HEIGHT);
136}
137
138/*
139 * Print shuffle mode to status bar
140 */
141void statusbar_icon_shuffle(void)
142{
143 lcd_mono_bitmap(bitmap_icons_7x8[Icon_Shuffle], ICON_SHUFFLE_X_POS,
144 STATUSBAR_Y_POS, ICON_SHUFFLE_WIDTH, STATUSBAR_HEIGHT);
145}
diff --git a/apps/recorder/icons.h b/apps/recorder/icons.h
index 5f2185e1b7..3c955ffe5b 100644
--- a/apps/recorder/icons.h
+++ b/apps/recorder/icons.h
@@ -128,20 +128,6 @@ extern const unsigned char bitmap_icon_disk[];
128#define ICON_DISK_X_POS STATUSBAR_WIDTH-ICON_DISK_WIDTH 128#define ICON_DISK_X_POS STATUSBAR_WIDTH-ICON_DISK_WIDTH
129#define TIME_X_END STATUSBAR_WIDTH-1 129#define TIME_X_END STATUSBAR_WIDTH-1
130 130
131extern void statusbar_wipe(void);
132extern void statusbar_icon_battery(int percent);
133extern bool statusbar_icon_volume(int percent);
134extern void statusbar_icon_play_state(int state);
135extern void statusbar_icon_play_mode(int mode);
136extern void statusbar_icon_shuffle(void);
137extern void statusbar_icon_lock(void);
138#if CONFIG_RTC
139extern void statusbar_time(int hour, int minute);
140#endif
141#if (CONFIG_LED == LED_VIRTUAL)
142extern void statusbar_led(void);
143#endif
144
145#endif /* End HAVE_LCD_BITMAP */ 131#endif /* End HAVE_LCD_BITMAP */
146#endif /* PLUGIN */ 132#endif /* PLUGIN */
147#endif /* _ICONS_H_ */ 133#endif /* _ICONS_H_ */
diff --git a/apps/tagcache.c b/apps/tagcache.c
index 058ab85f16..99ef3f5587 100644
--- a/apps/tagcache.c
+++ b/apps/tagcache.c
@@ -1309,11 +1309,6 @@ static bool check_all_headers(void)
1309 return true; 1309 return true;
1310} 1310}
1311 1311
1312bool tagcache_is_busy(void)
1313{
1314 return read_lock || write_lock;
1315}
1316
1317bool tagcache_search(struct tagcache_search *tcs, int tag) 1312bool tagcache_search(struct tagcache_search *tcs, int tag)
1318{ 1313{
1319 struct tagcache_header tag_hdr; 1314 struct tagcache_header tag_hdr;
@@ -3303,16 +3298,6 @@ void tagcache_update_numeric(int idx_id, int tag, long data)
3303} 3298}
3304#endif /* !__PCTOOL__ */ 3299#endif /* !__PCTOOL__ */
3305 3300
3306long tagcache_get_serial(void)
3307{
3308 return current_tcmh.serial;
3309}
3310
3311long tagcache_get_commitid(void)
3312{
3313 return current_tcmh.commitid;
3314}
3315
3316static bool write_tag(int fd, const char *tagstr, const char *datastr) 3301static bool write_tag(int fd, const char *tagstr, const char *datastr)
3317{ 3302{
3318 char buf[512]; 3303 char buf[512];
@@ -4794,13 +4779,6 @@ void tagcache_stop_scan(void)
4794 queue_post(&tagcache_queue, Q_STOP_SCAN, 0); 4779 queue_post(&tagcache_queue, Q_STOP_SCAN, 0);
4795} 4780}
4796 4781
4797#ifdef HAVE_TC_RAMCACHE
4798bool tagcache_is_ramcache(void)
4799{
4800 return tc_stat.ramcache;
4801}
4802#endif
4803
4804#endif /* !__PCTOOL__ */ 4782#endif /* !__PCTOOL__ */
4805 4783
4806 4784
diff --git a/apps/tagcache.h b/apps/tagcache.h
index 6c13efdd0e..604e93bce9 100644
--- a/apps/tagcache.h
+++ b/apps/tagcache.h
@@ -214,7 +214,6 @@ bool tagcache_is_numeric_tag(int type);
214bool tagcache_find_index(struct tagcache_search *tcs, const char *filename); 214bool tagcache_find_index(struct tagcache_search *tcs, const char *filename);
215bool tagcache_check_clauses(struct tagcache_search *tcs, 215bool tagcache_check_clauses(struct tagcache_search *tcs,
216 struct tagcache_search_clause **clause, int count); 216 struct tagcache_search_clause **clause, int count);
217bool tagcache_is_busy(void);
218bool tagcache_search(struct tagcache_search *tcs, int tag); 217bool tagcache_search(struct tagcache_search *tcs, int tag);
219void tagcache_search_set_uniqbuf(struct tagcache_search *tcs, 218void tagcache_search_set_uniqbuf(struct tagcache_search *tcs,
220 void *buffer, long length); 219 void *buffer, long length);
@@ -228,7 +227,6 @@ bool tagcache_retrieve(struct tagcache_search *tcs, int idxid,
228void tagcache_search_finish(struct tagcache_search *tcs); 227void tagcache_search_finish(struct tagcache_search *tcs);
229long tagcache_get_numeric(const struct tagcache_search *tcs, int tag); 228long tagcache_get_numeric(const struct tagcache_search *tcs, int tag);
230long tagcache_increase_serial(void); 229long tagcache_increase_serial(void);
231long tagcache_get_serial(void);
232bool tagcache_import_changelog(void); 230bool tagcache_import_changelog(void);
233bool tagcache_create_changelog(struct tagcache_search *tcs); 231bool tagcache_create_changelog(struct tagcache_search *tcs);
234void tagcache_update_numeric(int idx_id, int tag, long data); 232void tagcache_update_numeric(int idx_id, int tag, long data);
@@ -244,7 +242,6 @@ void tagcache_screensync_event(void);
244void tagcache_screensync_enable(bool state); 242void tagcache_screensync_enable(bool state);
245 243
246#ifdef HAVE_TC_RAMCACHE 244#ifdef HAVE_TC_RAMCACHE
247bool tagcache_is_ramcache(void);
248#ifdef HAVE_DIRCACHE 245#ifdef HAVE_DIRCACHE
249bool tagcache_fill_tags(struct mp3entry *id3, const char *filename); 246bool tagcache_fill_tags(struct mp3entry *id3, const char *filename);
250#endif 247#endif
diff --git a/apps/tree.c b/apps/tree.c
index 3ba54bdfc6..4431db2c4a 100644
--- a/apps/tree.c
+++ b/apps/tree.c
@@ -307,16 +307,6 @@ void tree_gui_init(void)
307} 307}
308 308
309 309
310/* drawer function for the GUI_EVENT_REDRAW callback */
311void tree_drawlists(void)
312{
313 /* band-aid to fix the bar/list redrawing properly after leaving a plugin */
314 send_event(GUI_EVENT_THEME_CHANGED, NULL);
315 /* end bandaid */
316 gui_synclist_draw(&tree_lists);
317}
318
319
320struct tree_context* tree_get_context(void) 310struct tree_context* tree_get_context(void)
321{ 311{
322 return &tc; 312 return &tc;
diff --git a/apps/tree.h b/apps/tree.h
index a12045cae4..d3a128b87a 100644
--- a/apps/tree.h
+++ b/apps/tree.h
@@ -105,7 +105,6 @@ struct tree_context {
105 * Call one of the two below after yields since the entrys may move inbetween */ 105 * Call one of the two below after yields since the entrys may move inbetween */
106struct entry* tree_get_entries(struct tree_context *t); 106struct entry* tree_get_entries(struct tree_context *t);
107struct entry* tree_get_entry_at(struct tree_context *t, int index); 107struct entry* tree_get_entry_at(struct tree_context *t, int index);
108void tree_drawlists(void);
109void tree_mem_init(void) INIT_ATTR; 108void tree_mem_init(void) INIT_ATTR;
110void tree_gui_init(void) INIT_ATTR; 109void tree_gui_init(void) INIT_ATTR;
111char* get_current_file(char* buffer, size_t buffer_len); 110char* get_current_file(char* buffer, size_t buffer_len);
diff --git a/firmware/enc_base.c b/firmware/enc_base.c
index 14cc553ae5..d120cdb07d 100644
--- a/firmware/enc_base.c
+++ b/firmware/enc_base.c
@@ -25,6 +25,7 @@
25 25
26/** mp3_enc.codec **/ 26/** mp3_enc.codec **/
27 27
28#if 0 /* Currently unused, left for reference and future use */
28/* These are in descending order rather than in MPEG frequency index 29/* These are in descending order rather than in MPEG frequency index
29 order */ 30 order */
30const unsigned long mp3_enc_sampr[MP3_ENC_NUM_SAMPR] = 31const unsigned long mp3_enc_sampr[MP3_ENC_NUM_SAMPR] =
@@ -35,6 +36,7 @@ const unsigned long mp3_enc_sampr[MP3_ENC_NUM_SAMPR] =
35 12000, 11025, 8000, /* MPEG 2.5 */ 36 12000, 11025, 8000, /* MPEG 2.5 */
36#endif 37#endif
37}; 38};
39#endif
38 40
39/* All bitrates used in the MPA L3 standard */ 41/* All bitrates used in the MPA L3 standard */
40const unsigned long mp3_enc_bitr[MP3_ENC_NUM_BITR] = 42const unsigned long mp3_enc_bitr[MP3_ENC_NUM_BITR] =
diff --git a/firmware/export/enc_base.h b/firmware/export/enc_base.h
index 321421c6e7..293ecfc1c1 100644
--- a/firmware/export/enc_base.h
+++ b/firmware/export/enc_base.h
@@ -97,7 +97,9 @@ struct aiff_enc_config
97/* This number is count of full encoder set */ 97/* This number is count of full encoder set */
98#define MP3_ENC_NUM_SAMPR 6 98#define MP3_ENC_NUM_SAMPR 6
99 99
100#if 0
100extern const unsigned long mp3_enc_sampr[MP3_ENC_NUM_SAMPR]; 101extern const unsigned long mp3_enc_sampr[MP3_ENC_NUM_SAMPR];
102#endif
101extern const unsigned long mp3_enc_bitr[MP3_ENC_NUM_BITR]; 103extern const unsigned long mp3_enc_bitr[MP3_ENC_NUM_BITR];
102 104
103struct mp3_enc_config 105struct mp3_enc_config
diff --git a/firmware/export/usb.h b/firmware/export/usb.h
index 2dac4c75db..d68ac7d910 100644
--- a/firmware/export/usb.h
+++ b/firmware/export/usb.h
@@ -132,7 +132,6 @@ void usb_signal_transfer_completion(
132 struct usb_transfer_completion_event_data *event_data); 132 struct usb_transfer_completion_event_data *event_data);
133bool usb_driver_enabled(int driver); 133bool usb_driver_enabled(int driver);
134bool usb_exclusive_storage(void); /* storage is available for usb */ 134bool usb_exclusive_storage(void); /* storage is available for usb */
135void usb_storage_try_release_storage(void);
136#endif 135#endif
137int usb_release_exclusive_storage(void); 136int usb_release_exclusive_storage(void);
138 137
diff --git a/firmware/usbstack/usb_storage.c b/firmware/usbstack/usb_storage.c
index c5fa47fa51..a178f06f87 100644
--- a/firmware/usbstack/usb_storage.c
+++ b/firmware/usbstack/usb_storage.c
@@ -364,24 +364,6 @@ static bool check_disk_present(IF_MD_NONVOID(int volume))
364#endif 364#endif
365} 365}
366 366
367void usb_storage_try_release_storage(void)
368{
369 /* Check if there is a connected drive left. If not,
370 release excusive access */
371 bool canrelease=true;
372 int i;
373 for(i=0;i<storage_num_drives();i++) {
374 if(!ejected[i] && locked[i]) {
375 canrelease=false;
376 break;
377 }
378 }
379 if(canrelease) {
380 logf("scsi release ata");
381 usb_release_exclusive_storage();
382 }
383}
384
385#ifdef HAVE_HOTSWAP 367#ifdef HAVE_HOTSWAP
386void usb_storage_notify_hotswap(int volume,bool inserted) 368void usb_storage_notify_hotswap(int volume,bool inserted)
387{ 369{