From b5716df4cb2837bbbc42195cf1aefcf03e21d6a6 Mon Sep 17 00:00:00 2001 From: Sean Bartell Date: Fri, 24 Jun 2011 01:25:21 -0400 Subject: [PATCH] Build librbcodec with DSP and metadata. All associated files are moved to /lib/rbcodec. Change-Id: I572ddd2b8a996aae1e98c081d06b1ed356dce222 --- apps/SOURCES | 54 ------------------- apps/fracmul.h | 2 +- apps/plugins/lrcplayer.c | 1 - lib/rbcodec/SOURCES | 54 +++++++++++++++++++ {apps => lib/rbcodec/dsp}/compressor.c | 0 {apps => lib/rbcodec/dsp}/compressor.h | 0 {apps => lib/rbcodec/dsp}/dsp.c | 0 {apps => lib/rbcodec/dsp}/dsp.h | 0 {apps => lib/rbcodec/dsp}/dsp_arm.S | 0 {apps => lib/rbcodec/dsp}/dsp_arm_v6.S | 0 {apps => lib/rbcodec/dsp}/dsp_asm.h | 0 {apps => lib/rbcodec/dsp}/dsp_cf.S | 0 {apps => lib/rbcodec/dsp}/eq.c | 0 {apps => lib/rbcodec/dsp}/eq.h | 0 {apps => lib/rbcodec/dsp}/eq_arm.S | 0 {apps => lib/rbcodec/dsp}/eq_cf.S | 0 {apps => lib/rbcodec/dsp}/eqs/Acoustic.cfg | 0 {apps => lib/rbcodec/dsp}/eqs/Bass.cfg | 0 {apps => lib/rbcodec/dsp}/eqs/Classical.cfg | 0 {apps => lib/rbcodec/dsp}/eqs/Default.cfg | 0 {apps => lib/rbcodec/dsp}/eqs/Disco.cfg | 0 {apps => lib/rbcodec/dsp}/eqs/Electronic.cfg | 0 {apps => lib/rbcodec/dsp}/eqs/Hip-Hop.cfg | 0 {apps => lib/rbcodec/dsp}/eqs/Jazz.cfg | 0 {apps => lib/rbcodec/dsp}/eqs/Lounge.cfg | 0 {apps => lib/rbcodec/dsp}/eqs/Pop.cfg | 0 {apps => lib/rbcodec/dsp}/eqs/R&B.cfg | 0 {apps => lib/rbcodec/dsp}/eqs/Rock.cfg | 0 {apps => lib/rbcodec/dsp}/eqs/Vocal.cfg | 0 {apps => lib/rbcodec/dsp}/tdspeed.c | 0 {apps => lib/rbcodec/dsp}/tdspeed.h | 0 {apps => lib/rbcodec}/metadata/a52.c | 0 {apps => lib/rbcodec}/metadata/adx.c | 0 {apps => lib/rbcodec}/metadata/aiff.c | 0 {apps => lib/rbcodec}/metadata/ape.c | 0 {apps => lib/rbcodec}/metadata/asap.c | 0 {apps => lib/rbcodec}/metadata/asf.c | 0 {apps => lib/rbcodec}/metadata/au.c | 0 {apps => lib/rbcodec}/metadata/ay.c | 0 {apps => lib/rbcodec}/metadata/flac.c | 0 {apps => lib/rbcodec}/metadata/gbs.c | 0 {apps => lib/rbcodec}/metadata/hes.c | 0 {apps => lib/rbcodec}/metadata/id3tags.c | 0 {apps => lib/rbcodec}/metadata/kss.c | 0 {apps => lib/rbcodec/metadata}/metadata.c | 2 +- {apps => lib/rbcodec/metadata}/metadata.h | 0 .../rbcodec}/metadata/metadata_common.c | 0 .../rbcodec}/metadata/metadata_common.h | 0 .../rbcodec}/metadata/metadata_parsers.h | 0 {apps => lib/rbcodec}/metadata/mod.c | 0 {apps => lib/rbcodec}/metadata/monkeys.c | 0 {apps => lib/rbcodec}/metadata/mp3.c | 0 {apps => lib/rbcodec/metadata}/mp3data.c | 0 {apps => lib/rbcodec/metadata}/mp3data.h | 0 {apps => lib/rbcodec}/metadata/mp4.c | 0 {apps => lib/rbcodec}/metadata/mpc.c | 0 {apps => lib/rbcodec}/metadata/nsf.c | 0 {apps => lib/rbcodec}/metadata/ogg.c | 0 {apps => lib/rbcodec}/metadata/oma.c | 0 {apps => lib/rbcodec/metadata}/replaygain.c | 0 {apps => lib/rbcodec/metadata}/replaygain.h | 0 {apps => lib/rbcodec}/metadata/rm.c | 0 {apps => lib/rbcodec}/metadata/sgc.c | 0 {apps => lib/rbcodec}/metadata/sid.c | 0 {apps => lib/rbcodec}/metadata/smaf.c | 0 {apps => lib/rbcodec}/metadata/spc.c | 0 {apps => lib/rbcodec}/metadata/tta.c | 0 {apps => lib/rbcodec}/metadata/vgm.c | 0 {apps => lib/rbcodec}/metadata/vorbis.c | 0 {apps => lib/rbcodec}/metadata/vox.c | 0 {apps => lib/rbcodec}/metadata/wave.c | 0 {apps => lib/rbcodec}/metadata/wavpack.c | 0 lib/rbcodec/rbcodec.make | 19 +++++++ lib/rbcodec/test/SOURCES | 41 -------------- lib/rbcodec/test/warble.make | 8 ++- tools/buildzip.pl | 2 +- tools/database/SOURCES | 11 ++-- tools/database/database.make | 4 +- tools/root.make | 9 +++- uisimulator/uisimulator.make | 2 +- 80 files changed, 97 insertions(+), 112 deletions(-) create mode 100644 lib/rbcodec/SOURCES rename {apps => lib/rbcodec/dsp}/compressor.c (100%) rename {apps => lib/rbcodec/dsp}/compressor.h (100%) rename {apps => lib/rbcodec/dsp}/dsp.c (100%) rename {apps => lib/rbcodec/dsp}/dsp.h (100%) rename {apps => lib/rbcodec/dsp}/dsp_arm.S (100%) rename {apps => lib/rbcodec/dsp}/dsp_arm_v6.S (100%) rename {apps => lib/rbcodec/dsp}/dsp_asm.h (100%) rename {apps => lib/rbcodec/dsp}/dsp_cf.S (100%) rename {apps => lib/rbcodec/dsp}/eq.c (100%) rename {apps => lib/rbcodec/dsp}/eq.h (100%) rename {apps => lib/rbcodec/dsp}/eq_arm.S (100%) rename {apps => lib/rbcodec/dsp}/eq_cf.S (100%) rename {apps => lib/rbcodec/dsp}/eqs/Acoustic.cfg (100%) rename {apps => lib/rbcodec/dsp}/eqs/Bass.cfg (100%) rename {apps => lib/rbcodec/dsp}/eqs/Classical.cfg (100%) rename {apps => lib/rbcodec/dsp}/eqs/Default.cfg (100%) rename {apps => lib/rbcodec/dsp}/eqs/Disco.cfg (100%) rename {apps => lib/rbcodec/dsp}/eqs/Electronic.cfg (100%) rename {apps => lib/rbcodec/dsp}/eqs/Hip-Hop.cfg (100%) rename {apps => lib/rbcodec/dsp}/eqs/Jazz.cfg (100%) rename {apps => lib/rbcodec/dsp}/eqs/Lounge.cfg (100%) rename {apps => lib/rbcodec/dsp}/eqs/Pop.cfg (100%) rename {apps => lib/rbcodec/dsp}/eqs/R&B.cfg (100%) rename {apps => lib/rbcodec/dsp}/eqs/Rock.cfg (100%) rename {apps => lib/rbcodec/dsp}/eqs/Vocal.cfg (100%) rename {apps => lib/rbcodec/dsp}/tdspeed.c (100%) rename {apps => lib/rbcodec/dsp}/tdspeed.h (100%) rename {apps => lib/rbcodec}/metadata/a52.c (100%) rename {apps => lib/rbcodec}/metadata/adx.c (100%) rename {apps => lib/rbcodec}/metadata/aiff.c (100%) rename {apps => lib/rbcodec}/metadata/ape.c (100%) rename {apps => lib/rbcodec}/metadata/asap.c (100%) rename {apps => lib/rbcodec}/metadata/asf.c (100%) rename {apps => lib/rbcodec}/metadata/au.c (100%) rename {apps => lib/rbcodec}/metadata/ay.c (100%) rename {apps => lib/rbcodec}/metadata/flac.c (100%) rename {apps => lib/rbcodec}/metadata/gbs.c (100%) rename {apps => lib/rbcodec}/metadata/hes.c (100%) rename {apps => lib/rbcodec}/metadata/id3tags.c (100%) rename {apps => lib/rbcodec}/metadata/kss.c (100%) rename {apps => lib/rbcodec/metadata}/metadata.c (99%) rename {apps => lib/rbcodec/metadata}/metadata.h (100%) rename {apps => lib/rbcodec}/metadata/metadata_common.c (100%) rename {apps => lib/rbcodec}/metadata/metadata_common.h (100%) rename {apps => lib/rbcodec}/metadata/metadata_parsers.h (100%) rename {apps => lib/rbcodec}/metadata/mod.c (100%) rename {apps => lib/rbcodec}/metadata/monkeys.c (100%) rename {apps => lib/rbcodec}/metadata/mp3.c (100%) rename {apps => lib/rbcodec/metadata}/mp3data.c (100%) rename {apps => lib/rbcodec/metadata}/mp3data.h (100%) rename {apps => lib/rbcodec}/metadata/mp4.c (100%) rename {apps => lib/rbcodec}/metadata/mpc.c (100%) rename {apps => lib/rbcodec}/metadata/nsf.c (100%) rename {apps => lib/rbcodec}/metadata/ogg.c (100%) rename {apps => lib/rbcodec}/metadata/oma.c (100%) rename {apps => lib/rbcodec/metadata}/replaygain.c (100%) rename {apps => lib/rbcodec/metadata}/replaygain.h (100%) rename {apps => lib/rbcodec}/metadata/rm.c (100%) rename {apps => lib/rbcodec}/metadata/sgc.c (100%) rename {apps => lib/rbcodec}/metadata/sid.c (100%) rename {apps => lib/rbcodec}/metadata/smaf.c (100%) rename {apps => lib/rbcodec}/metadata/spc.c (100%) rename {apps => lib/rbcodec}/metadata/tta.c (100%) rename {apps => lib/rbcodec}/metadata/vgm.c (100%) rename {apps => lib/rbcodec}/metadata/vorbis.c (100%) rename {apps => lib/rbcodec}/metadata/vox.c (100%) rename {apps => lib/rbcodec}/metadata/wave.c (100%) rename {apps => lib/rbcodec}/metadata/wavpack.c (100%) create mode 100644 lib/rbcodec/rbcodec.make diff --git a/apps/SOURCES b/apps/SOURCES index e1990217ca..45eb0768a3 100644 --- a/apps/SOURCES +++ b/apps/SOURCES @@ -26,7 +26,6 @@ menus/audiohw_eq_menu.c menus/eq_menu.c buffering.c voice_thread.c -replaygain.c #else /* !SWCODEC */ mpeg.c #endif @@ -42,7 +41,6 @@ menus/sound_menu.c menus/time_menu.c #endif misc.c -mp3data.c onplay.c playlist.c playlist_catalog.c @@ -168,29 +166,13 @@ pcmbuf.c codec_thread.c playback.c codecs.c -dsp.c -compressor.c #ifndef HAVE_HARDWARE_BEEP beep.c #endif -#ifdef HAVE_PITCHSCREEN -tdspeed.c -#endif #ifdef HAVE_RECORDING enc_config.c recorder/pcm_record.c #endif -eq.c -#if defined(CPU_COLDFIRE) -dsp_cf.S -eq_cf.S -#elif defined(CPU_ARM) -dsp_arm.S -#if ARM_ARCH >= 6 -dsp_arm_v6.S -#endif -eq_arm.S -#endif #endif #ifdef USB_ENABLE_HID usb_keymaps.c @@ -198,42 +180,6 @@ usb_keymaps.c #ifndef USB_NONE gui/usb_screen.c #endif -metadata.c -metadata/id3tags.c -metadata/mp3.c -#if CONFIG_CODEC == SWCODEC -metadata/metadata_common.c -metadata/aiff.c -metadata/ape.c -metadata/asf.c -metadata/adx.c -metadata/flac.c -metadata/monkeys.c -metadata/mp4.c -metadata/mpc.c -metadata/ogg.c -metadata/sid.c -metadata/mod.c -metadata/spc.c -metadata/vorbis.c -metadata/wave.c -metadata/wavpack.c -metadata/a52.c -metadata/asap.c -metadata/rm.c -metadata/nsf.c -metadata/oma.c -metadata/smaf.c -metadata/au.c -metadata/vox.c -metadata/tta.c -metadata/ay.c -metadata/gbs.c -metadata/hes.c -metadata/sgc.c -metadata/vgm.c -metadata/kss.c -#endif #ifdef HAVE_TAGCACHE tagcache.c #endif diff --git a/apps/fracmul.h b/apps/fracmul.h index 6aaedaf3e6..47b85e59ef 100644 --- a/apps/fracmul.h +++ b/apps/fracmul.h @@ -4,7 +4,7 @@ #include #include "gcc_extensions.h" -/** FRACTIONAL MULTIPLICATION - TAKEN FROM apps/dsp.h +/** FRACTIONAL MULTIPLICATION * Multiply two fixed point numbers with 31 fractional bits: * FRACMUL(x, y) * diff --git a/apps/plugins/lrcplayer.c b/apps/plugins/lrcplayer.c index cc0128b401..97385ff047 100644 --- a/apps/plugins/lrcplayer.c +++ b/apps/plugins/lrcplayer.c @@ -1113,7 +1113,6 @@ static void load_lrc_file(void) /******************************* * read lyrics from id3 *******************************/ -/* taken from apps/metadata/mp3.c */ static unsigned long unsync(unsigned long b0, unsigned long b1, unsigned long b2, unsigned long b3) { diff --git a/lib/rbcodec/SOURCES b/lib/rbcodec/SOURCES new file mode 100644 index 0000000000..3ac2660a38 --- /dev/null +++ b/lib/rbcodec/SOURCES @@ -0,0 +1,54 @@ +metadata/metadata.c +metadata/id3tags.c +metadata/mp3.c +metadata/mp3data.c +#if CONFIG_CODEC == SWCODEC +dsp/compressor.c +dsp/dsp.c +dsp/eq.c +# if defined(CPU_COLDFIRE) +dsp/dsp_cf.S +dsp/eq_cf.S +# elif defined(CPU_ARM) +dsp/dsp_arm.S +dsp/eq_arm.S +# if ARM_ARCH >= 6 +dsp/dsp_arm_v6.S +# endif +# endif +# ifdef HAVE_PITCHSCREEN +dsp/tdspeed.c +# endif +metadata/replaygain.c +metadata/metadata_common.c +metadata/a52.c +metadata/adx.c +metadata/aiff.c +metadata/ape.c +metadata/asap.c +metadata/asf.c +metadata/au.c +metadata/ay.c +metadata/flac.c +metadata/gbs.c +metadata/hes.c +metadata/kss.c +metadata/mod.c +metadata/monkeys.c +metadata/mp4.c +metadata/mpc.c +metadata/nsf.c +metadata/ogg.c +metadata/oma.c +metadata/rm.c +metadata/sgc.c +metadata/sid.c +metadata/smaf.c +metadata/spc.c +metadata/tta.c +metadata/vgm.c +metadata/vorbis.c +metadata/vox.c +metadata/wave.c +metadata/wavpack.c +#endif diff --git a/apps/compressor.c b/lib/rbcodec/dsp/compressor.c similarity index 100% rename from apps/compressor.c rename to lib/rbcodec/dsp/compressor.c diff --git a/apps/compressor.h b/lib/rbcodec/dsp/compressor.h similarity index 100% rename from apps/compressor.h rename to lib/rbcodec/dsp/compressor.h diff --git a/apps/dsp.c b/lib/rbcodec/dsp/dsp.c similarity index 100% rename from apps/dsp.c rename to lib/rbcodec/dsp/dsp.c diff --git a/apps/dsp.h b/lib/rbcodec/dsp/dsp.h similarity index 100% rename from apps/dsp.h rename to lib/rbcodec/dsp/dsp.h diff --git a/apps/dsp_arm.S b/lib/rbcodec/dsp/dsp_arm.S similarity index 100% rename from apps/dsp_arm.S rename to lib/rbcodec/dsp/dsp_arm.S diff --git a/apps/dsp_arm_v6.S b/lib/rbcodec/dsp/dsp_arm_v6.S similarity index 100% rename from apps/dsp_arm_v6.S rename to lib/rbcodec/dsp/dsp_arm_v6.S diff --git a/apps/dsp_asm.h b/lib/rbcodec/dsp/dsp_asm.h similarity index 100% rename from apps/dsp_asm.h rename to lib/rbcodec/dsp/dsp_asm.h diff --git a/apps/dsp_cf.S b/lib/rbcodec/dsp/dsp_cf.S similarity index 100% rename from apps/dsp_cf.S rename to lib/rbcodec/dsp/dsp_cf.S diff --git a/apps/eq.c b/lib/rbcodec/dsp/eq.c similarity index 100% rename from apps/eq.c rename to lib/rbcodec/dsp/eq.c diff --git a/apps/eq.h b/lib/rbcodec/dsp/eq.h similarity index 100% rename from apps/eq.h rename to lib/rbcodec/dsp/eq.h diff --git a/apps/eq_arm.S b/lib/rbcodec/dsp/eq_arm.S similarity index 100% rename from apps/eq_arm.S rename to lib/rbcodec/dsp/eq_arm.S diff --git a/apps/eq_cf.S b/lib/rbcodec/dsp/eq_cf.S similarity index 100% rename from apps/eq_cf.S rename to lib/rbcodec/dsp/eq_cf.S diff --git a/apps/eqs/Acoustic.cfg b/lib/rbcodec/dsp/eqs/Acoustic.cfg similarity index 100% rename from apps/eqs/Acoustic.cfg rename to lib/rbcodec/dsp/eqs/Acoustic.cfg diff --git a/apps/eqs/Bass.cfg b/lib/rbcodec/dsp/eqs/Bass.cfg similarity index 100% rename from apps/eqs/Bass.cfg rename to lib/rbcodec/dsp/eqs/Bass.cfg diff --git a/apps/eqs/Classical.cfg b/lib/rbcodec/dsp/eqs/Classical.cfg similarity index 100% rename from apps/eqs/Classical.cfg rename to lib/rbcodec/dsp/eqs/Classical.cfg diff --git a/apps/eqs/Default.cfg b/lib/rbcodec/dsp/eqs/Default.cfg similarity index 100% rename from apps/eqs/Default.cfg rename to lib/rbcodec/dsp/eqs/Default.cfg diff --git a/apps/eqs/Disco.cfg b/lib/rbcodec/dsp/eqs/Disco.cfg similarity index 100% rename from apps/eqs/Disco.cfg rename to lib/rbcodec/dsp/eqs/Disco.cfg diff --git a/apps/eqs/Electronic.cfg b/lib/rbcodec/dsp/eqs/Electronic.cfg similarity index 100% rename from apps/eqs/Electronic.cfg rename to lib/rbcodec/dsp/eqs/Electronic.cfg diff --git a/apps/eqs/Hip-Hop.cfg b/lib/rbcodec/dsp/eqs/Hip-Hop.cfg similarity index 100% rename from apps/eqs/Hip-Hop.cfg rename to lib/rbcodec/dsp/eqs/Hip-Hop.cfg diff --git a/apps/eqs/Jazz.cfg b/lib/rbcodec/dsp/eqs/Jazz.cfg similarity index 100% rename from apps/eqs/Jazz.cfg rename to lib/rbcodec/dsp/eqs/Jazz.cfg diff --git a/apps/eqs/Lounge.cfg b/lib/rbcodec/dsp/eqs/Lounge.cfg similarity index 100% rename from apps/eqs/Lounge.cfg rename to lib/rbcodec/dsp/eqs/Lounge.cfg diff --git a/apps/eqs/Pop.cfg b/lib/rbcodec/dsp/eqs/Pop.cfg similarity index 100% rename from apps/eqs/Pop.cfg rename to lib/rbcodec/dsp/eqs/Pop.cfg diff --git a/apps/eqs/R&B.cfg b/lib/rbcodec/dsp/eqs/R&B.cfg similarity index 100% rename from apps/eqs/R&B.cfg rename to lib/rbcodec/dsp/eqs/R&B.cfg diff --git a/apps/eqs/Rock.cfg b/lib/rbcodec/dsp/eqs/Rock.cfg similarity index 100% rename from apps/eqs/Rock.cfg rename to lib/rbcodec/dsp/eqs/Rock.cfg diff --git a/apps/eqs/Vocal.cfg b/lib/rbcodec/dsp/eqs/Vocal.cfg similarity index 100% rename from apps/eqs/Vocal.cfg rename to lib/rbcodec/dsp/eqs/Vocal.cfg diff --git a/apps/tdspeed.c b/lib/rbcodec/dsp/tdspeed.c similarity index 100% rename from apps/tdspeed.c rename to lib/rbcodec/dsp/tdspeed.c diff --git a/apps/tdspeed.h b/lib/rbcodec/dsp/tdspeed.h similarity index 100% rename from apps/tdspeed.h rename to lib/rbcodec/dsp/tdspeed.h diff --git a/apps/metadata/a52.c b/lib/rbcodec/metadata/a52.c similarity index 100% rename from apps/metadata/a52.c rename to lib/rbcodec/metadata/a52.c diff --git a/apps/metadata/adx.c b/lib/rbcodec/metadata/adx.c similarity index 100% rename from apps/metadata/adx.c rename to lib/rbcodec/metadata/adx.c diff --git a/apps/metadata/aiff.c b/lib/rbcodec/metadata/aiff.c similarity index 100% rename from apps/metadata/aiff.c rename to lib/rbcodec/metadata/aiff.c diff --git a/apps/metadata/ape.c b/lib/rbcodec/metadata/ape.c similarity index 100% rename from apps/metadata/ape.c rename to lib/rbcodec/metadata/ape.c diff --git a/apps/metadata/asap.c b/lib/rbcodec/metadata/asap.c similarity index 100% rename from apps/metadata/asap.c rename to lib/rbcodec/metadata/asap.c diff --git a/apps/metadata/asf.c b/lib/rbcodec/metadata/asf.c similarity index 100% rename from apps/metadata/asf.c rename to lib/rbcodec/metadata/asf.c diff --git a/apps/metadata/au.c b/lib/rbcodec/metadata/au.c similarity index 100% rename from apps/metadata/au.c rename to lib/rbcodec/metadata/au.c diff --git a/apps/metadata/ay.c b/lib/rbcodec/metadata/ay.c similarity index 100% rename from apps/metadata/ay.c rename to lib/rbcodec/metadata/ay.c diff --git a/apps/metadata/flac.c b/lib/rbcodec/metadata/flac.c similarity index 100% rename from apps/metadata/flac.c rename to lib/rbcodec/metadata/flac.c diff --git a/apps/metadata/gbs.c b/lib/rbcodec/metadata/gbs.c similarity index 100% rename from apps/metadata/gbs.c rename to lib/rbcodec/metadata/gbs.c diff --git a/apps/metadata/hes.c b/lib/rbcodec/metadata/hes.c similarity index 100% rename from apps/metadata/hes.c rename to lib/rbcodec/metadata/hes.c diff --git a/apps/metadata/id3tags.c b/lib/rbcodec/metadata/id3tags.c similarity index 100% rename from apps/metadata/id3tags.c rename to lib/rbcodec/metadata/id3tags.c diff --git a/apps/metadata/kss.c b/lib/rbcodec/metadata/kss.c similarity index 100% rename from apps/metadata/kss.c rename to lib/rbcodec/metadata/kss.c diff --git a/apps/metadata.c b/lib/rbcodec/metadata/metadata.c similarity index 99% rename from apps/metadata.c rename to lib/rbcodec/metadata/metadata.c index 2a93c1880c..b91e00cc4e 100644 --- a/apps/metadata.c +++ b/lib/rbcodec/metadata/metadata.c @@ -29,7 +29,7 @@ #include "cuesheet.h" #include "metadata.h" -#include "metadata/metadata_parsers.h" +#include "metadata_parsers.h" #if CONFIG_CODEC == SWCODEC diff --git a/apps/metadata.h b/lib/rbcodec/metadata/metadata.h similarity index 100% rename from apps/metadata.h rename to lib/rbcodec/metadata/metadata.h diff --git a/apps/metadata/metadata_common.c b/lib/rbcodec/metadata/metadata_common.c similarity index 100% rename from apps/metadata/metadata_common.c rename to lib/rbcodec/metadata/metadata_common.c diff --git a/apps/metadata/metadata_common.h b/lib/rbcodec/metadata/metadata_common.h similarity index 100% rename from apps/metadata/metadata_common.h rename to lib/rbcodec/metadata/metadata_common.h diff --git a/apps/metadata/metadata_parsers.h b/lib/rbcodec/metadata/metadata_parsers.h similarity index 100% rename from apps/metadata/metadata_parsers.h rename to lib/rbcodec/metadata/metadata_parsers.h diff --git a/apps/metadata/mod.c b/lib/rbcodec/metadata/mod.c similarity index 100% rename from apps/metadata/mod.c rename to lib/rbcodec/metadata/mod.c diff --git a/apps/metadata/monkeys.c b/lib/rbcodec/metadata/monkeys.c similarity index 100% rename from apps/metadata/monkeys.c rename to lib/rbcodec/metadata/monkeys.c diff --git a/apps/metadata/mp3.c b/lib/rbcodec/metadata/mp3.c similarity index 100% rename from apps/metadata/mp3.c rename to lib/rbcodec/metadata/mp3.c diff --git a/apps/mp3data.c b/lib/rbcodec/metadata/mp3data.c similarity index 100% rename from apps/mp3data.c rename to lib/rbcodec/metadata/mp3data.c diff --git a/apps/mp3data.h b/lib/rbcodec/metadata/mp3data.h similarity index 100% rename from apps/mp3data.h rename to lib/rbcodec/metadata/mp3data.h diff --git a/apps/metadata/mp4.c b/lib/rbcodec/metadata/mp4.c similarity index 100% rename from apps/metadata/mp4.c rename to lib/rbcodec/metadata/mp4.c diff --git a/apps/metadata/mpc.c b/lib/rbcodec/metadata/mpc.c similarity index 100% rename from apps/metadata/mpc.c rename to lib/rbcodec/metadata/mpc.c diff --git a/apps/metadata/nsf.c b/lib/rbcodec/metadata/nsf.c similarity index 100% rename from apps/metadata/nsf.c rename to lib/rbcodec/metadata/nsf.c diff --git a/apps/metadata/ogg.c b/lib/rbcodec/metadata/ogg.c similarity index 100% rename from apps/metadata/ogg.c rename to lib/rbcodec/metadata/ogg.c diff --git a/apps/metadata/oma.c b/lib/rbcodec/metadata/oma.c similarity index 100% rename from apps/metadata/oma.c rename to lib/rbcodec/metadata/oma.c diff --git a/apps/replaygain.c b/lib/rbcodec/metadata/replaygain.c similarity index 100% rename from apps/replaygain.c rename to lib/rbcodec/metadata/replaygain.c diff --git a/apps/replaygain.h b/lib/rbcodec/metadata/replaygain.h similarity index 100% rename from apps/replaygain.h rename to lib/rbcodec/metadata/replaygain.h diff --git a/apps/metadata/rm.c b/lib/rbcodec/metadata/rm.c similarity index 100% rename from apps/metadata/rm.c rename to lib/rbcodec/metadata/rm.c diff --git a/apps/metadata/sgc.c b/lib/rbcodec/metadata/sgc.c similarity index 100% rename from apps/metadata/sgc.c rename to lib/rbcodec/metadata/sgc.c diff --git a/apps/metadata/sid.c b/lib/rbcodec/metadata/sid.c similarity index 100% rename from apps/metadata/sid.c rename to lib/rbcodec/metadata/sid.c diff --git a/apps/metadata/smaf.c b/lib/rbcodec/metadata/smaf.c similarity index 100% rename from apps/metadata/smaf.c rename to lib/rbcodec/metadata/smaf.c diff --git a/apps/metadata/spc.c b/lib/rbcodec/metadata/spc.c similarity index 100% rename from apps/metadata/spc.c rename to lib/rbcodec/metadata/spc.c diff --git a/apps/metadata/tta.c b/lib/rbcodec/metadata/tta.c similarity index 100% rename from apps/metadata/tta.c rename to lib/rbcodec/metadata/tta.c diff --git a/apps/metadata/vgm.c b/lib/rbcodec/metadata/vgm.c similarity index 100% rename from apps/metadata/vgm.c rename to lib/rbcodec/metadata/vgm.c diff --git a/apps/metadata/vorbis.c b/lib/rbcodec/metadata/vorbis.c similarity index 100% rename from apps/metadata/vorbis.c rename to lib/rbcodec/metadata/vorbis.c diff --git a/apps/metadata/vox.c b/lib/rbcodec/metadata/vox.c similarity index 100% rename from apps/metadata/vox.c rename to lib/rbcodec/metadata/vox.c diff --git a/apps/metadata/wave.c b/lib/rbcodec/metadata/wave.c similarity index 100% rename from apps/metadata/wave.c rename to lib/rbcodec/metadata/wave.c diff --git a/apps/metadata/wavpack.c b/lib/rbcodec/metadata/wavpack.c similarity index 100% rename from apps/metadata/wavpack.c rename to lib/rbcodec/metadata/wavpack.c diff --git a/lib/rbcodec/rbcodec.make b/lib/rbcodec/rbcodec.make new file mode 100644 index 0000000000..afa289ba28 --- /dev/null +++ b/lib/rbcodec/rbcodec.make @@ -0,0 +1,19 @@ +# __________ __ ___. +# Open \______ \ ____ ____ | | _\_ |__ _______ ___ +# Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / +# Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < +# Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ +# \/ \/ \/ \/ \/ + +RBCODEC_LIB = $(RBCODEC_BLD)/librbcodec.a +RBCODEC_SRC := $(call preprocess, $(RBCODEC_DIR)/SOURCES) +RBCODEC_OBJ := $(call c2obj, $(RBCODEC_SRC)) +INCLUDES += -I$(RBCODEC_DIR) -I$(RBCODEC_DIR)/dsp -I$(RBCODEC_DIR)/metadata +OTHER_SRC += $(RBCODEC_SRC) + +$(RBCODEC_BLD)/%.o: $(RBCODEC_DIR)/%.c + $(SILENT)mkdir -p $(dir $@) + $(call PRINTS,CC $<)$(CC) $(CFLAGS) $(RBCODEC_CFLAGS) -c $< -o $@ + +$(RBCODEC_LIB): $(RBCODEC_OBJ) + $(call PRINTS,AR $(@F))$(AR) rcs $@ $^ >/dev/null diff --git a/lib/rbcodec/test/SOURCES b/lib/rbcodec/test/SOURCES index 467115e0d6..4c0d906dc5 100644 --- a/lib/rbcodec/test/SOURCES +++ b/lib/rbcodec/test/SOURCES @@ -1,49 +1,8 @@ warble.c -../../../apps/metadata.c -../../../apps/replaygain.c ../../../firmware/buflib.c ../../../firmware/core_alloc.c ../../../firmware/common/strlcpy.c ../../../firmware/common/unicode.c ../../../firmware/common/structec.c -../../../apps/mp3data.c ../../../apps/fixedpoint.c ../../../uisimulator/common/io.c -../../../apps/compressor.c -../../../apps/dsp.c -../../../apps/eq.c -../../../apps/tdspeed.c -../../../apps/metadata/a52.c -../../../apps/metadata/adx.c -../../../apps/metadata/aiff.c -../../../apps/metadata/ape.c -../../../apps/metadata/asap.c -../../../apps/metadata/asf.c -../../../apps/metadata/au.c -../../../apps/metadata/ay.c -../../../apps/metadata/flac.c -../../../apps/metadata/gbs.c -../../../apps/metadata/hes.c -../../../apps/metadata/id3tags.c -../../../apps/metadata/kss.c -../../../apps/metadata/metadata_common.c -../../../apps/metadata/mod.c -../../../apps/metadata/monkeys.c -../../../apps/metadata/mp3.c -../../../apps/metadata/mp4.c -../../../apps/metadata/mpc.c -../../../apps/metadata/nsf.c -../../../apps/metadata/ogg.c -../../../apps/metadata/oma.c -../../../apps/metadata/rm.c -../../../apps/metadata/sgc.c -../../../apps/metadata/sid.c -../../../apps/metadata/smaf.c -../../../apps/metadata/spc.c -../../../apps/metadata/tta.c -../../../apps/metadata/vgm.c -../../../apps/metadata/vorbis.c -../../../apps/metadata/vox.c -../../../apps/metadata/wave.c -../../../apps/metadata/wavpack.c - diff --git a/lib/rbcodec/test/warble.make b/lib/rbcodec/test/warble.make index 0b70e9a932..11f7ab03ec 100644 --- a/lib/rbcodec/test/warble.make +++ b/lib/rbcodec/test/warble.make @@ -9,12 +9,15 @@ +RBCODEC_DIR = $(ROOTDIR)/lib/rbcodec +RBCODEC_BLD = $(BUILDDIR)/lib/rbcodec + FLAGS=-g -D__PCTOOL__ $(TARGET) -Wall SRC= $(call preprocess, $(ROOTDIR)/lib/rbcodec/test/SOURCES) INCLUDES += -I$(ROOTDIR)/apps -I$(ROOTDIR)/apps/codecs -I$(ROOTDIR)/apps/codecs/lib \ - -I$(ROOTDIR)/apps/gui -I$(ROOTDIR)/apps/metadata + -I$(ROOTDIR)/apps/gui INCLUDES += -I$(ROOTDIR)/firmware/export -I$(ROOTDIR)/firmware/include \ -I$(ROOTDIR)/firmware/target/hosted \ -I$(ROOTDIR)/firmware/target/hosted/sdl @@ -30,9 +33,10 @@ endif include $(ROOTDIR)/tools/functions.make include $(ROOTDIR)/apps/codecs/codecs.make +include $(ROOTDIR)/lib/rbcodec/rbcodec.make $(BUILDDIR)/$(BINARY): $(CODECS) -$(BUILDDIR)/$(BINARY): $$(OBJ) +$(BUILDDIR)/$(BINARY): $$(OBJ) $(RBCODEC_LIB) @echo LD $(BINARY) $(SILENT)$(HOSTCC) $(SIMFLAGS) $(LIBS) -o $@ $+ diff --git a/tools/buildzip.pl b/tools/buildzip.pl index b4a152c546..2aa990ac7d 100755 --- a/tools/buildzip.pl +++ b/tools/buildzip.pl @@ -444,7 +444,7 @@ sub buildzip { if($swcodec) { glob_mkdir("$temp_dir/eqs"); - glob_copy("$ROOT/apps/eqs/*.cfg", "$temp_dir/eqs/"); # equalizer presets + glob_copy("$ROOT/lib/rbcodec/dsp/eqs/*.cfg", "$temp_dir/eqs/"); # equalizer presets } glob_mkdir("$temp_dir/wps"); diff --git a/tools/database/SOURCES b/tools/database/SOURCES index 65d6ca6aba..9c60fb1e7d 100644 --- a/tools/database/SOURCES +++ b/tools/database/SOURCES @@ -1,11 +1,6 @@ database.c ../../apps/fixedpoint.c -../../apps/metadata.c -#if CONFIG_CODEC == SWCODEC -../../apps/replaygain.c -#endif ../../apps/misc.c -../../apps/mp3data.c ../../apps/tagcache.c ../../firmware/common/crc32.c ../../firmware/common/filefuncs.c @@ -17,7 +12,9 @@ database.c ../../firmware/logf.c ../../uisimulator/common/io.c #if CONFIG_CODEC != SWCODEC -../../apps/metadata/id3tags.c -../../apps/metadata/mp3.c +../../lib/rbcodec/metadata/id3tags.c +../../lib/rbcodec/metadata/metadata.c +../../lib/rbcodec/metadata/mp3.c +../../lib/rbcodec/metadata/mp3data.c #endif /* Caution. metadata files do not add!! */ diff --git a/tools/database/database.make b/tools/database/database.make index 7d02a461bd..c7292a66a9 100644 --- a/tools/database/database.make +++ b/tools/database/database.make @@ -15,7 +15,7 @@ createsrc = $(shell cat $(1) > $(3); echo "\#if CONFIG_CODEC == SWCODEC" >> $(3) echo "\#endif" >> $(3); \ echo $(3)) -METADATAS := $(subst $(ROOTDIR), ../.., $(wildcard $(ROOTDIR)/apps/metadata/*.c)) +METADATAS := $(subst $(ROOTDIR), ../.., $(wildcard $(ROOTDIR)/lib/rbcodec/metadata/*.c)) SRCFILE := $(call createsrc, $(TOOLSDIR)/database/SOURCES, \ $(METADATAS), \ @@ -28,6 +28,8 @@ INCLUDES = -I$(ROOTDIR)/apps/gui \ -I$(ROOTDIR)/firmware/include \ -I$(ROOTDIR)/apps \ -I$(ROOTDIR)/apps/recorder \ + -I$(ROOTDIR)/lib/rbcodec \ + -I$(ROOTDIR)/lib/rbcodec/metadata \ -I$(APPSDIR) \ -I$(BUILDDIR) \ diff --git a/tools/root.make b/tools/root.make index 3231b73053..1bac0d6600 100644 --- a/tools/root.make +++ b/tools/root.make @@ -95,7 +95,10 @@ else ifneq (,$(findstring database,$(APP_TYPE))) else ifneq (,$(findstring warble,$(APP_TYPE))) include $(ROOTDIR)/lib/rbcodec/test/warble.make else + RBCODEC_DIR = $(ROOTDIR)/lib/rbcodec + RBCODEC_BLD = $(BUILDDIR)/lib/rbcodec include $(APPSDIR)/apps.make + include $(RBCODEC_DIR)/rbcodec.make include $(APPSDIR)/lang/lang.make ifdef SOFTWARECODECS @@ -205,17 +208,19 @@ $(LINKROM): $(ROMLDS) $(call PRINTS,PP $(@F)) $(call preprocess2file,$<,$@,-DLOADADDRESS=$(LOADADDRESS)) -$(BUILDDIR)/rockbox.elf : $$(OBJ) $$(FIRMLIB) $$(VOICESPEEXLIB) $$(SKINLIB) $$(LIBARMSUPPORT) $$(UNWARMINDER) $$(LINKRAM) +$(BUILDDIR)/rockbox.elf : $$(OBJ) $$(FIRMLIB) $$(RBCODEC_LIB) $$(VOICESPEEXLIB) $$(SKINLIB) $$(LIBARMSUPPORT) $$(UNWARMINDER) $$(LINKRAM) $(call PRINTS,LD $(@F))$(CC) $(GCCOPTS) -Os -nostdlib -o $@ $(OBJ) \ -L$(BUILDDIR)/firmware -lfirmware \ + -L$(RBCODEC_BLD) -lrbcodec \ -L$(BUILDDIR)/lib -lskin_parser $(LIBARMSUPPORT_LINK) \ $(UNWARMINDER_LINK) -L$(BUILDDIR)/apps/codecs \ $(VOICESPEEXLIB:lib%.a=-l%) -lgcc $(BOOTBOXLDOPTS) \ $(GLOBAL_LDOPTS) -T$(LINKRAM) -Wl,-Map,$(BUILDDIR)/rockbox.map -$(BUILDDIR)/rombox.elf : $$(OBJ) $$(FIRMLIB) $$(VOICESPEEXLIB) $$(SKINLIB) $$(LIBARMSUPPORT) $$(UNWARMINDER) $$(LINKROM) +$(BUILDDIR)/rombox.elf : $$(OBJ) $$(FIRMLIB) $$(RBCODEC_LIB) $$(VOICESPEEXLIB) $$(SKINLIB) $$(LIBARMSUPPORT) $$(UNWARMINDER) $$(LINKROM) $(call PRINTS,LD $(@F))$(CC) $(GCCOPTS) -Os -nostdlib -o $@ $(OBJ) \ -L$(BUILDDIR)/firmware -lfirmware \ + -L$(RBCODEC_BLD) -lrbcodec \ -L$(BUILDDIR)/lib -lskin_parser $(LIBARMSUPPORT_LINK) \ $(UNWARMINDER_LINK) -L$(BUILDDIR)/apps/codecs \ $(VOICESPEEXLIB:lib%.a=-l%) -lgcc $(GLOBAL_LDOPTS) \ diff --git a/uisimulator/uisimulator.make b/uisimulator/uisimulator.make index fc58f3a6c1..be57e3c216 100644 --- a/uisimulator/uisimulator.make +++ b/uisimulator/uisimulator.make @@ -30,7 +30,7 @@ $(SIMLIB): $$(SIMOBJ) $(UIBMP) $(SILENT)$(shell rm -f $@) $(call PRINTS,AR $(@F))$(AR) rcs $@ $^ >/dev/null -$(BUILDDIR)/$(BINARY): $$(OBJ) $(SIMLIB) $(VOICESPEEXLIB) $(FIRMLIB) $(SKINLIB) $(UNWARMINDER) +$(BUILDDIR)/$(BINARY): $$(OBJ) $(SIMLIB) $(VOICESPEEXLIB) $(FIRMLIB) $(RBCODEC_LIB) $(SKINLIB) $(UNWARMINDER) $(call PRINTS,LD $(BINARY))$(CC) -o $@ $^ $(SIMLIB) $(LDOPTS) $(GLOBAL_LDOPTS) \ -Wl,-Map,$(BUILDDIR)/rockbox.map