diff options
author | Michael Krufky <mkrufky@linuxtv.org> | 2008-04-22 13:46:21 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2008-04-24 13:07:54 -0400 |
commit | 14c74b23b6b5a8259c25c8f825e3036f595518d0 (patch) | |
tree | b5484ee371548bf849c490040dffadd30be7a80b /drivers/media/dvb/frontends | |
parent | ae07d042f626caa13d5a8a15ac7297b2873f7622 (diff) |
V4L/DVB (7431): tda18271: allow device-specific configuration of IF level
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/dvb/frontends')
-rw-r--r-- | drivers/media/dvb/frontends/tda18271-fe.c | 2 | ||||
-rw-r--r-- | drivers/media/dvb/frontends/tda18271-tables.c | 112 | ||||
-rw-r--r-- | drivers/media/dvb/frontends/tda18271.h | 2 |
3 files changed, 59 insertions, 57 deletions
diff --git a/drivers/media/dvb/frontends/tda18271-fe.c b/drivers/media/dvb/frontends/tda18271-fe.c index 2bbf277f5cfc..b5a422ef4ff6 100644 --- a/drivers/media/dvb/frontends/tda18271-fe.c +++ b/drivers/media/dvb/frontends/tda18271-fe.c | |||
@@ -55,13 +55,13 @@ static int tda18271_channel_configuration(struct dvb_frontend *fe, | |||
55 | 55 | ||
56 | /* update IF output level & IF notch frequency */ | 56 | /* update IF output level & IF notch frequency */ |
57 | regs[R_EP4] &= ~0x1c; /* clear if level bits */ | 57 | regs[R_EP4] &= ~0x1c; /* clear if level bits */ |
58 | regs[R_EP4] |= (map->if_lvl << 2); | ||
58 | 59 | ||
59 | switch (priv->mode) { | 60 | switch (priv->mode) { |
60 | case TDA18271_ANALOG: | 61 | case TDA18271_ANALOG: |
61 | regs[R_MPD] &= ~0x80; /* IF notch = 0 */ | 62 | regs[R_MPD] &= ~0x80; /* IF notch = 0 */ |
62 | break; | 63 | break; |
63 | case TDA18271_DIGITAL: | 64 | case TDA18271_DIGITAL: |
64 | regs[R_EP4] |= 0x04; /* IF level = 1 */ | ||
65 | regs[R_MPD] |= 0x80; /* IF notch = 1 */ | 65 | regs[R_MPD] |= 0x80; /* IF notch = 1 */ |
66 | break; | 66 | break; |
67 | } | 67 | } |
diff --git a/drivers/media/dvb/frontends/tda18271-tables.c b/drivers/media/dvb/frontends/tda18271-tables.c index b402abd15bb2..342fb31b64c4 100644 --- a/drivers/media/dvb/frontends/tda18271-tables.c +++ b/drivers/media/dvb/frontends/tda18271-tables.c | |||
@@ -1187,65 +1187,65 @@ fail: | |||
1187 | /*---------------------------------------------------------------------*/ | 1187 | /*---------------------------------------------------------------------*/ |
1188 | 1188 | ||
1189 | static struct tda18271_std_map tda18271c1_std_map = { | 1189 | static struct tda18271_std_map tda18271c1_std_map = { |
1190 | .fm_radio = { .if_freq = 1250, .fm_rfn = 1, .agc_mode = 3, .std = 0 }, | 1190 | .fm_radio = { .if_freq = 1250, .fm_rfn = 1, .if_lvl = 0, |
1191 | /* EP3[4:0] 0x18 */ | 1191 | .agc_mode = 3, .std = 0 }, /* EP3[4:0] 0x18 */ |
1192 | .atv_b = { .if_freq = 6750, .fm_rfn = 0, .agc_mode = 1, .std = 6 }, | 1192 | .atv_b = { .if_freq = 6750, .fm_rfn = 0, .if_lvl = 0, |
1193 | /* EP3[4:0] 0x0e */ | 1193 | .agc_mode = 1, .std = 6 }, /* EP3[4:0] 0x0e */ |
1194 | .atv_dk = { .if_freq = 7750, .fm_rfn = 0, .agc_mode = 1, .std = 7 }, | 1194 | .atv_dk = { .if_freq = 7750, .fm_rfn = 0, .if_lvl = 0, |
1195 | /* EP3[4:0] 0x0f */ | 1195 | .agc_mode = 1, .std = 7 }, /* EP3[4:0] 0x0f */ |
1196 | .atv_gh = { .if_freq = 7750, .fm_rfn = 0, .agc_mode = 1, .std = 7 }, | 1196 | .atv_gh = { .if_freq = 7750, .fm_rfn = 0, .if_lvl = 0, |
1197 | /* EP3[4:0] 0x0f */ | 1197 | .agc_mode = 1, .std = 7 }, /* EP3[4:0] 0x0f */ |
1198 | .atv_i = { .if_freq = 7750, .fm_rfn = 0, .agc_mode = 1, .std = 7 }, | 1198 | .atv_i = { .if_freq = 7750, .fm_rfn = 0, .if_lvl = 0, |
1199 | /* EP3[4:0] 0x0f */ | 1199 | .agc_mode = 1, .std = 7 }, /* EP3[4:0] 0x0f */ |
1200 | .atv_l = { .if_freq = 7750, .fm_rfn = 0, .agc_mode = 1, .std = 7 }, | 1200 | .atv_l = { .if_freq = 7750, .fm_rfn = 0, .if_lvl = 0, |
1201 | /* EP3[4:0] 0x0f */ | 1201 | .agc_mode = 1, .std = 7 }, /* EP3[4:0] 0x0f */ |
1202 | .atv_lc = { .if_freq = 1250, .fm_rfn = 0, .agc_mode = 1, .std = 7 }, | 1202 | .atv_lc = { .if_freq = 1250, .fm_rfn = 0, .if_lvl = 0, |
1203 | /* EP3[4:0] 0x0f */ | 1203 | .agc_mode = 1, .std = 7 }, /* EP3[4:0] 0x0f */ |
1204 | .atv_mn = { .if_freq = 5750, .fm_rfn = 0, .agc_mode = 1, .std = 5 }, | 1204 | .atv_mn = { .if_freq = 5750, .fm_rfn = 0, .if_lvl = 0, |
1205 | /* EP3[4:0] 0x0d */ | 1205 | .agc_mode = 1, .std = 5 }, /* EP3[4:0] 0x0d */ |
1206 | .atsc_6 = { .if_freq = 3250, .fm_rfn = 0, .agc_mode = 3, .std = 4 }, | 1206 | .atsc_6 = { .if_freq = 3250, .fm_rfn = 0, .if_lvl = 1, |
1207 | /* EP3[4:0] 0x1c */ | 1207 | .agc_mode = 3, .std = 4 }, /* EP3[4:0] 0x1c */ |
1208 | .dvbt_6 = { .if_freq = 3300, .fm_rfn = 0, .agc_mode = 3, .std = 4 }, | 1208 | .dvbt_6 = { .if_freq = 3300, .fm_rfn = 0, .if_lvl = 1, |
1209 | /* EP3[4:0] 0x1c */ | 1209 | .agc_mode = 3, .std = 4 }, /* EP3[4:0] 0x1c */ |
1210 | .dvbt_7 = { .if_freq = 3800, .fm_rfn = 0, .agc_mode = 3, .std = 5 }, | 1210 | .dvbt_7 = { .if_freq = 3800, .fm_rfn = 0, .if_lvl = 1, |
1211 | /* EP3[4:0] 0x1d */ | 1211 | .agc_mode = 3, .std = 5 }, /* EP3[4:0] 0x1d */ |
1212 | .dvbt_8 = { .if_freq = 4300, .fm_rfn = 0, .agc_mode = 3, .std = 6 }, | 1212 | .dvbt_8 = { .if_freq = 4300, .fm_rfn = 0, .if_lvl = 1, |
1213 | /* EP3[4:0] 0x1e */ | 1213 | .agc_mode = 3, .std = 6 }, /* EP3[4:0] 0x1e */ |
1214 | .qam_6 = { .if_freq = 4000, .fm_rfn = 0, .agc_mode = 3, .std = 5 }, | 1214 | .qam_6 = { .if_freq = 4000, .fm_rfn = 0, .if_lvl = 1, |
1215 | /* EP3[4:0] 0x1d */ | 1215 | .agc_mode = 3, .std = 5 }, /* EP3[4:0] 0x1d */ |
1216 | .qam_8 = { .if_freq = 5000, .fm_rfn = 0, .agc_mode = 3, .std = 7 }, | 1216 | .qam_8 = { .if_freq = 5000, .fm_rfn = 0, .if_lvl = 1, |
1217 | /* EP3[4:0] 0x1f */ | 1217 | .agc_mode = 3, .std = 7 }, /* EP3[4:0] 0x1f */ |
1218 | }; | 1218 | }; |
1219 | 1219 | ||
1220 | static struct tda18271_std_map tda18271c2_std_map = { | 1220 | static struct tda18271_std_map tda18271c2_std_map = { |
1221 | .fm_radio = { .if_freq = 1250, .fm_rfn = 1, .agc_mode = 3, .std = 0 }, | 1221 | .fm_radio = { .if_freq = 1250, .fm_rfn = 1, .if_lvl = 0, |
1222 | /* EP3[4:0] 0x18 */ | 1222 | .agc_mode = 3, .std = 0 }, /* EP3[4:0] 0x18 */ |
1223 | .atv_b = { .if_freq = 6000, .fm_rfn = 0, .agc_mode = 1, .std = 5 }, | 1223 | .atv_b = { .if_freq = 6000, .fm_rfn = 0, .if_lvl = 0, |
1224 | /* EP3[4:0] 0x0d */ | 1224 | .agc_mode = 1, .std = 5 }, /* EP3[4:0] 0x0d */ |
1225 | .atv_dk = { .if_freq = 6900, .fm_rfn = 0, .agc_mode = 1, .std = 6 }, | 1225 | .atv_dk = { .if_freq = 6900, .fm_rfn = 0, .if_lvl = 0, |
1226 | /* EP3[4:0] 0x0e */ | 1226 | .agc_mode = 1, .std = 6 }, /* EP3[4:0] 0x0e */ |
1227 | .atv_gh = { .if_freq = 7100, .fm_rfn = 0, .agc_mode = 1, .std = 6 }, | 1227 | .atv_gh = { .if_freq = 7100, .fm_rfn = 0, .if_lvl = 0, |
1228 | /* EP3[4:0] 0x0e */ | 1228 | .agc_mode = 1, .std = 6 }, /* EP3[4:0] 0x0e */ |
1229 | .atv_i = { .if_freq = 7250, .fm_rfn = 0, .agc_mode = 1, .std = 6 }, | 1229 | .atv_i = { .if_freq = 7250, .fm_rfn = 0, .if_lvl = 0, |
1230 | /* EP3[4:0] 0x0e */ | 1230 | .agc_mode = 1, .std = 6 }, /* EP3[4:0] 0x0e */ |
1231 | .atv_l = { .if_freq = 6900, .fm_rfn = 0, .agc_mode = 1, .std = 6 }, | 1231 | .atv_l = { .if_freq = 6900, .fm_rfn = 0, .if_lvl = 0, |
1232 | /* EP3[4:0] 0x0e */ | 1232 | .agc_mode = 1, .std = 6 }, /* EP3[4:0] 0x0e */ |
1233 | .atv_lc = { .if_freq = 1250, .fm_rfn = 0, .agc_mode = 1, .std = 6 }, | 1233 | .atv_lc = { .if_freq = 1250, .fm_rfn = 0, .if_lvl = 0, |
1234 | /* EP3[4:0] 0x0e */ | 1234 | .agc_mode = 1, .std = 6 }, /* EP3[4:0] 0x0e */ |
1235 | .atv_mn = { .if_freq = 5400, .fm_rfn = 0, .agc_mode = 1, .std = 4 }, | 1235 | .atv_mn = { .if_freq = 5400, .fm_rfn = 0, .if_lvl = 0, |
1236 | /* EP3[4:0] 0x0c */ | 1236 | .agc_mode = 1, .std = 4 }, /* EP3[4:0] 0x0c */ |
1237 | .atsc_6 = { .if_freq = 3250, .fm_rfn = 0, .agc_mode = 3, .std = 4 }, | 1237 | .atsc_6 = { .if_freq = 3250, .fm_rfn = 0, .if_lvl = 1, |
1238 | /* EP3[4:0] 0x1c */ | 1238 | .agc_mode = 3, .std = 4 }, /* EP3[4:0] 0x1c */ |
1239 | .dvbt_6 = { .if_freq = 3300, .fm_rfn = 0, .agc_mode = 3, .std = 4 }, | 1239 | .dvbt_6 = { .if_freq = 3300, .fm_rfn = 0, .if_lvl = 1, |
1240 | /* EP3[4:0] 0x1c */ | 1240 | .agc_mode = 3, .std = 4 }, /* EP3[4:0] 0x1c */ |
1241 | .dvbt_7 = { .if_freq = 3500, .fm_rfn = 0, .agc_mode = 3, .std = 4 }, | 1241 | .dvbt_7 = { .if_freq = 3500, .fm_rfn = 0, .if_lvl = 1, |
1242 | /* EP3[4:0] 0x1c */ | 1242 | .agc_mode = 3, .std = 4 }, /* EP3[4:0] 0x1c */ |
1243 | .dvbt_8 = { .if_freq = 4000, .fm_rfn = 0, .agc_mode = 3, .std = 5 }, | 1243 | .dvbt_8 = { .if_freq = 4000, .fm_rfn = 0, .if_lvl = 1, |
1244 | /* EP3[4:0] 0x1d */ | 1244 | .agc_mode = 3, .std = 5 }, /* EP3[4:0] 0x1d */ |
1245 | .qam_6 = { .if_freq = 4000, .fm_rfn = 0, .agc_mode = 3, .std = 5 }, | 1245 | .qam_6 = { .if_freq = 4000, .fm_rfn = 0, .if_lvl = 1, |
1246 | /* EP3[4:0] 0x1d */ | 1246 | .agc_mode = 3, .std = 5 }, /* EP3[4:0] 0x1d */ |
1247 | .qam_8 = { .if_freq = 5000, .fm_rfn = 0, .agc_mode = 3, .std = 7 }, | 1247 | .qam_8 = { .if_freq = 5000, .fm_rfn = 0, .if_lvl = 1, |
1248 | /* EP3[4:0] 0x1f */ | 1248 | .agc_mode = 3, .std = 7 }, /* EP3[4:0] 0x1f */ |
1249 | }; | 1249 | }; |
1250 | 1250 | ||
1251 | /*---------------------------------------------------------------------*/ | 1251 | /*---------------------------------------------------------------------*/ |
diff --git a/drivers/media/dvb/frontends/tda18271.h b/drivers/media/dvb/frontends/tda18271.h index 3a743b0f0e8b..60d63ba285f8 100644 --- a/drivers/media/dvb/frontends/tda18271.h +++ b/drivers/media/dvb/frontends/tda18271.h | |||
@@ -33,6 +33,8 @@ struct tda18271_std_map_item { | |||
33 | unsigned int std:3; | 33 | unsigned int std:3; |
34 | /* EP4[7] */ | 34 | /* EP4[7] */ |
35 | unsigned int fm_rfn:1; | 35 | unsigned int fm_rfn:1; |
36 | /* EP4[4:2] */ | ||
37 | unsigned int if_lvl:3; | ||
36 | }; | 38 | }; |
37 | 39 | ||
38 | struct tda18271_std_map { | 40 | struct tda18271_std_map { |