diff options
author | Michael Krufky <mkrufky@linuxtv.org> | 2008-01-02 23:17:45 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2008-01-25 16:04:37 -0500 |
commit | 2ba65d517b91ebb30f4f2a88f1e1beeabd8d8ee6 (patch) | |
tree | b19f9930f28914d4a0cf23e9e72cea87872001db | |
parent | f21e0d7f0513e743b14df3197fdeeb9a9b7edbb2 (diff) |
V4L/DVB (6963): tda18271: store IF frequency in a u16 instead of u32
Store IF Frequency in a u16 instead of a u32. Multiply by 1000 before use.
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
-rw-r--r-- | drivers/media/dvb/frontends/tda18271-fe.c | 11 | ||||
-rw-r--r-- | drivers/media/dvb/frontends/tda18271-tables.c | 52 | ||||
-rw-r--r-- | drivers/media/dvb/frontends/tda18271.h | 2 | ||||
-rw-r--r-- | drivers/media/video/cx23885/cx23885-dvb.c | 4 |
4 files changed, 35 insertions, 34 deletions
diff --git a/drivers/media/dvb/frontends/tda18271-fe.c b/drivers/media/dvb/frontends/tda18271-fe.c index b17ab4ace08c..a02d6404f755 100644 --- a/drivers/media/dvb/frontends/tda18271-fe.c +++ b/drivers/media/dvb/frontends/tda18271-fe.c | |||
@@ -770,8 +770,8 @@ static int tda18271_set_params(struct dvb_frontend *fe, | |||
770 | struct tda18271_priv *priv = fe->tuner_priv; | 770 | struct tda18271_priv *priv = fe->tuner_priv; |
771 | struct tda18271_std_map *std_map = &priv->std; | 771 | struct tda18271_std_map *std_map = &priv->std; |
772 | u8 std; | 772 | u8 std; |
773 | u32 bw, sgIF = 0; | 773 | u16 sgIF; |
774 | u32 freq = params->frequency; | 774 | u32 bw, freq = params->frequency; |
775 | 775 | ||
776 | BUG_ON(!priv->tune); | 776 | BUG_ON(!priv->tune); |
777 | 777 | ||
@@ -825,7 +825,7 @@ static int tda18271_set_params(struct dvb_frontend *fe, | |||
825 | return -EINVAL; | 825 | return -EINVAL; |
826 | } | 826 | } |
827 | 827 | ||
828 | return priv->tune(fe, sgIF, freq, bw, std); | 828 | return priv->tune(fe, sgIF * 1000, freq, bw, std); |
829 | } | 829 | } |
830 | 830 | ||
831 | static int tda18271_set_analog_params(struct dvb_frontend *fe, | 831 | static int tda18271_set_analog_params(struct dvb_frontend *fe, |
@@ -835,7 +835,8 @@ static int tda18271_set_analog_params(struct dvb_frontend *fe, | |||
835 | struct tda18271_std_map *std_map = &priv->std; | 835 | struct tda18271_std_map *std_map = &priv->std; |
836 | char *mode; | 836 | char *mode; |
837 | u8 std; | 837 | u8 std; |
838 | u32 sgIF, freq = params->frequency * 62500; | 838 | u16 sgIF; |
839 | u32 freq = params->frequency * 62500; | ||
839 | 840 | ||
840 | BUG_ON(!priv->tune); | 841 | BUG_ON(!priv->tune); |
841 | 842 | ||
@@ -877,7 +878,7 @@ static int tda18271_set_analog_params(struct dvb_frontend *fe, | |||
877 | 878 | ||
878 | tda_dbg("setting tda18271 to system %s\n", mode); | 879 | tda_dbg("setting tda18271 to system %s\n", mode); |
879 | 880 | ||
880 | return priv->tune(fe, sgIF, freq, 0, std); | 881 | return priv->tune(fe, sgIF * 1000, freq, 0, std); |
881 | } | 882 | } |
882 | 883 | ||
883 | static int tda18271_release(struct dvb_frontend *fe) | 884 | static int tda18271_release(struct dvb_frontend *fe) |
diff --git a/drivers/media/dvb/frontends/tda18271-tables.c b/drivers/media/dvb/frontends/tda18271-tables.c index 2f8ea72bcabb..528a2ec9e967 100644 --- a/drivers/media/dvb/frontends/tda18271-tables.c +++ b/drivers/media/dvb/frontends/tda18271-tables.c | |||
@@ -1187,35 +1187,35 @@ fail: | |||
1187 | /*---------------------------------------------------------------------*/ | 1187 | /*---------------------------------------------------------------------*/ |
1188 | 1188 | ||
1189 | static struct tda18271_std_map tda18271c1_std_map = { | 1189 | static struct tda18271_std_map tda18271c1_std_map = { |
1190 | .atv_b = { .if_freq = 6750000, .std_bits = 0x0e }, | 1190 | .atv_b = { .if_freq = 6750, .std_bits = 0x0e }, |
1191 | .atv_dk = { .if_freq = 7750000, .std_bits = 0x0f }, | 1191 | .atv_dk = { .if_freq = 7750, .std_bits = 0x0f }, |
1192 | .atv_gh = { .if_freq = 7750000, .std_bits = 0x0f }, | 1192 | .atv_gh = { .if_freq = 7750, .std_bits = 0x0f }, |
1193 | .atv_i = { .if_freq = 7750000, .std_bits = 0x0f }, | 1193 | .atv_i = { .if_freq = 7750, .std_bits = 0x0f }, |
1194 | .atv_l = { .if_freq = 7750000, .std_bits = 0x0f }, | 1194 | .atv_l = { .if_freq = 7750, .std_bits = 0x0f }, |
1195 | .atv_lc = { .if_freq = 1250000, .std_bits = 0x0f }, | 1195 | .atv_lc = { .if_freq = 1250, .std_bits = 0x0f }, |
1196 | .atv_mn = { .if_freq = 5750000, .std_bits = 0x0d }, | 1196 | .atv_mn = { .if_freq = 5750, .std_bits = 0x0d }, |
1197 | .atsc_6 = { .if_freq = 3250000, .std_bits = 0x1c }, | 1197 | .atsc_6 = { .if_freq = 3250, .std_bits = 0x1c }, |
1198 | .dvbt_6 = { .if_freq = 3300000, .std_bits = 0x1c }, | 1198 | .dvbt_6 = { .if_freq = 3300, .std_bits = 0x1c }, |
1199 | .dvbt_7 = { .if_freq = 3800000, .std_bits = 0x1d }, | 1199 | .dvbt_7 = { .if_freq = 3800, .std_bits = 0x1d }, |
1200 | .dvbt_8 = { .if_freq = 4300000, .std_bits = 0x1e }, | 1200 | .dvbt_8 = { .if_freq = 4300, .std_bits = 0x1e }, |
1201 | .qam_6 = { .if_freq = 4000000, .std_bits = 0x1d }, | 1201 | .qam_6 = { .if_freq = 4000, .std_bits = 0x1d }, |
1202 | .qam_8 = { .if_freq = 5000000, .std_bits = 0x1f }, | 1202 | .qam_8 = { .if_freq = 5000, .std_bits = 0x1f }, |
1203 | }; | 1203 | }; |
1204 | 1204 | ||
1205 | static struct tda18271_std_map tda18271c2_std_map = { | 1205 | static struct tda18271_std_map tda18271c2_std_map = { |
1206 | .atv_b = { .if_freq = 6000000, .std_bits = 0x0d }, | 1206 | .atv_b = { .if_freq = 6000, .std_bits = 0x0d }, |
1207 | .atv_dk = { .if_freq = 6900000, .std_bits = 0x0e }, | 1207 | .atv_dk = { .if_freq = 6900, .std_bits = 0x0e }, |
1208 | .atv_gh = { .if_freq = 7100000, .std_bits = 0x0e }, | 1208 | .atv_gh = { .if_freq = 7100, .std_bits = 0x0e }, |
1209 | .atv_i = { .if_freq = 7250000, .std_bits = 0x0e }, | 1209 | .atv_i = { .if_freq = 7250, .std_bits = 0x0e }, |
1210 | .atv_l = { .if_freq = 6900000, .std_bits = 0x0e }, | 1210 | .atv_l = { .if_freq = 6900, .std_bits = 0x0e }, |
1211 | .atv_lc = { .if_freq = 1250000, .std_bits = 0x0e }, | 1211 | .atv_lc = { .if_freq = 1250, .std_bits = 0x0e }, |
1212 | .atv_mn = { .if_freq = 5400000, .std_bits = 0x0c }, | 1212 | .atv_mn = { .if_freq = 5400, .std_bits = 0x0c }, |
1213 | .atsc_6 = { .if_freq = 3250000, .std_bits = 0x1c }, | 1213 | .atsc_6 = { .if_freq = 3250, .std_bits = 0x1c }, |
1214 | .dvbt_6 = { .if_freq = 3300000, .std_bits = 0x1c }, | 1214 | .dvbt_6 = { .if_freq = 3300, .std_bits = 0x1c }, |
1215 | .dvbt_7 = { .if_freq = 3500000, .std_bits = 0x1c }, | 1215 | .dvbt_7 = { .if_freq = 3500, .std_bits = 0x1c }, |
1216 | .dvbt_8 = { .if_freq = 4000000, .std_bits = 0x1d }, | 1216 | .dvbt_8 = { .if_freq = 4000, .std_bits = 0x1d }, |
1217 | .qam_6 = { .if_freq = 4000000, .std_bits = 0x1d }, | 1217 | .qam_6 = { .if_freq = 4000, .std_bits = 0x1d }, |
1218 | .qam_8 = { .if_freq = 5000000, .std_bits = 0x1f }, | 1218 | .qam_8 = { .if_freq = 5000, .std_bits = 0x1f }, |
1219 | }; | 1219 | }; |
1220 | 1220 | ||
1221 | /*---------------------------------------------------------------------*/ | 1221 | /*---------------------------------------------------------------------*/ |
diff --git a/drivers/media/dvb/frontends/tda18271.h b/drivers/media/dvb/frontends/tda18271.h index 36a3a548a6f5..4fa3d6ab6216 100644 --- a/drivers/media/dvb/frontends/tda18271.h +++ b/drivers/media/dvb/frontends/tda18271.h | |||
@@ -25,7 +25,7 @@ | |||
25 | #include "dvb_frontend.h" | 25 | #include "dvb_frontend.h" |
26 | 26 | ||
27 | struct tda18271_std_map_item { | 27 | struct tda18271_std_map_item { |
28 | u32 if_freq; | 28 | u16 if_freq; |
29 | u8 std_bits; | 29 | u8 std_bits; |
30 | }; | 30 | }; |
31 | 31 | ||
diff --git a/drivers/media/video/cx23885/cx23885-dvb.c b/drivers/media/video/cx23885/cx23885-dvb.c index 948a7fb7ed06..1b669ee962d0 100644 --- a/drivers/media/video/cx23885/cx23885-dvb.c +++ b/drivers/media/video/cx23885/cx23885-dvb.c | |||
@@ -184,8 +184,8 @@ static struct tda829x_config tda829x_no_probe = { | |||
184 | }; | 184 | }; |
185 | 185 | ||
186 | static struct tda18271_std_map hauppauge_tda18271_std_map = { | 186 | static struct tda18271_std_map hauppauge_tda18271_std_map = { |
187 | .atsc_6 = { .if_freq = 5380000, .std_bits = 0x1b }, | 187 | .atsc_6 = { .if_freq = 5380, .std_bits = 0x1b }, |
188 | .qam_6 = { .if_freq = 4000000, .std_bits = 0x18 }, | 188 | .qam_6 = { .if_freq = 4000, .std_bits = 0x18 }, |
189 | }; | 189 | }; |
190 | 190 | ||
191 | static struct tda18271_config hauppauge_tda18271_config = { | 191 | static struct tda18271_config hauppauge_tda18271_config = { |