diff options
author | Hans Verkuil <hverkuil@xs4all.nl> | 2006-03-19 10:35:57 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2006-03-24 14:26:57 -0500 |
commit | 2474ed444b475614ef795523076be7cc8437ae00 (patch) | |
tree | 87808b3c7ff145b63a638e6e42ffce9db7db1b8c /drivers/media/video/em28xx | |
parent | 49965a80a4c4f5cbe15fb3bb1f8f8b0ec4ef02bc (diff) |
V4L/DVB (3582): Implement correct msp3400 input/output routing
- implement VIDIOC_INT_S_AUDIO_ROUTING for msp3400 and tvaudio
- use the new command in bttv, pvrusb2 and em28xx.
- remove the now obsolete MSP_SET_MATRIX from msp3400 (yeah!)
- remove the obsolete VIDIOC_S_AUDIO from msp3400.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/video/em28xx')
-rw-r--r-- | drivers/media/video/em28xx/em28xx-cards.c | 8 | ||||
-rw-r--r-- | drivers/media/video/em28xx/em28xx-video.c | 8 |
2 files changed, 12 insertions, 4 deletions
diff --git a/drivers/media/video/em28xx/em28xx-cards.c b/drivers/media/video/em28xx/em28xx-cards.c index 2d68a27417eb..f62fd706b45a 100644 --- a/drivers/media/video/em28xx/em28xx-cards.c +++ b/drivers/media/video/em28xx/em28xx-cards.c | |||
@@ -28,8 +28,9 @@ | |||
28 | #include <linux/i2c.h> | 28 | #include <linux/i2c.h> |
29 | #include <linux/usb.h> | 29 | #include <linux/usb.h> |
30 | #include <media/tuner.h> | 30 | #include <media/tuner.h> |
31 | #include <media/audiochip.h> | 31 | #include <media/msp3400.h> |
32 | #include <media/tveeprom.h> | 32 | #include <media/tveeprom.h> |
33 | #include <media/audiochip.h> | ||
33 | #include <media/v4l2-common.h> | 34 | #include <media/v4l2-common.h> |
34 | 35 | ||
35 | #include "em28xx.h" | 36 | #include "em28xx.h" |
@@ -146,11 +147,12 @@ struct em28xx_board em28xx_boards[] = { | |||
146 | .input = {{ | 147 | .input = {{ |
147 | .type = EM28XX_VMUX_TELEVISION, | 148 | .type = EM28XX_VMUX_TELEVISION, |
148 | .vmux = 0, | 149 | .vmux = 0, |
149 | .amux = 6, | 150 | .amux = MSP_INPUT_DEFAULT, |
150 | },{ | 151 | },{ |
151 | .type = EM28XX_VMUX_SVIDEO, | 152 | .type = EM28XX_VMUX_SVIDEO, |
152 | .vmux = 2, | 153 | .vmux = 2, |
153 | .amux = 1, | 154 | .amux = MSP_INPUT(MSP_IN_SCART_1, MSP_IN_TUNER_1, |
155 | MSP_DSP_OUT_SCART, MSP_DSP_OUT_SCART), | ||
154 | }}, | 156 | }}, |
155 | }, | 157 | }, |
156 | [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 780342f7b239..dfba33d0fa61 100644 --- a/drivers/media/video/em28xx/em28xx-video.c +++ b/drivers/media/video/em28xx/em28xx-video.c | |||
@@ -38,6 +38,7 @@ | |||
38 | #include "em28xx.h" | 38 | #include "em28xx.h" |
39 | #include <media/tuner.h> | 39 | #include <media/tuner.h> |
40 | #include <media/v4l2-common.h> | 40 | #include <media/v4l2-common.h> |
41 | #include <media/msp3400.h> | ||
41 | 42 | ||
42 | #define DRIVER_AUTHOR "Ludovico Cavedon <cavedon@sssup.it>, " \ | 43 | #define DRIVER_AUTHOR "Ludovico Cavedon <cavedon@sssup.it>, " \ |
43 | "Markus Rechberger <mrechberger@gmail.com>, " \ | 44 | "Markus Rechberger <mrechberger@gmail.com>, " \ |
@@ -216,9 +217,14 @@ static void video_mux(struct em28xx *dev, int index) | |||
216 | em28xx_videodbg("Setting input index=%d, vmux=%d, amux=%d\n",index,input,dev->ctl_ainput); | 217 | em28xx_videodbg("Setting input index=%d, vmux=%d, amux=%d\n",index,input,dev->ctl_ainput); |
217 | 218 | ||
218 | if (dev->has_msp34xx) { | 219 | if (dev->has_msp34xx) { |
220 | struct v4l2_routing route; | ||
221 | |||
219 | if (dev->i2s_speed) | 222 | if (dev->i2s_speed) |
220 | 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); |
221 | em28xx_i2c_call_clients(dev, VIDIOC_S_AUDIO, &dev->ctl_ainput); | 224 | route.input = dev->ctl_ainput; |
225 | route.output = MSP_OUTPUT(MSP_OUT_SCART1_DA); | ||
226 | /* Note: this is msp3400 specific */ | ||
227 | em28xx_i2c_call_clients(dev, VIDIOC_INT_S_AUDIO_ROUTING, &route); | ||
222 | ainput = EM28XX_AUDIO_SRC_TUNER; | 228 | ainput = EM28XX_AUDIO_SRC_TUNER; |
223 | em28xx_audio_source(dev, ainput); | 229 | em28xx_audio_source(dev, ainput); |
224 | } else { | 230 | } else { |