Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 261256
b: refs/heads/master
c: e75873c
h: refs/heads/master
v: v3
  • Loading branch information
Istvan Varga authored and Mauro Carvalho Chehab committed Jul 27, 2011
1 parent beeefa7 commit 1ee793a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 11 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 818a1776a45c230c4f230c8e4e2d0c7bdf5f8fa3
refs/heads/master: e75873c1f80380f190d0270fec566410f59c4829
19 changes: 9 additions & 10 deletions trunk/drivers/media/common/tuners/xc4000.c
Original file line number Diff line number Diff line change
Expand Up @@ -516,12 +516,10 @@ static u16 WaitForLock(struct xc4000_priv *priv)
return lockState;
}

#define XC_TUNE_ANALOG 0
#define XC_TUNE_DIGITAL 1
static int xc_tune_channel(struct xc4000_priv *priv, u32 freq_hz, int mode)
static int xc_tune_channel(struct xc4000_priv *priv, u32 freq_hz)
{
int found = 0;
int result = 0;
int found = 1;
int result;

dprintk(1, "%s(%u)\n", __func__, freq_hz);

Expand All @@ -533,9 +531,10 @@ static int xc_tune_channel(struct xc4000_priv *priv, u32 freq_hz, int mode)
if (result != XC_RESULT_SUCCESS)
return 0;

if (mode == XC_TUNE_ANALOG) {
if (WaitForLock(priv) == 1)
found = 1;
/* wait for lock only in analog TV mode */
if ((priv->cur_fw.type & (FM | DTV6 | DTV7 | DTV78 | DTV8)) == 0) {
if (WaitForLock(priv) != 1)
found = 0;
}

/* Wait for stats to stabilize.
Expand Down Expand Up @@ -1269,7 +1268,7 @@ static int xc4000_set_params(struct dvb_frontend *fe,
}
}

xc_tune_channel(priv, priv->freq_hz, XC_TUNE_DIGITAL);
xc_tune_channel(priv, priv->freq_hz);

ret = 0;

Expand Down Expand Up @@ -1468,7 +1467,7 @@ static int xc4000_set_analog_params(struct dvb_frontend *fe,
}
}

xc_tune_channel(priv, priv->freq_hz, XC_TUNE_ANALOG);
xc_tune_channel(priv, priv->freq_hz);

ret = 0;

Expand Down

0 comments on commit 1ee793a

Please sign in to comment.