sm0svx / svxlink

Advanced repeater system software with EchoLink support for Linux including a GUI, Qtel - the Qt EchoLink client
http://svxlink.org/
Other
438 stars 173 forks source link

Svxlink exporting audio line levels as system variable #684

Open cbspidi opened 3 days ago

cbspidi commented 3 days ago

Hi Guys,

Can I request a feature, please?

Working with svxreflector for some time, I find it challenging to find the actual audio line levels.(repeater works in server (CLI) mode only. It would be super useful to know what the svxlink audio line levels are, reported in dB value. It would be very nice to have it exported into a system variable called $svx_tx_line_level and $svx_rx_line_level respectively.

This could be partially implemented already, a form of alert has already been produced in the logs for peak detection.

Automated actions can be written based on specific values for those variables.

Please let me know what you think.

f5vmr commented 3 days ago

Hi, I am unsure what you mean by audio line levels. In my systems and scripts I previously used alsamixer, but I now implement amixer that has a read and write facility, and reads and writes specific to specific numid variables using sget and cget. You can get the various arguements from the options using amixer.

In my systems, I used .php in the dashboard to implement the changes by giving limited and specific access of the webserver to sudo-based commands to make these and other changes.

Chris G4NAB

On Sat, 2 Nov 2024 at 20:45, Piotr @.***> wrote:

Hi Guys,

Can I request a feature, please?

Working with svxreflector for some time, I find it challenging to find the actual audio line levels.(repeater works in server (CLI) mode only. It would be super useful to know what the svxlink audio line levels are, reported in dB value. It would be very nice to have it exported into a system variable called $svx_tx_line_level and $svx_rx_line_level respectively.

This could be partially implemented already, a form of alert has already been produced in the logs for peak detection.

Automated actions can be written based on specific values for those variables.

Please let me know what you think.

— Reply to this email directly, view it on GitHub https://github.com/sm0svx/svxlink/issues/684, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACAKA5HB73QVSQJ734ECT5DZ6U2YLAVCNFSM6AAAAABRCBJZJ2VHI2DSMVQWIX3LMV43ASLTON2WKOZSGYZTANZXHA2TMNA . You are receiving this because you are subscribed to this thread.Message ID: @.***>

f5vmr commented 3 days ago

These are of course in the svxlink, and not in the svxreflector. The svxreflector is unconcerned with levels. It is up to the svxlink to maintain correct levels in my opinion. Chris

On Sat, 2 Nov 2024 at 20:45, Piotr @.***> wrote:

Hi Guys,

Can I request a feature, please?

Working with svxreflector for some time, I find it challenging to find the actual audio line levels.(repeater works in server (CLI) mode only. It would be super useful to know what the svxlink audio line levels are, reported in dB value. It would be very nice to have it exported into a system variable called $svx_tx_line_level and $svx_rx_line_level respectively.

This could be partially implemented already, a form of alert has already been produced in the logs for peak detection.

Automated actions can be written based on specific values for those variables.

Please let me know what you think.

— Reply to this email directly, view it on GitHub https://github.com/sm0svx/svxlink/issues/684, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACAKA5HB73QVSQJ734ECT5DZ6U2YLAVCNFSM6AAAAABRCBJZJ2VHI2DSMVQWIX3LMV43ASLTON2WKOZSGYZTANZXHA2TMNA . You are receiving this because you are subscribed to this thread.Message ID: @.***>

f5vmr commented 3 days ago

Just to clarify my experience, I manage the svxportal-uk.ddns.net:81, and have no need to monitor these levels at the reflector level. I have a node that does that for me, by monitoring selected talkgroups. All the nodes using the UK reflector seem to have balanced audio throughout.

Chris

On Sat, 2 Nov 2024 at 20:45, Piotr @.***> wrote:

Hi Guys,

Can I request a feature, please?

Working with svxreflector for some time, I find it challenging to find the actual audio line levels.(repeater works in server (CLI) mode only. It would be super useful to know what the svxlink audio line levels are, reported in dB value. It would be very nice to have it exported into a system variable called $svx_tx_line_level and $svx_rx_line_level respectively.

This could be partially implemented already, a form of alert has already been produced in the logs for peak detection.

Automated actions can be written based on specific values for those variables.

Please let me know what you think.

— Reply to this email directly, view it on GitHub https://github.com/sm0svx/svxlink/issues/684, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACAKA5HB73QVSQJ734ECT5DZ6U2YLAVCNFSM6AAAAABRCBJZJ2VHI2DSMVQWIX3LMV43ASLTON2WKOZSGYZTANZXHA2TMNA . You are receiving this because you are subscribed to this thread.Message ID: @.***>

cbspidi commented 2 days ago

Hello, Apologies for not been clear with my initial message, yes there is reflector that i work with but the same hardware also serves a purpose of a local gateway access. Its the local gateway TX and RX audio line levels I would be interested to see, as @f5vmr mentioned, this has nothing to do with reflector part of configuration.

I think a good way of implementing this feature would be to have a configurable "0/1" variable under below two section. A simple suggestion would be export_audio_level=0 or 1, this would be very neat and handy feature.

[Rx1]
TYPE=Local
RX_ID=R
AUDIO_DEV=alsa:plughw:1
AUDIO_CHANNEL=0

[Tx1]
TYPE=Local
TX_ID=T
AUDIO_DEV=alsa:plughw:1
AUDIO_CHANNEL=0

@f5vmr , tell me more about your config with alsa, what and how did you do it?

f5vmr commented 2 days ago

Ok, because of the way I install svxlink by script from my GitHub, it has a two fold build. The svxlink-builder firstly installs all the software, blacklists the onboard sound cards and HDMI, and places the USB soundcard at position 0. Then runs through a variety of menus to configure the node. During this process a webserver dashboard is installed, that contains the shell scripts for everything, including that for the sound settings. The dashboard can also be downloaded as a separate entity with an install script of its own. So for your integrated node configuration this could be the way forward, although it doesn't actually display live audio data, you can view the current settings and change them as required. I did not write all the dashboard, but I have modified a lot of the PHP to compensate for php8.3, and wrote some new stuff for editing of the .conf files. I cannot tell if this will be your solution but it may help. If you'd like more info, please write to me direct, or join the Svxlink amateur radio users Facebook page.

  1. Chris

On Sun, 3 Nov 2024, 12:11 Piotr, @.***> wrote:

Hello, Apologies for not been clear with my initial message, yes there is reflector that i work with but the same hardware also serves a purpose of a local gateway access. Its the local gateway TX and RX audio line levels I would be interested to see, as @f5vmr https://github.com/f5vmr mentioned, this has nothing to do with reflector part of configuration.

I think a good way of implementing this feature would be to have a configurable "0/1" variable under below two section. A simple suggestion would be export_audio_level=0 or 1, this would be very neat and handy feature.

[Rx1] TYPE=Local RX_ID=R AUDIO_DEV=alsa:plughw:1 AUDIO_CHANNEL=0

[Tx1] TYPE=Local TX_ID=T AUDIO_DEV=alsa:plughw:1 AUDIO_CHANNEL=0

@f5vmr https://github.com/f5vmr , tell me more about your config with alsa, what and how did you do it?

— Reply to this email directly, view it on GitHub https://github.com/sm0svx/svxlink/issues/684#issuecomment-2453405462, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACAKA5G6P55I4R6ZKT3PFODZ6YHIPAVCNFSM6AAAAABRCBJZJ2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDINJTGQYDKNBWGI . You are receiving this because you were mentioned.Message ID: @.***>

cbspidi commented 2 days ago

Hi @f5vmr , i will ping you directly for more info on your way of configuring the svxliink, its always great to see how other engineers have it done.

On the feature request, it will be nice to have an input on the code change for this to be implemented.

cbspidi commented 11 hours ago

Hello guys, It would be amazing to have this available via API call, but I understand there would need to be significant code implementations for the API system to be structured and thought about. Maybe it would be a good start for other parameters to be available and maybe changeable via API calls.

For now, if developers would be kind enough, it would be great to see this as an integer exported to the system variable

sm0svx commented 3 hours ago

The way to get your audio levels right is to use the devcal utility to calibrate all receivers (and transmitters) to exactly the correct level. That is, the received FM deviation on one receiver should ideally be reproduced on all other transmitters with exactly the same deviation.

But I agree that it would be useful for a reflector sysop being able to monitor audio levels for all nodes to find the nodes that does not have the correct calibration. I may add such a feature but I must be honest and say that it's not at the top of my TODO-list.