Skip to content

Commit

Permalink
update v1.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
[email protected] committed Jun 17, 2021
1 parent 1dba594 commit 1d78f3d
Show file tree
Hide file tree
Showing 951 changed files with 95,347 additions and 5,143 deletions.
21 changes: 15 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@ export TIDY_FILTER=/opt/utils/tidy-filter
#export SoC?=bd29
#export SoC?=br30
#export SoC?=br30c
#export SoC?=br34
export SoC?=br34
#export SoC?=br28
export SoC?=bd19
#export SoC?=bd19
#export SoC?=br36


Expand All @@ -53,15 +53,16 @@ export SoC?=bd19
#export APP_CASE?=qcy_case
#export APP_CASE?=soundbox
#export APP_CASE?=dongle
#export APP_CASE?=spp_and_le
export APP_CASE?=hid
export APP_CASE?=spp_and_le
#export APP_CASE?=hid
#export APP_CASE?=mesh
#export APP_CASE?=watch
# export APP_CASE?=watch
#export APP_CASE?=iot
#export APP_CASE?=bt_udisk
#export APP_CASE?=multi_link
#export APP_CASE?=le_audio
#export APP_CASE?=adapter
#export APP_CASE?=ICrecorder


# --------------common var begin-----------------------
Expand Down Expand Up @@ -102,7 +103,7 @@ endif



.PHONY: all clean lib clean_lib libs clean_libs dry_run debug usage cbp winmake app
.PHONY: all clean lib clean_lib libs clean_libs dry_run debug usage cbp winmake app doc sphinx_doc

all: pre_make $(ADDITION_DEP)
@$(MAKE) -C apps || exit 1
Expand Down Expand Up @@ -207,6 +208,14 @@ winrelease: cbp winmake
branch_jenkins:
$(V) python3 /opt/utils/jenkins-gen-build-config.py --config jenkins/jenkins-librepo.json --project $(project) > jenkins/jenkins-build-branch.json

doc:
@mkdir -p doxygen_out
doxygen Doxyfile
$(MAKE) -C docsrc html

sphinx_doc:
$(MAKE) -C docsrc html


usage:
@echo Complie apps : make
Expand Down
2 changes: 1 addition & 1 deletion apps/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
objs += \
$(ROOT)/apps/common/debug/debug.o \

include $(ROOT)/cpu/$(CPU)/Makefile
include $(ROOT)/cpu/$(CPU_DIR)/Makefile

include $(ROOT)/apps/$(APP_CASE)/Makefile

Expand Down
11 changes: 7 additions & 4 deletions apps/app_cfg
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,11 @@ export LIB_SUFFIX = _2M_flash
OTA_UPDATE = n
BANK_ENABLE = y

#AUDIO_CFG_DEFINE += \
AUDIO_CFG_DEFINE += \
-DCONFIG_LITE_AEC_ENABLE=1 \

#-DCONFIG_LITE_DECODER=1 \
#-DCONFIG_LITE_AUDIO \
#-DCONFIG_LITE_AEC_ENABLE=1 \

#BTCTRLER_CFG_DEFINE += \
#-DTEST_DUT_CODE=0 \
Expand All @@ -46,9 +47,11 @@ CC_DEFINE += \

else #ifeq ($(FLASH_256K),y)

#AUDIO_CFG_DEFINE += \
AUDIO_CFG_DEFINE += \
-DCONFIG_LITE_AEC_ENABLE=0 \

#-DCONFIG_LITE_DECODER=0 \
#-DCONFIG_LITE_AEC_ENABLE=0 \

#
#BTCTRLER_CFG_DEFINE += \
#-DTEST_DUT_CODE=1 \
Expand Down
7 changes: 7 additions & 0 deletions apps/common/audio/decode/decode.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,19 @@ struct audio_dec_app_audio_state_hdl {
const struct audio_dec_format_hdl decode_format_list[] = {
{"wtg", AUDIO_CODING_G729},
{"msbc", AUDIO_CODING_MSBC},
{"msb", AUDIO_CODING_MSBC},
{"sbc", AUDIO_CODING_SBC},
{"mty", AUDIO_CODING_MTY},
{"aac", AUDIO_CODING_AAC},
{"mp3", AUDIO_CODING_MP3},
{"wma", AUDIO_CODING_WMA},
{"wav", AUDIO_CODING_WAV},
#if (defined(TCFG_DEC_MIDI_ENABLE) && TCFG_DEC_MIDI_ENABLE)
//midi 文件播放,需要对应音色文件配合
{"midi", AUDIO_CODING_MIDI},
{"mid", AUDIO_CODING_MIDI},
#endif //TCFG_DEC_MIDI_ENABLE

#if TCFG_DEC_WTGV2_ENABLE
{"wts", AUDIO_CODING_WTGV2},
#endif
Expand Down
212 changes: 212 additions & 0 deletions apps/common/audio/demo/audio_decoder_test.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,212 @@
/*
****************************************************************
* AUDIO DECODER TEST
* File : audio_decoder_test.c
* By :
* Notes : 解码测试
* before和after之间就是解码对应功能的处理,
* 可以在before和after中分别翻转IO来卡一下处理时间
****************************************************************
*/


#include "media/includes.h"


#define DEC_IO_DEBUG_1(i,x) {JL_PORT##i->DIR &= ~BIT(x), JL_PORT##i->OUT |= BIT(x);}
#define DEC_IO_DEBUG_0(i,x) {JL_PORT##i->DIR &= ~BIT(x), JL_PORT##i->OUT &= ~BIT(x);}


/*
*********************************************************************
* Audio Decoder test output before
* Description: 解码输出
* Arguments : *dec 解码句柄
* *buff 输出buf
* len 输出长度
* Return : None.
* Note(s) : None.
*********************************************************************
*/
void audio_decoder_test_out_before(struct audio_decoder *dec, void *buff, int len)
{
DEC_IO_DEBUG_1(C, 3);
}
/*
*********************************************************************
* Audio Decoder test output after
* Description: 解码输出
* Arguments : *dec 解码句柄
* wlen 实际输出长度
* Return : None.
* Note(s) : None.
*********************************************************************
*/
void audio_decoder_test_out_after(struct audio_decoder *dec, int wlen)
{
DEC_IO_DEBUG_0(C, 3);
}

/*
*********************************************************************
* Audio Decoder test read file before
* Description: 解码获取文件数据
* Arguments : *dec 解码句柄
* len 获取数据长度
* offset 获取数据偏移地址
* Return : None.
* Note(s) : None.
*********************************************************************
*/
void audio_decoder_test_read_before(struct audio_decoder *dec, int len, u32 offset)
{
DEC_IO_DEBUG_1(C, 2);
}
/*
*********************************************************************
* Audio Decoder test read file after
* Description: 解码获取文件数据
* Arguments : *dec 解码句柄
* *data 获取到的数据
* rlen 获取到的数据长度
* Return : None.
* Note(s) : None.
*********************************************************************
*/
void audio_decoder_test_read_after(struct audio_decoder *dec, u8 *data, int rlen)
{
DEC_IO_DEBUG_0(C, 2);
}

/*
*********************************************************************
* Audio Decoder test get frame before
* Description: 解码获取帧数据
* Arguments : *dec 解码句柄
* Return : None.
* Note(s) : None.
*********************************************************************
*/
void audio_decoder_test_get_frame_before(struct audio_decoder *dec)
{
DEC_IO_DEBUG_1(C, 2);
}
/*
*********************************************************************
* Audio Decoder test get frame after
* Description: 解码获取帧数据
* Arguments : *dec 解码句柄
* *frame 获取到的帧数据
* rlen 获取到的帧数据长度
* Return : None.
* Note(s) : None.
*********************************************************************
*/
void audio_decoder_test_get_frame_after(struct audio_decoder *dec, u8 *frame, int rlen)
{
DEC_IO_DEBUG_0(C, 2);
}

/*
*********************************************************************
* Audio Decoder test fetch frame before
* Description: 解码检查帧数据
* Arguments : *dec 解码句柄
* Return : None.
* Note(s) : None.
*********************************************************************
*/
void audio_decoder_test_fetch_before(struct audio_decoder *dec)
{
DEC_IO_DEBUG_1(C, 2);
}
/*
*********************************************************************
* Audio Decoder test fetch frame after
* Description: 解码检查帧数据
* Arguments : *dec 解码句柄
* *frame 获取到的帧数据
* rlen 获取到的帧数据长度
* Return : None.
* Note(s) : None.
*********************************************************************
*/
void audio_decoder_test_fetch_after(struct audio_decoder *dec, u8 *frame, int rlen)
{
DEC_IO_DEBUG_0(C, 2);
}

/*
*********************************************************************
* Audio Decoder test run before
* Description: 解码处理
* Arguments : *dec 解码句柄
* Return : None.
* Note(s) : None.
*********************************************************************
*/
void audio_decoder_test_run_before(struct audio_decoder *dec)
{
DEC_IO_DEBUG_1(C, 1);
}
/*
*********************************************************************
* Audio Decoder test run after
* Description: 解码处理
* Arguments : *dec 解码句柄
* err 解码处理返回值
* Return : None.
* Note(s) : None.
*********************************************************************
*/
void audio_decoder_test_run_after(struct audio_decoder *dec, int err)
{
DEC_IO_DEBUG_0(C, 1);
}


/*
* 数据流节点统计时间示例
* 这里的时间是数据流节点运行的时间加上输出的时间
* 数据流节点的运行时间约等于当前统计的时间减去下一个节点的统计时间
* */
#if 0

// 保存原来的数据流数据处理
static void *demo_data_handler_save;
// 数据流data_handler处理
static int demo_new_data_handler(struct audio_stream_entry *entry,
struct audio_data_frame *in,
struct audio_data_frame *out)
{
DEC_IO_DEBUG_1(C, 1);

// 调用原来的接口输出
int wlen = ((int (*)(struct audio_stream_entry *, struct audio_data_frame *, struct audio_data_frame *))demo_data_handler_save)(entry, in, out);

DEC_IO_DEBUG_0(C, 1);
return wlen;
}


void test_start(void)
{
#if 1
// 用变量保存原来的数据处理接口,然后重新赋值新的数据处理
// 这里以获取mix节点的数据为例
demo_data_handler_save = (void *)bt_a2dp_dec->mix_ch.entry.data_handler;
bt_a2dp_dec->mix_ch.entry.data_handler = demo_new_data_handler;
#endif

// 数据流串联
struct audio_stream_entry *entries[8] = {NULL};
u8 entry_cnt = 0;
entries[entry_cnt++] = &dec->dec.decoder.entry;
entries[entry_cnt++] = &dec->mix_ch.entry;
// ...
}


#endif


Loading

0 comments on commit 1d78f3d

Please sign in to comment.