Hotspot Audio for C4FM Very loud and distorted.


Frank C. D'Amato
 

I have DVswitch setup DMR>Analog. It pushes a DMR TG to my Hamvoip Allstar node (2 seperate Pi's).

When I talk on the analog radio, the audio sounds great coming out of my DMR radio connected to a Openspot (Both ver 1&2).

If I put my openspot modem to C4FM (to use my yaesu rado in DN mode), and connect to the TG that my DVswitch is transmitting to, the audio sounds very distorted and loud.

Anyone else have this problem?

Using the same setup C4FM to DMR on the openspots sound great on the yeasu radio, The problem is only there on the TG the DVswitch is pushing the analog audio to.


Patrick Perdue
 

Are you running USRPGain and TLVGain at unity? I've found it helps a lot to turn TLVGain down quite a bit in Analog_Bridge.ini. TLV is the gain sent from analog to digital. This will reduce the gain to DMR from analog. More headroom isn't necessarily bad, though you'll find that audio to your Yaesu is probably still louder than with a DMR radio. I'm not a Yaesu-using person myself, though I did just order an FT70 to play with, so I don't know exactly why these differences in levels between DMR and C4FM radios are what they are when everyone is using the same codec. I'll let someone better qualified explain that.


Here's how I have my TLV gain set:

tlvAudio = AUDIO_USE_GAIN                  ; Analog -> Digital (AUDIO_UNITY, AUDIO_USE_GAIN, AUDIO_BPF)
tlvGain = 0.35                          ; Gain factor when tlvAudio = AUDIO_USE_GAIN (0.0 to 5.0) (1.0 = AUDIO_UNITY)


When playing with things a month or so ago, I was told that, on my bridge, digital to digital (person A on DMR radio and person B on a Yaesu) sounded OK, but audio from analog was too hot on C4FM, but OK on analog, so I turned down the TLVGain a little. I don't really know a better way to handle that situation. Note that in my case, DVSwitch is not involved in making the connection between DMR and YSF. I got the same results when using DVSwitch instead, though.


And for USRPGain, I'm using AGC, with the threshold a little higher than in the default configuration. This is personal preference, but I find it works pretty well on my bridge.

usrpAudio = AUDIO_USE_AGC                 ; Digital -> Analog (AUDIO_UNITY, AUDIO_USE_GAIN, AUDIO_USE_AGC)
usrpGain = 1.0                         ; Gain factor when usrpAudio = AUDIO_USE_GAIN (0.0 to 5.0) (1.0 = AUDIO_UNITY)
usrpAgc = -18,10,500


On 12/30/2020 12:54 AM, Frank C. D'Amato wrote:
I have DVswitch setup DMR>Analog. It pushes a DMR TG to my Hamvoip Allstar node (2 seperate Pi's).

When I talk on the analog radio, the audio sounds great coming out of my DMR radio connected to a Openspot (Both ver 1&2).

If I put my openspot modem to C4FM (to use my yaesu rado in DN mode), and connect to the TG that my DVswitch is transmitting to, the audio sounds very distorted and loud.

Anyone else have this problem?

Using the same setup C4FM to DMR on the openspots sound great on the yeasu radio, The problem is only there on the TG the DVswitch is pushing the analog audio to.


Steve N4IRS
 

Frank,
You can control the audio level sent from or to digital. Depending on how you change modes you can change levels on the fly.
Since you are happy with the level of DMR, I would start there since this is what you will want to return to.

The mode command command of dvswitch.sh will take 2 optional parameters. These parameters control the audio levels. Below is the section from Analog_Bridge.ini:

[USRP]
address = 127.0.0.1                     ; IP address of USRP partner (Allstar/Asterisk or another Analog_Bridge)
txPort = 32001                          ; Transmit USRP frames on this port
rxPort = 34001                          ; Listen for USRP frames on this port
usrpAudio = AUDIO_UNITY                 ; Digital -> Analog (AUDIO_UNITY, AUDIO_USE_GAIN, AUDIO_USE_AGC)
usrpGain = 1.10                         ; Gain factor when usrpAudio = AUDIO_USE_GAIN (0.0 to 5.0) (1.0 = AUDIO_UNITY)
usrpAGC = -20,10,100                    ; Set the agc threshold (db), slope (db) and decay (ms)
tlvAudio = AUDIO_UNITY                  ; Analog -> Digital (AUDIO_UNITY, AUDIO_USE_GAIN, AUDIO_BPF)
tlvGain = 0.35                          ; Gain factor when tlvAudio = AUDIO_USE_GAIN (0.0 to 5.0) (1.0 = AUDIO_UNITY)


The above has usrpAudio and TLV audio set to AUDIO_UNITY. This is the same as AUDIO_USE_GAIN with gain of 1.0
You can use dvswitch.sh mode DMR 1.0 1.0 to do the same thing.
The command is dvswitch.sh mode {DMR|NXDN|P25|YSF|DSTAR} tlvGain usrpGain

Since your audio from Analog to YSFn is too loud, I would start by cutting the audio sent to YSFn in half and test:
dvswitch.sh mode YSF .50 1.0

Test with this and see if you are happy with the levels.

73, Steve N4IRS

On 12/30/20 12:54 AM, Frank C. D'Amato wrote:
I have DVswitch setup DMR>Analog. It pushes a DMR TG to my Hamvoip Allstar node (2 seperate Pi's).

When I talk on the analog radio, the audio sounds great coming out of my DMR radio connected to a Openspot (Both ver 1&2).

If I put my openspot modem to C4FM (to use my yaesu rado in DN mode), and connect to the TG that my DVswitch is transmitting to, the audio sounds very distorted and loud.

Anyone else have this problem?

Using the same setup C4FM to DMR on the openspots sound great on the yeasu radio, The problem is only there on the TG the DVswitch is pushing the analog audio to.


Patrick Perdue
 

I could be wrong, but it doesn't sound like Frank is actually bridging to YSF, but rather is just crossmoding to DMR with a C4FM radio. That being the case, there will be no separate option for changing the TLVGain for YSF. You'll have to adjust TLVGain for DMR audio and hope it helps without overcompensating.


On 12/30/2020 6:19 AM, Steve N4IRS wrote:
Frank,
You can control the audio level sent from or to digital. Depending on how you change modes you can change levels on the fly.
Since you are happy with the level of DMR, I would start there since this is what you will want to return to.

The mode command command of dvswitch.sh will take 2 optional parameters. These parameters control the audio levels. Below is the section from Analog_Bridge.ini:

[USRP]
address = 127.0.0.1                     ; IP address of USRP partner (Allstar/Asterisk or another Analog_Bridge)
txPort = 32001                          ; Transmit USRP frames on this port
rxPort = 34001                          ; Listen for USRP frames on this port
usrpAudio = AUDIO_UNITY                 ; Digital -> Analog (AUDIO_UNITY, AUDIO_USE_GAIN, AUDIO_USE_AGC)
usrpGain = 1.10                         ; Gain factor when usrpAudio = AUDIO_USE_GAIN (0.0 to 5.0) (1.0 = AUDIO_UNITY)
usrpAGC = -20,10,100                    ; Set the agc threshold (db), slope (db) and decay (ms)
tlvAudio = AUDIO_UNITY                  ; Analog -> Digital (AUDIO_UNITY, AUDIO_USE_GAIN, AUDIO_BPF)
tlvGain = 0.35                          ; Gain factor when tlvAudio = AUDIO_USE_GAIN (0.0 to 5.0) (1.0 = AUDIO_UNITY)


The above has usrpAudio and TLV audio set to AUDIO_UNITY. This is the same as AUDIO_USE_GAIN with gain of 1.0
You can use dvswitch.sh mode DMR 1.0 1.0 to do the same thing.
The command is dvswitch.sh mode {DMR|NXDN|P25|YSF|DSTAR} tlvGain usrpGain

Since your audio from Analog to YSFn is too loud, I would start by cutting the audio sent to YSFn in half and test:
dvswitch.sh mode YSF .50 1.0

Test with this and see if you are happy with the levels.

73, Steve N4IRS

On 12/30/20 12:54 AM, Frank C. D'Amato wrote:
I have DVswitch setup DMR>Analog. It pushes a DMR TG to my Hamvoip Allstar node (2 seperate Pi's).

When I talk on the analog radio, the audio sounds great coming out of my DMR radio connected to a Openspot (Both ver 1&2).

If I put my openspot modem to C4FM (to use my yaesu rado in DN mode), and connect to the TG that my DVswitch is transmitting to, the audio sounds very distorted and loud.

Anyone else have this problem?

Using the same setup C4FM to DMR on the openspots sound great on the yeasu radio, The problem is only there on the TG the DVswitch is pushing the analog audio to.


Steve N4IRS
 

Actually, if he is using DVSwitch Server, he can change to audio level when he switches to YSF in /opt/Analog_Bridge/dvsm.macro:

[MACROS]
; Example: When a DVSM user selects the DMR mode, AB will look for the mode below and execute the script and pass the parameter.
; In this case, AB will execute the script "/opt/MMDVM_Bridge/dvswitch.sh" and pass the prarmeters of "mode DMR" to the script.

DMR =   /opt/MMDVM_Bridge/dvswitch.sh mode DMR
DSTAR = /opt/MMDVM_Bridge/dvswitch.sh mode DSTAR
NXDN =  /opt/MMDVM_Bridge/dvswitch.sh mode NXDN
P25 =   /opt/MMDVM_Bridge/dvswitch.sh mode P25
YSF =   /opt/MMDVM_Bridge/dvswitch.sh mode YSF

So, it would be a matter of editing the above.


On 12/30/20 6:23 AM, Patrick Perdue wrote:

I could be wrong, but it doesn't sound like Frank is actually bridging to YSF, but rather is just crossmoding to DMR with a C4FM radio. That being the case, there will be no separate option for changing the TLVGain for YSF. You'll have to adjust TLVGain for DMR audio and hope it helps without overcompensating.


On 12/30/2020 6:19 AM, Steve N4IRS wrote:
Frank,
You can control the audio level sent from or to digital. Depending on how you change modes you can change levels on the fly.
Since you are happy with the level of DMR, I would start there since this is what you will want to return to.

The mode command command of dvswitch.sh will take 2 optional parameters. These parameters control the audio levels. Below is the section from Analog_Bridge.ini:

[USRP]
address = 127.0.0.1                     ; IP address of USRP partner (Allstar/Asterisk or another Analog_Bridge)
txPort = 32001                          ; Transmit USRP frames on this port
rxPort = 34001                          ; Listen for USRP frames on this port
usrpAudio = AUDIO_UNITY                 ; Digital -> Analog (AUDIO_UNITY, AUDIO_USE_GAIN, AUDIO_USE_AGC)
usrpGain = 1.10                         ; Gain factor when usrpAudio = AUDIO_USE_GAIN (0.0 to 5.0) (1.0 = AUDIO_UNITY)
usrpAGC = -20,10,100                    ; Set the agc threshold (db), slope (db) and decay (ms)
tlvAudio = AUDIO_UNITY                  ; Analog -> Digital (AUDIO_UNITY, AUDIO_USE_GAIN, AUDIO_BPF)
tlvGain = 0.35                          ; Gain factor when tlvAudio = AUDIO_USE_GAIN (0.0 to 5.0) (1.0 = AUDIO_UNITY)


The above has usrpAudio and TLV audio set to AUDIO_UNITY. This is the same as AUDIO_USE_GAIN with gain of 1.0
You can use dvswitch.sh mode DMR 1.0 1.0 to do the same thing.
The command is dvswitch.sh mode {DMR|NXDN|P25|YSF|DSTAR} tlvGain usrpGain

Since your audio from Analog to YSFn is too loud, I would start by cutting the audio sent to YSFn in half and test:
dvswitch.sh mode YSF .50 1.0

Test with this and see if you are happy with the levels.

73, Steve N4IRS

On 12/30/20 12:54 AM, Frank C. D'Amato wrote:
I have DVswitch setup DMR>Analog. It pushes a DMR TG to my Hamvoip Allstar node (2 seperate Pi's).

When I talk on the analog radio, the audio sounds great coming out of my DMR radio connected to a Openspot (Both ver 1&2).

If I put my openspot modem to C4FM (to use my yaesu rado in DN mode), and connect to the TG that my DVswitch is transmitting to, the audio sounds very distorted and loud.

Anyone else have this problem?

Using the same setup C4FM to DMR on the openspots sound great on the yeasu radio, The problem is only there on the TG the DVswitch is pushing the analog audio to.



Patrick Perdue
 

Also true, though I think he is just connecting his hotspot to DMR and using it to convert to C4FM, not DVSwitch for that.

Again, could be wrong, and I'll shut up before I get myself into trouble, but that's how I read it.


On 12/30/2020 6:27 AM, Steve N4IRS wrote:
Actually, if he is using DVSwitch Server, he can change to audio level when he switches to YSF in /opt/Analog_Bridge/dvsm.macro:

[MACROS]
; Example: When a DVSM user selects the DMR mode, AB will look for the mode below and execute the script and pass the parameter.
; In this case, AB will execute the script "/opt/MMDVM_Bridge/dvswitch.sh" and pass the prarmeters of "mode DMR" to the script.

DMR =   /opt/MMDVM_Bridge/dvswitch.sh mode DMR
DSTAR = /opt/MMDVM_Bridge/dvswitch.sh mode DSTAR
NXDN =  /opt/MMDVM_Bridge/dvswitch.sh mode NXDN
P25 =   /opt/MMDVM_Bridge/dvswitch.sh mode P25
YSF =   /opt/MMDVM_Bridge/dvswitch.sh mode YSF

So, it would be a matter of editing the above.


On 12/30/20 6:23 AM, Patrick Perdue wrote:

I could be wrong, but it doesn't sound like Frank is actually bridging to YSF, but rather is just crossmoding to DMR with a C4FM radio. That being the case, there will be no separate option for changing the TLVGain for YSF. You'll have to adjust TLVGain for DMR audio and hope it helps without overcompensating.


On 12/30/2020 6:19 AM, Steve N4IRS wrote:
Frank,
You can control the audio level sent from or to digital. Depending on how you change modes you can change levels on the fly.
Since you are happy with the level of DMR, I would start there since this is what you will want to return to.

The mode command command of dvswitch.sh will take 2 optional parameters. These parameters control the audio levels. Below is the section from Analog_Bridge.ini:

[USRP]
address = 127.0.0.1                     ; IP address of USRP partner (Allstar/Asterisk or another Analog_Bridge)
txPort = 32001                          ; Transmit USRP frames on this port
rxPort = 34001                          ; Listen for USRP frames on this port
usrpAudio = AUDIO_UNITY                 ; Digital -> Analog (AUDIO_UNITY, AUDIO_USE_GAIN, AUDIO_USE_AGC)
usrpGain = 1.10                         ; Gain factor when usrpAudio = AUDIO_USE_GAIN (0.0 to 5.0) (1.0 = AUDIO_UNITY)
usrpAGC = -20,10,100                    ; Set the agc threshold (db), slope (db) and decay (ms)
tlvAudio = AUDIO_UNITY                  ; Analog -> Digital (AUDIO_UNITY, AUDIO_USE_GAIN, AUDIO_BPF)
tlvGain = 0.35                          ; Gain factor when tlvAudio = AUDIO_USE_GAIN (0.0 to 5.0) (1.0 = AUDIO_UNITY)


The above has usrpAudio and TLV audio set to AUDIO_UNITY. This is the same as AUDIO_USE_GAIN with gain of 1.0
You can use dvswitch.sh mode DMR 1.0 1.0 to do the same thing.
The command is dvswitch.sh mode {DMR|NXDN|P25|YSF|DSTAR} tlvGain usrpGain

Since your audio from Analog to YSFn is too loud, I would start by cutting the audio sent to YSFn in half and test:
dvswitch.sh mode YSF .50 1.0

Test with this and see if you are happy with the levels.

73, Steve N4IRS

On 12/30/20 12:54 AM, Frank C. D'Amato wrote:
I have DVswitch setup DMR>Analog. It pushes a DMR TG to my Hamvoip Allstar node (2 seperate Pi's).

When I talk on the analog radio, the audio sounds great coming out of my DMR radio connected to a Openspot (Both ver 1&2).

If I put my openspot modem to C4FM (to use my yaesu rado in DN mode), and connect to the TG that my DVswitch is transmitting to, the audio sounds very distorted and loud.

Anyone else have this problem?

Using the same setup C4FM to DMR on the openspots sound great on the yeasu radio, The problem is only there on the TG the DVswitch is pushing the analog audio to.



Frank C. D'Amato
 

That’s correct, I’m not using C4FM on DVswitch.  I’m just cross mode from another hotspot.

I’ll try lowering the DMR settings.


Frank C. D'Amato
 

Once I edit Analog_Bridge.ini, what commands can I type to get the DVswitch to start using the new values instead of restarting the Pi?


Steve N4IRS
 

systemctl restart analog_bridge

On 12/30/20 10:11 AM, Frank C. D'Amato wrote:
Once I edit Analog_Bridge.ini, what commands can I type to get the DVswitch to start using the new values instead of restarting the Pi?