Skip to content

Commit

Permalink
[media] r820t: use the right IF for the selected TV standard
Browse files Browse the repository at this point in the history
IF is set at r820t_set_tv_standard(). So, we can't calculate
LO frequency before calling it.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Tested-by: Antti Palosaari <crope@iki.fi>
  • Loading branch information
Mauro Carvalho Chehab committed Apr 17, 2013
1 parent fa4bfd2 commit a7dd065
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions drivers/media/tuners/r820t.c
Original file line number Diff line number Diff line change
Expand Up @@ -1193,15 +1193,15 @@ static int generic_set_freq(struct dvb_frontend *fe,
tuner_dbg("should set frequency to %d kHz, bw %d MHz\n",
freq / 1000, bw);

rc = r820t_set_tv_standard(priv, bw, type, std, delsys);
if (rc < 0)
goto err;

if ((type == V4L2_TUNER_ANALOG_TV) && (std == V4L2_STD_SECAM_LC))
lo_freq = freq - priv->int_freq;
else
lo_freq = freq + priv->int_freq;

rc = r820t_set_tv_standard(priv, bw, type, std, delsys);
if (rc < 0)
goto err;

rc = r820t_set_mux(priv, lo_freq);
if (rc < 0)
goto err;
Expand Down

0 comments on commit a7dd065

Please sign in to comment.