Build librbcodec with DSP and metadata.

All associated files are moved to /lib/rbcodec.

Change-Id: I572ddd2b8a996aae1e98c081d06b1ed356dce222
This commit is contained in:
Sean Bartell 2011-06-24 01:25:21 -04:00 committed by Nils Wallménius
parent 24bd9d5393
commit b5716df4cb
80 changed files with 97 additions and 112 deletions

View file

@ -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

View file

@ -4,7 +4,7 @@
#include <stdint.h>
#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)
*

View file

@ -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)
{

54
lib/rbcodec/SOURCES Normal file
View file

@ -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

View file

@ -29,7 +29,7 @@
#include "cuesheet.h"
#include "metadata.h"
#include "metadata/metadata_parsers.h"
#include "metadata_parsers.h"
#if CONFIG_CODEC == SWCODEC

19
lib/rbcodec/rbcodec.make Normal file
View file

@ -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

View file

@ -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

View file

@ -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 $@ $+

View file

@ -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");

View file

@ -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!! */

View file

@ -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) \

View file

@ -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) \

View file

@ -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