OP25 Audio Mute Suggestion

Carter911

Member
Joined
Aug 17, 2021
Messages
59
Once again, thank you to the OP25 developers for such a great project!

The back story:
I have an RPi 3B+ running OP25-Boatbod, with a single RTL-SDR, monitoring a single control channel, and it works very well!
I tinker a bit with electronics, so I designed an RPI "Hat" that has a stereo - to - mono mixer, and an audio amp.
It additionally has several push button switches and LEDs.
On boot-up, it loads a particular configuration of the rx.py command with its associated white list.

One can select any of four modes of operation by pushing the respective push button switch.
The RPi de-selects the current mode, and selects the new mode, (new white list, etc.).

I can listen to just the local FD/EMS, or FD/EMS & local PD, or to the regional TG's of interest, or to any traffic on the system, (essentially a test mode).

The 5th PB switch tells the RPi to shut down, prior to turning off it's power.

With this little setup I can essentially have a headless 800 MHz radio, as I don't require the monitor, KB, and mouse to shut things down when needed, and I can easily select from several pre-configured setups with the push of a button.

Unfortunately, when there is no voice traffic, one hears some "computer noise" through the speaker.
When there is voice traffic, one can't hear the computer noise.
When there is no voice traffic it gets annoying with the constant background noise.

I believe that much of the noise is coupled through the power supply rail, while some of it is directly radiated, (EMI), from the RPI's PCB that sits right below it.
I can certainly make a new and improved Hat with better power supply filtering, but that really won't completely eliminate the noise.

Now, after that long winded intro, the suggestion:
It would be really great if down the road there was an up-dated version of the program that include one more option for the command line.
That option would be to enable an RPi's GPIO pin/line/signal as a Mute Audio signal.
Many small amplifier chips have a mute control input, which allows a radio's microcontroller to totally mute the audio output when tuning between stations.
In this case, when OP25 is just listening / scanning and there is no audio traffic to play, the mute signal could be used to totally silence the speaker output.
When the system is playing a talk-group's audio, the signal would enable the audio amplifier to play the voice traffic.

This option would only make sense for those running OP25 on an RPi, not on a PC.
The Mute flag on the rx.py command line could have a parameter that let the user select the RPI GPIO pin to use for the signal.
e.g. rx.py ...... -- mute 12 ... would route the mute signal to GPIO 12.

As some audio amp chips use a High to Mute signal, and others use a Low to Mute signal, one could get fancy and use a parameter of 12 for GPIO 12, High to Mute, or add 100 to the parameter and have 112 for GPIO 12, Low to Mute.

I throw this out there only as a suggestion to perhaps add to the future development wish list!
I know that everyone's time is valuable, and that higher priorities exist.

Once again, thank you for OP25, it is a great project!

Jay

20220911_211523 C.jpg
 
Last edited:

wgbecks

Active Member
Joined
Jan 17, 2005
Messages
921
Location
NE Wisconsin
I tool would like to have a logic indication funciton that signals when a talkgroup is active. However, as you've already pointed out, such a
GPIO function would become very device specific. Perhaps instad of a logic function, op25 might call a couple of basic (generic) python
programs that the end user could modify to set/reset device specific GPIO lines?

Regarding the noise theat you're experiencing, I have to question how you are sourcing the audio for your amplifier and speaker system?
I have a Pi-4B with the earphone jack audio supplying audio to and external mixer and apmplifier chain and have no extranious noise issues.
You have to be careful with the RPi's earhone jacks that you use a 4-Pole (TRRS) plug as inserting a standard 3-Pole (TRS) plug will make
contact with the baseband (analog) video present on the connecor jack that will induce unwanted computer noise.

It may also be possible that this is not the case but rather you have a gound loop and need to insert an auido isolation transformer
to break the gound loop if one exists.
 

Carter911

Member
Joined
Aug 17, 2021
Messages
59
Great thoughts.

I actually ordered a few TRRS plugs with a shielded wire pig tail for this.
So that plugs into the RPi's AV jack, and the other end is soldered into the input pads on the PCB.
So, unfortunately, it isn't as easy a fix as redoing the plug to omit the video signal, because I am already avoiding it.

If I plug in an external computer speaker it plays the audio just fine, with very minimal noise present, between transmissions, if one listens closely to the speaker with the volume turned up. So the RPi and OP25 are working fine.

I think the real issue is that true audio gear is designed with a very clean, (analog), power supply, with tons of filtering.
I didn't go to that effort, and now I'm seeing the result. I'm just using the RPi's (dirty) power bus with a little bit of filtering, (but obviously not enough).

The good news is that this was primarily a testbed to see if I could easily switch operating modes with a push button, and also generate a forced shut down with a GPIO signal, (in this case generated by a push button switch).
Now that all of that is functional, I'll work on the rest of the project.

If I dig around deep enough in my old parts bin I might have a 600:600 ohm transformer that I could use to test the ground loop theory.

I always appreciate your help and guidance!

Take care,

Jay
 

boatbod

Member
Joined
Mar 3, 2007
Messages
3,339
Location
Talbot Co, MD
I think the only way it could possibly work would be for op25 to invoke a call to an external shell script. That said, I have concerns about the impact that such a call might introduce into the core application. Conceivably it could be slaved to the metadata handler in some way since that already runs in it's own thread.
 
Top