From 5ab4134e5217f7c212c5c32fc9ce4276850c091e Mon Sep 17 00:00:00 2001 From: Gear Misner Date: Wed, 3 Jun 2026 16:21:50 -0700 Subject: [PATCH] Add configurable sound card channels --- dev_ui/dbupdate.php | 3 ++- includes/classes/SVXLink.php | 2 ++ install/dev/openrepeater.db | Bin 13312 -> 13312 bytes install/dev/test.php | 1 + install/sql/openrepeater.db | Bin 23552 -> 23552 bytes install/svxlink-conf/svxlink.conf | 2 +- settings.php | 13 ++++++++++++- wizard/includes/database_defaults.json | 3 ++- 8 files changed, 20 insertions(+), 4 deletions(-) diff --git a/dev_ui/dbupdate.php b/dev_ui/dbupdate.php index 48da6cbf..2573e609 100644 --- a/dev_ui/dbupdate.php +++ b/dev_ui/dbupdate.php @@ -22,6 +22,7 @@ # Check and Update Database Structure with new fields if they don't already exist $classDB->add_record('settings','ID_Only_When_Active','False'); +$classDB->add_record('settings','CARD_CHANNELS','2'); $classDB->add_record('settings','Location_Info',''); $classDB->add_record('settings','LinkGroup_Settings',''); $classDB->add_record('system_flags','config_files',''); @@ -130,4 +131,4 @@ function serial2JSON($setting, $table, $db) { // SESSION CHECK TO SEE IF USER IS LOGGED IN. } // close ELSE to end login check from top of page // -------------------------------------------------------- -?> \ No newline at end of file +?> diff --git a/includes/classes/SVXLink.php b/includes/classes/SVXLink.php index 082d2e2e..ae2e8e9b 100644 --- a/includes/classes/SVXLink.php +++ b/includes/classes/SVXLink.php @@ -95,6 +95,8 @@ public function build_global() { $global_array['CFG_DIR'] = 'svxlink.d'; $global_array['TIMESTAMP_FORMAT'] = '"%c"'; $global_array['CARD_SAMPLE_RATE'] = '48000'; + $cardChannels = isset($this->settingsArray['CARD_CHANNELS']) ? $this->settingsArray['CARD_CHANNELS'] : '2'; + $global_array['CARD_CHANNELS'] = (is_numeric($cardChannels) && $cardChannels >= 1) ? (int) $cardChannels : '2'; //$global_array['LOCATION_INFO'] = 'LocationInfo'; // Add Link Sections if defined diff --git a/install/dev/openrepeater.db b/install/dev/openrepeater.db index fc1a8e2dcf6f31a5a6a82521a4be0a54e5327fba..5bc14863e72ef751e9b45acb345782bf83aeb10d 100755 GIT binary patch delta 107 zcmZq3Xvml#&6qh+#+fyfL9h46#*_v8jN+471@xJi@-~|Zv@tS1oV-_Xqp+X?vpT=C zV~|U{vxlRfpQ}%>(dI^>W=1w~#zhQFFD7${*lczaS;!>JBFL=Hh@wzo^Di+rSpcc^ B9x(s_ delta 105 zcmZq3Xvml#&6qJ!#+fyPLH8N^#*_v8jAD~n1@xI1CT%toXk%o|o4i+WqcGD$24MzN ku(?sFnUO_|aS_90E)ko}E+UJWgvC&mfOwmKiLuE705-c6-v9sr diff --git a/install/dev/test.php b/install/dev/test.php index be72d73e..e9bd1475 100644 --- a/install/dev/test.php +++ b/install/dev/test.php @@ -14,6 +14,7 @@ "rxTone" => "", "txTailValueSec" => "2", "txTone" => "", + "CARD_CHANNELS" => "2", "courtesyMode" => "beep", "ID_Short_Mode" => "morse", "ID_Long_Mode" => "voice", diff --git a/install/sql/openrepeater.db b/install/sql/openrepeater.db index c1f7776b8c727164d4903aab2ade0f5f4e305370..297c481dc8f12dcc3263505e485984e6c4446fb1 100755 GIT binary patch delta 109 zcmZqJ!Pu~aae_4C$B8n|tRETldVg$8S-{UIGnrMul8JHQW(R>VMmatPI1rR!R_Awi w404Hg_Hgv`bM*-}+Pp @@ -72,6 +74,15 @@ +
+ +
+ +
+
+ @@ -438,4 +449,4 @@ // SESSION CHECK TO SEE IF USER IS LOGGED IN. } // close ELSE to end login check from top of page // -------------------------------------------------------- -?> \ No newline at end of file +?> diff --git a/wizard/includes/database_defaults.json b/wizard/includes/database_defaults.json index 21786ec3..81ec7158 100644 --- a/wizard/includes/database_defaults.json +++ b/wizard/includes/database_defaults.json @@ -10,6 +10,7 @@ "rxTone": "0", "txTailValueSec": "1", "txTone": "0", + "CARD_CHANNELS": "2", "courtesyMode": "beep", "ID_Short_Mode": "morse", "ID_Long_Mode": "voice", @@ -88,4 +89,4 @@ } } -} \ No newline at end of file +}