Compare commits
31 Commits
0d1d09bda5
...
f0bf978454
Author | SHA1 | Date |
---|---|---|
Rudis Muiznieks | f0bf978454 | |
Ben V. Brown | f64468868c | |
Ben V. Brown | 850cb666c4 | |
Ben V. Brown | 833de0f666 | |
Ben V. Brown | 7365d8e6b8 | |
Ben V. Brown | 0751b1cf75 | |
Nick Anstee | b61712a01c | |
Ben V. Brown | d8be791cad | |
nicka101 | 839d513367 | |
Ben V. Brown | 61f736b66b | |
Nick Anstee | 3e95c41c0d | |
Ben V. Brown | ea0d5b067a | |
Haxk20 | 851fb95dcb | |
Ben V. Brown | bc68d1628e | |
Ben V. Brown | 9f5d2d6956 | |
Ben V. Brown | c76a31e13a | |
Ben V. Brown | 5bc29ea41e | |
Ben V. Brown | b540007bcc | |
Ben V. Brown | 802822fbb6 | |
Ben V. Brown | fd2c9386c7 | |
Ben V. Brown | 725dcc4421 | |
Ben V. Brown | c1dd03c127 | |
Ben V. Brown | 68c0f2e047 | |
Ben V. Brown | b63b1b3a39 | |
Ben V. Brown | 9f525debd0 | |
Ben V. Brown | fb1dd221d5 | |
Ben V. Brown | 7b21c7bcb5 | |
Ben V. Brown | eb232e87ed | |
Ben Brown | 124f0545f8 | |
Ben V. Brown | 42451f7f7d | |
dependabot[bot] | 2cb04b7925 |
|
@ -17,11 +17,17 @@ jobs:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Install qemu dependency
|
||||||
|
run: |
|
||||||
|
sudo apt-get update
|
||||||
|
sudo apt-get install -y qemu-user-static
|
||||||
|
|
||||||
- name: Build images
|
- name: Build images
|
||||||
id: build
|
id: build
|
||||||
uses: redhat-actions/buildah-build@v2
|
uses: redhat-actions/buildah-build@v2
|
||||||
with:
|
with:
|
||||||
image: ${{ github.repository }}
|
image: ${{ github.repository }}
|
||||||
|
platforms: linux/amd64, linux/arm64
|
||||||
context: /
|
context: /
|
||||||
tags: ${{ contains(github.ref_name, 'main') && 'latest' || github.ref_name }}-sdk
|
tags: ${{ contains(github.ref_name, 'main') && 'latest' || github.ref_name }}-sdk
|
||||||
containerfiles: /Dockerfile
|
containerfiles: /Dockerfile
|
||||||
|
|
|
@ -12,6 +12,6 @@ jobs:
|
||||||
run: cd /usr/src/ && ./build.sh || cat /usr/src/log.txt
|
run: cd /usr/src/ && ./build.sh || cat /usr/src/log.txt
|
||||||
|
|
||||||
- name: Archive produced firmware
|
- name: Archive produced firmware
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
path: /usr/src/out/open_source/open_source.bin
|
path: /usr/src/out/open_source/open_source.bin
|
||||||
|
|
|
@ -41,6 +41,11 @@ RUN apt-get update \
|
||||||
&& curl \
|
&& curl \
|
||||||
https://armkeil.blob.core.windows.net/developer/Files/downloads/gnu-rm/9-2019q4/gcc-arm-none-eabi-9-2019-q4-major-$(arch)-linux.tar.bz2 | tar -xj -C /src/
|
https://armkeil.blob.core.windows.net/developer/Files/downloads/gnu-rm/9-2019q4/gcc-arm-none-eabi-9-2019-q4-major-$(arch)-linux.tar.bz2 | tar -xj -C /src/
|
||||||
|
|
||||||
|
RUN apt-get update \
|
||||||
|
&& apt-get install -y \
|
||||||
|
minicom \
|
||||||
|
sudo
|
||||||
|
|
||||||
ENV PATH="${PATH}:/src/gcc-arm-none-eabi-9-2019-q4-major/bin"
|
ENV PATH="${PATH}:/src/gcc-arm-none-eabi-9-2019-q4-major/bin"
|
||||||
COPY --from=rust_build /usr/src/bestool/bestool/target/release/bestool /usr/local/bin/bestool
|
COPY --from=rust_build /usr/src/bestool/bestool/target/release/bestool /usr/local/bin/bestool
|
||||||
COPY . /usr/src
|
COPY . /usr/src
|
||||||
|
|
|
@ -25,6 +25,7 @@ endif
|
||||||
|
|
||||||
ifeq ($(ANC_ASSIST_ENABLED),1)
|
ifeq ($(ANC_ASSIST_ENABLED),1)
|
||||||
CFLAGS_app_anc.o += -DANC_ASSIST_ENABLED
|
CFLAGS_app_anc.o += -DANC_ASSIST_ENABLED
|
||||||
|
CFLAGS_anc_assist.o += -DANC_ASSIST_ENABLED
|
||||||
|
|
||||||
ifeq ($(ANC_ASSIST_WNR_ENABLED),1)
|
ifeq ($(ANC_ASSIST_WNR_ENABLED),1)
|
||||||
CFLAGS_anc_assist.o += -DANC_ASSIST_WNR_ENABLED
|
CFLAGS_anc_assist.o += -DANC_ASSIST_WNR_ENABLED
|
||||||
|
|
|
@ -1531,13 +1531,6 @@ void app_anc_key(APP_KEY_STATUS *status, void *param) {
|
||||||
bool flag = app_anc_work_status();
|
bool flag = app_anc_work_status();
|
||||||
|
|
||||||
#if defined(IBRT)
|
#if defined(IBRT)
|
||||||
ibrt_ctrl_t *p_ibrt_ctrl = app_tws_ibrt_get_bt_ctrl_ctx();
|
|
||||||
|
|
||||||
TRACE(2, "[%s] current_role: %d", __func__, p_ibrt_ctrl->current_role);
|
|
||||||
if (p_ibrt_ctrl->current_role == IBRT_SLAVE) {
|
|
||||||
app_anc_notify_master_to_exchange_coef(0, 0);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
app_anc_status_sync(!flag);
|
app_anc_status_sync(!flag);
|
||||||
#endif
|
#endif
|
||||||
app_anc_status_post(!flag);
|
app_anc_status_post(!flag);
|
||||||
|
|
|
@ -118,6 +118,12 @@ void send_prev_track(void) {
|
||||||
uint8_t action[] = {IBRT_ACTION_BACKWARD};
|
uint8_t action[] = {IBRT_ACTION_BACKWARD};
|
||||||
app_ibrt_if_start_user_action(action, sizeof(action));
|
app_ibrt_if_start_user_action(action, sizeof(action));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void send_enable_disable_anc(void) {
|
||||||
|
uint8_t action[] = {IBRT_ACTION_ANC_NOTIRY_MASTER_EXCHANGE_COEF};
|
||||||
|
app_ibrt_if_start_user_action(action, sizeof(action));
|
||||||
|
}
|
||||||
|
|
||||||
void app_key_single_tap(APP_KEY_STATUS *status, void *param) {
|
void app_key_single_tap(APP_KEY_STATUS *status, void *param) {
|
||||||
TRACE(2, "%s event %d", __func__, status->event);
|
TRACE(2, "%s event %d", __func__, status->event);
|
||||||
|
|
||||||
|
@ -207,7 +213,7 @@ void app_key_long_press_down(APP_KEY_STATUS *status, void *param) {
|
||||||
//send_prev_track();
|
//send_prev_track();
|
||||||
} else {
|
} else {
|
||||||
// Bud's are working as a pair
|
// Bud's are working as a pair
|
||||||
app_anc_key(status, param);
|
send_enable_disable_anc();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -11,6 +11,10 @@ RTOS ?= 1
|
||||||
NO_PWRKEY = 0
|
NO_PWRKEY = 0
|
||||||
LIBC_ROM ?= 1
|
LIBC_ROM ?= 1
|
||||||
|
|
||||||
|
# Extas added by Open source community
|
||||||
|
CONNECTED_BLUE_LIGHT = 1 # if set to 1, the blue light will flash when connected
|
||||||
|
# end our extras
|
||||||
|
|
||||||
export USER_SECURE_BOOT ?= 0
|
export USER_SECURE_BOOT ?= 0
|
||||||
# enable:1
|
# enable:1
|
||||||
# disable:0
|
# disable:0
|
||||||
|
@ -54,31 +58,36 @@ export BT_DEBUG_TPORTS ?= 0
|
||||||
TPORTS_KEY_COEXIST ?= 0
|
TPORTS_KEY_COEXIST ?= 0
|
||||||
|
|
||||||
export SNIFF_MODE_CHECK ?= 0
|
export SNIFF_MODE_CHECK ?= 0
|
||||||
|
# Merge L+R stream down to mono
|
||||||
AUDIO_OUTPUT_MONO ?= 0
|
AUDIO_OUTPUT_MONO ?= 0
|
||||||
|
|
||||||
AUDIO_OUTPUT_DIFF ?= 0
|
AUDIO_OUTPUT_DIFF ?= 0
|
||||||
|
|
||||||
|
# Raise mic bias from 2.2V to 3.3V
|
||||||
|
DIGMIC_HIGH_VOLT ?= 0
|
||||||
|
|
||||||
#### ANC DEFINE START ######
|
#### ANC DEFINE START ######
|
||||||
export ANC_APP ?= 1
|
export ANC_APP ?= 1
|
||||||
# Feed Forward ANC configuration (external mic)
|
# Feed Forward ANC configuration (external mic)
|
||||||
export ANC_FF_ENABLED ?= 1
|
export ANC_FF_ENABLED ?= 1
|
||||||
# Feed Backward ANC configuration (internal mic)
|
# Feed Backward ANC configuration (internal mic)
|
||||||
export ANC_FB_ENABLED ?= 1
|
export ANC_FB_ENABLED ?= 1
|
||||||
|
# Wind noise reduction mode
|
||||||
export ANC_WNR_ENABLED ?= 0
|
export ANC_WNR_ENABLED ?= 0
|
||||||
|
|
||||||
|
# Music cancel mode. Conflicts with audio resampling
|
||||||
export AUDIO_ANC_FB_MC ?= 0
|
export AUDIO_ANC_FB_MC ?= 0
|
||||||
export AUDIO_SECTION_SUPPT ?= 0
|
export AUDIO_SECTION_SUPPT ?= 0
|
||||||
export AUD_SECTION_STRUCT_VERSION ?= 2
|
export AUD_SECTION_STRUCT_VERSION ?= 2
|
||||||
# Music cancel hardware?
|
# Music cancel hardware?
|
||||||
export AUDIO_ANC_FB_MC_HW ?=1
|
export AUDIO_ANC_FB_MC_HW ?=0
|
||||||
export APP_ANC_KEY ?= 1
|
export APP_ANC_KEY ?= 1
|
||||||
|
# Feedback check for feedforward mic. Locked on due to blobs
|
||||||
export ANC_FB_CHECK ?= 1
|
export ANC_FB_CHECK ?= 1
|
||||||
##### ANC DEFINE END ######
|
|
||||||
|
|
||||||
# Build in ANC testing app (closed source)
|
# Build in ANC testing app (closed source)
|
||||||
APP_ANC_TEST ?= 0
|
APP_ANC_TEST ?= 0
|
||||||
|
export ANC_ASSIST_ENABLED ?= 0
|
||||||
|
##### ANC DEFINE END ######
|
||||||
|
|
||||||
# Allow test commands via bluetooth
|
# Allow test commands via bluetooth
|
||||||
TEST_OVER_THE_AIR ?= 0
|
TEST_OVER_THE_AIR ?= 0
|
||||||
|
@ -236,7 +245,7 @@ A2DP_LHDC_LARC ?= 1
|
||||||
export FLASH_UNIQUE_ID ?= 1
|
export FLASH_UNIQUE_ID ?= 1
|
||||||
endif
|
endif
|
||||||
|
|
||||||
A2DP_LDAC_ON ?= 0
|
A2DP_LDAC_ON ?= 1
|
||||||
|
|
||||||
export TX_RX_PCM_MASK ?= 0
|
export TX_RX_PCM_MASK ?= 0
|
||||||
|
|
||||||
|
@ -351,6 +360,8 @@ export BT_EXT_PA ?=0
|
||||||
|
|
||||||
ifeq ($(A2DP_LHDC_ON),1)
|
ifeq ($(A2DP_LHDC_ON),1)
|
||||||
AUDIO_BUFFER_SIZE := 140*1024
|
AUDIO_BUFFER_SIZE := 140*1024
|
||||||
|
else ifeq ($(A2DP_LDAC_ON),1)
|
||||||
|
AUDIO_BUFFER_SIZE := 140*1024
|
||||||
else
|
else
|
||||||
AUDIO_BUFFER_SIZE := 100*1024
|
AUDIO_BUFFER_SIZE := 100*1024
|
||||||
endif
|
endif
|
||||||
|
|
|
@ -205,7 +205,7 @@ enum AUD_STREAM_ID_T {
|
||||||
AUD_STREAM_ID_0 = 0,
|
AUD_STREAM_ID_0 = 0,
|
||||||
AUD_STREAM_ID_1,
|
AUD_STREAM_ID_1,
|
||||||
AUD_STREAM_ID_2,
|
AUD_STREAM_ID_2,
|
||||||
#ifdef __ANC_ASSIST__
|
#ifdef ANC_ASSIST_ENABLED
|
||||||
AUD_STREAM_ID_3,
|
AUD_STREAM_ID_3,
|
||||||
#endif
|
#endif
|
||||||
AUD_STREAM_ID_NUM,
|
AUD_STREAM_ID_NUM,
|
||||||
|
@ -230,7 +230,7 @@ enum AUD_IO_PATH_T {
|
||||||
AUD_INPUT_PATH_NTMIC,
|
AUD_INPUT_PATH_NTMIC,
|
||||||
AUD_INPUT_PATH_ANC_WNR, // Wind Noise Reduction
|
AUD_INPUT_PATH_ANC_WNR, // Wind Noise Reduction
|
||||||
AUD_INPUT_PATH_USBAUDIO,
|
AUD_INPUT_PATH_USBAUDIO,
|
||||||
#ifdef __ANC_ASSIST__
|
#ifdef ANC_ASSIST_ENABLED
|
||||||
AUD_INPUT_PATH_AF_ANC,
|
AUD_INPUT_PATH_AF_ANC,
|
||||||
#endif
|
#endif
|
||||||
// Output path
|
// Output path
|
||||||
|
|
|
@ -279,6 +279,7 @@ void app_ibrt_ui_perform_user_action(uint8_t *p_buff, uint16_t length) {
|
||||||
ibrt_ctrl_t *p_ibrt_ctrl = app_tws_ibrt_get_bt_ctrl_ctx();
|
ibrt_ctrl_t *p_ibrt_ctrl = app_tws_ibrt_get_bt_ctrl_ctx();
|
||||||
|
|
||||||
#ifdef ANC_APP
|
#ifdef ANC_APP
|
||||||
|
//Doesnt actully get used!!!
|
||||||
app_anc_cmd_receive_process(p_buff, length);
|
app_anc_cmd_receive_process(p_buff, length);
|
||||||
#endif
|
#endif
|
||||||
#ifdef ANC_WNR_ENABLED
|
#ifdef ANC_WNR_ENABLED
|
||||||
|
@ -352,6 +353,9 @@ void app_ibrt_ui_perform_user_action(uint8_t *p_buff, uint16_t length) {
|
||||||
app_bt_volumedown();
|
app_bt_volumedown();
|
||||||
app_ibrt_sync_volume_info();
|
app_ibrt_sync_volume_info();
|
||||||
break;
|
break;
|
||||||
|
case IBRT_ACTION_ANC_NOTIRY_MASTER_EXCHANGE_COEF:
|
||||||
|
app_anc_key(NULL, NULL);
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
TRACE(2, "%s unknown user action %d\n", __func__, p_buff[0]);
|
TRACE(2, "%s unknown user action %d\n", __func__, p_buff[0]);
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -3866,7 +3866,9 @@ int bt_sbc_player(enum PLAYER_OPER_T on, enum APP_SYSFREQ_FREQ_T freq) {
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
if (freq < APP_SYSFREQ_52M) {
|
||||||
freq = APP_SYSFREQ_52M;
|
freq = APP_SYSFREQ_52M;
|
||||||
|
}
|
||||||
app_sysfreq_req(APP_SYSFREQ_USER_BT_A2DP, freq);
|
app_sysfreq_req(APP_SYSFREQ_USER_BT_A2DP, freq);
|
||||||
TRACE_AUD_STREAM_I("[A2DP_PLAYER] sysfreq %d", freq);
|
TRACE_AUD_STREAM_I("[A2DP_PLAYER] sysfreq %d", freq);
|
||||||
TRACE_AUD_STREAM_I("[A2DP_PLAYER] sysfreq calc : %d\n",
|
TRACE_AUD_STREAM_I("[A2DP_PLAYER] sysfreq calc : %d\n",
|
||||||
|
@ -3886,8 +3888,10 @@ int bt_sbc_player(enum PLAYER_OPER_T on, enum APP_SYSFREQ_FREQ_T freq) {
|
||||||
|
|
||||||
else if (codec_type == BTIF_AVDTP_CODEC_TYPE_NON_A2DP) {
|
else if (codec_type == BTIF_AVDTP_CODEC_TYPE_NON_A2DP) {
|
||||||
TRACE(1, "current_a2dp_non_type %d", current_a2dp_non_type);
|
TRACE(1, "current_a2dp_non_type %d", current_a2dp_non_type);
|
||||||
|
if (0) {
|
||||||
|
}
|
||||||
#if defined(A2DP_LHDC_ON)
|
#if defined(A2DP_LHDC_ON)
|
||||||
if (current_a2dp_non_type == A2DP_NON_CODEC_TYPE_LHDC) {
|
else if (current_a2dp_non_type == A2DP_NON_CODEC_TYPE_LHDC) {
|
||||||
app_overlay_select(APP_OVERLAY_A2DP_LHDC);
|
app_overlay_select(APP_OVERLAY_A2DP_LHDC);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
14
uart_log.sh
14
uart_log.sh
|
@ -1,5 +1,11 @@
|
||||||
#!/usr/bin/env sh
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
num=$(find /dev -name 'ttyUSB*' | rev | cut -c 1)
|
rightbud=/dev/serial/by-id/usb-wch.cn_USB_Dual_Serial_0123456789-if00
|
||||||
echo "$num"
|
leftbud=/dev/serial/by-id/usb-wch.cn_USB_Dual_Serial_0123456789-if02
|
||||||
sudo minicom "port$num"
|
|
||||||
|
read -p "Which bud do you want to connect to UART for? L/R (default L): " -n 1 -r
|
||||||
|
ttydev=$leftbud
|
||||||
|
if [[ $REPLY =~ ^[Rr]$ ]]; then
|
||||||
|
ttydev=$rightbud
|
||||||
|
fi
|
||||||
|
sudo minicom -D $ttydev -b 2000000
|
||||||
|
|
Loading…
Reference in New Issue