aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/em28xx
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@brturbo.com.br>2006-01-09 12:25:37 -0500
committerMauro Carvalho Chehab <mchehab@brturbo.com.br>2006-01-09 12:25:37 -0500
commit9bb13a6dc3a6f68c990264838ff0493d900c48d7 (patch)
tree274f9dfdcbbbff9f7a382df772a6f2efa9247cc7 /drivers/media/video/em28xx
parente1bc80adaf801bf75ca176b9c1b60b3cceee1e03 (diff)
V4L/DVB (3233): Fixed API to set I2S speed control
- Created a new ioctl to control I2S speed. Old calls to an inadequate V4L2 API replaced. Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
Diffstat (limited to 'drivers/media/video/em28xx')
-rw-r--r--drivers/media/video/em28xx/em28xx-cards.c8
-rw-r--r--drivers/media/video/em28xx/em28xx-video.c2
-rw-r--r--drivers/media/video/em28xx/em28xx.h2
3 files changed, 6 insertions, 6 deletions
diff --git a/drivers/media/video/em28xx/em28xx-cards.c b/drivers/media/video/em28xx/em28xx-cards.c
index 57779e63f35d..58f7b4194a0d 100644
--- a/drivers/media/video/em28xx/em28xx-cards.c
+++ b/drivers/media/video/em28xx/em28xx-cards.c
@@ -30,6 +30,7 @@
30#include <media/tuner.h> 30#include <media/tuner.h>
31#include <media/audiochip.h> 31#include <media/audiochip.h>
32#include <media/tveeprom.h> 32#include <media/tveeprom.h>
33#include <media/v4l2-common.h>
33#include "msp3400.h" 34#include "msp3400.h"
34 35
35#include "em28xx.h" 36#include "em28xx.h"
@@ -261,7 +262,6 @@ void em28xx_card_setup(struct em28xx *dev)
261 /* request some modules */ 262 /* request some modules */
262 if (dev->model == EM2820_BOARD_HAUPPAUGE_WINTV_USB_2) { 263 if (dev->model == EM2820_BOARD_HAUPPAUGE_WINTV_USB_2) {
263 struct tveeprom tv; 264 struct tveeprom tv;
264 struct v4l2_audioout ao;
265#ifdef CONFIG_MODULES 265#ifdef CONFIG_MODULES
266 request_module("tveeprom"); 266 request_module("tveeprom");
267 request_module("ir-kbd-i2c"); 267 request_module("ir-kbd-i2c");
@@ -274,12 +274,8 @@ void em28xx_card_setup(struct em28xx *dev)
274 274
275 dev->tuner_type= tv.tuner_type; 275 dev->tuner_type= tv.tuner_type;
276 if (tv.audio_processor == AUDIO_CHIP_MSP34XX) { 276 if (tv.audio_processor == AUDIO_CHIP_MSP34XX) {
277 dev->i2s_speed=2048000;
277 dev->has_msp34xx=1; 278 dev->has_msp34xx=1;
278 memset (&ao,0,sizeof(ao));
279
280 ao.index=2;
281 ao.mode=V4L2_AUDMODE_32BITS;
282 em28xx_i2c_call_clients(dev, VIDIOC_S_AUDOUT, &ao);
283 } else 279 } else
284 dev->has_msp34xx=0; 280 dev->has_msp34xx=0;
285 } 281 }
diff --git a/drivers/media/video/em28xx/em28xx-video.c b/drivers/media/video/em28xx/em28xx-video.c
index 5e831fccf3fd..0b5557c479ae 100644
--- a/drivers/media/video/em28xx/em28xx-video.c
+++ b/drivers/media/video/em28xx/em28xx-video.c
@@ -287,6 +287,8 @@ static void video_mux(struct em28xx *dev, int index)
287 em28xx_videodbg("Setting input index=%d, vmux=%d, amux=%d\n",index,input,dev->ctl_ainput); 287 em28xx_videodbg("Setting input index=%d, vmux=%d, amux=%d\n",index,input,dev->ctl_ainput);
288 288
289 if (dev->has_msp34xx) { 289 if (dev->has_msp34xx) {
290 if (dev->i2s_speed)
291 em28xx_i2c_call_clients(dev, VIDIOC_INT_I2S_CLOCK_FREQ, &dev->i2s_speed);
290 em28xx_i2c_call_clients(dev, VIDIOC_S_AUDIO, &dev->ctl_ainput); 292 em28xx_i2c_call_clients(dev, VIDIOC_S_AUDIO, &dev->ctl_ainput);
291 ainput = EM28XX_AUDIO_SRC_TUNER; 293 ainput = EM28XX_AUDIO_SRC_TUNER;
292 em28xx_audio_source(dev, ainput); 294 em28xx_audio_source(dev, ainput);
diff --git a/drivers/media/video/em28xx/em28xx.h b/drivers/media/video/em28xx/em28xx.h
index 5c7a41ce69f3..ffa9acc9be37 100644
--- a/drivers/media/video/em28xx/em28xx.h
+++ b/drivers/media/video/em28xx/em28xx.h
@@ -216,6 +216,8 @@ struct em28xx {
216 unsigned int has_msp34xx:1; 216 unsigned int has_msp34xx:1;
217 unsigned int has_tda9887:1; 217 unsigned int has_tda9887:1;
218 218
219 u32 i2s_speed; /* I2S speed for audio digital stream */
220
219 enum em28xx_decoder decoder; 221 enum em28xx_decoder decoder;
220 222
221 int tuner_type; /* type of the tuner */ 223 int tuner_type; /* type of the tuner */