summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorManu Abraham <manu@linuxtv.org>2007-09-25 02:38:11 +0400
committerManu Abraham <manu@linuxtv.org>2007-09-25 02:38:11 +0400
commit683702b8e0927e4981224cd2e0a41ddbdcb222ce (patch)
treee2b96373a9c03ba8087534cb0c4c8455e19fdbe3
parent0276faf82179e0e51cafeb2d6e6d9bb1c238ae36 (diff)
downloadmediapointer-dvb-s2-683702b8e0927e4981224cd2e0a41ddbdcb222ce.tar.gz
mediapointer-dvb-s2-683702b8e0927e4981224cd2e0a41ddbdcb222ce.tar.bz2
Code Simplification
Use an enumeration for I/Q Swap rather than an int, easier to spot the nasty ones From: Manu Abraham <abraham.manu@gmail.com> Signed-off-by: Manu Abraham <manu@linuxtv.org>
-rw-r--r--linux/drivers/media/dvb/frontends/stb0899_drv.h10
-rw-r--r--linux/drivers/media/dvb/frontends/stb0899_priv.h6
-rw-r--r--linux/drivers/media/dvb/ttpci/budget-av.c2
-rw-r--r--linux/drivers/media/dvb/ttpci/budget-ci.c2
4 files changed, 11 insertions, 9 deletions
diff --git a/linux/drivers/media/dvb/frontends/stb0899_drv.h b/linux/drivers/media/dvb/frontends/stb0899_drv.h
index 52c2ce17f..8cb320643 100644
--- a/linux/drivers/media/dvb/frontends/stb0899_drv.h
+++ b/linux/drivers/media/dvb/frontends/stb0899_drv.h
@@ -44,6 +44,12 @@ struct stb0899_s2_reg {
u32 data;
};
+enum stb0899_inversion {
+ IQ_SWAP_OFF = 0,
+ IQ_SWAP_ON,
+ IQ_SWAP_AUTO
+};
+
struct stb0899_config {
const struct stb0899_s1_reg *init_dev;
const struct stb0899_s2_reg *init_s2_demod;
@@ -51,6 +57,8 @@ struct stb0899_config {
const struct stb0899_s2_reg *init_s2_fec;
const struct stb0899_s1_reg *init_tst;
+ enum stb0899_inversion inversion;
+
u32 xtal_freq;
u8 demod_address;
@@ -65,7 +73,7 @@ struct stb0899_config {
u8 data_fifo_mode;
u8 out_rate_comp;
u8 i2c_repeater;
- int inversion;
+// int inversion;
u32 esno_ave;
u32 esno_quant;
diff --git a/linux/drivers/media/dvb/frontends/stb0899_priv.h b/linux/drivers/media/dvb/frontends/stb0899_priv.h
index 0f09539f1..31ada88db 100644
--- a/linux/drivers/media/dvb/frontends/stb0899_priv.h
+++ b/linux/drivers/media/dvb/frontends/stb0899_priv.h
@@ -137,12 +137,6 @@ enum stb0899_frame {
STB0899_SHORT_FRAME
};
-enum stb0899_inversion {
- IQ_SWAP_OFF = 0,
- IQ_SWAP_ON,
- IQ_SWAP_AUTO
-};
-
enum stb0899_alpha {
RRC_20,
RRC_25,
diff --git a/linux/drivers/media/dvb/ttpci/budget-av.c b/linux/drivers/media/dvb/ttpci/budget-av.c
index 9e7fab0e3..1b9bbdb36 100644
--- a/linux/drivers/media/dvb/ttpci/budget-av.c
+++ b/linux/drivers/media/dvb/ttpci/budget-av.c
@@ -1451,7 +1451,7 @@ static struct stb0899_config knc1_dvbs2_config = {
// .ts_pfbit_toggle = STB0899_MPEG_NORMAL, /* DirecTV, MPEG toggling seq */
.xtal_freq = 27000000,
- .inversion = 1,
+ .inversion = IQ_SWAP_ON, /* 1 */
.esno_ave = KNC1_DVBS2_ESNO_AVE,
.esno_quant = KNC1_DVBS2_ESNO_QUANT,
diff --git a/linux/drivers/media/dvb/ttpci/budget-ci.c b/linux/drivers/media/dvb/ttpci/budget-ci.c
index 6a9abecad..a8b27a45e 100644
--- a/linux/drivers/media/dvb/ttpci/budget-ci.c
+++ b/linux/drivers/media/dvb/ttpci/budget-ci.c
@@ -1666,7 +1666,7 @@ static struct stb0899_config tt3200_config = {
.demod_address = 0x68,
.xtal_freq = 27000000,
- .inversion = 1,
+ .inversion = IQ_SWAP_ON, /* 1 */
.esno_ave = TT3200_DVBS2_ESNO_AVE,
.esno_quant = TT3200_DVBS2_ESNO_QUANT,