diff options
author | Mauro Carvalho Chehab <devnull@localhost> | 2005-12-26 13:57:00 +0000 |
---|---|---|
committer | Mauro Carvalho Chehab <devnull@localhost> | 2005-12-26 13:57:00 +0000 |
commit | f12863ef9f416661a0701b40684653e682edd686 (patch) | |
tree | 16d647cda8cd9cc2ba619652844035c857504583 /linux/drivers/media/video/em28xx | |
parent | 47f8c542de6bd81e34cd5a3731686720f9b2b73f (diff) | |
download | mediapointer-dvb-s2-f12863ef9f416661a0701b40684653e682edd686.tar.gz mediapointer-dvb-s2-f12863ef9f416661a0701b40684653e682edd686.tar.bz2 |
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 'linux/drivers/media/video/em28xx')
-rw-r--r-- | linux/drivers/media/video/em28xx/em28xx-cards.c | 8 | ||||
-rw-r--r-- | linux/drivers/media/video/em28xx/em28xx-video.c | 2 | ||||
-rw-r--r-- | linux/drivers/media/video/em28xx/em28xx.h | 2 |
3 files changed, 6 insertions, 6 deletions
diff --git a/linux/drivers/media/video/em28xx/em28xx-cards.c b/linux/drivers/media/video/em28xx/em28xx-cards.c index 679c68a8c..e3bcad2b8 100644 --- a/linux/drivers/media/video/em28xx/em28xx-cards.c +++ b/linux/drivers/media/video/em28xx/em28xx-cards.c @@ -31,6 +31,7 @@ #include <media/tuner.h> #include <media/audiochip.h> #include <media/tveeprom.h> +#include <media/v4l2-common.h> #include "msp3400.h" #include "em28xx.h" @@ -262,7 +263,6 @@ void em28xx_card_setup(struct em28xx *dev) /* request some modules */ if (dev->model == EM2820_BOARD_HAUPPAUGE_WINTV_USB_2) { struct tveeprom tv; - struct v4l2_audioout ao; #ifdef CONFIG_MODULES request_module("tveeprom"); request_module("ir-kbd-i2c"); @@ -275,12 +275,8 @@ void em28xx_card_setup(struct em28xx *dev) dev->tuner_type= tv.tuner_type; if (tv.audio_processor == AUDIO_CHIP_MSP34XX) { + dev->i2s_speed=2048000; dev->has_msp34xx=1; - memset (&ao,0,sizeof(ao)); - - ao.index=2; - ao.mode=V4L2_AUDMODE_32BITS; - em28xx_i2c_call_clients(dev, VIDIOC_S_AUDOUT, &ao); } else dev->has_msp34xx=0; } diff --git a/linux/drivers/media/video/em28xx/em28xx-video.c b/linux/drivers/media/video/em28xx/em28xx-video.c index 94696254e..7f05fcd23 100644 --- a/linux/drivers/media/video/em28xx/em28xx-video.c +++ b/linux/drivers/media/video/em28xx/em28xx-video.c @@ -368,6 +368,8 @@ static void video_mux(struct em28xx *dev, int index) em28xx_videodbg("Setting input index=%d, vmux=%d, amux=%d\n",index,input,dev->ctl_ainput); if (dev->has_msp34xx) { + if (dev->i2s_speed) + em28xx_i2c_call_clients(dev, VIDIOC_INT_I2S_CLOCK_FREQ, &dev->i2s_speed); em28xx_i2c_call_clients(dev, VIDIOC_S_AUDIO, &dev->ctl_ainput); ainput = EM28XX_AUDIO_SRC_TUNER; em28xx_audio_source(dev, ainput); diff --git a/linux/drivers/media/video/em28xx/em28xx.h b/linux/drivers/media/video/em28xx/em28xx.h index ef332d3e6..7a62c6e84 100644 --- a/linux/drivers/media/video/em28xx/em28xx.h +++ b/linux/drivers/media/video/em28xx/em28xx.h @@ -217,6 +217,8 @@ struct em28xx { unsigned int has_msp34xx:1; unsigned int has_tda9887:1; + u32 i2s_speed; /* I2S speed for audio digital stream */ + enum em28xx_decoder decoder; int tuner_type; /* type of the tuner */ |