aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/media/video/cx18/cx18-cards.c61
-rw-r--r--drivers/media/video/cx18/cx18-cards.h40
2 files changed, 31 insertions, 70 deletions
diff --git a/drivers/media/video/cx18/cx18-cards.c b/drivers/media/video/cx18/cx18-cards.c
index baccd079243d..c35eb53a34c6 100644
--- a/drivers/media/video/cx18/cx18-cards.c
+++ b/drivers/media/video/cx18/cx18-cards.c
@@ -23,6 +23,7 @@
23 23
24#include "cx18-driver.h" 24#include "cx18-driver.h"
25#include "cx18-cards.h" 25#include "cx18-cards.h"
26#include "cx18-av-core.h"
26#include "cx18-i2c.h" 27#include "cx18-i2c.h"
27#include <media/cs5345.h> 28#include <media/cs5345.h>
28 29
@@ -54,22 +55,22 @@ static const struct cx18_card cx18_card_hvr1600_esmt = {
54 .hw_all = CX18_HW_TVEEPROM | CX18_HW_TUNER | 55 .hw_all = CX18_HW_TVEEPROM | CX18_HW_TUNER |
55 CX18_HW_CS5345 | CX18_HW_DVB, 56 CX18_HW_CS5345 | CX18_HW_DVB,
56 .video_inputs = { 57 .video_inputs = {
57 { CX18_CARD_INPUT_VID_TUNER, 0, CX23418_COMPOSITE7 }, 58 { CX18_CARD_INPUT_VID_TUNER, 0, CX18_AV_COMPOSITE7 },
58 { CX18_CARD_INPUT_SVIDEO1, 1, CX23418_SVIDEO1 }, 59 { CX18_CARD_INPUT_SVIDEO1, 1, CX18_AV_SVIDEO1 },
59 { CX18_CARD_INPUT_COMPOSITE1, 1, CX23418_COMPOSITE3 }, 60 { CX18_CARD_INPUT_COMPOSITE1, 1, CX18_AV_COMPOSITE3 },
60 { CX18_CARD_INPUT_SVIDEO2, 2, CX23418_SVIDEO2 }, 61 { CX18_CARD_INPUT_SVIDEO2, 2, CX18_AV_SVIDEO2 },
61 { CX18_CARD_INPUT_COMPOSITE2, 2, CX23418_COMPOSITE4 }, 62 { CX18_CARD_INPUT_COMPOSITE2, 2, CX18_AV_COMPOSITE4 },
62 }, 63 },
63 .audio_inputs = { 64 .audio_inputs = {
64 { CX18_CARD_INPUT_AUD_TUNER, 65 { CX18_CARD_INPUT_AUD_TUNER,
65 CX23418_AUDIO8, CS5345_IN_1 | CS5345_MCLK_1_5 }, 66 CX18_AV_AUDIO8, CS5345_IN_1 | CS5345_MCLK_1_5 },
66 { CX18_CARD_INPUT_LINE_IN1, 67 { CX18_CARD_INPUT_LINE_IN1,
67 CX23418_AUDIO_SERIAL, CS5345_IN_2 }, 68 CX18_AV_AUDIO_SERIAL, CS5345_IN_2 },
68 { CX18_CARD_INPUT_LINE_IN2, 69 { CX18_CARD_INPUT_LINE_IN2,
69 CX23418_AUDIO_SERIAL, CS5345_IN_2 }, 70 CX18_AV_AUDIO_SERIAL, CS5345_IN_2 },
70 }, 71 },
71 .radio_input = { CX18_CARD_INPUT_AUD_TUNER, 72 .radio_input = { CX18_CARD_INPUT_AUD_TUNER,
72 CX23418_AUDIO_SERIAL, 0 }, 73 CX18_AV_AUDIO_SERIAL, 0 },
73 .ddr = { 74 .ddr = {
74 /* ESMT M13S128324A-5B memory */ 75 /* ESMT M13S128324A-5B memory */
75 .chip_config = 0x003, 76 .chip_config = 0x003,
@@ -94,22 +95,22 @@ static const struct cx18_card cx18_card_hvr1600_samsung = {
94 .hw_all = CX18_HW_TVEEPROM | CX18_HW_TUNER | 95 .hw_all = CX18_HW_TVEEPROM | CX18_HW_TUNER |
95 CX18_HW_CS5345 | CX18_HW_DVB, 96 CX18_HW_CS5345 | CX18_HW_DVB,
96 .video_inputs = { 97 .video_inputs = {
97 { CX18_CARD_INPUT_VID_TUNER, 0, CX23418_COMPOSITE7 }, 98 { CX18_CARD_INPUT_VID_TUNER, 0, CX18_AV_COMPOSITE7 },
98 { CX18_CARD_INPUT_SVIDEO1, 1, CX23418_SVIDEO1 }, 99 { CX18_CARD_INPUT_SVIDEO1, 1, CX18_AV_SVIDEO1 },
99 { CX18_CARD_INPUT_COMPOSITE1, 1, CX23418_COMPOSITE3 }, 100 { CX18_CARD_INPUT_COMPOSITE1, 1, CX18_AV_COMPOSITE3 },
100 { CX18_CARD_INPUT_SVIDEO2, 2, CX23418_SVIDEO2 }, 101 { CX18_CARD_INPUT_SVIDEO2, 2, CX18_AV_SVIDEO2 },
101 { CX18_CARD_INPUT_COMPOSITE2, 2, CX23418_COMPOSITE4 }, 102 { CX18_CARD_INPUT_COMPOSITE2, 2, CX18_AV_COMPOSITE4 },
102 }, 103 },
103 .audio_inputs = { 104 .audio_inputs = {
104 { CX18_CARD_INPUT_AUD_TUNER, 105 { CX18_CARD_INPUT_AUD_TUNER,
105 CX23418_AUDIO8, CS5345_IN_1 | CS5345_MCLK_1_5 }, 106 CX18_AV_AUDIO8, CS5345_IN_1 | CS5345_MCLK_1_5 },
106 { CX18_CARD_INPUT_LINE_IN1, 107 { CX18_CARD_INPUT_LINE_IN1,
107 CX23418_AUDIO_SERIAL, CS5345_IN_2 }, 108 CX18_AV_AUDIO_SERIAL, CS5345_IN_2 },
108 { CX18_CARD_INPUT_LINE_IN2, 109 { CX18_CARD_INPUT_LINE_IN2,
109 CX23418_AUDIO_SERIAL, CS5345_IN_2 }, 110 CX18_AV_AUDIO_SERIAL, CS5345_IN_2 },
110 }, 111 },
111 .radio_input = { CX18_CARD_INPUT_AUD_TUNER, 112 .radio_input = { CX18_CARD_INPUT_AUD_TUNER,
112 CX23418_AUDIO_SERIAL, 0 }, 113 CX18_AV_AUDIO_SERIAL, 0 },
113 .ddr = { 114 .ddr = {
114 /* Samsung K4D263238G-VC33 memory */ 115 /* Samsung K4D263238G-VC33 memory */
115 .chip_config = 0x003, 116 .chip_config = 0x003,
@@ -141,19 +142,19 @@ static const struct cx18_card cx18_card_h900 = {
141 .hw_audio_ctrl = CX18_HW_CX23418, 142 .hw_audio_ctrl = CX18_HW_CX23418,
142 .hw_all = CX18_HW_TUNER, 143 .hw_all = CX18_HW_TUNER,
143 .video_inputs = { 144 .video_inputs = {
144 { CX18_CARD_INPUT_VID_TUNER, 0, CX23418_COMPOSITE2 }, 145 { CX18_CARD_INPUT_VID_TUNER, 0, CX18_AV_COMPOSITE2 },
145 { CX18_CARD_INPUT_SVIDEO1, 1, 146 { CX18_CARD_INPUT_SVIDEO1, 1,
146 CX23418_SVIDEO_LUMA3 | CX23418_SVIDEO_CHROMA4 }, 147 CX18_AV_SVIDEO_LUMA3 | CX18_AV_SVIDEO_CHROMA4 },
147 { CX18_CARD_INPUT_COMPOSITE1, 1, CX23418_COMPOSITE1 }, 148 { CX18_CARD_INPUT_COMPOSITE1, 1, CX18_AV_COMPOSITE1 },
148 }, 149 },
149 .audio_inputs = { 150 .audio_inputs = {
150 { CX18_CARD_INPUT_AUD_TUNER, 151 { CX18_CARD_INPUT_AUD_TUNER,
151 CX23418_AUDIO8, 0 }, 152 CX18_AV_AUDIO8, 0 },
152 { CX18_CARD_INPUT_LINE_IN1, 153 { CX18_CARD_INPUT_LINE_IN1,
153 CX23418_AUDIO_SERIAL, 0 }, 154 CX18_AV_AUDIO_SERIAL, 0 },
154 }, 155 },
155 .radio_input = { CX18_CARD_INPUT_AUD_TUNER, 156 .radio_input = { CX18_CARD_INPUT_AUD_TUNER,
156 CX23418_AUDIO_SERIAL, 0 }, 157 CX18_AV_AUDIO_SERIAL, 0 },
157 .tuners = { 158 .tuners = {
158 { .std = V4L2_STD_ALL, .tuner = TUNER_XC2028 }, 159 { .std = V4L2_STD_ALL, .tuner = TUNER_XC2028 },
159 }, 160 },
@@ -188,18 +189,18 @@ static const struct cx18_card cx18_card_mpc718 = {
188 .hw_audio_ctrl = CX18_HW_CX23418, 189 .hw_audio_ctrl = CX18_HW_CX23418,
189 .hw_all = CX18_HW_TUNER, 190 .hw_all = CX18_HW_TUNER,
190 .video_inputs = { 191 .video_inputs = {
191 { CX18_CARD_INPUT_VID_TUNER, 0, CX23418_COMPOSITE7 }, 192 { CX18_CARD_INPUT_VID_TUNER, 0, CX18_AV_COMPOSITE7 },
192 { CX18_CARD_INPUT_SVIDEO1, 1, CX23418_SVIDEO1 }, 193 { CX18_CARD_INPUT_SVIDEO1, 1, CX18_AV_SVIDEO1 },
193 { CX18_CARD_INPUT_COMPOSITE1, 1, CX23418_COMPOSITE3 }, 194 { CX18_CARD_INPUT_COMPOSITE1, 1, CX18_AV_COMPOSITE3 },
194 }, 195 },
195 .audio_inputs = { 196 .audio_inputs = {
196 { CX18_CARD_INPUT_AUD_TUNER, 197 { CX18_CARD_INPUT_AUD_TUNER,
197 CX23418_AUDIO8, 0 }, 198 CX18_AV_AUDIO8, 0 },
198 { CX18_CARD_INPUT_LINE_IN1, 199 { CX18_CARD_INPUT_LINE_IN1,
199 CX23418_AUDIO_SERIAL, 0 }, 200 CX18_AV_AUDIO_SERIAL, 0 },
200 }, 201 },
201 .radio_input = { CX18_CARD_INPUT_AUD_TUNER, 202 .radio_input = { CX18_CARD_INPUT_AUD_TUNER,
202 CX23418_AUDIO_SERIAL, 0 }, 203 CX18_AV_AUDIO_SERIAL, 0 },
203 .tuners = { 204 .tuners = {
204 /* XC3028 tuner */ 205 /* XC3028 tuner */
205 { .std = V4L2_STD_ALL, .tuner = TUNER_XC2028 }, 206 { .std = V4L2_STD_ALL, .tuner = TUNER_XC2028 },
diff --git a/drivers/media/video/cx18/cx18-cards.h b/drivers/media/video/cx18/cx18-cards.h
index bccb67f0db16..3c2c0b92956c 100644
--- a/drivers/media/video/cx18/cx18-cards.h
+++ b/drivers/media/video/cx18/cx18-cards.h
@@ -36,36 +36,6 @@
36#define CX18_CARD_INPUT_COMPOSITE2 5 36#define CX18_CARD_INPUT_COMPOSITE2 5
37#define CX18_CARD_INPUT_COMPOSITE3 6 37#define CX18_CARD_INPUT_COMPOSITE3 6
38 38
39enum cx34180_video_input {
40 /* Composite video inputs In1-In8 */
41 CX23418_COMPOSITE1 = 1,
42 CX23418_COMPOSITE2,
43 CX23418_COMPOSITE3,
44 CX23418_COMPOSITE4,
45 CX23418_COMPOSITE5,
46 CX23418_COMPOSITE6,
47 CX23418_COMPOSITE7,
48 CX23418_COMPOSITE8,
49
50 /* S-Video inputs consist of one luma input (In1-In4) ORed with one
51 chroma input (In5-In8) */
52 CX23418_SVIDEO_LUMA1 = 0x10,
53 CX23418_SVIDEO_LUMA2 = 0x20,
54 CX23418_SVIDEO_LUMA3 = 0x30,
55 CX23418_SVIDEO_LUMA4 = 0x40,
56 CX23418_SVIDEO_CHROMA4 = 0x400,
57 CX23418_SVIDEO_CHROMA5 = 0x500,
58 CX23418_SVIDEO_CHROMA6 = 0x600,
59 CX23418_SVIDEO_CHROMA7 = 0x700,
60 CX23418_SVIDEO_CHROMA8 = 0x800,
61
62 /* S-Video aliases for common luma/chroma combinations */
63 CX23418_SVIDEO1 = 0x510,
64 CX23418_SVIDEO2 = 0x620,
65 CX23418_SVIDEO3 = 0x730,
66 CX23418_SVIDEO4 = 0x840,
67};
68
69/* audio inputs */ 39/* audio inputs */
70#define CX18_CARD_INPUT_AUD_TUNER 1 40#define CX18_CARD_INPUT_AUD_TUNER 1
71#define CX18_CARD_INPUT_LINE_IN1 2 41#define CX18_CARD_INPUT_LINE_IN1 2
@@ -75,16 +45,6 @@ enum cx34180_video_input {
75#define CX18_CARD_MAX_AUDIO_INPUTS 3 45#define CX18_CARD_MAX_AUDIO_INPUTS 3
76#define CX18_CARD_MAX_TUNERS 2 46#define CX18_CARD_MAX_TUNERS 2
77 47
78enum cx23418_audio_input {
79 /* Audio inputs: serial or In4-In8 */
80 CX23418_AUDIO_SERIAL,
81 CX23418_AUDIO4 = 4,
82 CX23418_AUDIO5,
83 CX23418_AUDIO6,
84 CX23418_AUDIO7,
85 CX23418_AUDIO8,
86};
87
88/* V4L2 capability aliases */ 48/* V4L2 capability aliases */
89#define CX18_CAP_ENCODER (V4L2_CAP_VIDEO_CAPTURE | V4L2_CAP_TUNER | \ 49#define CX18_CAP_ENCODER (V4L2_CAP_VIDEO_CAPTURE | V4L2_CAP_TUNER | \
90 V4L2_CAP_AUDIO | V4L2_CAP_READWRITE) 50 V4L2_CAP_AUDIO | V4L2_CAP_READWRITE)