mirror of
https://github.com/sle118/squeezelite-esp32.git
synced 2025-12-22 07:28:31 +03:00
Compare commits
8 Commits
ESP32-A1S-
...
ESP32-A1S.
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f0bd81125b | ||
|
|
251882a400 | ||
|
|
0503d03e64 | ||
|
|
fed98f470f | ||
|
|
95d4dbc905 | ||
|
|
54b9da287f | ||
|
|
67ea623ba3 | ||
|
|
9dbddd2c18 |
11
.github/workflows/CrossBuild.yml
vendored
11
.github/workflows/CrossBuild.yml
vendored
@@ -49,17 +49,18 @@ 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"
|
||||
echo "name=${name}" >> $GITHUB_ENV
|
||||
echo "last_commit=${last_commit}" >> $GITHUB_ENV
|
||||
echo "artifact_file_name=${artifact_file_name}" >> $GITHUB_ENV
|
||||
echo "PROJECT_VER=${TARGET_BUILD_NAME}-${{ steps.buildnumber.outputs.build_number }} " >> $GITHUB_ENV
|
||||
echo "artifact_bin_file_name=${artifact_bin_file_name}" >> $GITHUB_ENV
|
||||
description=""
|
||||
description=${description}$'------------------------------\n### Revision Log\n\n'
|
||||
@@ -77,7 +78,9 @@ jobs:
|
||||
cat $GITHUB_ENV
|
||||
- name: Build the firmware
|
||||
run: |
|
||||
docker run --rm -v $PWD:/project -w /project espressif/idf:release-v4.0 /bin/bash -c "cp build-scripts/${TARGET_BUILD_NAME}-sdkconfig.defaults sdkconfig && export PROJECT_VER=${TARGET_BUILD_NAME}-${{ steps.buildnumber.outputs.build_number }} && 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"
|
||||
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 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
|
||||
@@ -121,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:
|
||||
@@ -131,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:
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||

|
||||

|
||||

|
||||

|
||||
|
||||
# Squeezelite-esp32
|
||||
## Supported Hardware
|
||||
|
||||
@@ -615,7 +615,7 @@ static void register_squeezelite_config(void){
|
||||
|
||||
void register_config_cmd(void){
|
||||
register_audio_config();
|
||||
register_squeezelite_config();
|
||||
// register_squeezelite_config();
|
||||
register_i2s_config();
|
||||
register_spdif_config();
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -131,24 +131,29 @@ 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.
|
||||
|
||||
len /= BYTES_PER_FRAME;
|
||||
wanted_len = len;
|
||||
|
||||
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;
|
||||
avail_data = _output_frames(wanted_len);
|
||||
wanted_len -= avail_data;
|
||||
} while (wanted_len > 0 && avail_data != 0);
|
||||
|
||||
if (wanted_len > 0) {
|
||||
SET_MIN_MAX(wanted_len, under);
|
||||
SET_MIN_MAX(wanted_len * BYTES_PER_FRAME, under);
|
||||
}
|
||||
output.frames_in_process = len-wanted_len;
|
||||
|
||||
output.frames_in_process = len - wanted_len;
|
||||
equalizer_process(data, (len - wanted_len) * BYTES_PER_FRAME, output.current_sample_rate);
|
||||
|
||||
UNLOCK;
|
||||
@@ -156,7 +161,7 @@ int32_t output_bt_data(uint8_t *data, int32_t len) {
|
||||
SET_MIN_MAX((len-wanted_len), rec);
|
||||
TIME_MEASUREMENT_START(start_timer);
|
||||
|
||||
return len-wanted_len;
|
||||
return (len - wanted_len) * BYTES_PER_FRAME;
|
||||
}
|
||||
|
||||
void output_bt_tick(void) {
|
||||
|
||||
Reference in New Issue
Block a user