diff options
author | Sylvain Munaut <tnt@246tNt.com> | 2012-10-19 23:07:39 +0200 |
---|---|---|
committer | Sylvain Munaut <tnt@246tNt.com> | 2013-01-02 20:44:11 +0100 |
commit | 1ccc9f88229f51fdeb4823599a304b22f4b72374 (patch) | |
tree | db8b4dfa3c346426edc11b35871708703e5e85b8 /src/target/firmware/rf | |
parent | f853f92e4712a629ccaa5e79b97aa9340d8d9123 (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/rf')
-rw-r--r-- | src/target/firmware/rf/trf6151.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/target/firmware/rf/trf6151.c b/src/target/firmware/rf/trf6151.c index 96210fc6..0a910091 100644 --- a/src/target/firmware/rf/trf6151.c +++ b/src/target/firmware/rf/trf6151.c @@ -603,3 +603,17 @@ void trf6151_compute_gain(int16_t exp_inp, int16_t target_bb) trf6151_set_gain(delta); } +int trf6151_iq_swapped(uint16_t band_arfcn, int tx) +{ + if (!tx) + return 0; + + switch (gsm_arfcn2band(band_arfcn)) { + case GSM_BAND_850: + return 1; + default: + break; + } + + return 0; +} |