Merge commit '387276f2f33a0fb9dde01434387aac9cdc9a8472' into firmware-proxy

# Conflicts:
#	components/wifi-manager/webapp/webapp.cmake
#	components/wifi-manager/webapp/webpack.c
#	components/wifi-manager/webapp/webpack.h
#	components/wifi-manager/webapp/webpack/dist/index.html
#	components/wifi-manager/webapp/webpack/dist/index.html.br
#	components/wifi-manager/webapp/webpack/dist/index.html.gz
#	components/wifi-manager/webapp/webpack/dist/js/index.18c3b7.bundle.js
#	components/wifi-manager/webapp/webpack/dist/js/index.abeafc.bundle.js
#	components/wifi-manager/webapp/webpack/dist/js/index.cf3fe8.bundle.js
#	components/wifi-manager/webapp/webpack/dist/js/node-modules.18c3b7.bundle.js
#	components/wifi-manager/webapp/webpack/dist/js/node-modules.abeafc.bundle.js
#	components/wifi-manager/webapp/webpack/dist/js/node-modules.cf3fe8.bundle.js
#	components/wifi-manager/webapp/webpack/dist/js/node-modules.cf3fe8.bundle.js.br
#	components/wifi-manager/webapp/webpack/dist/js/node-modules.cf3fe8.bundle.js.gz
#	components/wifi-manager/webapp/webpack/dist/js/runtime.18c3b7.bundle.js
#	components/wifi-manager/webapp/webpack/dist/js/runtime.18c3b7.bundle.js.br
#	components/wifi-manager/webapp/webpack/dist/js/runtime.18c3b7.bundle.js.gz
#	components/wifi-manager/webapp/webpack/dist/js/runtime.abeafc.bundle.js
#	components/wifi-manager/webapp/webpack/dist/js/runtime.abeafc.bundle.js.br
#	components/wifi-manager/webapp/webpack/dist/js/runtime.abeafc.bundle.js.gz
#	components/wifi-manager/webapp/webpack/dist/js/runtime.cf3fe8.bundle.js
#	components/wifi-manager/webapp/webpack/dist/js/runtime.cf3fe8.bundle.js.br
#	components/wifi-manager/webapp/webpack/dist/js/runtime.cf3fe8.bundle.js.gz
This commit is contained in:
Michael Herger
2021-04-26 07:04:53 +02:00
30 changed files with 108 additions and 91 deletions

View File

@@ -1,5 +1,4 @@
# This is a basic workflow to help you get started with Actions
name: Cross-Build
on:
@@ -32,7 +31,7 @@ jobs:
- name: Set target name
run: |
echo "TARGET_BUILD_NAME=${{ matrix.node }}" >> $GITHUB_ENV
echo "build_version_prefix=V0." >> $GITHUB_ENV
echo "build_version_prefix=1." >> $GITHUB_ENV
- uses: actions/checkout@v2
with:
fetch-depth: 15
@@ -58,7 +57,7 @@ jobs:
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="dev.${BUILD_NUMBER}-${{matrix.depth}}#v4.0#${TARGET_BUILD_NAME}#${branch_name}"
name="1.${BUILD_NUMBER}-${{matrix.depth}}#v4.0#${TARGET_BUILD_NAME}#${branch_name}"
artifact_prefix="squeezelite-esp32-${branch_name}-${TARGET_BUILD_NAME}-${{matrix.depth}}-${build_version_prefix}${BUILD_NUMBER}"
artifact_file_name="${artifact_prefix}.zip"
artifact_bin_file_name="${artifact_prefix}.bin"

View File

@@ -152,20 +152,28 @@ static int read_mp4_header(unsigned long *samplerate_p, unsigned char *channels_
return -1;
}
int desc_len = mp4_desc_length(&ptr);
info.profile = *ptr >> 3;
int AOT = *ptr >> 3;
info.profile = AAC_PROFILE_LC;
info.sampRateCore = (*ptr++ & 0x07) << 1;
info.sampRateCore |= (*ptr >> 7) & 0x01;
info.sampRateCore = rates[info.sampRateCore];
info.nChans = (*ptr++ & 0x7f) >> 3;
*channels_p = info.nChans;
if (desc_len > 2 && ((ptr[0] << 3) | (ptr[1] >> 5)) == 0x2b7 && (ptr[1] & 0x1f) == 0x05 && (ptr[2] & 0x80)) {
*samplerate_p = rates[(ptr[2] & 0x78) >> 3];
LOG_WARN("AAC SBR mode activated => high CPU consumption expected, please use LMS proxy to mitigate");
} else {
info.nChans = (*ptr & 0x7f) >> 3;
*channels_p = info.nChans;
// Note that 24 bits frequencies are not handled
if (AOT == 5 || AOT == 29) {
*samplerate_p = rates[((ptr[0] & 0x03) << 1) | (ptr[1] >> 7)];
LOG_WARN("AAC stream with SBR => high CPU required (use LMS proxied mode)");
} else if (desc_len > 2 && ((ptr[1] << 3) | (ptr[2] >> 5)) == 0x2b7 && (ptr[2] & 0x1f) == 0x05 && (ptr[3] & 0x80)) {
*samplerate_p = rates[(ptr[3] & 0x78) >> 3];
LOG_WARN("AAC stream with extended SBR => high CPU required (use LMS proxied mode)");
} else if (AOT == 2) {
*samplerate_p = info.sampRateCore;
} else {
*samplerate_p = 44100;
LOG_ERROR("AAC audio object type %d not handled", AOT);
}
HAAC(a, SetRawBlockParams, a->hAac, 0, &info);
LOG_DEBUG("playable aac track: %u (p:%x, r:%d, c:%d)", trak, info.profile, info.sampRateCore, info.nChans);
LOG_DEBUG("playable aac track: %u (p:%x, r:%d, c:%d, desc_len:%d)", trak, AOT, info.sampRateCore, info.nChans, desc_len);
play = trak;
}

View File

@@ -24,7 +24,7 @@
// make may define: PORTAUDIO, SELFPIPE, RESAMPLE, RESAMPLE_MP, VISEXPORT, GPIO, IR, DSD, LINKALL to influence build
#define MAJOR_VERSION "0"
#define MAJOR_VERSION "1"
#define MINOR_VERSION "0"
#define MICRO_VERSION ""

View File

@@ -217,8 +217,9 @@
<tbody id="nvsTable">
</tbody>
</table>
<div class="d-flex justify-content-between ">
<button button id="reboot-button" class="btn btn-primary" type="submit" onclick="handleReboot('reboot');" >Reboot</button>
<div class="buttons">
<button button id="reboot-button" class="btn btn-primary" style="float:right" type="submit" onclick="handleReboot('reboot');" >Reboot</button>
<input id="save-nvs" type="button" class="btn btn-success" value="Commit">
<input id="save-as-nvs" type="button" class="btn btn-success" value="Download config">
<input id="load-nvs" type="button" class="btn btn-success" value="Load File">

View File

@@ -19,6 +19,6 @@ import '../node_modules/remixicon/icons/Media/play-circle-fill.svg';
import '../node_modules/remixicon/icons/Media/pause-circle-fill.svg';
import '../node_modules/remixicon/icons/System/lock-fill.svg';
import '../node_modules/remixicon/icons/System/lock-unlock-fill.svg';
import './assets/images/favicon-32x32.png';
import './js/custom.js';
// <%= `<svg><use xlink:href="#${htmlWebpackPlugin.files.sprites.svg.defs.symbol[s].id}"></use></svg>` %>

View File

@@ -16,6 +16,12 @@ tr.hide {
.rebooting {
display: none;
}
td.value {
width: 80%;
}
#boot-div {
float: right;
}
/* body {
border: 0;
margin: 0;
@@ -378,13 +384,9 @@ ul#navbar {
background-color: #3c0505;
}
td.value {
width: 80%;
}
#boot-div {
float: right;
}
div#message {
display: none;
color: #000;

View File

@@ -1,5 +1,5 @@
target_add_binary_data( __idf_wifi-manager ./webapp/webpack/dist/favicon-32x32.png BINARY)
target_add_binary_data( __idf_wifi-manager ./webapp/webpack/dist/index.html.gz BINARY)
target_add_binary_data( __idf_wifi-manager ./webapp/webpack/dist/js/index.cf3fe8.bundle.js.gz BINARY)
target_add_binary_data( __idf_wifi-manager ./webapp/webpack/dist/js/node-modules.cf3fe8.bundle.js.gz BINARY)
target_add_binary_data( __idf_wifi-manager ./webapp/webpack/dist/js/runtime.cf3fe8.bundle.js.gz BINARY)
target_add_binary_data( __idf_wifi-manager ./webapp/webpack/dist/js/index.df6830.bundle.js.gz BINARY)
target_add_binary_data( __idf_wifi-manager ./webapp/webpack/dist/js/node-modules.df6830.bundle.js.gz BINARY)
target_add_binary_data( __idf_wifi-manager ./webapp/webpack/dist/js/runtime.df6830.bundle.js.gz BINARY)

View File

@@ -4,31 +4,31 @@ extern const uint8_t _favicon_32x32_png_start[] asm("_binary_favicon_32x32_png_s
extern const uint8_t _favicon_32x32_png_end[] asm("_binary_favicon_32x32_png_end");
extern const uint8_t _index_html_gz_start[] asm("_binary_index_html_gz_start");
extern const uint8_t _index_html_gz_end[] asm("_binary_index_html_gz_end");
extern const uint8_t _index_cf3fe8_bundle_js_gz_start[] asm("_binary_index_cf3fe8_bundle_js_gz_start");
extern const uint8_t _index_cf3fe8_bundle_js_gz_end[] asm("_binary_index_cf3fe8_bundle_js_gz_end");
extern const uint8_t _node_modules_cf3fe8_bundle_js_gz_start[] asm("_binary_node_modules_cf3fe8_bundle_js_gz_start");
extern const uint8_t _node_modules_cf3fe8_bundle_js_gz_end[] asm("_binary_node_modules_cf3fe8_bundle_js_gz_end");
extern const uint8_t _runtime_cf3fe8_bundle_js_gz_start[] asm("_binary_runtime_cf3fe8_bundle_js_gz_start");
extern const uint8_t _runtime_cf3fe8_bundle_js_gz_end[] asm("_binary_runtime_cf3fe8_bundle_js_gz_end");
extern const uint8_t _index_df6830_bundle_js_gz_start[] asm("_binary_index_df6830_bundle_js_gz_start");
extern const uint8_t _index_df6830_bundle_js_gz_end[] asm("_binary_index_df6830_bundle_js_gz_end");
extern const uint8_t _node_modules_df6830_bundle_js_gz_start[] asm("_binary_node_modules_df6830_bundle_js_gz_start");
extern const uint8_t _node_modules_df6830_bundle_js_gz_end[] asm("_binary_node_modules_df6830_bundle_js_gz_end");
extern const uint8_t _runtime_df6830_bundle_js_gz_start[] asm("_binary_runtime_df6830_bundle_js_gz_start");
extern const uint8_t _runtime_df6830_bundle_js_gz_end[] asm("_binary_runtime_df6830_bundle_js_gz_end");
const char * resource_lookups[] = {
"/dist/favicon-32x32.png",
"/dist/index.html.gz",
"/js/index.cf3fe8.bundle.js.gz",
"/js/node-modules.cf3fe8.bundle.js.gz",
"/js/runtime.cf3fe8.bundle.js.gz",
"/favicon-32x32.png",
"/index.html.gz",
"/js/index.df6830.bundle.js.gz",
"/js/node-modules.df6830.bundle.js.gz",
"/js/runtime.df6830.bundle.js.gz",
""
};
const uint8_t * resource_map_start[] = {
_favicon_32x32_png_start,
_index_html_gz_start,
_index_cf3fe8_bundle_js_gz_start,
_node_modules_cf3fe8_bundle_js_gz_start,
_runtime_cf3fe8_bundle_js_gz_start
_index_df6830_bundle_js_gz_start,
_node_modules_df6830_bundle_js_gz_start,
_runtime_df6830_bundle_js_gz_start
};
const uint8_t * resource_map_end[] = {
_favicon_32x32_png_end,
_index_html_gz_end,
_index_cf3fe8_bundle_js_gz_end,
_node_modules_cf3fe8_bundle_js_gz_end,
_runtime_cf3fe8_bundle_js_gz_end
_index_df6830_bundle_js_gz_end,
_node_modules_df6830_bundle_js_gz_end,
_runtime_df6830_bundle_js_gz_end
};

View File

@@ -1,26 +1,26 @@
/***********************************
webpack_headers
Hash: cf3fe8058d89a1b0df6f
Hash: df683065b9a62ef5a0ce
Version: webpack 4.46.0
Time: 4393ms
Built at: 17.04.2021 06:30:07
Time: 2739ms
Built at: 26.04.2021 07:00:49
Asset Size Chunks Chunk Names
./js/index.cf3fe8.bundle.js 231 KiB 0 [emitted] [immutable] index
./js/index.cf3fe8.bundle.js.br 31.8 KiB [emitted]
./js/index.cf3fe8.bundle.js.gz 41.2 KiB [emitted]
./js/node-modules.cf3fe8.bundle.js 266 KiB 1 [emitted] [immutable] [big] node-modules
./js/node-modules.cf3fe8.bundle.js.br 76.3 KiB [emitted]
./js/node-modules.cf3fe8.bundle.js.gz 88.7 KiB [emitted]
./js/runtime.cf3fe8.bundle.js 1.46 KiB 2 [emitted] [immutable] runtime
./js/runtime.cf3fe8.bundle.js.br 644 bytes [emitted]
./js/runtime.cf3fe8.bundle.js.gz 722 bytes [emitted]
./js/index.df6830.bundle.js 232 KiB 0 [emitted] [immutable] index
./js/index.df6830.bundle.js.br 32.5 KiB [emitted]
./js/index.df6830.bundle.js.gz 41.9 KiB [emitted]
./js/node-modules.df6830.bundle.js 266 KiB 1 [emitted] [immutable] [big] node-modules
./js/node-modules.df6830.bundle.js.br 76.3 KiB [emitted]
./js/node-modules.df6830.bundle.js.gz 88.7 KiB [emitted]
./js/runtime.df6830.bundle.js 1.46 KiB 2 [emitted] [immutable] runtime
./js/runtime.df6830.bundle.js.br 644 bytes [emitted]
./js/runtime.df6830.bundle.js.gz 722 bytes [emitted]
favicon-32x32.png 634 bytes [emitted]
index.html 21.7 KiB [emitted]
index.html.br 4.75 KiB [emitted]
index.html.gz 5.76 KiB [emitted]
index.html.br 4.74 KiB [emitted]
index.html.gz 5.75 KiB [emitted]
sprite.svg 4.4 KiB [emitted]
sprite.svg.br 912 bytes [emitted]
Entrypoint index [big] = ./js/runtime.cf3fe8.bundle.js ./js/node-modules.cf3fe8.bundle.js ./js/index.cf3fe8.bundle.js
sprite.svg.br 898 bytes [emitted]
Entrypoint index [big] = ./js/runtime.df6830.bundle.js ./js/node-modules.df6830.bundle.js ./js/index.df6830.bundle.js
[6] ./node_modules/bootstrap/dist/js/bootstrap-exposed.js 437 bytes {1} [built]
[11] ./src/sass/main.scss 1.55 KiB {0} [built]
[16] ./node_modules/remixicon/icons/Device/signal-wifi-fill.svg 323 bytes {1} [built]
@@ -35,22 +35,22 @@ Entrypoint index [big] = ./js/runtime.cf3fe8.bundle.js ./js/node-modules.cf3fe8.
[25] ./node_modules/remixicon/icons/Device/device-recover-fill.svg 329 bytes {1} [built]
[26] ./node_modules/remixicon/icons/Device/bluetooth-fill.svg 319 bytes {1} [built]
[27] ./node_modules/remixicon/icons/Device/bluetooth-connect-fill.svg 335 bytes {1} [built]
[37] ./src/index.ts + 1 modules 62.5 KiB {0} [built]
| ./src/index.ts 1.36 KiB [built]
[38] ./src/index.ts + 1 modules 62.5 KiB {0} [built]
| ./src/index.ts 1.4 KiB [built]
| ./src/js/custom.js 61 KiB [built]
+ 23 hidden modules
+ 24 hidden modules
WARNING in asset size limit: The following asset(s) exceed the recommended size limit (244 KiB).
This can impact web performance.
Assets:
./js/node-modules.cf3fe8.bundle.js (266 KiB)
./js/node-modules.df6830.bundle.js (266 KiB)
WARNING in entrypoint size limit: The following entrypoint(s) combined asset size exceeds the recommended limit (244 KiB). This can impact web performance.
Entrypoints:
index (498 KiB)
./js/runtime.cf3fe8.bundle.js
./js/node-modules.cf3fe8.bundle.js
./js/index.cf3fe8.bundle.js
index (499 KiB)
./js/runtime.df6830.bundle.js
./js/node-modules.df6830.bundle.js
./js/index.df6830.bundle.js
WARNING in webpack performance recommendations:

File diff suppressed because one or more lines are too long

View File

@@ -11,6 +11,8 @@ const ESLintPlugin = require('eslint-webpack-plugin');
const SpriteLoaderPlugin = require('svg-sprite-loader/plugin');
// Linting
const TSLintPlugin = require('tslint-webpack-plugin');
const ImageminPlugin = require('imagemin-webpack-plugin').default;
const imageminMozjpeg = require('imagemin-mozjpeg');
module.exports = {
@@ -97,9 +99,10 @@ module.exports = {
loader: 'url-loader',
options: {
// publicPath: '../',
name: './assets/images/' + '[name].[ext]',
//name: './assets/images/' + '[name].[ext]',
limit: 10000,
publicPath: '../'
//limit:false,
//publicPath: '../'
}
},
@@ -177,6 +180,22 @@ module.exports = {
plugins: [
new CleanWebpackPlugin(),
new ImageminPlugin({
test: /\.(jpe?g|png|gif|svg)$/i,
// lossLess gif compressor
gifsicle: {
optimizationLevel: 9
},
// lossy png compressor, remove for default lossLess
pngquant: ({
quality: '75'
}),
// lossy jpg compressor
plugins: [imageminMozjpeg({
quality: '75'
})],
destination: './webpack',
}),
new ESLintPlugin({
cache: true,
ignore: true,
@@ -203,6 +222,7 @@ module.exports = {
useShortDoctype : true
},
favicon: "./src/assets/images/favicon-32x32.png",
excludeChunks: ['test'],
}),

View File

@@ -11,8 +11,7 @@ const MiniCssExtractPlugin = require('mini-css-extract-plugin');
const TerserPlugin = require('terser-webpack-plugin');
const OptimizeCSSAssetsPlugin = require('optimize-css-assets-webpack-plugin');
const CompressionPlugin = require('compression-webpack-plugin');
const ImageminPlugin = require('imagemin-webpack-plugin').default;
const imageminMozjpeg = require('imagemin-mozjpeg');
const fs = require('fs');
const glob = require('glob');
var WebpackOnBuildPlugin = require('on-build-webpack');
@@ -83,21 +82,7 @@ module.exports = merge(common, {
threshold: 100,
minRatio: 0.8,
}),
new ImageminPlugin({
test: /\.(jpe?g|png|gif|svg)$/i,
// lossLess gif compressor
gifsicle: {
optimizationLevel: 9
},
// lossy png compressor, remove for default lossLess
pngquant: ({
quality: '75'
}),
// lossy jpg compressor
plugins: [imageminMozjpeg({
quality: '75'
})]
}),
// new FaviconsWebpackPlugin({
// // Your source logo
// logo: './src/assets/images/200px-ControllerAppIcon.png',
@@ -152,7 +137,7 @@ module.exports = merge(common, {
console.log('Error', err);
} else {
const regex = /^(.*\/)([^\/]*)$/
const relativeRegex = /(\w+\/[^\/]*)$/
const relativeRegex = /((\w+(?<!dist)\/){0,1}[^\/]*)$/
const makePathRegex = /([^\.].*)$/
let exportDefHead=
'/***********************************\n'+

View File

@@ -44,6 +44,8 @@ void register_common_handlers(httpd_handle_t server){
httpd_register_uri_handler(server, &js_get);
httpd_uri_t icon_get = { .uri = "/icons*", .method = HTTP_GET, .handler = resource_filehandler, .user_ctx = rest_context };
httpd_register_uri_handler(server, &icon_get);
httpd_uri_t png_get = { .uri = "/favicon*", .method = HTTP_GET, .handler = resource_filehandler, .user_ctx = rest_context };
httpd_register_uri_handler(server, &png_get);
}
void register_regular_handlers(httpd_handle_t server){

View File

@@ -87,7 +87,7 @@ menu "Squeezelite-ESP32"
default "TWATCH" if TWATCH2020
default "I2S-4MFlash" if !A1S && !SQUEEZEAMP && !DAC32 && !TWATCH2020
# AGGREGATES - begin
# these parameters are "aggregates" that take precedence. The must have a default value
# these parameters are "aggregates" that take precedence. They must have a default value
config DAC_CONFIG
string
default "model=TAS57xx,bck=33,ws=25,do=32,sda=27,scl=26,mute=14:0" if SQUEEZEAMP