diff --git a/ubitx_iop/audio.ino b/ubitx_iop/audio.ino index 2de479d..1f452a6 100644 --- a/ubitx_iop/audio.ino +++ b/ubitx_iop/audio.ino @@ -78,6 +78,7 @@ void audioInit() audioSelectRxInput(RX_RIG_IN); audioSelectTxInput(TX_MIC_IN); // superfluous I think + //audioCtrl.adcHighPassFilterDisable(); audioCtrl.audioPreProcessorEnable(); } @@ -202,11 +203,15 @@ void audioSelectRxInput(RxInput input) case RX_RIG_IN: muteRxUSBIn(); restoreRxRigIn(); + mixRX.gain(2, 0); + mixRX.gain(3, 0); break; case RX_USB_IN: muteRxRigIn(); restoreRxUSBIn(); + mixRX.gain(2, 0); + mixRX.gain(3, 0); break; } } @@ -219,6 +224,8 @@ void audioSelectTxInput(TxInput input) //muteTxMicIn(); // redundant w/ Line-In muteTxLineIn(); muteTxUSBIn(); + mixTX.gain(2, 0); + mixTX.gain(3, 0); /* switch(input) { case TX_MIC_IN: muteTxUSBIn(); @@ -579,8 +586,8 @@ int hpFilter[5]; void audioSSBFilter() { // calcBiquad(FilterType,FrequencyC,dBgain,Q,QuantizationUnit,SampleRate,int*); - calcBiquad(FILTER_LOPASS, 3100, 0, 0.707, 524288, 44100, lpFilter); - calcBiquad(FILTER_HIPASS, 300, 0, 0.707, 524288, 44100, hpFilter); + calcBiquad(FILTER_LOPASS, 3300, 0, 0.707, 524288, 44100, lpFilter); + calcBiquad(FILTER_HIPASS, 100, 0, 0.707, 524288, 44100, hpFilter); audioCtrl.eqFilter(0, lpFilter); audioCtrl.eqFilter(1, hpFilter); audioCtrl.eqFilter(2, lpFilter); @@ -592,8 +599,8 @@ void audioSSBFilter() void audioCWFilter() { // calcBiquad(FilterType,FrequencyC,dBgain,Q,QuantizationUnit,SampleRate,int*); - calcBiquad(FILTER_LOPASS, 700, 0, 0.707, 524288, 44100, lpFilter); - calcBiquad(FILTER_HIPASS, 300, 0, 0.707, 524288, 44100, hpFilter); + calcBiquad(FILTER_LOPASS, 1300, 0, 0.707, 524288, 44100, lpFilter); + calcBiquad(FILTER_HIPASS, 100, 0, 0.707, 524288, 44100, hpFilter); audioCtrl.eqFilter(0, lpFilter); audioCtrl.eqFilter(1, hpFilter); audioCtrl.eqFilter(2, lpFilter); @@ -602,11 +609,19 @@ void audioCWFilter() audioCtrl.eqFilter(5, hpFilter); } +//====================================================================== +// audioDigiFilter() +// Create a very wide filter for digital modes... wider than the uBITX +// needs, but just want to make sure we leave the full audio bandwidth +// open for digimodes, while ensuring we've cut down any extraneous +// noise outside the normal band. +//====================================================================== + void audioDigiFilter() { // calcBiquad(FilterType,FrequencyC,dBgain,Q,QuantizationUnit,SampleRate,int*); - calcBiquad(FILTER_LOPASS, 3100, 0, 0.707, 524288, 44100, lpFilter); - calcBiquad(FILTER_HIPASS, 300, 0, 0.707, 524288, 44100, hpFilter); + calcBiquad(FILTER_LOPASS, 5000, 0, 0.707, 524288, 44100, lpFilter); + calcBiquad(FILTER_HIPASS, 100, 0, 0.707, 524288, 44100, hpFilter); audioCtrl.eqFilter(0, lpFilter); audioCtrl.eqFilter(1, hpFilter); audioCtrl.eqFilter(2, lpFilter);