diff options
author | Hans Verkuil <hverkuil@xs4all.nl> | 2009-04-02 10:26:22 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2009-04-06 20:44:27 -0400 |
commit | 5325b4272a53b43f55b82cc369c310c2fcacdca1 (patch) | |
tree | f2a1491de3d05901152e0e271c0cb5ce381884c2 /drivers/media/video/zoran | |
parent | c0ff29150d37615ac703802ab3edc775fd402491 (diff) |
V4L/DVB (11380): v4l2-subdev: change s_routing prototype
It is no longer needed to use a struct pointer as argument, since v4l2_subdev
doesn't require that ioctl-like approach anymore. Instead just pass the input,
output and config (new!) arguments directly.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/zoran')
-rw-r--r-- | drivers/media/video/zoran/zoran_card.c | 4 | ||||
-rw-r--r-- | drivers/media/video/zoran/zoran_device.c | 20 | ||||
-rw-r--r-- | drivers/media/video/zoran/zoran_driver.c | 20 |
3 files changed, 14 insertions, 30 deletions
diff --git a/drivers/media/video/zoran/zoran_card.c b/drivers/media/video/zoran/zoran_card.c index 1ef70b090c4c..ea6c577b0eb3 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) | |||
1087 | detect_guest_activity(zr); | 1087 | detect_guest_activity(zr); |
1088 | test_interrupts(zr); | 1088 | test_interrupts(zr); |
1089 | if (!pass_through) { | 1089 | if (!pass_through) { |
1090 | struct v4l2_routing route = { 2, 0 }; | ||
1091 | |||
1092 | decoder_call(zr, video, s_stream, 0); | 1090 | decoder_call(zr, video, s_stream, 0); |
1093 | encoder_call(zr, video, s_routing, &route); | 1091 | encoder_call(zr, video, s_routing, 2, 0, 0); |
1094 | } | 1092 | } |
1095 | 1093 | ||
1096 | zr->zoran_proc = NULL; | 1094 | zr->zoran_proc = NULL; |
diff --git a/drivers/media/video/zoran/zoran_device.c b/drivers/media/video/zoran/zoran_device.c index 25e565f0502a..f6c2fb4fc3b4 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, | |||
971 | struct vfe_settings cap; | 971 | struct vfe_settings cap; |
972 | int field_size = | 972 | int field_size = |
973 | zr->jpg_buffers.buffer_size / zr->jpg_settings.field_per_buff; | 973 | zr->jpg_buffers.buffer_size / zr->jpg_settings.field_per_buff; |
974 | struct v4l2_routing route = { 0, 0 }; | ||
975 | 974 | ||
976 | zr->codec_mode = mode; | 975 | zr->codec_mode = mode; |
977 | 976 | ||
@@ -994,8 +993,7 @@ zr36057_enable_jpg (struct zoran *zr, | |||
994 | */ | 993 | */ |
995 | set_videobus_dir(zr, 0); | 994 | set_videobus_dir(zr, 0); |
996 | decoder_call(zr, video, s_stream, 1); | 995 | decoder_call(zr, video, s_stream, 1); |
997 | route.input = 0; | 996 | encoder_call(zr, video, s_routing, 0, 0, 0); |
998 | encoder_call(zr, video, s_routing, &route); | ||
999 | 997 | ||
1000 | /* Take the JPEG codec and the VFE out of sleep */ | 998 | /* Take the JPEG codec and the VFE out of sleep */ |
1001 | jpeg_codec_sleep(zr, 0); | 999 | jpeg_codec_sleep(zr, 0); |
@@ -1043,8 +1041,7 @@ zr36057_enable_jpg (struct zoran *zr, | |||
1043 | */ | 1041 | */ |
1044 | decoder_call(zr, video, s_stream, 0); | 1042 | decoder_call(zr, video, s_stream, 0); |
1045 | set_videobus_dir(zr, 1); | 1043 | set_videobus_dir(zr, 1); |
1046 | route.input = 1; | 1044 | encoder_call(zr, video, s_routing, 1, 0, 0); |
1047 | encoder_call(zr, video, s_routing, &route); | ||
1048 | 1045 | ||
1049 | /* Take the JPEG codec and the VFE out of sleep */ | 1046 | /* Take the JPEG codec and the VFE out of sleep */ |
1050 | jpeg_codec_sleep(zr, 0); | 1047 | jpeg_codec_sleep(zr, 0); |
@@ -1089,8 +1086,7 @@ zr36057_enable_jpg (struct zoran *zr, | |||
1089 | zr36057_adjust_vfe(zr, mode); | 1086 | zr36057_adjust_vfe(zr, mode); |
1090 | 1087 | ||
1091 | decoder_call(zr, video, s_stream, 1); | 1088 | decoder_call(zr, video, s_stream, 1); |
1092 | route.input = 0; | 1089 | encoder_call(zr, video, s_routing, 0, 0, 0); |
1093 | encoder_call(zr, video, s_routing, &route); | ||
1094 | 1090 | ||
1095 | dprintk(2, KERN_INFO "%s: enable_jpg(IDLE)\n", ZR_DEVNAME(zr)); | 1091 | dprintk(2, KERN_INFO "%s: enable_jpg(IDLE)\n", ZR_DEVNAME(zr)); |
1096 | break; | 1092 | break; |
@@ -1571,8 +1567,6 @@ zoran_set_pci_master (struct zoran *zr, | |||
1571 | void | 1567 | void |
1572 | zoran_init_hardware (struct zoran *zr) | 1568 | zoran_init_hardware (struct zoran *zr) |
1573 | { | 1569 | { |
1574 | struct v4l2_routing route = { 0, 0 }; | ||
1575 | |||
1576 | /* Enable bus-mastering */ | 1570 | /* Enable bus-mastering */ |
1577 | zoran_set_pci_master(zr, 1); | 1571 | zoran_set_pci_master(zr, 1); |
1578 | 1572 | ||
@@ -1581,16 +1575,14 @@ zoran_init_hardware (struct zoran *zr) | |||
1581 | zr->card.init(zr); | 1575 | zr->card.init(zr); |
1582 | } | 1576 | } |
1583 | 1577 | ||
1584 | route.input = zr->card.input[zr->input].muxsel; | ||
1585 | |||
1586 | decoder_call(zr, core, init, 0); | 1578 | decoder_call(zr, core, init, 0); |
1587 | decoder_call(zr, core, s_std, zr->norm); | 1579 | decoder_call(zr, core, s_std, zr->norm); |
1588 | decoder_call(zr, video, s_routing, &route); | 1580 | decoder_call(zr, video, s_routing, |
1581 | zr->card.input[zr->input].muxsel, 0, 0); | ||
1589 | 1582 | ||
1590 | encoder_call(zr, core, init, 0); | 1583 | encoder_call(zr, core, init, 0); |
1591 | encoder_call(zr, video, s_std_output, zr->norm); | 1584 | encoder_call(zr, video, s_std_output, zr->norm); |
1592 | route.input = 0; | 1585 | encoder_call(zr, video, s_routing, 0, 0, 0); |
1593 | encoder_call(zr, video, s_routing, &route); | ||
1594 | 1586 | ||
1595 | /* toggle JPEG codec sleep to sync PLL */ | 1587 | /* toggle JPEG codec sleep to sync PLL */ |
1596 | jpeg_codec_sleep(zr, 1); | 1588 | jpeg_codec_sleep(zr, 1); |
diff --git a/drivers/media/video/zoran/zoran_driver.c b/drivers/media/video/zoran/zoran_driver.c index 979e8d0e80f5..092333b1c34f 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) | |||
1018 | zoran_set_pci_master(zr, 0); | 1018 | zoran_set_pci_master(zr, 0); |
1019 | 1019 | ||
1020 | if (!pass_through) { /* Switch to color bar */ | 1020 | if (!pass_through) { /* Switch to color bar */ |
1021 | struct v4l2_routing route = { 2, 0 }; | ||
1022 | |||
1023 | decoder_call(zr, video, s_stream, 0); | 1021 | decoder_call(zr, video, s_stream, 0); |
1024 | encoder_call(zr, video, s_routing, &route); | 1022 | encoder_call(zr, video, s_routing, 2, 0, 0); |
1025 | } | 1023 | } |
1026 | } | 1024 | } |
1027 | 1025 | ||
@@ -1496,8 +1494,6 @@ static int | |||
1496 | zoran_set_input (struct zoran *zr, | 1494 | zoran_set_input (struct zoran *zr, |
1497 | int input) | 1495 | int input) |
1498 | { | 1496 | { |
1499 | struct v4l2_routing route = { 0, 0 }; | ||
1500 | |||
1501 | if (input == zr->input) { | 1497 | if (input == zr->input) { |
1502 | return 0; | 1498 | return 0; |
1503 | } | 1499 | } |
@@ -1519,10 +1515,10 @@ zoran_set_input (struct zoran *zr, | |||
1519 | return -EINVAL; | 1515 | return -EINVAL; |
1520 | } | 1516 | } |
1521 | 1517 | ||
1522 | route.input = zr->card.input[input].muxsel; | ||
1523 | zr->input = input; | 1518 | zr->input = input; |
1524 | 1519 | ||
1525 | decoder_call(zr, video, s_routing, &route); | 1520 | decoder_call(zr, video, s_routing, |
1521 | zr->card.input[input].muxsel, 0, 0); | ||
1526 | 1522 | ||
1527 | return 0; | 1523 | return 0; |
1528 | } | 1524 | } |
@@ -1748,7 +1744,6 @@ jpgreqbuf_unlock_and_return: | |||
1748 | case BUZIOC_G_STATUS: | 1744 | case BUZIOC_G_STATUS: |
1749 | { | 1745 | { |
1750 | struct zoran_status *bstat = arg; | 1746 | struct zoran_status *bstat = arg; |
1751 | struct v4l2_routing route = { 0, 0 }; | ||
1752 | int status = 0, res = 0; | 1747 | int status = 0, res = 0; |
1753 | v4l2_std_id norm; | 1748 | v4l2_std_id norm; |
1754 | 1749 | ||
@@ -1762,8 +1757,6 @@ jpgreqbuf_unlock_and_return: | |||
1762 | return -EINVAL; | 1757 | return -EINVAL; |
1763 | } | 1758 | } |
1764 | 1759 | ||
1765 | route.input = zr->card.input[bstat->input].muxsel; | ||
1766 | |||
1767 | mutex_lock(&zr->resource_lock); | 1760 | mutex_lock(&zr->resource_lock); |
1768 | 1761 | ||
1769 | if (zr->codec_mode != BUZ_MODE_IDLE) { | 1762 | if (zr->codec_mode != BUZ_MODE_IDLE) { |
@@ -1775,7 +1768,8 @@ jpgreqbuf_unlock_and_return: | |||
1775 | goto gstat_unlock_and_return; | 1768 | goto gstat_unlock_and_return; |
1776 | } | 1769 | } |
1777 | 1770 | ||
1778 | decoder_call(zr, video, s_routing, &route); | 1771 | decoder_call(zr, video, s_routing, |
1772 | zr->card.input[bstat->input].muxsel, 0, 0); | ||
1779 | 1773 | ||
1780 | /* sleep 1 second */ | 1774 | /* sleep 1 second */ |
1781 | ssleep(1); | 1775 | ssleep(1); |
@@ -1785,8 +1779,8 @@ jpgreqbuf_unlock_and_return: | |||
1785 | decoder_call(zr, video, g_input_status, &status); | 1779 | decoder_call(zr, video, g_input_status, &status); |
1786 | 1780 | ||
1787 | /* restore previous input and norm */ | 1781 | /* restore previous input and norm */ |
1788 | route.input = zr->card.input[zr->input].muxsel; | 1782 | decoder_call(zr, video, s_routing, |
1789 | decoder_call(zr, video, s_routing, &route); | 1783 | zr->card.input[zr->input].muxsel, 0, 0); |
1790 | gstat_unlock_and_return: | 1784 | gstat_unlock_and_return: |
1791 | mutex_unlock(&zr->resource_lock); | 1785 | mutex_unlock(&zr->resource_lock); |
1792 | 1786 | ||