diff options
author | Hans Verkuil <hverkuil@xs4all.nl> | 2006-03-25 08:26:09 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2006-04-02 03:55:01 -0400 |
commit | 31bc09b579f31331545e694d0a49ec4e6b380989 (patch) | |
tree | a05a635820426eac67a8f2ce16e88eb82fc84c57 /drivers/media | |
parent | 11cda1075d8c40e536b77fce6dbf4cdbf8f77736 (diff) |
V4L/DVB (3610): Added the new routing commands to cx25840.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media')
-rw-r--r-- | drivers/media/video/cx25840/cx25840-audio.c | 3 | ||||
-rw-r--r-- | drivers/media/video/cx25840/cx25840-core.c | 24 | ||||
-rw-r--r-- | drivers/media/video/cx25840/cx25840-core.h (renamed from drivers/media/video/cx25840/cx25840.h) | 46 | ||||
-rw-r--r-- | drivers/media/video/cx25840/cx25840-firmware.c | 3 | ||||
-rw-r--r-- | drivers/media/video/cx25840/cx25840-vbi.c | 3 |
5 files changed, 23 insertions, 56 deletions
diff --git a/drivers/media/video/cx25840/cx25840-audio.c b/drivers/media/video/cx25840/cx25840-audio.c index a4540e858f21..9a4b813152e5 100644 --- a/drivers/media/video/cx25840/cx25840-audio.c +++ b/drivers/media/video/cx25840/cx25840-audio.c | |||
@@ -19,8 +19,9 @@ | |||
19 | #include <linux/videodev2.h> | 19 | #include <linux/videodev2.h> |
20 | #include <linux/i2c.h> | 20 | #include <linux/i2c.h> |
21 | #include <media/v4l2-common.h> | 21 | #include <media/v4l2-common.h> |
22 | #include <media/cx25840.h> | ||
22 | 23 | ||
23 | #include "cx25840.h" | 24 | #include "cx25840-core.h" |
24 | 25 | ||
25 | static int set_audclk_freq(struct i2c_client *client, u32 freq) | 26 | static int set_audclk_freq(struct i2c_client *client, u32 freq) |
26 | { | 27 | { |
diff --git a/drivers/media/video/cx25840/cx25840-core.c b/drivers/media/video/cx25840/cx25840-core.c index a65b3cc4bf03..a961bb2ab0fd 100644 --- a/drivers/media/video/cx25840/cx25840-core.c +++ b/drivers/media/video/cx25840/cx25840-core.c | |||
@@ -32,8 +32,9 @@ | |||
32 | #include <linux/videodev2.h> | 32 | #include <linux/videodev2.h> |
33 | #include <linux/i2c.h> | 33 | #include <linux/i2c.h> |
34 | #include <media/v4l2-common.h> | 34 | #include <media/v4l2-common.h> |
35 | #include <media/cx25840.h> | ||
35 | 36 | ||
36 | #include "cx25840.h" | 37 | #include "cx25840-core.h" |
37 | 38 | ||
38 | MODULE_DESCRIPTION("Conexant CX25840 audio/video decoder driver"); | 39 | MODULE_DESCRIPTION("Conexant CX25840 audio/video decoder driver"); |
39 | MODULE_AUTHOR("Ulf Eklund, Chris Kennedy, Hans Verkuil, Tyler Trafford"); | 40 | MODULE_AUTHOR("Ulf Eklund, Chris Kennedy, Hans Verkuil, Tyler Trafford"); |
@@ -668,6 +669,7 @@ static int cx25840_command(struct i2c_client *client, unsigned int cmd, | |||
668 | { | 669 | { |
669 | struct cx25840_state *state = i2c_get_clientdata(client); | 670 | struct cx25840_state *state = i2c_get_clientdata(client); |
670 | struct v4l2_tuner *vt = arg; | 671 | struct v4l2_tuner *vt = arg; |
672 | struct v4l2_routing *route = arg; | ||
671 | 673 | ||
672 | switch (cmd) { | 674 | switch (cmd) { |
673 | #ifdef CONFIG_VIDEO_ADV_DEBUG | 675 | #ifdef CONFIG_VIDEO_ADV_DEBUG |
@@ -749,19 +751,21 @@ static int cx25840_command(struct i2c_client *client, unsigned int cmd, | |||
749 | state->radio = 1; | 751 | state->radio = 1; |
750 | break; | 752 | break; |
751 | 753 | ||
752 | case VIDIOC_G_INPUT: | 754 | case VIDIOC_INT_G_VIDEO_ROUTING: |
753 | *(int *)arg = state->vid_input; | 755 | route->input = state->vid_input; |
756 | route->output = 0; | ||
754 | break; | 757 | break; |
755 | 758 | ||
756 | case VIDIOC_S_INPUT: | 759 | case VIDIOC_INT_S_VIDEO_ROUTING: |
757 | return set_input(client, *(enum cx25840_video_input *)arg, state->aud_input); | 760 | return set_input(client, route->input, state->aud_input); |
758 | 761 | ||
759 | case VIDIOC_S_AUDIO: | 762 | case VIDIOC_INT_G_AUDIO_ROUTING: |
760 | { | 763 | route->input = state->aud_input; |
761 | struct v4l2_audio *input = arg; | 764 | route->output = 0; |
765 | break; | ||
762 | 766 | ||
763 | return set_input(client, state->vid_input, input->index); | 767 | case VIDIOC_INT_S_AUDIO_ROUTING: |
764 | } | 768 | return set_input(client, state->vid_input, route->input); |
765 | 769 | ||
766 | case VIDIOC_S_FREQUENCY: | 770 | case VIDIOC_S_FREQUENCY: |
767 | input_change(client); | 771 | input_change(client); |
diff --git a/drivers/media/video/cx25840/cx25840.h b/drivers/media/video/cx25840/cx25840-core.h index dd70664d1dd9..1736929fc204 100644 --- a/drivers/media/video/cx25840/cx25840.h +++ b/drivers/media/video/cx25840/cx25840-core.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* cx25840 API header | 1 | /* cx25840 internal API header |
2 | * | 2 | * |
3 | * Copyright (C) 2003-2004 Chris Kennedy | 3 | * Copyright (C) 2003-2004 Chris Kennedy |
4 | * | 4 | * |
@@ -17,8 +17,8 @@ | |||
17 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | 17 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
18 | */ | 18 | */ |
19 | 19 | ||
20 | #ifndef _CX25840_H_ | 20 | #ifndef _CX25840_CORE_H_ |
21 | #define _CX25840_H_ | 21 | #define _CX25840_CORE_H_ |
22 | 22 | ||
23 | 23 | ||
24 | #include <linux/videodev2.h> | 24 | #include <linux/videodev2.h> |
@@ -32,46 +32,6 @@ | |||
32 | providing this information. */ | 32 | providing this information. */ |
33 | #define CX25840_CID_ENABLE_PVR150_WORKAROUND (V4L2_CID_PRIVATE_BASE+0) | 33 | #define CX25840_CID_ENABLE_PVR150_WORKAROUND (V4L2_CID_PRIVATE_BASE+0) |
34 | 34 | ||
35 | enum cx25840_video_input { | ||
36 | /* Composite video inputs In1-In8 */ | ||
37 | CX25840_COMPOSITE1 = 1, | ||
38 | CX25840_COMPOSITE2, | ||
39 | CX25840_COMPOSITE3, | ||
40 | CX25840_COMPOSITE4, | ||
41 | CX25840_COMPOSITE5, | ||
42 | CX25840_COMPOSITE6, | ||
43 | CX25840_COMPOSITE7, | ||
44 | CX25840_COMPOSITE8, | ||
45 | |||
46 | /* S-Video inputs consist of one luma input (In1-In4) ORed with one | ||
47 | chroma input (In5-In8) */ | ||
48 | CX25840_SVIDEO_LUMA1 = 0x10, | ||
49 | CX25840_SVIDEO_LUMA2 = 0x20, | ||
50 | CX25840_SVIDEO_LUMA3 = 0x30, | ||
51 | CX25840_SVIDEO_LUMA4 = 0x40, | ||
52 | CX25840_SVIDEO_CHROMA4 = 0x400, | ||
53 | CX25840_SVIDEO_CHROMA5 = 0x500, | ||
54 | CX25840_SVIDEO_CHROMA6 = 0x600, | ||
55 | CX25840_SVIDEO_CHROMA7 = 0x700, | ||
56 | CX25840_SVIDEO_CHROMA8 = 0x800, | ||
57 | |||
58 | /* S-Video aliases for common luma/chroma combinations */ | ||
59 | CX25840_SVIDEO1 = 0x510, | ||
60 | CX25840_SVIDEO2 = 0x620, | ||
61 | CX25840_SVIDEO3 = 0x730, | ||
62 | CX25840_SVIDEO4 = 0x840, | ||
63 | }; | ||
64 | |||
65 | enum cx25840_audio_input { | ||
66 | /* Audio inputs: serial or In4-In8 */ | ||
67 | CX25840_AUDIO_SERIAL, | ||
68 | CX25840_AUDIO4 = 4, | ||
69 | CX25840_AUDIO5, | ||
70 | CX25840_AUDIO6, | ||
71 | CX25840_AUDIO7, | ||
72 | CX25840_AUDIO8, | ||
73 | }; | ||
74 | |||
75 | struct cx25840_state { | 35 | struct cx25840_state { |
76 | int pvr150_workaround; | 36 | int pvr150_workaround; |
77 | int radio; | 37 | int radio; |
diff --git a/drivers/media/video/cx25840/cx25840-firmware.c b/drivers/media/video/cx25840/cx25840-firmware.c index e1a7823d82cd..18dd3475358e 100644 --- a/drivers/media/video/cx25840/cx25840-firmware.c +++ b/drivers/media/video/cx25840/cx25840-firmware.c | |||
@@ -20,8 +20,9 @@ | |||
20 | #include <linux/i2c-algo-bit.h> | 20 | #include <linux/i2c-algo-bit.h> |
21 | #include <linux/firmware.h> | 21 | #include <linux/firmware.h> |
22 | #include <media/v4l2-common.h> | 22 | #include <media/v4l2-common.h> |
23 | #include <media/cx25840.h> | ||
23 | 24 | ||
24 | #include "cx25840.h" | 25 | #include "cx25840-core.h" |
25 | 26 | ||
26 | #define FWFILE "v4l-cx25840.fw" | 27 | #define FWFILE "v4l-cx25840.fw" |
27 | #define FWSEND 1024 | 28 | #define FWSEND 1024 |
diff --git a/drivers/media/video/cx25840/cx25840-vbi.c b/drivers/media/video/cx25840/cx25840-vbi.c index e96fd1f1d6dc..f5784589b270 100644 --- a/drivers/media/video/cx25840/cx25840-vbi.c +++ b/drivers/media/video/cx25840/cx25840-vbi.c | |||
@@ -19,8 +19,9 @@ | |||
19 | #include <linux/videodev2.h> | 19 | #include <linux/videodev2.h> |
20 | #include <linux/i2c.h> | 20 | #include <linux/i2c.h> |
21 | #include <media/v4l2-common.h> | 21 | #include <media/v4l2-common.h> |
22 | #include <media/cx25840.h> | ||
22 | 23 | ||
23 | #include "cx25840.h" | 24 | #include "cx25840-core.h" |
24 | 25 | ||
25 | static int odd_parity(u8 c) | 26 | static int odd_parity(u8 c) |
26 | { | 27 | { |