From: Markus Rechberger Date: Tue, 7 Feb 2006 08:25:42 +0000 (-0200) Subject: V4L/DVB (3281): Added signal detection support to tvp5150 X-Git-Tag: v2.6.16-rc3~135^2^2~13 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ac2523014234004413c252e1aa9c12774b7a502d;p=linux-2.6 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 a6330a351e..1864423b30 100644 --- a/drivers/media/video/tvp5150.c +++ b/drivers/media/video/tvp5150.c @@ -896,6 +896,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; }