aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorManu Abraham <abraham.manu@gmail.com>2007-09-24 18:38:11 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2008-12-29 14:53:16 -0500
commitecdec311806220d6e88e3ac52936cc30e1580810 (patch)
tree94b8dd0a6ff63288305cc4e1e09d10a3611adecf /drivers
parentdb1d3b80b3d077b6d5936f2afef3e5a84d302c1a (diff)
V4L/DVB (9401): Code Simplification
Use an enumeration for I/Q Swap rather than an int, easier to spot the nasty ones Signed-off-by: Manu Abraham <manu@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/media/dvb/frontends/stb0899_drv.h10
-rw-r--r--drivers/media/dvb/frontends/stb0899_priv.h6
-rw-r--r--drivers/media/dvb/ttpci/budget-av.c2
-rw-r--r--drivers/media/dvb/ttpci/budget-ci.c2
4 files changed, 11 insertions, 9 deletions
diff --git a/drivers/media/dvb/frontends/stb0899_drv.h b/drivers/media/dvb/frontends/stb0899_drv.h
index 52c2ce17f856..8cb320643f8e 100644
--- a/drivers/media/dvb/frontends/stb0899_drv.h
+++ b/drivers/media/dvb/frontends/stb0899_drv.h
@@ -44,6 +44,12 @@ struct stb0899_s2_reg {
44 u32 data; 44 u32 data;
45}; 45};
46 46
47enum stb0899_inversion {
48 IQ_SWAP_OFF = 0,
49 IQ_SWAP_ON,
50 IQ_SWAP_AUTO
51};
52
47struct stb0899_config { 53struct stb0899_config {
48 const struct stb0899_s1_reg *init_dev; 54 const struct stb0899_s1_reg *init_dev;
49 const struct stb0899_s2_reg *init_s2_demod; 55 const struct stb0899_s2_reg *init_s2_demod;
@@ -51,6 +57,8 @@ struct stb0899_config {
51 const struct stb0899_s2_reg *init_s2_fec; 57 const struct stb0899_s2_reg *init_s2_fec;
52 const struct stb0899_s1_reg *init_tst; 58 const struct stb0899_s1_reg *init_tst;
53 59
60 enum stb0899_inversion inversion;
61
54 u32 xtal_freq; 62 u32 xtal_freq;
55 63
56 u8 demod_address; 64 u8 demod_address;
@@ -65,7 +73,7 @@ struct stb0899_config {
65 u8 data_fifo_mode; 73 u8 data_fifo_mode;
66 u8 out_rate_comp; 74 u8 out_rate_comp;
67 u8 i2c_repeater; 75 u8 i2c_repeater;
68 int inversion; 76// int inversion;
69 77
70 u32 esno_ave; 78 u32 esno_ave;
71 u32 esno_quant; 79 u32 esno_quant;
diff --git a/drivers/media/dvb/frontends/stb0899_priv.h b/drivers/media/dvb/frontends/stb0899_priv.h
index 47e533dd417d..73790b4e3453 100644
--- a/drivers/media/dvb/frontends/stb0899_priv.h
+++ b/drivers/media/dvb/frontends/stb0899_priv.h
@@ -137,12 +137,6 @@ enum stb0899_frame {
137 STB0899_SHORT_FRAME 137 STB0899_SHORT_FRAME
138}; 138};
139 139
140enum stb0899_inversion {
141 IQ_SWAP_OFF = 0,
142 IQ_SWAP_ON,
143 IQ_SWAP_AUTO
144};
145
146enum stb0899_alpha { 140enum stb0899_alpha {
147 RRC_20, 141 RRC_20,
148 RRC_25, 142 RRC_25,
diff --git a/drivers/media/dvb/ttpci/budget-av.c b/drivers/media/dvb/ttpci/budget-av.c
index 9e7fab0e31e1..1b9bbdb36b82 100644
--- a/drivers/media/dvb/ttpci/budget-av.c
+++ b/drivers/media/dvb/ttpci/budget-av.c
@@ -1451,7 +1451,7 @@ static struct stb0899_config knc1_dvbs2_config = {
1451// .ts_pfbit_toggle = STB0899_MPEG_NORMAL, /* DirecTV, MPEG toggling seq */ 1451// .ts_pfbit_toggle = STB0899_MPEG_NORMAL, /* DirecTV, MPEG toggling seq */
1452 1452
1453 .xtal_freq = 27000000, 1453 .xtal_freq = 27000000,
1454 .inversion = 1, 1454 .inversion = IQ_SWAP_ON, /* 1 */
1455 1455
1456 .esno_ave = KNC1_DVBS2_ESNO_AVE, 1456 .esno_ave = KNC1_DVBS2_ESNO_AVE,
1457 .esno_quant = KNC1_DVBS2_ESNO_QUANT, 1457 .esno_quant = KNC1_DVBS2_ESNO_QUANT,
diff --git a/drivers/media/dvb/ttpci/budget-ci.c b/drivers/media/dvb/ttpci/budget-ci.c
index 005c4596343d..fc4cc491ab59 100644
--- a/drivers/media/dvb/ttpci/budget-ci.c
+++ b/drivers/media/dvb/ttpci/budget-ci.c
@@ -1658,7 +1658,7 @@ static struct stb0899_config tt3200_config = {
1658 .demod_address = 0x68, 1658 .demod_address = 0x68,
1659 1659
1660 .xtal_freq = 27000000, 1660 .xtal_freq = 27000000,
1661 .inversion = 1, 1661 .inversion = IQ_SWAP_ON, /* 1 */
1662 1662
1663 .esno_ave = TT3200_DVBS2_ESNO_AVE, 1663 .esno_ave = TT3200_DVBS2_ESNO_AVE,
1664 .esno_quant = TT3200_DVBS2_ESNO_QUANT, 1664 .esno_quant = TT3200_DVBS2_ESNO_QUANT,