We have to run an audio driver 'exe file' (audio.exe) in the background of the operating system, along with a shell script (script.sh) that can read the RSSI value and can write 1/0 to the GPIO value on the basis of RSSI value. We first run an ./audio.exe & and then run ./script.sh & to control the receiver using the value of GPIO, which is based on RSSI.
Both of these files have while loop that is continuously monitoring the RSSI value, writing 1/0 to gpio value, and also handling the uart data in audio.exe.
The problem rises on running the script.sh, it causes audio distortion. If we manually write 1/0 to the gpio, or do any kind of changes, there is no disruption in the audio. But if we run that shell script, it causes problem because of while loop.
Any help in this regard is highly appreciated.