summaryrefslogtreecommitdiff
path: root/linux
diff options
context:
space:
mode:
Diffstat (limited to 'linux')
-rw-r--r--linux/drivers/media/video/tvp5150.c47
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;
}