summaryrefslogtreecommitdiff
path: root/linux/drivers/media
diff options
context:
space:
mode:
authorHans Verkuil <hverkuil@xs4all.nl>2006-03-19 16:41:28 +0100
committerHans Verkuil <hverkuil@xs4all.nl>2006-03-19 16:41:28 +0100
commit09648f958d1c6060e3372c88b6f22b991ee0d633 (patch)
tree4c4136550e85a1752babeba69194657caf1c6a99 /linux/drivers/media
parentfde3e3b6816368fa44ece4a962fd3ef5ed664398 (diff)
parent9000c5024269dbd6f01e6cab6d8eaeb9f90b240f (diff)
downloadmediapointer-dvb-s2-09648f958d1c6060e3372c88b6f22b991ee0d633.tar.gz
mediapointer-dvb-s2-09648f958d1c6060e3372c88b6f22b991ee0d633.tar.bz2
Merge from master
From: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Diffstat (limited to 'linux/drivers/media')
-rw-r--r--linux/drivers/media/dvb/b2c2/flexcop-usb.c1
-rw-r--r--linux/drivers/media/video/cx25840/cx25840-core.c35
-rw-r--r--linux/drivers/media/video/cx88/Kconfig5
-rw-r--r--linux/drivers/media/video/pvrusb2/pvrusb2-audio.c31
-rw-r--r--linux/drivers/media/video/tda9840.c3
-rw-r--r--linux/drivers/media/video/tea6415c.c3
-rw-r--r--linux/drivers/media/video/tea6420.c3
7 files changed, 52 insertions, 29 deletions
diff --git a/linux/drivers/media/dvb/b2c2/flexcop-usb.c b/linux/drivers/media/dvb/b2c2/flexcop-usb.c
index 78e0adf0f..c29abd803 100644
--- a/linux/drivers/media/dvb/b2c2/flexcop-usb.c
+++ b/linux/drivers/media/dvb/b2c2/flexcop-usb.c
@@ -541,6 +541,7 @@ static struct usb_device_id flexcop_usb_table [] = {
{ USB_DEVICE(0x0af7, 0x0101) },
{ }
};
+MODULE_DEVICE_TABLE (usb, flexcop_usb_table);
/* usb specific object needed to register this driver with the usb subsystem */
static struct usb_driver flexcop_usb_driver = {
diff --git a/linux/drivers/media/video/cx25840/cx25840-core.c b/linux/drivers/media/video/cx25840/cx25840-core.c
index d89a6456e..cfe64d600 100644
--- a/linux/drivers/media/video/cx25840/cx25840-core.c
+++ b/linux/drivers/media/video/cx25840/cx25840-core.c
@@ -186,9 +186,9 @@ static void cx25840_initialize(struct i2c_client *client, int loadfw)
cx25840_write(client, 0x4a5, 0x00);
cx25840_write(client, 0x402, 0x00);
/* 8. */
- cx25840_write(client, 0x401, 0x18);
- cx25840_write(client, 0x4a2, 0x10);
- cx25840_write(client, 0x402, 0x04);
+ cx25840_and_or(client, 0x401, ~0x18, 0);
+ cx25840_and_or(client, 0x4a2, ~0x10, 0x10);
+ /* steps 8c and 8d are done in change_input() */
/* 10. */
cx25840_write(client, 0x8d3, 0x1f);
cx25840_write(client, 0x8e3, 0x03);
@@ -219,6 +219,17 @@ static void input_change(struct i2c_client *client)
struct cx25840_state *state = i2c_get_clientdata(client);
v4l2_std_id std = cx25840_get_v4lstd(client);
+ /* Follow step 8c and 8d of section 3.16 in the cx25840 datasheet */
+ if (std & V4L2_STD_SECAM) {
+ cx25840_write(client, 0x402, 0);
+ }
+ else {
+ cx25840_write(client, 0x402, 0x04);
+ cx25840_write(client, 0x49f, (std & V4L2_STD_NTSC) ? 0x14 : 0x11);
+ }
+ cx25840_and_or(client, 0x401, ~0x60, 0);
+ cx25840_and_or(client, 0x401, ~0x60, 0x60);
+
/* Note: perhaps V4L2_STD_PAL_M should be handled as V4L2_STD_NTSC
instead of V4L2_STD_PAL. Someone needs to test this. */
if (std & V4L2_STD_PAL) {
@@ -353,6 +364,15 @@ static int set_v4lstd(struct i2c_client *client, v4l2_std_id std)
}
}
+ /* Follow step 9 of section 3.16 in the cx25840 datasheet.
+ Without this PAL may display a vertical ghosting effect.
+ This happens for example with the Yuan MPC622. */
+ if (fmt >= 4 && fmt < 8) {
+ /* Set format to NTSC-M */
+ cx25840_and_or(client, 0x400, ~0xf, 1);
+ /* Turn off LCOMB */
+ cx25840_and_or(client, 0x47b, ~6, 0);
+ }
cx25840_and_or(client, 0x400, ~0xf, fmt);
cx25840_vbi_setup(client);
return 0;
@@ -369,7 +389,14 @@ v4l2_std_id cx25840_get_v4lstd(struct i2c_client * client)
}
switch (fmt) {
- case 0x1: return V4L2_STD_NTSC_M | V4L2_STD_NTSC_M_KR;
+ case 0x1:
+ {
+ /* if the audio std is A2-M, then this is the South Korean
+ NTSC standard */
+ if (cx25840_read(client, 0x805) == 2)
+ return V4L2_STD_NTSC_M_KR;
+ return V4L2_STD_NTSC_M;
+ }
case 0x2: return V4L2_STD_NTSC_M_JP;
case 0x3: return V4L2_STD_NTSC_443;
case 0x4: return V4L2_STD_PAL;
diff --git a/linux/drivers/media/video/cx88/Kconfig b/linux/drivers/media/video/cx88/Kconfig
index e140996e6..ff0f72340 100644
--- a/linux/drivers/media/video/cx88/Kconfig
+++ b/linux/drivers/media/video/cx88/Kconfig
@@ -16,12 +16,13 @@ config VIDEO_CX88
module will be called cx8800
config VIDEO_CX88_ALSA
- tristate "ALSA DMA audio support"
+ tristate "Conexant 2388x DMA audio support"
depends on VIDEO_CX88 && SND && EXPERIMENTAL
select SND_PCM
---help---
This is a video4linux driver for direct (DMA) audio on
- Conexant 2388x based TV cards.
+ Conexant 2388x based TV cards using ALSA.
+
It only works with boards with function 01 enabled.
To check if your board supports, use lspci -n.
If supported, you should see 1471:8801 or 1471:8811
diff --git a/linux/drivers/media/video/pvrusb2/pvrusb2-audio.c b/linux/drivers/media/video/pvrusb2/pvrusb2-audio.c
index 79e1bede4..fb69e1ad5 100644
--- a/linux/drivers/media/video/pvrusb2/pvrusb2-audio.c
+++ b/linux/drivers/media/video/pvrusb2/pvrusb2-audio.c
@@ -37,21 +37,6 @@ struct pvr2_msp3400_handler {
};
-/*
-
- MCI <isely@pobox.com> 10-Mar-2005 - Rather than operate the msp34xx
- directly, we rely on the msp3400.ko module to do it for us. We
- really have to do this because that $##@!! module is going to attach
- itself to us anyway, so we really can't operate the chip ourselves.
- Unfortunately msp3400.ko is a real train wreck of a piece of code.
- Most of the code below tries to tickle that module in just the right
- way to get the results we need. Yuck. msp3400.c should be taken
- out back and shot. Based on my reading of the actual chip datasheet
- it should in theory be possible to write a far cleaner and simpler
- driver than what is currently there right now.
-
-*/
-
static int xlat_audiomode_to_v4l2(int id)
{
switch (id) {
@@ -76,7 +61,7 @@ static void set_stereo(struct pvr2_msp3400_handler *ctxt)
struct pvr2_hdw *hdw = ctxt->hdw;
struct v4l2_routing route;
- pvr2_trace(PVR2_TRACE_CHIPS,"i2c msp3400 set_stereo");
+ pvr2_trace(PVR2_TRACE_CHIPS,"i2c msp3400 v4l2 set_stereo");
if (hdw->controls[PVR2_CID_INPUT].value == PVR2_CVAL_INPUT_TV) {
struct v4l2_tuner vt;
@@ -161,19 +146,19 @@ static void msp3400_update(struct pvr2_msp3400_handler *ctxt)
}
-/* This reads back the current volume parameters and signal type */
+/* This reads back the current signal type */
static int get_audio_status(struct pvr2_msp3400_handler *ctxt)
{
- struct video_audio vt;
+ struct v4l2_tuner vt;
int stat;
memset(&vt,0,sizeof(vt));
- stat = pvr2_i2c_client_cmd(ctxt->client,VIDIOCGAUDIO,&vt);
+ stat = pvr2_i2c_client_cmd(ctxt->client,VIDIOC_G_TUNER,&vt);
if (stat < 0) return stat;
- ctxt->hdw->flag_stereo = (vt.mode & VIDEO_SOUND_STEREO) != 0;
+ ctxt->hdw->flag_stereo = (vt.audmode & V4L2_TUNER_MODE_STEREO) != 0;
ctxt->hdw->flag_bilingual =
- (vt.mode & (VIDEO_SOUND_LANG1|VIDEO_SOUND_LANG2)) != 0;
+ (vt.audmode & V4L2_TUNER_MODE_LANG2) != 0;
return 0;
}
@@ -189,7 +174,7 @@ static void pvr2_msp3400_detach(struct pvr2_msp3400_handler *ctxt)
static unsigned int pvr2_msp3400_describe(struct pvr2_msp3400_handler *ctxt,
char *buf,unsigned int cnt)
{
- return scnprintf(buf,cnt,"handler: pvrusb2-audio");
+ return scnprintf(buf,cnt,"handler: pvrusb2-audio v4l2");
}
@@ -222,7 +207,7 @@ int pvr2_i2c_msp3400_setup(struct pvr2_hdw *hdw,struct pvr2_i2c_client *cp)
sizeof(msp3400_ops[0]))) - 1;
cp->handler = &ctxt->i2c_handler;
hdw->audio_stat = &ctxt->astat;
- pvr2_trace(PVR2_TRACE_CHIPS,"i2c 0x%x msp3400 V4L1 handler set up",
+ pvr2_trace(PVR2_TRACE_CHIPS,"i2c 0x%x msp3400 V4L2 handler set up",
cp->client->addr);
return !0;
}
diff --git a/linux/drivers/media/video/tda9840.c b/linux/drivers/media/video/tda9840.c
index 4677399db..42a842aec 100644
--- a/linux/drivers/media/video/tda9840.c
+++ b/linux/drivers/media/video/tda9840.c
@@ -46,6 +46,9 @@ MODULE_PARM_DESC(debug, "Turn on/off device debugging (default:off).");
/* addresses to scan, found only at 0x42 (7-Bit) */
static unsigned short normal_i2c[] = { I2C_ADDR_TDA9840, I2C_CLIENT_END };
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,13)
+static unsigned short normal_i2c_range[] = { I2C_CLIENT_END };
+#endif
/* magic definition of all other variables and things */
I2C_CLIENT_INSMOD;
diff --git a/linux/drivers/media/video/tea6415c.c b/linux/drivers/media/video/tea6415c.c
index 12e83ad21..98434efb0 100644
--- a/linux/drivers/media/video/tea6415c.c
+++ b/linux/drivers/media/video/tea6415c.c
@@ -46,6 +46,9 @@ MODULE_PARM_DESC(debug, "Turn on/off device debugging (default:off).");
/* addresses to scan, found only at 0x03 and/or 0x43 (7-bit) */
static unsigned short normal_i2c[] = { I2C_TEA6415C_1, I2C_TEA6415C_2, I2C_CLIENT_END };
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,13)
+static unsigned short normal_i2c_range[] = { I2C_CLIENT_END };
+#endif
/* magic definition of all other variables and things */
I2C_CLIENT_INSMOD;
diff --git a/linux/drivers/media/video/tea6420.c b/linux/drivers/media/video/tea6420.c
index 27454cbb8..b5e41f49b 100644
--- a/linux/drivers/media/video/tea6420.c
+++ b/linux/drivers/media/video/tea6420.c
@@ -43,6 +43,9 @@ MODULE_PARM_DESC(debug, "Turn on/off device debugging (default:off).");
/* addresses to scan, found only at 0x4c and/or 0x4d (7-Bit) */
static unsigned short normal_i2c[] = { I2C_ADDR_TEA6420_1, I2C_ADDR_TEA6420_2, I2C_CLIENT_END };
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,13)
+static unsigned short normal_i2c_range[] = { I2C_CLIENT_END };
+#endif
/* magic definition of all other variables and things */
I2C_CLIENT_INSMOD;