From 61e28e52b5bc884d2a4012a50ae51e497d1f4df0 Mon Sep 17 00:00:00 2001 From: thetechprepper Date: Mon, 13 Oct 2025 11:24:23 -0700 Subject: [PATCH] Xiegu X6100 - Replaced audio setings for the X6100 to use the new audio script approach. --- overlay/opt/emcomm-tools/bin/et-audio | 14 +------ overlay/opt/emcomm-tools/bin/et-radio | 4 +- .../conf/radios.d/audio/lab599-tx500mp.sh | 2 +- .../conf/radios.d/audio/xiegu-x6100.sh | 38 +++++++++++++++++++ .../conf/radios.d/xiegu-x6100.json | 3 ++ 5 files changed, 45 insertions(+), 16 deletions(-) create mode 100755 overlay/opt/emcomm-tools/conf/radios.d/audio/xiegu-x6100.sh diff --git a/overlay/opt/emcomm-tools/bin/et-audio b/overlay/opt/emcomm-tools/bin/et-audio index 705f2eb..be89593 100755 --- a/overlay/opt/emcomm-tools/bin/et-audio +++ b/overlay/opt/emcomm-tools/bin/et-audio @@ -2,7 +2,7 @@ # # Author : Gaston Gonzalez # Date : 31 October 2024 -# Updated : 9 October 2025 +# Updated : 13 October 2025 # Purpose : Configures ET audio device with sane defaults # # Preconditions @@ -128,18 +128,6 @@ update-config () { # Disable Auto Gain Control amixer -q -c ${AUDIO_CARD} sset 'Auto Gain Control' mute - et-log "Applied amixer settings for ${ET_DEVICE_NAME}" - ;; - "X6100") - # Unmute Speaker a set volume. Adjust if remote station can't decode you. - amixer -q -c ${AUDIO_CARD} sset Speaker Playback Switch 42% 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 ${ET_DEVICE_NAME}" ;; *) diff --git a/overlay/opt/emcomm-tools/bin/et-radio b/overlay/opt/emcomm-tools/bin/et-radio index e049fcf..54c4e8e 100755 --- a/overlay/opt/emcomm-tools/bin/et-radio +++ b/overlay/opt/emcomm-tools/bin/et-radio @@ -2,7 +2,7 @@ # # Author : Gaston Gonzalez # Date : 11 October 2024 -# Updated : 16 March 2025 +# Updated : 13 March 2025 # Purpose : A script for managaing plug-and-play radios source /opt/emcomm-tools/bin/et-common @@ -18,7 +18,7 @@ while IFS= read -r radio; do MODEL=$(cat $radio | jq -r .model) options+=("$ID" "$VENDOR $MODEL") -done < <(find $ET_HOME/conf/radios.d -type f | grep -v "bt.json" | sort) +done < <(find $ET_HOME/conf/radios.d -type f -name \*.json | grep -v "bt.json" | sort) SELECTED_RADIO=$(dialog --clear --menu "Select a radio:" 21 60 10 "${options[@]}" 3>&1 1>&2 2>&3) exit_status=$? diff --git a/overlay/opt/emcomm-tools/conf/radios.d/audio/lab599-tx500mp.sh b/overlay/opt/emcomm-tools/conf/radios.d/audio/lab599-tx500mp.sh index 9922176..93c7dbf 100755 --- a/overlay/opt/emcomm-tools/conf/radios.d/audio/lab599-tx500mp.sh +++ b/overlay/opt/emcomm-tools/conf/radios.d/audio/lab599-tx500mp.sh @@ -23,7 +23,7 @@ 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. +# can't decode you or if there is no output power on TX. amixer -q -c ${AUDIO_CARD} sset Speaker Playback Switch 92% unmute # Unmute Mic diff --git a/overlay/opt/emcomm-tools/conf/radios.d/audio/xiegu-x6100.sh b/overlay/opt/emcomm-tools/conf/radios.d/audio/xiegu-x6100.sh new file mode 100755 index 0000000..4829db5 --- /dev/null +++ b/overlay/opt/emcomm-tools/conf/radios.d/audio/xiegu-x6100.sh @@ -0,0 +1,38 @@ +#!/bin/bash +# +# Author : Gaston Gonzalez +# Date : 13 October 2025 +# Purpose : Audio settings specific to the Xiegu X6100 +# +# Preconditions +# 1. Supported audio interface is connected and properly detected +# +# Postconditions +# 1. ALSA settings set on ET audio device + +usage() { + echo "usage: $(basename $0) " +} + +if [[ $# -ne 2 ]]; then + usage + exit 1 +fi + +AUDIO_CARD=$1 +ET_DEVICE_NAME=$2 + +# Unmute Speaker and set the volume to 27. Adjust if the remote station +# can't decode you or if there is no output power on TX. +amixer -q -c ${AUDIO_CARD} sset Speaker Playback Switch 42% 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}" diff --git a/overlay/opt/emcomm-tools/conf/radios.d/xiegu-x6100.json b/overlay/opt/emcomm-tools/conf/radios.d/xiegu-x6100.json index 2550b68..274cba9 100644 --- a/overlay/opt/emcomm-tools/conf/radios.d/xiegu-x6100.json +++ b/overlay/opt/emcomm-tools/conf/radios.d/xiegu-x6100.json @@ -8,6 +8,9 @@ "ptt": "RIG", "conf": "timeout=1000,retry=1,timeout_retry=1", "primeRig": true + }, + "audio": { + "script": "/opt/emcomm-tools/conf/radios.d/audio/xiegu-x6100.sh" }, "notes": [ "Turn on radio",