summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDevin Heitmueller <dheitmueller@linuxtv.org>2009-03-11 02:00:58 -0400
committerDevin Heitmueller <dheitmueller@linuxtv.org>2009-03-11 02:00:58 -0400
commit66833094069d442ee8db6a6a95d59c6598335302 (patch)
treea6d6ab73d20407ceae330da6b7c95018ced2bab2
parentbfd1ef181a59f27524db364c847f27957694de75 (diff)
downloadmediapointer-dvb-s2-66833094069d442ee8db6a6a95d59c6598335302.tar.gz
mediapointer-dvb-s2-66833094069d442ee8db6a6a95d59c6598335302.tar.bz2
au0828: make g_chip_ident call work properly
From: Devin Heitmueller <dheitmueller@linuxtv.org> Make the g_chip_ident call work for the au0828/au8522. Discovered when testing with the v4l2_compliance tool Priority: normal Signed-off-by: Devin Heitmueller <dheitmueller@linuxtv.org> Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
-rw-r--r--linux/drivers/media/video/au0828/au0828-video.c8
-rw-r--r--linux/drivers/media/video/au8522_decoder.c1
-rw-r--r--linux/include/media/v4l2-chip-ident.h3
3 files changed, 12 insertions, 0 deletions
diff --git a/linux/drivers/media/video/au0828/au0828-video.c b/linux/drivers/media/video/au0828/au0828-video.c
index b675df838..ae6dac3f2 100644
--- a/linux/drivers/media/video/au0828/au0828-video.c
+++ b/linux/drivers/media/video/au0828/au0828-video.c
@@ -1352,7 +1352,15 @@ static int vidioc_g_chip_ident(struct file *file, void *priv,
chip->ident = V4L2_IDENT_NONE;
chip->revision = 0;
+ if (v4l2_chip_match_host(&chip->match)) {
+ chip->ident = V4L2_IDENT_AU0828;
+ return 0;
+ }
+
au0828_call_i2c_clients(dev, VIDIOC_DBG_G_CHIP_IDENT, chip);
+ if (chip->ident == V4L2_IDENT_NONE)
+ return -EINVAL;
+
return 0;
}
diff --git a/linux/drivers/media/video/au8522_decoder.c b/linux/drivers/media/video/au8522_decoder.c
index 556b012fc..93f119508 100644
--- a/linux/drivers/media/video/au8522_decoder.c
+++ b/linux/drivers/media/video/au8522_decoder.c
@@ -637,6 +637,7 @@ static int au8522_queryctrl(struct v4l2_subdev *sd, struct v4l2_queryctrl *qc)
break;
}
+ qc->type = 0;
return -EINVAL;
}
diff --git a/linux/include/media/v4l2-chip-ident.h b/linux/include/media/v4l2-chip-ident.h
index 43684f105..ca2aa6d7e 100644
--- a/linux/include/media/v4l2-chip-ident.h
+++ b/linux/include/media/v4l2-chip-ident.h
@@ -70,6 +70,9 @@ enum {
V4L2_IDENT_CX23416 = 416,
V4L2_IDENT_CX23418 = 418,
+ /* module au0828 */
+ V4L2_IDENT_AU0828 = 828,
+
/* module indycam: just ident 2000 */
V4L2_IDENT_INDYCAM = 2000,