From 70b6934a6c6b5f242a42978f3c5e4f45d476dddb Mon Sep 17 00:00:00 2001 From: "Nickolay V. Shmyrev" Date: Tue, 8 Nov 2005 21:36:50 -0800 Subject: [PATCH] [PATCH] v4l: 691: set if of tda8275 according to tv norm - Set IF of tda8275 according to tv norm. Signed-off-by: Nickolay V. Shmyrev Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- drivers/media/video/tda8290.c | 21 ++++++++++++++------- include/media/tuner.h | 1 + 2 files changed, 15 insertions(+), 7 deletions(-) diff --git a/drivers/media/video/tda8290.c b/drivers/media/video/tda8290.c index 61268f8..1e2acc4 100644 --- a/drivers/media/video/tda8290.c +++ b/drivers/media/video/tda8290.c @@ -181,18 +181,25 @@ 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) @@ -200,7 +207,7 @@ 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); } diff --git a/include/media/tuner.h b/include/media/tuner.h index bf92570..97e16bd 100644 --- a/include/media/tuner.h +++ b/include/media/tuner.h @@ -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); -- 2.7.4