mirror of
https://github.com/thetechprepper/emcomm-tools-os-community.git
synced 2026-09-17 15:41:44 -04:00
TX-500MP - Added finer control for defining per radio audio levels that are user configurable. The generic approach for treating all DigiRig devices globally the same was problematic. The new audio.script configuration property is optional
This commit is contained in:
@@ -2,7 +2,7 @@
|
|||||||
#
|
#
|
||||||
# Author : Gaston Gonzalez
|
# Author : Gaston Gonzalez
|
||||||
# Date : 31 October 2024
|
# Date : 31 October 2024
|
||||||
# Updated : 5 October 2025
|
# Updated : 9 October 2025
|
||||||
# Purpose : Configures ET audio device with sane defaults
|
# Purpose : Configures ET audio device with sane defaults
|
||||||
#
|
#
|
||||||
# Preconditions
|
# Preconditions
|
||||||
@@ -10,6 +10,7 @@
|
|||||||
#
|
#
|
||||||
# Postconditions
|
# Postconditions
|
||||||
# 1. ALSA settings set on ET audio device
|
# 1. ALSA settings set on ET audio device
|
||||||
|
. /opt/emcomm-tools/bin/et-common
|
||||||
|
|
||||||
usage() {
|
usage() {
|
||||||
echo "usage: $(basename $0) <command>"
|
echo "usage: $(basename $0) <command>"
|
||||||
@@ -48,10 +49,27 @@ update-config () {
|
|||||||
|
|
||||||
et-log "Updating audio device: '${ET_DEVICE_NAME}' (${FULL_AUDIO_DEVICE})' for ALSA PnP configuration."
|
et-log "Updating audio device: '${ET_DEVICE_NAME}' (${FULL_AUDIO_DEVICE})' for ALSA PnP configuration."
|
||||||
|
|
||||||
|
# Handle audio settings specifically if defined in the radio configuration
|
||||||
|
AUDIO_INIT_SCRIPT=$(jq -r -e '.audio.script' ${ET_ACTIVE_RADIO_CONF})
|
||||||
|
if [[ $? -eq 0 ]]; then
|
||||||
|
et-log "Executing audio configuration script: ${AUDIO_INIT_SCRIPT}"
|
||||||
|
|
||||||
|
CMD="${AUDIO_INIT_SCRIPT} ${AUDIO_CARD} ${AUDIO_DEVICE}"
|
||||||
|
et-log "Running command: ${CMD}"
|
||||||
|
${CMD}
|
||||||
|
|
||||||
|
if [[ $? -ne 0 ]]; then
|
||||||
|
et-log "Audio init script ${AUDIO_INIT_SCRIPT} failed. Can't start application."
|
||||||
|
notify-user "Audio init script failed. Can't start application."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Handle audio generically for most sound card interfaces
|
||||||
case ${ET_DEVICE_NAME} in
|
case ${ET_DEVICE_NAME} in
|
||||||
"DIGIRIG_MOBILE")
|
"DIGIRIG_MOBILE")
|
||||||
# TODO: 92% is needed for the TX-500MP. Revisit approach for setting speaker
|
|
||||||
# out differently across radios definitions.
|
|
||||||
# Unmute Speaker a set volume. Adjust if remote station can't decode you. Your TX controls.
|
# Unmute Speaker a set volume. Adjust if remote station can't decode you. Your TX controls.
|
||||||
amixer -q -c ${AUDIO_CARD} sset Speaker Playback Switch 42% unmute
|
amixer -q -c ${AUDIO_CARD} sset Speaker Playback Switch 42% unmute
|
||||||
# Unmute Mic
|
# Unmute Mic
|
||||||
|
|||||||
@@ -0,0 +1,38 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
#
|
||||||
|
# Author : Gaston Gonzalez
|
||||||
|
# Date : 9 October 2025
|
||||||
|
# Purpose : Audio settings specific to the Lab599 TX-500MP
|
||||||
|
#
|
||||||
|
# Preconditions
|
||||||
|
# 1. Supported audio interface is connected and properly detected
|
||||||
|
#
|
||||||
|
# Postconditions
|
||||||
|
# 1. ALSA settings set on ET audio device
|
||||||
|
|
||||||
|
usage() {
|
||||||
|
echo "usage: $(basename $0) <ET audio card> <ET device name>"
|
||||||
|
}
|
||||||
|
|
||||||
|
if [[ $# -ne 2 ]]; then
|
||||||
|
usage
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
AUDIO_CARD=$1
|
||||||
|
ET_DEVICE_NAME=$2
|
||||||
|
|
||||||
|
# Unmute Speaker and set the volume to 81. Adjust if the remote station
|
||||||
|
# can't decode you or if there is not output power on TX.
|
||||||
|
amixer -q -c ${AUDIO_CARD} sset Speaker Playback Switch 92% unmute
|
||||||
|
|
||||||
|
# Unmute Mic
|
||||||
|
amixer -q -c ${AUDIO_CARD} sset Mic Playback Switch 52% unmute
|
||||||
|
|
||||||
|
# Set "L/R Capture" to 19. Adjust if you can't decode received audio.
|
||||||
|
amixer -q -c ${AUDIO_CARD} sset Mic Capture Switch 31% unmute
|
||||||
|
|
||||||
|
# Disable Auto Gain Control
|
||||||
|
amixer -q -c ${AUDIO_CARD} sset 'Auto Gain Control' mute
|
||||||
|
|
||||||
|
et-log "Applied amixer settings for audio card ${AUDIO_CARD} on device ${ET_DEVICE_NAME}"
|
||||||
@@ -8,6 +8,9 @@
|
|||||||
"ptt": "RTS",
|
"ptt": "RTS",
|
||||||
"pttOnly": "false"
|
"pttOnly": "false"
|
||||||
},
|
},
|
||||||
|
"audio": {
|
||||||
|
"script": "/opt/emcomm-tools/conf/radios.d/audio/lab599-tx500mp.sh"
|
||||||
|
},
|
||||||
"notes": [
|
"notes": [
|
||||||
"1. Set MENU 36 CAT PROTOCOL = TS2000",
|
"1. Set MENU 36 CAT PROTOCOL = TS2000",
|
||||||
"2. Set MODE = DIGI",
|
"2. Set MODE = DIGI",
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
#
|
#
|
||||||
# Author : Gaston Gonzalez
|
# Author : Gaston Gonzalez
|
||||||
# Date : 6 October 2024
|
# Date : 6 October 2024
|
||||||
# Updated : 1 November 2024
|
# Updated : 9 October 2025
|
||||||
# Purpose : Install EmComm Tools applications
|
# Purpose : Install EmComm Tools applications
|
||||||
|
|
||||||
et-log "Installing EmComm Tools applications..."
|
et-log "Installing EmComm Tools applications..."
|
||||||
@@ -18,6 +18,10 @@ chgrp -v -R $ET_GROUP $ET_HOME/conf/radios.d
|
|||||||
chmod -v 775 $ET_HOME/conf/radios.d
|
chmod -v 775 $ET_HOME/conf/radios.d
|
||||||
chmod -v 664 $ET_HOME/conf/radios.d/*.json
|
chmod -v 664 $ET_HOME/conf/radios.d/*.json
|
||||||
|
|
||||||
|
chgrp -v -R $ET_GROUP $ET_HOME/conf/radios.d/audio
|
||||||
|
chmod -v 775 $ET_HOME/conf/radios.d/audio
|
||||||
|
chmod -v 664 $ET_HOME/conf/radios.d/audio/*.sh
|
||||||
|
|
||||||
chgrp -v -R $ET_GROUP $ET_HOME/conf/template.d/packet
|
chgrp -v -R $ET_GROUP $ET_HOME/conf/template.d/packet
|
||||||
chmod -v 775 $ET_HOME/conf/template.d/packet
|
chmod -v 775 $ET_HOME/conf/template.d/packet
|
||||||
chmod -v 664 $ET_HOME/conf/template.d/packet/*.conf
|
chmod -v 664 $ET_HOME/conf/template.d/packet/*.conf
|
||||||
|
|||||||
Reference in New Issue
Block a user