summaryrefslogtreecommitdiff
path: root/linux/drivers/media/dvb/frontends/tda18271-fe.c
diff options
context:
space:
mode:
authorMichael Krufky <mkrufky@linuxtv.org>2008-03-16 22:36:48 -0400
committerMichael Krufky <mkrufky@linuxtv.org>2008-03-16 22:36:48 -0400
commitb1fad223c39000c4e5e8be80928035406ae8ccce (patch)
treebcde3a3f4285862e056db70782978d7a3e0152ff /linux/drivers/media/dvb/frontends/tda18271-fe.c
parentc4f93765eb27e12c33bd7a439b90753b1a0a2406 (diff)
downloadmediapointer-dvb-s2-b1fad223c39000c4e5e8be80928035406ae8ccce.tar.gz
mediapointer-dvb-s2-b1fad223c39000c4e5e8be80928035406ae8ccce.tar.bz2
tda18271: store agc_mode configuration independently of std_bits
From: Michael Krufky <mkrufky@linuxtv.org> Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Diffstat (limited to 'linux/drivers/media/dvb/frontends/tda18271-fe.c')
-rw-r--r--linux/drivers/media/dvb/frontends/tda18271-fe.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/linux/drivers/media/dvb/frontends/tda18271-fe.c b/linux/drivers/media/dvb/frontends/tda18271-fe.c
index 31d495645..7d1d13f22 100644
--- a/linux/drivers/media/dvb/frontends/tda18271-fe.c
+++ b/linux/drivers/media/dvb/frontends/tda18271-fe.c
@@ -49,7 +49,7 @@ static int tda18271_channel_configuration(struct dvb_frontend *fe,
/* set standard */
regs[R_EP3] &= ~0x1f; /* clear std bits */
- regs[R_EP3] |= map->std_bits;
+ regs[R_EP3] |= (map->agc_mode << 3) | map->std;
/* set cal mode to normal */
regs[R_EP4] &= ~0x03;
@@ -755,8 +755,8 @@ static int tda18271_tune(struct dvb_frontend *fe,
{
struct tda18271_priv *priv = fe->tuner_priv;
- tda_dbg("freq = %d, ifc = %d, bw = %d, std = 0x%02x\n",
- freq, map->if_freq, bw, map->std_bits);
+ tda_dbg("freq = %d, ifc = %d, bw = %d, agc_mode = %d, std = %d\n",
+ freq, map->if_freq, bw, map->agc_mode, map->std);
tda18271_init(fe);
@@ -951,15 +951,17 @@ static int tda18271_get_bandwidth(struct dvb_frontend *fe, u32 *bandwidth)
/* ------------------------------------------------------------------ */
#define tda18271_update_std(std_cfg, name) do { \
- if (map->std_cfg.if_freq + map->std_cfg.std_bits > 0) { \
+ if (map->std_cfg.if_freq + \
+ map->std_cfg.agc_mode + map->std_cfg.std > 0) { \
tda_dbg("Using custom std config for %s\n", name); \
memcpy(&std->std_cfg, &map->std_cfg, \
sizeof(struct tda18271_std_map_item)); \
} } while (0)
#define tda18271_dump_std_item(std_cfg, name) do { \
- tda_dbg("(%s) if freq = %d, std bits = 0x%02x\n", \
- name, std->std_cfg.if_freq, std->std_cfg.std_bits); \
+ tda_dbg("(%s) if freq = %d, agc_mode = %d, std = %d\n", \
+ name, std->std_cfg.if_freq, \
+ std->std_cfg.agc_mode, std->std_cfg.std); \
} while (0)
static int tda18271_dump_std_map(struct dvb_frontend *fe)