mirror of
https://github.com/sle118/squeezelite-esp32.git
synced 2025-12-12 22:47:15 +03:00
Start of 5.X work
This commit is contained in:
@@ -3,54 +3,56 @@ import "customoptions.proto";
|
||||
import "nanopb.proto";
|
||||
option (nanopb_fileopt).enum_to_string = true;
|
||||
|
||||
package sys;
|
||||
enum OutputTypeEnum {
|
||||
OUTPUT_UNKNOWN = 0;
|
||||
OUTPUT_I2S = 1;
|
||||
OUTPUT_SPDIF = 2;
|
||||
OUTPUT_Bluetooth = 3;
|
||||
package sys.squeezelite;
|
||||
enum outputs {
|
||||
UNKNOWN = 0;
|
||||
I2S = 1;
|
||||
SPDIF = 2;
|
||||
BT = 3;
|
||||
}
|
||||
message OutputBT {
|
||||
message bt {
|
||||
option (nanopb_msgopt).packed_struct = true;
|
||||
option (nanopb_msgopt).msgid = 10039;
|
||||
string sink_name = 1 [(nanopb).max_length= 128];
|
||||
string pin = 2 [(nanopb).max_length= 16];
|
||||
}
|
||||
// Enum for the type of resampling algorithm
|
||||
enum ResampleAlgorithm {
|
||||
RA_DISABLED = 0;
|
||||
RA_BASIC_LINEAR = 1; // Basic linear interpolation
|
||||
RA_THIRTEEN_TAPS = 2; // 13 taps
|
||||
RA_TWENTY_ONE_TAPS = 3; // 21 taps
|
||||
enum algorythms {
|
||||
DISABLED = 0;
|
||||
BASIC_LINEAR = 1; // Basic linear interpolation
|
||||
THIRTEEN_TAPS = 2; // 13 taps
|
||||
TWENTY_ONE_TAPS = 3; // 21 taps
|
||||
}
|
||||
|
||||
// ResampleOptions represents the resampling options for Squeezelite
|
||||
message ResampleOptions {
|
||||
message options {
|
||||
option (nanopb_msgopt).packed_struct = true;
|
||||
option (nanopb_msgopt).msgid = 10040;
|
||||
ResampleAlgorithm algorithm = 1; // The resampling algorithm to use
|
||||
algorythms algorithm = 1; // The resampling algorithm to use
|
||||
bool interpolate_filter_coefficients = 2; // Whether to interpolate filter coefficients
|
||||
}
|
||||
|
||||
enum SampleRate {
|
||||
SAMPLE_RATE_UNSPECIFIED = 0; // Default value, can be used to represent an unspecified rate
|
||||
SAMPLE_RATE_8000 = 8000;
|
||||
SAMPLE_RATE_11025 = 11025;
|
||||
SAMPLE_RATE_12000 = 12000;
|
||||
SAMPLE_RATE_16000 = 16000;
|
||||
SAMPLE_RATE_22050 = 22050;
|
||||
SAMPLE_RATE_24000 = 24000;
|
||||
SAMPLE_RATE_32000 = 32000;
|
||||
SAMPLE_RATE_44100 = 44100;
|
||||
SAMPLE_RATE_48000 = 48000;
|
||||
SAMPLE_RATE_88200 = 88200;
|
||||
SAMPLE_RATE_96000 = 96000;
|
||||
SAMPLE_RATE_176400 = 176400;
|
||||
SAMPLE_RATE_192000 = 192000;
|
||||
SAMPLE_RATE_352800 = 352800;
|
||||
SAMPLE_RATE_384000 = 384000;
|
||||
SAMPLE_RATE_705600 = 705600;
|
||||
SAMPLE_RATE_768000 = 768000;
|
||||
enum rates {
|
||||
R_NONE = 0; // Default value, can be used to represent an unspecified rate
|
||||
R_8000 = 8000;
|
||||
R_11025 = 11025;
|
||||
R_12000 = 12000;
|
||||
R_16000 = 16000;
|
||||
R_22050 = 22050;
|
||||
R_24000 = 24000;
|
||||
R_32000 = 32000;
|
||||
R_44100 = 44100;
|
||||
R_48000 = 48000;
|
||||
R_88200 = 88200;
|
||||
R_96000 = 96000;
|
||||
R_176400 = 176400;
|
||||
R_192000 = 192000;
|
||||
R_352800 = 352800;
|
||||
R_384000 = 384000;
|
||||
R_705600 = 705600;
|
||||
R_768000 = 768000;
|
||||
}
|
||||
enum DebugLevelEnum {
|
||||
enum debug_levels {
|
||||
DEFAULT = 0;
|
||||
ERROR = 1;
|
||||
WARN = 2;
|
||||
@@ -58,7 +60,7 @@ enum DebugLevelEnum {
|
||||
DEBUG = 4;
|
||||
SDEBUG = 5;
|
||||
}
|
||||
enum CodexEnum {
|
||||
enum codecs {
|
||||
c_undefined = 0;
|
||||
c_alac = 1;
|
||||
c_ogg = 2;
|
||||
@@ -69,32 +71,37 @@ enum CodexEnum {
|
||||
c_mad = 7;
|
||||
c_mpg = 8;
|
||||
}
|
||||
message RatesOption {
|
||||
message rates_opt {
|
||||
option (nanopb_msgopt).packed_struct = true;
|
||||
option (nanopb_msgopt).msgid = 10041;
|
||||
SampleRate min = 1;
|
||||
SampleRate max = 2;
|
||||
repeated SampleRate list = 3 [(nanopb).type = FT_POINTER]; // [(nanopb).max_count= 10];
|
||||
rates min = 1;
|
||||
rates max = 2;
|
||||
repeated rates list = 3 [(nanopb).type = FT_POINTER]; // [(nanopb).max_count= 10];
|
||||
}
|
||||
message BufferOption {
|
||||
message buffer_opt {
|
||||
option (nanopb_msgopt).packed_struct = true;
|
||||
option (nanopb_msgopt).msgid = 10042;
|
||||
uint32 stream = 1 [(cust_field).v_uint32 = 500];
|
||||
uint32 output = 2 [(cust_field).v_uint32 = 2000];
|
||||
}
|
||||
message DebugOptions {
|
||||
DebugLevelEnum output = 1 [(cust_field).v_string = "WARN"];
|
||||
DebugLevelEnum stream = 2 [(cust_field).v_string = "WARN"];
|
||||
DebugLevelEnum decode = 3 [(cust_field).v_string = "WARN"];
|
||||
DebugLevelEnum slimproto = 4 [(cust_field).v_string = "WARN"];
|
||||
DebugLevelEnum ir = 5 [(cust_field).v_string = "WARN"];
|
||||
message logging_opt {
|
||||
option (nanopb_msgopt).packed_struct = true;
|
||||
debug_levels output = 1 [(cust_field).v_string = "DEBUG"];
|
||||
debug_levels stream = 2 [(cust_field).v_string = "DEBUG"];
|
||||
debug_levels decode = 3 [(cust_field).v_string = "DEBUG"];
|
||||
debug_levels slimproto = 4 [(cust_field).v_string = "DEBUG"];
|
||||
debug_levels ir = 5 [(cust_field).v_string = "DEBUG"];
|
||||
debug_levels all = 6 [(cust_field).v_string = "DEBUG"];
|
||||
}
|
||||
|
||||
message Squeezelite {
|
||||
message config {
|
||||
option (nanopb_msgopt).packed_struct = true;
|
||||
option (nanopb_msgopt).msgid = 10044;
|
||||
// Output device configuration
|
||||
OutputTypeEnum output_type = 1 [(cust_field).v_string = "OUTPUT_I2S"];
|
||||
outputs output_type = 1 ;
|
||||
|
||||
// Sample rates supported
|
||||
RatesOption rates = 2;
|
||||
rates_opt rates = 2;
|
||||
|
||||
// Timeout (seconds) for switching off amp GPIO
|
||||
// default is to keep the device 'on' all the time
|
||||
@@ -109,19 +116,24 @@ message Squeezelite {
|
||||
|
||||
// Allow disabling squeezelite to use the
|
||||
// device in "detached mode"
|
||||
bool enabled = 7;
|
||||
bool enabled = 7 [(cust_field).v_bool = true];
|
||||
|
||||
OutputBT output_bt = 8;
|
||||
bt output_bt = 8;
|
||||
|
||||
// enable debugging here
|
||||
DebugOptions log = 9 ;
|
||||
logging_opt log = 9 ;
|
||||
|
||||
// Max sample rate reported to server
|
||||
uint32 max_rate = 10;
|
||||
|
||||
BufferOption buffers = 11;
|
||||
buffer_opt buffers = 11;
|
||||
string resample = 12 [(nanopb).type = FT_POINTER];
|
||||
repeated CodexEnum included_codex = 13 [(nanopb).type = FT_POINTER];
|
||||
repeated CodexEnum excluded_codex = 14 [(nanopb).type = FT_POINTER];
|
||||
repeated codecs included_codex = 13 [(nanopb).type = FT_POINTER];
|
||||
repeated codecs excluded_codex = 14 [(nanopb).type = FT_POINTER];
|
||||
|
||||
}
|
||||
message profile {
|
||||
option (nanopb_msgopt).packed_struct = true;
|
||||
string name = 1 [(nanopb).type = FT_POINTER];
|
||||
config profile = 2 ;
|
||||
}
|
||||
Reference in New Issue
Block a user