Skip to content

Commit

Permalink
[PATCH] v4l: 691: set if of tda8275 according to tv norm
Browse files Browse the repository at this point in the history
- Set IF of tda8275 according to tv norm.

Signed-off-by: Nickolay V. Shmyrev <nshmyrev@yandex.ru>
Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
  • Loading branch information
Nickolay V. Shmyrev authored and Linus Torvalds committed Nov 9, 2005
1 parent 058afaf commit 70b6934
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 7 deletions.
21 changes: 14 additions & 7 deletions drivers/media/video/tda8290.c
Original file line number Diff line number Diff line change
Expand Up @@ -181,26 +181,33 @@ static void set_audio(struct tuner *t)
{
t->i2c_easy_mode[0] = 0x01;

if (t->std & V4L2_STD_MN)
if (t->std & V4L2_STD_MN) {
t->sgIF = 736;
t->i2c_easy_mode[1] = 0x01;
else if (t->std & V4L2_STD_B)
} else if (t->std & V4L2_STD_B) {
t->sgIF = 864;
t->i2c_easy_mode[1] = 0x02;
else if (t->std & V4L2_STD_GH)
} else if (t->std & V4L2_STD_GH) {
t->sgIF = 992;
t->i2c_easy_mode[1] = 0x04;
else if (t->std & V4L2_STD_PAL_I)
} else if (t->std & V4L2_STD_PAL_I) {
t->sgIF = 992;
t->i2c_easy_mode[1] = 0x08;
else if (t->std & V4L2_STD_DK)
} else if (t->std & V4L2_STD_DK) {
t->sgIF = 992;
t->i2c_easy_mode[1] = 0x10;
else if (t->std & V4L2_STD_SECAM_L)
} else if (t->std & V4L2_STD_SECAM_L) {
t->sgIF = 992;
t->i2c_easy_mode[1] = 0x20;
}
}

static void set_tv_freq(struct i2c_client *c, unsigned int freq)
{
struct tuner *t = i2c_get_clientdata(c);

set_audio(t);
set_frequency(t, 864, freq);
set_frequency(t, t->sgIF, freq);
tda8290_tune(c);
}

Expand Down
1 change: 1 addition & 0 deletions include/media/tuner.h
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,7 @@ struct tuner {
/* used by tda8290 */
unsigned char i2c_easy_mode[2];
unsigned char i2c_set_freq[8];
unsigned int sgIF;

/* function ptrs */
void (*tv_freq)(struct i2c_client *c, unsigned int freq);
Expand Down

0 comments on commit 70b6934

Please sign in to comment.