提交 70b6934a 编写于 作者: N Nickolay V. Shmyrev 提交者: Linus Torvalds

[PATCH] v4l: 691: set if of tda8275 according to tv norm

- Set IF of tda8275 according to tv norm.
Signed-off-by: NNickolay V. Shmyrev <nshmyrev@yandex.ru>
Signed-off-by: NMauro Carvalho Chehab <mchehab@brturbo.com.br>
Signed-off-by: NAndrew Morton <akpm@osdl.org>
Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
上级 058afaf8
...@@ -181,18 +181,25 @@ static void set_audio(struct tuner *t) ...@@ -181,18 +181,25 @@ static void set_audio(struct tuner *t)
{ {
t->i2c_easy_mode[0] = 0x01; 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; 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; 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; 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; 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; 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; t->i2c_easy_mode[1] = 0x20;
}
} }
static void set_tv_freq(struct i2c_client *c, unsigned int freq) 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) ...@@ -200,7 +207,7 @@ static void set_tv_freq(struct i2c_client *c, unsigned int freq)
struct tuner *t = i2c_get_clientdata(c); struct tuner *t = i2c_get_clientdata(c);
set_audio(t); set_audio(t);
set_frequency(t, 864, freq); set_frequency(t, t->sgIF, freq);
tda8290_tune(c); tda8290_tune(c);
} }
......
...@@ -191,6 +191,7 @@ struct tuner { ...@@ -191,6 +191,7 @@ struct tuner {
/* used by tda8290 */ /* used by tda8290 */
unsigned char i2c_easy_mode[2]; unsigned char i2c_easy_mode[2];
unsigned char i2c_set_freq[8]; unsigned char i2c_set_freq[8];
unsigned int sgIF;
/* function ptrs */ /* function ptrs */
void (*tv_freq)(struct i2c_client *c, unsigned int freq); void (*tv_freq)(struct i2c_client *c, unsigned int freq);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册