summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video/bt819.c
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@redhat.com>2009-03-13 20:00:50 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2009-03-13 20:00:50 -0300
commiteb97af7a1c842f6958f57fe8f9dbd93471d17948 (patch)
treeaab8522fdbd5a23c8fc7b0a8a27d2354b4258022 /linux/drivers/media/video/bt819.c
parentbd5114e836d5c39563589881b3d9da0cf06624f1 (diff)
parent70e434a0770289c85c4cf61a2956160e24d76bcf (diff)
downloadmediapointer-dvb-s2-eb97af7a1c842f6958f57fe8f9dbd93471d17948.tar.gz
mediapointer-dvb-s2-eb97af7a1c842f6958f57fe8f9dbd93471d17948.tar.bz2
merge: http://www.linuxtv.org/hg/~hverkuil/v4l-dvb-notify
From: Mauro Carvalho Chehab <mchehab@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'linux/drivers/media/video/bt819.c')
-rw-r--r--linux/drivers/media/video/bt819.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/linux/drivers/media/video/bt819.c b/linux/drivers/media/video/bt819.c
index 9f9596c7c..ea4d0fbc4 100644
--- a/linux/drivers/media/video/bt819.c
+++ b/linux/drivers/media/video/bt819.c
@@ -32,13 +32,14 @@
#include <linux/types.h>
#include <linux/ioctl.h>
#include <linux/delay.h>
-#include <asm/uaccess.h>
+#include <linux/uaccess.h>
#include <linux/i2c.h>
#include <linux/i2c-id.h>
#include <linux/videodev2.h>
#include <media/v4l2-device.h>
#include <media/v4l2-chip-ident.h>
#include <media/v4l2-i2c-drv.h>
+#include <media/bt819.h>
#include "compat.h"
MODULE_DESCRIPTION("Brooktree-819 video decoder driver");
@@ -256,7 +257,11 @@ static int bt819_s_std(struct v4l2_subdev *sd, v4l2_std_id std)
v4l2_dbg(1, debug, sd, "set norm %llx\n", (unsigned long long)std);
+ if (sd->v4l2_dev == NULL || sd->v4l2_dev->notify == NULL)
+ v4l2_err(sd, "no notify found!\n");
+
if (std & V4L2_STD_NTSC) {
+ v4l2_subdev_notify(sd, BT819_FIFO_RESET_LOW, 0);
bt819_setbit(decoder, 0x01, 0, 1);
bt819_setbit(decoder, 0x01, 1, 0);
bt819_setbit(decoder, 0x01, 5, 0);
@@ -265,6 +270,7 @@ static int bt819_s_std(struct v4l2_subdev *sd, v4l2_std_id std)
/* bt819_setbit(decoder, 0x1a, 5, 1); */
timing = &timing_data[1];
} else if (std & V4L2_STD_PAL) {
+ v4l2_subdev_notify(sd, BT819_FIFO_RESET_LOW, 0);
bt819_setbit(decoder, 0x01, 0, 1);
bt819_setbit(decoder, 0x01, 1, 1);
bt819_setbit(decoder, 0x01, 5, 1);
@@ -289,6 +295,7 @@ static int bt819_s_std(struct v4l2_subdev *sd, v4l2_std_id std)
bt819_write(decoder, 0x08, (timing->hscale >> 8) & 0xff);
bt819_write(decoder, 0x09, timing->hscale & 0xff);
decoder->norm = std;
+ v4l2_subdev_notify(sd, BT819_FIFO_RESET_HIGH, 0);
return 0;
}
@@ -301,7 +308,11 @@ static int bt819_s_routing(struct v4l2_subdev *sd, const struct v4l2_routing *ro
if (route->input < 0 || route->input > 7)
return -EINVAL;
+ if (sd->v4l2_dev == NULL || sd->v4l2_dev->notify == NULL)
+ v4l2_err(sd, "no notify found!\n");
+
if (decoder->input != route->input) {
+ v4l2_subdev_notify(sd, BT819_FIFO_RESET_LOW, 0);
decoder->input = route->input;
/* select mode */
if (decoder->input == 0) {
@@ -311,6 +322,7 @@ static int bt819_s_routing(struct v4l2_subdev *sd, const struct v4l2_routing *ro
bt819_setbit(decoder, 0x0b, 6, 1);
bt819_setbit(decoder, 0x1a, 1, 0);
}
+ v4l2_subdev_notify(sd, BT819_FIFO_RESET_HIGH, 0);
}
return 0;
}