diff options
author | Markus Rechberger <mrechberger@gmail.com> | 2006-01-31 07:49:30 +0100 |
---|---|---|
committer | Markus Rechberger <mrechberger@gmail.com> | 2006-01-31 07:49:30 +0100 |
commit | 3c4275835ab5235f19f956b4f25e86bb4eef6437 (patch) | |
tree | 7d98c9d89db75cf9878d924640f2d32bce142e48 /linux/drivers/media | |
parent | e338006ad87acfb632319deb4cdbd4797b771b9a (diff) | |
download | mediapointer-dvb-s2-3c4275835ab5235f19f956b4f25e86bb4eef6437.tar.gz mediapointer-dvb-s2-3c4275835ab5235f19f956b4f25e86bb4eef6437.tar.bz2 |
added signal detection support to tvp5150
From: Markus Rechberger <mrechberger@gmail.com>
added signal detection support to tvp5150
Signed-off-by: Markus Rechberger <mrechberger@gmail.com>
Diffstat (limited to 'linux/drivers/media')
-rw-r--r-- | linux/drivers/media/video/tvp5150.c | 47 |
1 files changed, 11 insertions, 36 deletions
diff --git a/linux/drivers/media/video/tvp5150.c b/linux/drivers/media/video/tvp5150.c index 701190ea9..97ca4bfbc 100644 --- a/linux/drivers/media/video/tvp5150.c +++ b/linux/drivers/media/video/tvp5150.c @@ -1063,42 +1063,17 @@ static int tvp5150_command(struct i2c_client *c, } case DECODER_GET_STATUS: { -#if 0 - int *iarg = arg; - int status; - int res; - - status = saa7113_read(c, 0x1f); - tvp5150_dbg(1,"%s status: 0x%02x\n", - I2C_NAME(c), status); - res = 0; - if ((status & (1 << 6)) == 0) { - res |= DECODER_STATUS_GOOD; - } - switch (decoder->norm) { - case VIDEO_MODE_NTSC: - res |= DECODER_STATUS_NTSC; - break; - case VIDEO_MODE_PAL: - res |= DECODER_STATUS_PAL; - break; - case VIDEO_MODE_SECAM: - res |= DECODER_STATUS_SECAM; - break; - default: - case VIDEO_MODE_AUTO: - if ((status & (1 << 5)) != 0) { - res |= DECODER_STATUS_NTSC; - } else { - res |= DECODER_STATUS_PAL; - } - break; - } - if ((status & (1 << 0)) != 0) { - res |= DECODER_STATUS_COLOR; - } - *iarg = res; -#endif + int *iarg = arg; + int status; + int res=0; + status = tvp5150_read(c, 0x88); + if(status&0x08){ + res |= DECODER_STATUS_COLOR; + } + if(status&0x04 && status&0x02){ + res |= DECODER_STATUS_GOOD; + } + *iarg=res; break; } |