summaryrefslogtreecommitdiffstats
path: root/src/target/firmware/include/calypso/dsp.h
diff options
context:
space:
mode:
authorSylvain Munaut <tnt@246tNt.com>2012-10-19 23:07:39 +0200
committerSylvain Munaut <tnt@246tNt.com>2012-11-14 20:18:22 +0100
commit08bc45147bb58700236c4d455080cdeea9cc27a8 (patch)
treea36d1bcf740e924528e6b57d1184641f9d3beb84 /src/target/firmware/include/calypso/dsp.h
parentee18c7b84241b67827c52f166d62cb187532a268 (diff)
target: Add support for IQ swap when required
Operation in GSM850 band requires IQ swap because of the offset PLL used in the TRF causing spectrum reversal. Thanks to Dieter Spaar for noticing the issue and the original patch Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
Diffstat (limited to 'src/target/firmware/include/calypso/dsp.h')
-rw-r--r--src/target/firmware/include/calypso/dsp.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/target/firmware/include/calypso/dsp.h b/src/target/firmware/include/calypso/dsp.h
index e4801cbf..4f391a7a 100644
--- a/src/target/firmware/include/calypso/dsp.h
+++ b/src/target/firmware/include/calypso/dsp.h
@@ -2,6 +2,7 @@
#define _CALYPSO_DSP_H
#include <calypso/dsp_api.h>
+#include <rffe.h>
#define CAL_DSP_TGT_BB_LVL 80
@@ -38,4 +39,12 @@ void dsp_end_scenario(void);
void dsp_load_rx_task(uint16_t task, uint8_t burst_id, uint8_t tsc);
void dsp_load_tx_task(uint16_t task, uint8_t burst_id, uint8_t tsc);
+static inline uint16_t
+dsp_task_iq_swap(uint16_t dsp_task, uint16_t band_arfcn, int tx)
+{
+ if (rffe_iq_swapped(band_arfcn, tx))
+ dsp_task |= 0x8000;
+ return dsp_task;
+}
+
#endif