Compare commits

...

9 Commits

Author SHA1 Message Date
Sébastien
72c4f810fb Release Philippe's BT fixes 2020-10-29 07:12:24 -04:00
Philippe G
6170f49673 Merge branch 'master-cmake' of https://github.com/sle118/squeezelite-esp32 into master-cmake 2020-10-28 22:38:49 -07:00
Philippe G
d486a99aa1 more BT fixes - release 2020-10-28 22:38:39 -07:00
Sébastien
f0bd81125b Update build badge-release 2020-10-28 21:12:41 -04:00
Philippe G
251882a400 Merge branch 'master-cmake' of https://github.com/sle118/squeezelite-esp32 into master-cmake 2020-10-28 17:46:55 -07:00
Philippe G
0503d03e64 fix BT source - release 2020-10-28 17:46:46 -07:00
Sebastien
fed98f470f Merge remote-tracking branch 'origin/master-cmake' into master-cmake 2020-10-28 20:40:07 -04:00
Sebastien
95d4dbc905 update Docker image for the build 2020-10-28 20:39:11 -04:00
Sebastien
54b9da287f update Docker image for the build 2020-10-28 18:23:22 -04:00
4 changed files with 22 additions and 26 deletions

View File

@@ -49,11 +49,11 @@ jobs:
branch_name="${branch_name//[^a-zA-Z0-9\-~!@_\.]/}"
BUILD_NUMBER=${{ needs.job1.outputs.build_number }}
echo "BUILD_NUMBER=${BUILD_NUMBER}" >> $GITHUB_ENV
tag="${TARGET_BUILD_NAME}-development-${BUILD_NUMBER}-${branch_name}"
tag="${TARGET_BUILD_NAME}.${BUILD_NUMBER}.${branch_name}"
echo "tag=${tag}" >> $GITHUB_ENV
last_commit="$(git log --pretty=format:'%s' --max-count=1)"
if [[ "$last_commit" =~ .*"Release".* ]]; then echo "release_flag=1" >> $GITHUB_ENV; else echo "release_flag=0" >> $GITHUB_ENV; fi
name="development.${BUILD_NUMBER}#v4.0#${TARGET_BUILD_NAME}#${branch_name}"
name="dev.${BUILD_NUMBER}#v4.0#${TARGET_BUILD_NAME}#${branch_name}"
artifact_prefix="squeezelite-esp32-${branch_name}-${TARGET_BUILD_NAME}-${build_version_prefix}${BUILD_NUMBER}"
artifact_file_name="${artifact_prefix}.zip"
artifact_bin_file_name="${artifact_prefix}.bin"
@@ -80,7 +80,7 @@ jobs:
run: |
env | grep "artifact\|tag\|GITHUB\|version\|NUMBER\|TARGET" >${TARGET_BUILD_NAME}-env.txt
echo "${tag}" >version.txt
docker run --env-file=${TARGET_BUILD_NAME}-env.txt --rm -v $PWD:/project -w /project espressif/idf:release-v4.0 /bin/bash -c "cp build-scripts/${TARGET_BUILD_NAME}-sdkconfig.defaults sdkconfig && idf.py build && zip build/${artifact_file_name} partitions*.csv build/*.bin build/bootloader/bootloader.bin build/partition_table/partition-table.bin build/flash_project_args build/size_*.txt"
docker run --env-file=${TARGET_BUILD_NAME}-env.txt --rm -v $PWD:/project -w /project sle118/squeezelite-esp32:release-v4.0 /bin/bash -c "cp build-scripts/${TARGET_BUILD_NAME}-sdkconfig.defaults sdkconfig && idf.py build && zip build/${artifact_file_name} partitions*.csv build/*.bin build/bootloader/bootloader.bin build/partition_table/partition-table.bin build/flash_project_args build/size_*.txt"
# - name: Build Mock firmware
# run: |
# mkdir -p build
@@ -124,6 +124,7 @@ jobs:
draft: false
prerelease: true
- name: Upload Release Asset - Squeezelite binary file
if: env.release_flag == 1
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
@@ -134,6 +135,7 @@ jobs:
asset_name: ${{ env.artifact_bin_file_name }}
asset_content_type: application/octet-stream
- name: Upload Release Asset - Zip file
if: env.release_flag == 1
id: upload-release-asset-zip
uses: actions/upload-release-asset@v1
env:

View File

@@ -1,6 +1,4 @@
![SqueezeAmp-master-cmake](https://github.com/sle118/squeezelite-esp32/workflows/SqueezeAmp/badge.svg?branch=master-cmake)
![I2S-4MFlash-master-cmake](https://github.com/sle118/squeezelite-esp32/workflows/I2S-4MFlash/badge.svg?branch=master-cmake)
![ESP32-A1S-master-cmake](https://github.com/sle118/squeezelite-esp32/workflows/ESP32-A1S/badge.svg?branch=master-cmake)
![Cross-Build](https://github.com/sle118/squeezelite-esp32/workflows/Cross-Build/badge.svg?branch=master-cmake)
# Squeezelite-esp32
## Supported Hardware
@@ -352,3 +350,4 @@ See squeezlite command line, but keys options are
## Additional notes
Build will start migrating to github workflows

View File

@@ -76,7 +76,7 @@ void equalizer_update(s8_t *gain) {
* process equalizer
*/
void equalizer_process(u8_t *buf, u32_t bytes, u32_t sample_rate) {
// don't want to process with output locked, so tak ethe small risk to miss one parametric update
// don't want to process with output locked, so take the small risk to miss one parametric update
if (equalizer.update) {
equalizer_close();
equalizer_open(sample_rate);

View File

@@ -115,12 +115,14 @@ static int _write_frames(frames_t out_frames, bool silence, s32_t gainL, s32_t g
}
output_visu_export((s16_t*) (btout + oframes * BYTES_PER_FRAME), out_frames, output.current_sample_rate, silence, (gainL + gainR) / 2);
oframes += out_frames;
return (int)out_frames;
}
int32_t output_bt_data(uint8_t *data, int32_t len) {
int32_t avail_data = 0, wanted_len = 0, start_timer = 0;
int32_t iframes = len / BYTES_PER_FRAME, start_timer = 0;
if (len < 0 || data == NULL || !running) {
return 0;
@@ -131,32 +133,25 @@ int32_t output_bt_data(uint8_t *data, int32_t len) {
// This is how the BTC layer calculates the number of bytes to
// for us to send. (BTC_SBC_DEC_PCM_DATA_LEN * sizeof(OI_INT16) - availPcmBytes
wanted_len=len;
SET_MIN_MAX(len,req);
TIME_MEASUREMENT_START(start_timer);
LOCK;
output.device_frames = 0; // todo: check if this is the right way do to this.
SET_MIN_MAX_SIZED(_buf_used(outputbuf),bt,outputbuf->size);
LOCK;
output.device_frames = 0;
output.updated = gettime_ms();
output.frames_played_dmp = output.frames_played;
SET_MIN_MAX_SIZED(_buf_used(outputbuf),bt,outputbuf->size);
do {
avail_data = _output_frames( wanted_len/BYTES_PER_FRAME )*BYTES_PER_FRAME; // Keep the transfer buffer full
wanted_len-=avail_data;
} while (wanted_len > 0 && avail_data != 0);
if (wanted_len > 0) {
SET_MIN_MAX(wanted_len, under);
}
output.frames_in_process = len-wanted_len;
equalizer_process(data, (len - wanted_len) * BYTES_PER_FRAME, output.current_sample_rate);
_output_frames(iframes);
output.frames_in_process = oframes;
UNLOCK;
equalizer_process(data, oframes * BYTES_PER_FRAME, output.current_sample_rate);
SET_MIN_MAX(TIME_MEASUREMENT_GET(start_timer),lock_out_time);
SET_MIN_MAX((len-wanted_len), rec);
SET_MIN_MAX((len-oframes*BYTES_PER_FRAME), rec);
TIME_MEASUREMENT_START(start_timer);
return len-wanted_len;
return oframes * BYTES_PER_FRAME;
}
void output_bt_tick(void) {