aboutsummaryrefslogtreecommitdiff
path: root/drivers/media/video/zoran
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2009-04-06 18:08:58 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2009-04-06 18:11:41 -0700
commit4ef4327b30957a16619ac7d47c749465e62de8c3 (patch)
tree5c80e853f0d9eadd01b2019d03d2432334393c5e /drivers/media/video/zoran
parent3989203290fba6fdf6bc4825fbf6526e1bf17977 (diff)
parenta938b8c5be8fe5c28800c9cef4aa43d569aa57a8 (diff)
Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6
* 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6: (120 commits) cx231xx: Convert to snd_card_create() V4L/DVB (11440): PWC: fix build error when CONFIG_INPUT=m V4L/DVB (11439): UVC: uvc_status_cleanup(): undefined reference to `input_unregister_device' V4L/DVB (11438): au0828: fix Kconfig dependance V4L/DVB (11437): pvrusb2: Drop client_register/unregister stubs V4L/DVB (11436): radio-mr800: convert to to v4l2_device V4L/DVB (11435): dsbr100 radio: convert to to v4l2_device V4L/DVB: zr364xx: remove unused #include <version.h> V4L/DVB: usbvision: remove unused #include <version.h> V4L/DVB (11427): gspca - m5602: Minor cleanups V4L/DVB (11426): gspca - m5602: Don't touch hflip/vflip register on Read/Modify/Write V4L/DVB (11425): gspca - m5602: Move the vflip quirk to probe stage. V4L/DVB (11424): gspca - m5602-ov9650: Use the local ctrl cache. Adjust image on vflip. V4L/DVB (11423): gspca - m5602-ov9650: Add a disconnect hook, setup a ctrl cache ctrl. V4L/DVB (11422): gspca - m5602-ov9650: Replace a magic constant with a define V4L/DVB (11421): gspca - m5602-ov9650: Synthesize modesetting. V4L/DVB (11420): gspca - m5602: Improve error handling in the ov9650 driver V4L/DVB (11419): gspca - m5602-ov9650: Don't read exposure data from COM1. V4L/DVB (11418): gspca - m5602-ov9650: Auto white balancing is on by default V4L/DVB (11417): gspca - m5602-ov9650: Autogain is on by default ...
Diffstat (limited to 'drivers/media/video/zoran')
-rw-r--r--drivers/media/video/zoran/zoran.h4
-rw-r--r--drivers/media/video/zoran/zoran_card.c12
-rw-r--r--drivers/media/video/zoran/zoran_device.c22
-rw-r--r--drivers/media/video/zoran/zoran_driver.c26
4 files changed, 25 insertions, 39 deletions
diff --git a/drivers/media/video/zoran/zoran.h b/drivers/media/video/zoran/zoran.h
index afecf32f1a8..d439c76b27e 100644
--- a/drivers/media/video/zoran/zoran.h
+++ b/drivers/media/video/zoran/zoran.h
@@ -143,8 +143,8 @@ Private IOCTL to set up for displaying MJPEG
#ifdef __KERNEL__
#define MAJOR_VERSION 0 /* driver major version */
-#define MINOR_VERSION 9 /* driver minor version */
-#define RELEASE_VERSION 5 /* release version */
+#define MINOR_VERSION 10 /* driver minor version */
+#define RELEASE_VERSION 0 /* release version */
#define ZORAN_NAME "ZORAN" /* name of the device */
diff --git a/drivers/media/video/zoran/zoran_card.c b/drivers/media/video/zoran/zoran_card.c
index f91bba435ed..ea6c577b0eb 100644
--- a/drivers/media/video/zoran/zoran_card.c
+++ b/drivers/media/video/zoran/zoran_card.c
@@ -1087,10 +1087,8 @@ zr36057_init (struct zoran *zr)
detect_guest_activity(zr);
test_interrupts(zr);
if (!pass_through) {
- struct v4l2_routing route = { 2, 0 };
-
decoder_call(zr, video, s_stream, 0);
- encoder_call(zr, video, s_routing, &route);
+ encoder_call(zr, video, s_routing, 2, 0, 0);
}
zr->zoran_proc = NULL;
@@ -1360,11 +1358,13 @@ static int __devinit zoran_probe(struct pci_dev *pdev,
goto zr_free_irq;
}
- zr->decoder = v4l2_i2c_new_probed_subdev(&zr->i2c_adapter,
- zr->card.mod_decoder, zr->card.i2c_decoder, zr->card.addrs_decoder);
+ zr->decoder = v4l2_i2c_new_probed_subdev(&zr->v4l2_dev,
+ &zr->i2c_adapter, zr->card.mod_decoder, zr->card.i2c_decoder,
+ zr->card.addrs_decoder);
if (zr->card.mod_encoder)
- zr->encoder = v4l2_i2c_new_probed_subdev(&zr->i2c_adapter,
+ zr->encoder = v4l2_i2c_new_probed_subdev(&zr->v4l2_dev,
+ &zr->i2c_adapter,
zr->card.mod_encoder, zr->card.i2c_encoder,
zr->card.addrs_encoder);
diff --git a/drivers/media/video/zoran/zoran_device.c b/drivers/media/video/zoran/zoran_device.c
index e0223deed35..f6c2fb4fc3b 100644
--- a/drivers/media/video/zoran/zoran_device.c
+++ b/drivers/media/video/zoran/zoran_device.c
@@ -971,7 +971,6 @@ zr36057_enable_jpg (struct zoran *zr,
struct vfe_settings cap;
int field_size =
zr->jpg_buffers.buffer_size / zr->jpg_settings.field_per_buff;
- struct v4l2_routing route = { 0, 0 };
zr->codec_mode = mode;
@@ -994,8 +993,7 @@ zr36057_enable_jpg (struct zoran *zr,
*/
set_videobus_dir(zr, 0);
decoder_call(zr, video, s_stream, 1);
- route.input = 0;
- encoder_call(zr, video, s_routing, &route);
+ encoder_call(zr, video, s_routing, 0, 0, 0);
/* Take the JPEG codec and the VFE out of sleep */
jpeg_codec_sleep(zr, 0);
@@ -1043,8 +1041,7 @@ zr36057_enable_jpg (struct zoran *zr,
*/
decoder_call(zr, video, s_stream, 0);
set_videobus_dir(zr, 1);
- route.input = 1;
- encoder_call(zr, video, s_routing, &route);
+ encoder_call(zr, video, s_routing, 1, 0, 0);
/* Take the JPEG codec and the VFE out of sleep */
jpeg_codec_sleep(zr, 0);
@@ -1089,8 +1086,7 @@ zr36057_enable_jpg (struct zoran *zr,
zr36057_adjust_vfe(zr, mode);
decoder_call(zr, video, s_stream, 1);
- route.input = 0;
- encoder_call(zr, video, s_routing, &route);
+ encoder_call(zr, video, s_routing, 0, 0, 0);
dprintk(2, KERN_INFO "%s: enable_jpg(IDLE)\n", ZR_DEVNAME(zr));
break;
@@ -1571,8 +1567,6 @@ zoran_set_pci_master (struct zoran *zr,
void
zoran_init_hardware (struct zoran *zr)
{
- struct v4l2_routing route = { 0, 0 };
-
/* Enable bus-mastering */
zoran_set_pci_master(zr, 1);
@@ -1581,16 +1575,14 @@ zoran_init_hardware (struct zoran *zr)
zr->card.init(zr);
}
- route.input = zr->card.input[zr->input].muxsel;
-
decoder_call(zr, core, init, 0);
- decoder_call(zr, tuner, s_std, zr->norm);
- decoder_call(zr, video, s_routing, &route);
+ decoder_call(zr, core, s_std, zr->norm);
+ decoder_call(zr, video, s_routing,
+ zr->card.input[zr->input].muxsel, 0, 0);
encoder_call(zr, core, init, 0);
encoder_call(zr, video, s_std_output, zr->norm);
- route.input = 0;
- encoder_call(zr, video, s_routing, &route);
+ encoder_call(zr, video, s_routing, 0, 0, 0);
/* toggle JPEG codec sleep to sync PLL */
jpeg_codec_sleep(zr, 1);
diff --git a/drivers/media/video/zoran/zoran_driver.c b/drivers/media/video/zoran/zoran_driver.c
index f16e57cf11e..092333b1c34 100644
--- a/drivers/media/video/zoran/zoran_driver.c
+++ b/drivers/media/video/zoran/zoran_driver.c
@@ -1018,10 +1018,8 @@ zoran_close(struct file *file)
zoran_set_pci_master(zr, 0);
if (!pass_through) { /* Switch to color bar */
- struct v4l2_routing route = { 2, 0 };
-
decoder_call(zr, video, s_stream, 0);
- encoder_call(zr, video, s_routing, &route);
+ encoder_call(zr, video, s_routing, 2, 0, 0);
}
}
@@ -1449,7 +1447,7 @@ zoran_set_norm (struct zoran *zr,
v4l2_std_id std = 0;
decoder_call(zr, video, querystd, &std);
- decoder_call(zr, tuner, s_std, std);
+ decoder_call(zr, core, s_std, std);
/* let changes come into effect */
ssleep(2);
@@ -1461,7 +1459,7 @@ zoran_set_norm (struct zoran *zr,
"%s: %s - no norm detected\n",
ZR_DEVNAME(zr), __func__);
/* reset norm */
- decoder_call(zr, tuner, s_std, zr->norm);
+ decoder_call(zr, core, s_std, zr->norm);
return -EIO;
}
@@ -1480,7 +1478,7 @@ zoran_set_norm (struct zoran *zr,
if (on)
zr36057_overlay(zr, 0);
- decoder_call(zr, tuner, s_std, norm);
+ decoder_call(zr, core, s_std, norm);
encoder_call(zr, video, s_std_output, norm);
if (on)
@@ -1496,8 +1494,6 @@ static int
zoran_set_input (struct zoran *zr,
int input)
{
- struct v4l2_routing route = { 0, 0 };
-
if (input == zr->input) {
return 0;
}
@@ -1519,10 +1515,10 @@ zoran_set_input (struct zoran *zr,
return -EINVAL;
}
- route.input = zr->card.input[input].muxsel;
zr->input = input;
- decoder_call(zr, video, s_routing, &route);
+ decoder_call(zr, video, s_routing,
+ zr->card.input[input].muxsel, 0, 0);
return 0;
}
@@ -1748,7 +1744,6 @@ jpgreqbuf_unlock_and_return:
case BUZIOC_G_STATUS:
{
struct zoran_status *bstat = arg;
- struct v4l2_routing route = { 0, 0 };
int status = 0, res = 0;
v4l2_std_id norm;
@@ -1762,8 +1757,6 @@ jpgreqbuf_unlock_and_return:
return -EINVAL;
}
- route.input = zr->card.input[bstat->input].muxsel;
-
mutex_lock(&zr->resource_lock);
if (zr->codec_mode != BUZ_MODE_IDLE) {
@@ -1775,7 +1768,8 @@ jpgreqbuf_unlock_and_return:
goto gstat_unlock_and_return;
}
- decoder_call(zr, video, s_routing, &route);
+ decoder_call(zr, video, s_routing,
+ zr->card.input[bstat->input].muxsel, 0, 0);
/* sleep 1 second */
ssleep(1);
@@ -1785,8 +1779,8 @@ jpgreqbuf_unlock_and_return:
decoder_call(zr, video, g_input_status, &status);
/* restore previous input and norm */
- route.input = zr->card.input[zr->input].muxsel;
- decoder_call(zr, video, s_routing, &route);
+ decoder_call(zr, video, s_routing,
+ zr->card.input[zr->input].muxsel, 0, 0);
gstat_unlock_and_return:
mutex_unlock(&zr->resource_lock);