afarhan / sbitx

174 stars 61 forks source link

Fix AGC Decay by moving r->agc_gain update outside of BIN loop #10

Closed sbeckman closed 2 years ago

sbeckman commented 2 years ago

The AGC Decay value is currently being changed across a single sample BIN - this results in no apparent AGC Decay at all, and is how the sBitx receiver currently sounds after the AGC hang time expires - there is a sudden, abrupt change in receiver gain when the delay timer expires.

The proposed change moves the AGC decay update calculation out of the loop that's modifying a single sample BIN, so that the AGC decay occurs across a group of sample BINs. The sBitx receiver AGC no longer exhibits the abrupt change in receiver gain after this modification is made. My ears think it sounds much better!

73; Steve, N3SB

k3ng commented 2 years ago

Definite improvement. This is great! 73 Goody K3NG

afarhan commented 2 years ago

I am just heads down trying to send off the upgrade kits and the replace the soon to be shipped boards with the switching regulators. I will get to a new round of pulls over the weekend

On Fri, Aug 19, 2022, 5:55 PM Anthony Good @.***> wrote:

Definite improvement. This is great! 73 Goody K3NG

— Reply to this email directly, view it on GitHub https://github.com/afarhan/sbitx/pull/10#issuecomment-1220614254, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAFYXOGNVC6D7MQTYLDZYU3VZ54LLANCNFSM567K6QFA . You are receiving this because you are subscribed to this thread.Message ID: @.***>

sbeckman commented 2 years ago

Updated PCM Write routines to both the play channel (speaker) and the loopback channel (FLDIGI) to repeat snd_pcm_writei calls until all sound samples in queue have been written. This change dramatically improves the sound stream being fed to FLDIGI, and can reduce pops and clicks in the speaker audio as well. I've also reduced sound levels into FLDIGI a bit, as it looked like it was being overdriven.

73; Steve, N3SB