From: Markus Rechberger Date: Tue, 7 Feb 2006 08:38:24 +0000 (-0200) Subject: V4L/DVB (3281): Added signal detection support to tvp5150 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=19d7509c0531b0e08f52ab93070569e0aba54cdf;p=linux-beck.git V4L/DVB (3281): Added signal detection support to tvp5150 - added signal detection support to tvp5150 Signed-off-by: Markus Rechberger Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/media/video/tvp5150.c b/drivers/media/video/tvp5150.c index 20e63593e441..3ae8a9ff5b13 100644 --- a/drivers/media/video/tvp5150.c +++ b/drivers/media/video/tvp5150.c @@ -967,6 +967,17 @@ static int tvp5150_command(struct i2c_client *c, } case DECODER_GET_STATUS: { + 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; }