diff --git a/overlay/opt/emcomm-tools/bin/et-audio b/overlay/opt/emcomm-tools/bin/et-audio index be89593..cdc5046 100755 --- a/overlay/opt/emcomm-tools/bin/et-audio +++ b/overlay/opt/emcomm-tools/bin/et-audio @@ -117,19 +117,6 @@ update-config () { et-log "Applied amixer settings for ${ET_DEVICE_NAME}" ;; - "FX-4CR") - # Unmute the PCM and set the volume to 21% to get the full output power. This value is - # dependent on the settings defined for the FX-4CR in the et-radio notes. - amixer -q -c ${AUDIO_CARD} sset 'PCM' 31% unmute - - # Set "L/R Capture" to 55%. Adjust if you can't decode received audio. - amixer -q -c ${AUDIO_CARD} sset 'Mic' 67% unmute - - # Disable Auto Gain Control - amixer -q -c ${AUDIO_CARD} sset 'Auto Gain Control' mute - - et-log "Applied amixer settings for ${ET_DEVICE_NAME}" - ;; *) et-log "No ALSA configuration specified for this ET_DEVICE." ;; diff --git a/overlay/opt/emcomm-tools/conf/radios.d/audio/bg2fx-fx4cr.sh b/overlay/opt/emcomm-tools/conf/radios.d/audio/bg2fx-fx4cr.sh new file mode 100755 index 0000000..458e611 --- /dev/null +++ b/overlay/opt/emcomm-tools/conf/radios.d/audio/bg2fx-fx4cr.sh @@ -0,0 +1,35 @@ +#!/bin/bash +# +# Author : Gaston Gonzalez +# Date : 13 October 2025 +# Purpose : Audio settings specific to the FX-4CR +# +# 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 the PCM and set the volume to 21% to get the full output power. This value is +# dependent on the settings defined for the FX-4CR in the et-radio notes. +amixer -q -c ${AUDIO_CARD} sset 'PCM' 31% unmute + +# Set "L/R Capture" to 55%. Adjust if you can't decode received audio. +amixer -q -c ${AUDIO_CARD} sset 'Mic' 67% 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/bg2fx-fx4cr.json b/overlay/opt/emcomm-tools/conf/radios.d/bg2fx-fx4cr.json index 6c39035..cc4c407 100644 --- a/overlay/opt/emcomm-tools/conf/radios.d/bg2fx-fx4cr.json +++ b/overlay/opt/emcomm-tools/conf/radios.d/bg2fx-fx4cr.json @@ -9,6 +9,9 @@ "conf": "data_bits=8,serial_handshake=None,stop_bits=1,rts_state=OFF", "pttOnly": "false" }, + "audio": { + "script": "/opt/emcomm-tools/conf/radios.d/audio/bg2fx-fx4cr.sh" + }, "notes": [ "Short press [PWR], then rotate AF knob until POW = 5.0", "Toggle [SSB] button until both USB and DIG appear", 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 274cba9..3e71fa6 100644 --- a/overlay/opt/emcomm-tools/conf/radios.d/xiegu-x6100.json +++ b/overlay/opt/emcomm-tools/conf/radios.d/xiegu-x6100.json @@ -9,7 +9,7 @@ "conf": "timeout=1000,retry=1,timeout_retry=1", "primeRig": true }, - "audio": { + "audio": { "script": "/opt/emcomm-tools/conf/radios.d/audio/xiegu-x6100.sh" }, "notes": [