aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHans Verkuil <hverkuil@xs4all.nl>2006-04-01 16:03:23 -0500
committerMauro Carvalho Chehab <mchehab@infradead.org>2006-04-02 03:56:11 -0400
commit07151724a35e8e70f1aa64ce30a5a3f5c1ad49a3 (patch)
tree49ad31b5f559bd43d05fc7d9ceff6135bdce8d98
parentab4cecf9c4e4a69cf2161f8a2424be14984430f8 (diff)
V4L/DVB (3702): Make msp3400 routing defines more consistent
Renamed various msp3400 routing defines to be more consistent and less confusing. Esp. the MSP_DSP_OUT defines were confusing since it is really a DSP input. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
-rw-r--r--drivers/media/video/bt8xx/bttv-driver.c12
-rw-r--r--drivers/media/video/em28xx/em28xx-cards.c4
-rw-r--r--drivers/media/video/em28xx/em28xx-video.c2
-rw-r--r--drivers/media/video/msp3400-kthreads.c4
-rw-r--r--include/media/msp3400.h60
5 files changed, 41 insertions, 41 deletions
diff --git a/drivers/media/video/bt8xx/bttv-driver.c b/drivers/media/video/bt8xx/bttv-driver.c
index 692dc69f691d..423e954948be 100644
--- a/drivers/media/video/bt8xx/bttv-driver.c
+++ b/drivers/media/video/bt8xx/bttv-driver.c
@@ -973,12 +973,12 @@ audio_mux(struct bttv *btv, int input, int mute)
973 For now this is sufficient. */ 973 For now this is sufficient. */
974 switch (input) { 974 switch (input) {
975 case TVAUDIO_INPUT_RADIO: 975 case TVAUDIO_INPUT_RADIO:
976 route.input = MSP_INPUT(MSP_IN_SCART_2, MSP_IN_TUNER_1, 976 route.input = MSP_INPUT(MSP_IN_SCART2, MSP_IN_TUNER1,
977 MSP_DSP_OUT_SCART, MSP_DSP_OUT_SCART); 977 MSP_DSP_IN_SCART, MSP_DSP_IN_SCART);
978 break; 978 break;
979 case TVAUDIO_INPUT_EXTERN: 979 case TVAUDIO_INPUT_EXTERN:
980 route.input = MSP_INPUT(MSP_IN_SCART_1, MSP_IN_TUNER_1, 980 route.input = MSP_INPUT(MSP_IN_SCART1, MSP_IN_TUNER1,
981 MSP_DSP_OUT_SCART, MSP_DSP_OUT_SCART); 981 MSP_DSP_IN_SCART, MSP_DSP_IN_SCART);
982 break; 982 break;
983 case TVAUDIO_INPUT_INTERN: 983 case TVAUDIO_INPUT_INTERN:
984 /* Yes, this is the same input as for RADIO. I doubt 984 /* Yes, this is the same input as for RADIO. I doubt
@@ -986,8 +986,8 @@ audio_mux(struct bttv *btv, int input, int mute)
986 input is the BTTV_BOARD_AVERMEDIA98. I wonder how 986 input is the BTTV_BOARD_AVERMEDIA98. I wonder how
987 that was tested. My guess is that the whole INTERN 987 that was tested. My guess is that the whole INTERN
988 input does not work. */ 988 input does not work. */
989 route.input = MSP_INPUT(MSP_IN_SCART_2, MSP_IN_TUNER_1, 989 route.input = MSP_INPUT(MSP_IN_SCART2, MSP_IN_TUNER1,
990 MSP_DSP_OUT_SCART, MSP_DSP_OUT_SCART); 990 MSP_DSP_IN_SCART, MSP_DSP_IN_SCART);
991 break; 991 break;
992 case TVAUDIO_INPUT_TUNER: 992 case TVAUDIO_INPUT_TUNER:
993 default: 993 default:
diff --git a/drivers/media/video/em28xx/em28xx-cards.c b/drivers/media/video/em28xx/em28xx-cards.c
index f62fd706b45a..3ba3439db580 100644
--- a/drivers/media/video/em28xx/em28xx-cards.c
+++ b/drivers/media/video/em28xx/em28xx-cards.c
@@ -151,8 +151,8 @@ struct em28xx_board em28xx_boards[] = {
151 },{ 151 },{
152 .type = EM28XX_VMUX_SVIDEO, 152 .type = EM28XX_VMUX_SVIDEO,
153 .vmux = 2, 153 .vmux = 2,
154 .amux = MSP_INPUT(MSP_IN_SCART_1, MSP_IN_TUNER_1, 154 .amux = MSP_INPUT(MSP_IN_SCART1, MSP_IN_TUNER1,
155 MSP_DSP_OUT_SCART, MSP_DSP_OUT_SCART), 155 MSP_DSP_IN_SCART, MSP_DSP_IN_SCART),
156 }}, 156 }},
157 }, 157 },
158 [EM2820_BOARD_MSI_VOX_USB_2] = { 158 [EM2820_BOARD_MSI_VOX_USB_2] = {
diff --git a/drivers/media/video/em28xx/em28xx-video.c b/drivers/media/video/em28xx/em28xx-video.c
index daa2ac2e6b90..ddc92cbb5276 100644
--- a/drivers/media/video/em28xx/em28xx-video.c
+++ b/drivers/media/video/em28xx/em28xx-video.c
@@ -222,7 +222,7 @@ static void video_mux(struct em28xx *dev, int index)
222 if (dev->i2s_speed) 222 if (dev->i2s_speed)
223 em28xx_i2c_call_clients(dev, VIDIOC_INT_I2S_CLOCK_FREQ, &dev->i2s_speed); 223 em28xx_i2c_call_clients(dev, VIDIOC_INT_I2S_CLOCK_FREQ, &dev->i2s_speed);
224 route.input = dev->ctl_ainput; 224 route.input = dev->ctl_ainput;
225 route.output = MSP_OUTPUT(MSP_OUT_SCART1_DA); 225 route.output = MSP_OUTPUT(MSP_SC_IN_DSP_SCART1);
226 /* Note: this is msp3400 specific */ 226 /* Note: this is msp3400 specific */
227 em28xx_i2c_call_clients(dev, VIDIOC_INT_S_AUDIO_ROUTING, &route); 227 em28xx_i2c_call_clients(dev, VIDIOC_INT_S_AUDIO_ROUTING, &route);
228 ainput = EM28XX_AUDIO_SRC_TUNER; 228 ainput = EM28XX_AUDIO_SRC_TUNER;
diff --git a/drivers/media/video/msp3400-kthreads.c b/drivers/media/video/msp3400-kthreads.c
index b41ee9afbd96..633a10213789 100644
--- a/drivers/media/video/msp3400-kthreads.c
+++ b/drivers/media/video/msp3400-kthreads.c
@@ -856,11 +856,11 @@ static void msp34xxg_set_source(struct i2c_client *client, u16 reg, int in)
856 break; 856 break;
857 } 857 }
858 858
859 if (in == MSP_DSP_OUT_TUNER) 859 if (in == MSP_DSP_IN_TUNER)
860 source = (source << 8) | 0x20; 860 source = (source << 8) | 0x20;
861 /* the msp34x2g puts the MAIN_AVC, MAIN and AUX sources in 12, 13, 14 861 /* the msp34x2g puts the MAIN_AVC, MAIN and AUX sources in 12, 13, 14
862 instead of 11, 12, 13. So we add one for that msp version. */ 862 instead of 11, 12, 13. So we add one for that msp version. */
863 else if (in >= MSP_DSP_OUT_MAIN_AVC && state->has_dolby_pro_logic) 863 else if (in >= MSP_DSP_IN_MAIN_AVC && state->has_dolby_pro_logic)
864 source = ((in + 1) << 8) | matrix; 864 source = ((in + 1) << 8) | matrix;
865 else 865 else
866 source = (in << 8) | matrix; 866 source = (in << 8) | matrix;
diff --git a/include/media/msp3400.h b/include/media/msp3400.h
index 0be61a021d45..6ab854931c05 100644
--- a/include/media/msp3400.h
+++ b/include/media/msp3400.h
@@ -80,16 +80,16 @@
80 */ 80 */
81 81
82/* SCART input to DSP selection */ 82/* SCART input to DSP selection */
83#define MSP_IN_SCART_1 0 /* Pin SC1_IN */ 83#define MSP_IN_SCART1 0 /* Pin SC1_IN */
84#define MSP_IN_SCART_2 1 /* Pin SC2_IN */ 84#define MSP_IN_SCART2 1 /* Pin SC2_IN */
85#define MSP_IN_SCART_3 2 /* Pin SC3_IN */ 85#define MSP_IN_SCART3 2 /* Pin SC3_IN */
86#define MSP_IN_SCART_4 3 /* Pin SC4_IN */ 86#define MSP_IN_SCART4 3 /* Pin SC4_IN */
87#define MSP_IN_MONO 6 /* Pin MONO_IN */ 87#define MSP_IN_MONO 6 /* Pin MONO_IN */
88#define MSP_IN_MUTE 7 /* Mute DSP input */ 88#define MSP_IN_MUTE 7 /* Mute DSP input */
89#define MSP_SCART_TO_DSP(in) (in) 89#define MSP_SCART_TO_DSP(in) (in)
90/* Tuner input to demodulator and DSP selection */ 90/* Tuner input to demodulator and DSP selection */
91#define MSP_IN_TUNER_1 0 /* Analog Sound IF input pin ANA_IN1 */ 91#define MSP_IN_TUNER1 0 /* Analog Sound IF input pin ANA_IN1 */
92#define MSP_IN_TUNER_2 1 /* Analog Sound IF input pin ANA_IN2 */ 92#define MSP_IN_TUNER2 1 /* Analog Sound IF input pin ANA_IN2 */
93#define MSP_TUNER_TO_DSP(in) ((in) << 3) 93#define MSP_TUNER_TO_DSP(in) ((in) << 3)
94 94
95/* The msp has up to 5 DSP outputs, each output can independently select 95/* The msp has up to 5 DSP outputs, each output can independently select
@@ -109,14 +109,14 @@
109 DSP. This is currently not implemented. Also not implemented is the 109 DSP. This is currently not implemented. Also not implemented is the
110 multi-channel capable I2S3 input of the 44x0G. If someone can demonstrate 110 multi-channel capable I2S3 input of the 44x0G. If someone can demonstrate
111 a need for one of those features then additional support can be added. */ 111 a need for one of those features then additional support can be added. */
112#define MSP_DSP_OUT_TUNER 0 /* Tuner output */ 112#define MSP_DSP_IN_TUNER 0 /* Tuner DSP input */
113#define MSP_DSP_OUT_SCART 2 /* SCART output */ 113#define MSP_DSP_IN_SCART 2 /* SCART DSP input */
114#define MSP_DSP_OUT_I2S1 5 /* I2S1 output */ 114#define MSP_DSP_IN_I2S1 5 /* I2S1 DSP input */
115#define MSP_DSP_OUT_I2S2 6 /* I2S2 output */ 115#define MSP_DSP_IN_I2S2 6 /* I2S2 DSP input */
116#define MSP_DSP_OUT_I2S3 7 /* I2S3 output */ 116#define MSP_DSP_IN_I2S3 7 /* I2S3 DSP input */
117#define MSP_DSP_OUT_MAIN_AVC 11 /* MAIN AVC processed output */ 117#define MSP_DSP_IN_MAIN_AVC 11 /* MAIN AVC processed DSP input */
118#define MSP_DSP_OUT_MAIN 12 /* MAIN output */ 118#define MSP_DSP_IN_MAIN 12 /* MAIN DSP input */
119#define MSP_DSP_OUT_AUX 13 /* AUX output */ 119#define MSP_DSP_IN_AUX 13 /* AUX DSP input */
120#define MSP_DSP_TO_MAIN(in) ((in) << 4) 120#define MSP_DSP_TO_MAIN(in) ((in) << 4)
121#define MSP_DSP_TO_AUX(in) ((in) << 8) 121#define MSP_DSP_TO_AUX(in) ((in) << 8)
122#define MSP_DSP_TO_SCART1(in) ((in) << 12) 122#define MSP_DSP_TO_SCART1(in) ((in) << 12)
@@ -125,16 +125,16 @@
125 125
126/* Output SCART select: the SCART outputs can select which input 126/* Output SCART select: the SCART outputs can select which input
127 to use. */ 127 to use. */
128#define MSP_OUT_SCART1 0 /* SCART1 input, bypassing the DSP */ 128#define MSP_SC_IN_SCART1 0 /* SCART1 input, bypassing the DSP */
129#define MSP_OUT_SCART2 1 /* SCART2 input, bypassing the DSP */ 129#define MSP_SC_IN_SCART2 1 /* SCART2 input, bypassing the DSP */
130#define MSP_OUT_SCART3 2 /* SCART3 input, bypassing the DSP */ 130#define MSP_SC_IN_SCART3 2 /* SCART3 input, bypassing the DSP */
131#define MSP_OUT_SCART4 3 /* SCART4 input, bypassing the DSP */ 131#define MSP_SC_IN_SCART4 3 /* SCART4 input, bypassing the DSP */
132#define MSP_OUT_SCART1_DA 4 /* DSP SCART1 output */ 132#define MSP_SC_IN_DSP_SCART1 4 /* DSP SCART1 input */
133#define MSP_OUT_SCART2_DA 5 /* DSP SCART2 output */ 133#define MSP_SC_IN_DSP_SCART2 5 /* DSP SCART2 input */
134#define MSP_OUT_MONO 6 /* MONO input, bypassing the DSP */ 134#define MSP_SC_IN_MONO 6 /* MONO input, bypassing the DSP */
135#define MSP_OUT_MUTE 7 /* MUTE output */ 135#define MSP_SC_IN_MUTE 7 /* MUTE output */
136#define MSP_OUT_TO_SCART1(in) (in) 136#define MSP_SC_TO_SCART1(in) (in)
137#define MSP_OUT_TO_SCART2(in) ((in) << 4) 137#define MSP_SC_TO_SCART2(in) ((in) << 4)
138 138
139/* Shortcut macros */ 139/* Shortcut macros */
140#define MSP_INPUT(sc, t, main_aux_src, sc_i2s_src) \ 140#define MSP_INPUT(sc, t, main_aux_src, sc_i2s_src) \
@@ -145,14 +145,14 @@
145 MSP_DSP_TO_SCART1(sc_i2s_src) | \ 145 MSP_DSP_TO_SCART1(sc_i2s_src) | \
146 MSP_DSP_TO_SCART2(sc_i2s_src) | \ 146 MSP_DSP_TO_SCART2(sc_i2s_src) | \
147 MSP_DSP_TO_I2S(sc_i2s_src)) 147 MSP_DSP_TO_I2S(sc_i2s_src))
148#define MSP_INPUT_DEFAULT MSP_INPUT(MSP_IN_SCART_1, MSP_IN_TUNER_1, \ 148#define MSP_INPUT_DEFAULT MSP_INPUT(MSP_IN_SCART1, MSP_IN_TUNER1, \
149 MSP_DSP_OUT_TUNER, MSP_DSP_OUT_TUNER) 149 MSP_DSP_IN_TUNER, MSP_DSP_IN_TUNER)
150#define MSP_OUTPUT(sc) \ 150#define MSP_OUTPUT(sc) \
151 (MSP_OUT_TO_SCART1(sc) | \ 151 (MSP_SC_TO_SCART1(sc) | \
152 MSP_OUT_TO_SCART2(sc)) 152 MSP_SC_TO_SCART2(sc))
153/* This equals the RESET position of the msp3400 ACB register */ 153/* This equals the RESET position of the msp3400 ACB register */
154#define MSP_OUTPUT_DEFAULT (MSP_OUT_TO_SCART1(MSP_OUT_SCART3) | \ 154#define MSP_OUTPUT_DEFAULT (MSP_SC_TO_SCART1(MSP_SC_IN_SCART3) | \
155 MSP_OUT_TO_SCART2(MSP_OUT_SCART1_DA)) 155 MSP_SC_TO_SCART2(MSP_SC_IN_DSP_SCART1))
156 156
157/* Tuner inputs vs. msp version */ 157/* Tuner inputs vs. msp version */
158/* Chip TUNER_1 TUNER_2 158/* Chip TUNER_1 TUNER_2