summaryrefslogtreecommitdiffstats
path: root/drivers/media
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media')
-rw-r--r--drivers/media/video/dpc7146.c58
-rw-r--r--drivers/media/video/hexium_gemini.c10
-rw-r--r--drivers/media/video/hexium_orion.c18
-rw-r--r--drivers/media/video/mxb.c146
-rw-r--r--drivers/media/video/mxb.h2
-rw-r--r--drivers/media/video/tda9840.c3
-rw-r--r--drivers/media/video/tea6415c.c5
-rw-r--r--drivers/media/video/tea6420.c5
8 files changed, 125 insertions, 122 deletions
diff --git a/drivers/media/video/dpc7146.c b/drivers/media/video/dpc7146.c
index 2831bdd1205..0fcc935828f 100644
--- a/drivers/media/video/dpc7146.c
+++ b/drivers/media/video/dpc7146.c
@@ -1,6 +1,6 @@
/*
dpc7146.c - v4l2 driver for the dpc7146 demonstration board
-
+
Copyright (C) 2000-2003 Michael Hunold <michael@mihu.de>
This program is free software; you can redistribute it and/or modify
@@ -52,7 +52,7 @@
#define SAA711X_DECODED_BYTES_OF_TS_2 0x1C
#define SAA711X_STATUS_BYTE 0x1F
-#define DPC_BOARD_CAN_DO_VBI(dev) (dev->revision != 0)
+#define DPC_BOARD_CAN_DO_VBI(dev) (dev->revision != 0)
static int debug = 0;
module_param(debug, int, 0);
@@ -81,16 +81,16 @@ struct dpc
struct video_device *video_dev;
struct video_device *vbi_dev;
- struct i2c_adapter i2c_adapter;
+ struct i2c_adapter i2c_adapter;
struct i2c_client *saa7111a;
-
+
int cur_input; /* current input */
};
/* fixme: add vbi stuff here */
static int dpc_probe(struct saa7146_dev* dev)
{
- struct dpc* dpc = NULL;
+ struct dpc* dpc = NULL;
struct i2c_client *client;
struct list_head *item;
@@ -118,20 +118,20 @@ static int dpc_probe(struct saa7146_dev* dev)
/* loop through all i2c-devices on the bus and look who is there */
list_for_each(item,&dpc->i2c_adapter.clients) {
client = list_entry(item, struct i2c_client, list);
- if( I2C_SAA7111A == client->addr )
+ if( I2C_SAA7111A == client->addr )
dpc->saa7111a = client;
}
/* check if all devices are present */
if( 0 == dpc->saa7111a ) {
- DEB_D(("dpc_v4l2.o: dpc_attach failed for this device.\n"));
+ DEB_D(("dpc_v4l2.o: dpc_attach failed for this device.\n"));
i2c_del_adapter(&dpc->i2c_adapter);
kfree(dpc);
return -ENODEV;
}
-
- /* all devices are present, probe was successful */
- DEB_D(("dpc_v4l2.o: dpc_probe succeeded for this device.\n"));
+
+ /* all devices are present, probe was successful */
+ DEB_D(("dpc_v4l2.o: dpc_probe succeeded for this device.\n"));
/* we store the pointer in our private data field */
dev->ext_priv = dpc;
@@ -182,7 +182,7 @@ static struct saa7146_ext_vv vv_data;
static int dpc_attach(struct saa7146_dev* dev, struct saa7146_pci_extension_data *info)
{
struct dpc* dpc = (struct dpc*)dev->ext_priv;
-
+
DEB_D(("dpc_v4l2.o: dpc_attach called.\n"));
/* checking for i2c-devices can be omitted here, because we
@@ -193,7 +193,7 @@ static int dpc_attach(struct saa7146_dev* dev, struct saa7146_pci_extension_data
ERR(("cannot register capture v4l2 device. skipping.\n"));
return -1;
}
-
+
/* initialization stuff (vbi) (only for revision > 0 and for extensions which want it)*/
if( 0 != DPC_BOARD_CAN_DO_VBI(dev)) {
if( 0 != saa7146_register_device(&dpc->vbi_dev, dev, "dpc", VFL_TYPE_VBI)) {
@@ -205,18 +205,18 @@ static int dpc_attach(struct saa7146_dev* dev, struct saa7146_pci_extension_data
printk("dpc: found 'dpc7146 demonstration board'-%d.\n",dpc_num);
dpc_num++;
-
+
/* the rest */
dpc->cur_input = 0;
dpc_init_done(dev);
-
+
return 0;
}
static int dpc_detach(struct saa7146_dev* dev)
{
struct dpc* dpc = (struct dpc*)dev->ext_priv;
-
+
DEB_EE(("dev:%p\n",dev));
i2c_release_client(dpc->saa7111a);
@@ -238,25 +238,25 @@ static int dpc_detach(struct saa7146_dev* dev)
int dpc_vbi_bypass(struct saa7146_dev* dev)
{
struct dpc* dpc = (struct dpc*)dev->ext_priv;
-
+
int i = 1;
/* switch bypass in saa7111a */
if ( 0 != dpc->saa7111a->driver->command(dpc->saa7111a,SAA711X_VBI_BYPASS, &i)) {
printk("dpc_v4l2.o: VBI_BYPASS: could not address saa7111a.\n");
return -1;
- }
+ }
return 0;
}
#endif
-static int dpc_ioctl(struct saa7146_fh *fh, unsigned int cmd, void *arg)
+static int dpc_ioctl(struct saa7146_fh *fh, unsigned int cmd, void *arg)
{
struct saa7146_dev *dev = fh->dev;
struct dpc* dpc = (struct dpc*)dev->ext_priv;
/*
- struct saa7146_vv *vv = dev->vv_data;
+ struct saa7146_vv *vv = dev->vv_data;
*/
switch(cmd)
{
@@ -264,11 +264,11 @@ static int dpc_ioctl(struct saa7146_fh *fh, unsigned int cmd, void *arg)
{
struct v4l2_input *i = arg;
DEB_EE(("VIDIOC_ENUMINPUT %d.\n",i->index));
-
+
if( i->index < 0 || i->index >= DPC_INPUTS) {
return -EINVAL;
}
-
+
memcpy(i, &dpc_inputs[i->index], sizeof(struct v4l2_input));
DEB_D(("dpc_v4l2.o: v4l2_ioctl: VIDIOC_ENUMINPUT %d.\n",i->index));
@@ -289,13 +289,13 @@ static int dpc_ioctl(struct saa7146_fh *fh, unsigned int cmd, void *arg)
if (input < 0 || input >= DPC_INPUTS) {
return -EINVAL;
}
-
+
dpc->cur_input = input;
/* fixme: switch input here, switch audio, too! */
// saa7146_set_hps_source_and_sync(dev, input_port_selection[input].hps_source, input_port_selection[input].hps_sync);
printk("dpc_v4l2.o: VIDIOC_S_INPUT: fixme switch input.\n");
-
+
return 0;
}
default:
@@ -334,8 +334,8 @@ static struct saa7146_standard standard[] = {
static struct saa7146_extension extension;
static struct saa7146_pci_extension_data dpc = {
- .ext_priv = "Multimedia eXtension Board",
- .ext = &extension,
+ .ext_priv = "Multimedia eXtension Board",
+ .ext = &extension,
};
static struct pci_device_id pci_tbl[] = {
@@ -357,7 +357,7 @@ static struct saa7146_ext_vv vv_data = {
.capabilities = V4L2_CAP_VBI_CAPTURE,
.stds = &standard[0],
.num_stds = sizeof(standard)/sizeof(struct saa7146_standard),
- .std_callback = &std_callback,
+ .std_callback = &std_callback,
.ioctls = &ioctls[0],
.ioctl = dpc_ioctl,
};
@@ -365,7 +365,7 @@ static struct saa7146_ext_vv vv_data = {
static struct saa7146_extension extension = {
.name = "dpc7146 demonstration board",
.flags = SAA7146_USE_I2C_IRQ,
-
+
.pci_tbl = &pci_tbl[0],
.module = THIS_MODULE,
@@ -375,7 +375,7 @@ static struct saa7146_extension extension = {
.irq_mask = 0,
.irq_func = NULL,
-};
+};
static int __init dpc_init_module(void)
{
@@ -383,7 +383,7 @@ static int __init dpc_init_module(void)
DEB_S(("failed to register extension.\n"));
return -ENODEV;
}
-
+
return 0;
}
diff --git a/drivers/media/video/hexium_gemini.c b/drivers/media/video/hexium_gemini.c
index e7bbeb11553..c7fed340565 100644
--- a/drivers/media/video/hexium_gemini.c
+++ b/drivers/media/video/hexium_gemini.c
@@ -1,9 +1,9 @@
/*
hexium_gemini.c - v4l2 driver for Hexium Gemini frame grabber cards
-
+
Visit http://www.mihu.de/linux/saa7146/ and follow the link
to "hexium" for further details about this card.
-
+
Copyright (C) 2003 Michael Hunold <michael@mihu.de>
This program is free software; you can redistribute it and/or modify
@@ -81,7 +81,7 @@ struct hexium
struct video_device *video_dev;
struct i2c_adapter i2c_adapter;
-
+
int cur_input; /* current input */
v4l2_std_id cur_std; /* current standard */
int cur_bw; /* current black/white status */
@@ -174,7 +174,7 @@ static struct saa7146_standard hexium_standards[] = {
.h_offset = 1, .h_pixels = 720,
.v_max_out = 576, .h_max_out = 768,
}
-};
+};
/* bring hardware to a sane state. this has to be done, just in case someone
wants to capture from this device before it has been properly initialized.
@@ -311,7 +311,7 @@ static int hexium_ioctl(struct saa7146_fh *fh, unsigned int cmd, void *arg)
struct saa7146_dev *dev = fh->dev;
struct hexium *hexium = (struct hexium *) dev->ext_priv;
/*
- struct saa7146_vv *vv = dev->vv_data;
+ struct saa7146_vv *vv = dev->vv_data;
*/
switch (cmd) {
case VIDIOC_ENUMINPUT:
diff --git a/drivers/media/video/hexium_orion.c b/drivers/media/video/hexium_orion.c
index aad4a18aafd..137c4736da0 100644
--- a/drivers/media/video/hexium_orion.c
+++ b/drivers/media/video/hexium_orion.c
@@ -3,7 +3,7 @@
Visit http://www.mihu.de/linux/saa7146/ and follow the link
to "hexium" for further details about this card.
-
+
Copyright (C) 2003 Michael Hunold <michael@mihu.de>
This program is free software; you can redistribute it and/or modify
@@ -69,7 +69,7 @@ struct hexium
{
int type;
struct video_device *video_dev;
- struct i2c_adapter i2c_adapter;
+ struct i2c_adapter i2c_adapter;
int cur_input; /* current input */
};
@@ -86,7 +86,7 @@ static u8 hexium_saa7110[53]={
};
static struct {
- struct hexium_data data[8];
+ struct hexium_data data[8];
} hexium_input_select[] = {
{
{ /* cvbs 1 */
@@ -153,7 +153,7 @@ static struct {
{ 0x30, 0x60 },
{ 0x31, 0xB5 }, // ??
{ 0x21, 0x03 },
- }
+ }
}, {
{ /* y/c 1 */
{ 0x06, 0x80 },
@@ -187,7 +187,7 @@ static struct {
{ 0x31, 0x75 },
{ 0x21, 0x21 },
}
-}
+}
};
static struct saa7146_standard hexium_standards[] = {
@@ -207,7 +207,7 @@ static struct saa7146_standard hexium_standards[] = {
.h_offset = 1, .h_pixels = 720,
.v_max_out = 576, .h_max_out = 768,
}
-};
+};
/* this is only called for old HV-PCI6/Orion cards
without eeprom */
@@ -272,7 +272,7 @@ static int hexium_probe(struct saa7146_dev *dev)
return 0;
}
- /* check if this is an old hexium Orion card by looking at
+ /* check if this is an old hexium Orion card by looking at
a saa7110 at address 0x4e */
if (0 == (err = i2c_smbus_xfer(&hexium->i2c_adapter, 0x4e, 0, I2C_SMBUS_READ, 0x00, I2C_SMBUS_BYTE_DATA, &data))) {
printk("hexium_orion: device is a Hexium HV-PCI6/Orion (old).\n");
@@ -314,7 +314,7 @@ static int hexium_set_input(struct hexium *hexium, int input)
{
union i2c_smbus_data data;
int i = 0;
-
+
DEB_D((".\n"));
for (i = 0; i < 8; i++) {
@@ -375,7 +375,7 @@ static int hexium_ioctl(struct saa7146_fh *fh, unsigned int cmd, void *arg)
struct saa7146_dev *dev = fh->dev;
struct hexium *hexium = (struct hexium *) dev->ext_priv;
/*
- struct saa7146_vv *vv = dev->vv_data;
+ struct saa7146_vv *vv = dev->vv_data;
*/
switch (cmd) {
case VIDIOC_ENUMINPUT:
diff --git a/drivers/media/video/mxb.c b/drivers/media/video/mxb.c
index 2f154f415bc..eb3b3186749 100644
--- a/drivers/media/video/mxb.c
+++ b/drivers/media/video/mxb.c
@@ -1,11 +1,11 @@
/*
mxb - v4l2 driver for the Multimedia eXtension Board
-
+
Copyright (C) 1998-2006 Michael Hunold <michael@mihu.de>
Visit http://www.mihu.de/linux/saa7146/mxb/
for further details about this card.
-
+
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
@@ -35,12 +35,12 @@
#define I2C_SAA7111 0x24
-#define MXB_BOARD_CAN_DO_VBI(dev) (dev->revision != 0)
+#define MXB_BOARD_CAN_DO_VBI(dev) (dev->revision != 0)
/* global variable */
static int mxb_num = 0;
-/* initial frequence the tuner will be tuned to.
+/* initial frequence the tuner will be tuned to.
in verden (lower saxony, germany) 4148 is a
channel called "phoenix" */
static int freq = 4148;
@@ -55,7 +55,7 @@ MODULE_PARM_DESC(debug, "Turn on/off device debugging (default:off).");
enum { TUNER, AUX1, AUX3, AUX3_YC };
static struct v4l2_input mxb_inputs[MXB_INPUTS] = {
- { TUNER, "Tuner", V4L2_INPUT_TYPE_TUNER, 1, 0, V4L2_STD_PAL_BG|V4L2_STD_NTSC_M, 0 },
+ { TUNER, "Tuner", V4L2_INPUT_TYPE_TUNER, 1, 0, V4L2_STD_PAL_BG|V4L2_STD_NTSC_M, 0 },
{ AUX1, "AUX1", V4L2_INPUT_TYPE_CAMERA, 2, 0, V4L2_STD_PAL_BG|V4L2_STD_NTSC_M, 0 },
{ AUX3, "AUX3 Composite", V4L2_INPUT_TYPE_CAMERA, 4, 0, V4L2_STD_PAL_BG|V4L2_STD_NTSC_M, 0 },
{ AUX3_YC, "AUX3 S-Video", V4L2_INPUT_TYPE_CAMERA, 4, 0, V4L2_STD_PAL_BG|V4L2_STD_NTSC_M, 0 },
@@ -66,7 +66,7 @@ static struct v4l2_input mxb_inputs[MXB_INPUTS] = {
static struct {
int hps_source;
int hps_sync;
-} input_port_selection[MXB_INPUTS] = {
+} input_port_selection[MXB_INPUTS] = {
{ SAA7146_HPS_SOURCE_PORT_A, SAA7146_HPS_SYNC_PORT_A },
{ SAA7146_HPS_SOURCE_PORT_A, SAA7146_HPS_SYNC_PORT_A },
{ SAA7146_HPS_SOURCE_PORT_A, SAA7146_HPS_SYNC_PORT_A },
@@ -81,7 +81,7 @@ static int video_audio_connect[MXB_INPUTS] =
/* these are the necessary input-output-pins for bringing one audio source
(see above) to the CD-output */
static struct tea6420_multiplex TEA6420_cd[MXB_AUDIOS+1][2] =
- {
+ {
{{1,1,0},{1,1,0}}, /* Tuner */
{{5,1,0},{6,1,0}}, /* AUX 1 */
{{4,1,0},{6,1,0}}, /* AUX 2 */
@@ -122,8 +122,8 @@ static struct saa7146_extension_ioctls ioctls[] = {
{ VIDIOC_S_FREQUENCY, SAA7146_EXCLUSIVE },
{ VIDIOC_G_AUDIO, SAA7146_EXCLUSIVE },
{ VIDIOC_S_AUDIO, SAA7146_EXCLUSIVE },
- { MXB_S_AUDIO_CD, SAA7146_EXCLUSIVE }, /* custom control */
- { MXB_S_AUDIO_LINE, SAA7146_EXCLUSIVE }, /* custom control */
+ { MXB_S_AUDIO_CD, SAA7146_EXCLUSIVE }, /* custom control */
+ { MXB_S_AUDIO_LINE, SAA7146_EXCLUSIVE }, /* custom control */
{ 0, 0 }
};
@@ -132,7 +132,7 @@ struct mxb
struct video_device *video_dev;
struct video_device *vbi_dev;
- struct i2c_adapter i2c_adapter;
+ struct i2c_adapter i2c_adapter;
struct i2c_client* saa7111a;
struct i2c_client* tda9840;
@@ -200,15 +200,15 @@ static int mxb_probe(struct saa7146_dev* dev)
client = list_entry(item, struct i2c_client, list);
if( I2C_TEA6420_1 == client->addr )
mxb->tea6420_1 = client;
- if( I2C_TEA6420_2 == client->addr )
+ if( I2C_TEA6420_2 == client->addr )
mxb->tea6420_2 = client;
- if( I2C_TEA6415C_2 == client->addr )
+ if( I2C_TEA6415C_2 == client->addr )
mxb->tea6415c = client;
- if( I2C_TDA9840 == client->addr )
+ if( I2C_TDA9840 == client->addr )
mxb->tda9840 = client;
if( I2C_SAA7111 == client->addr )
mxb->saa7111a = client;
- if( 0x60 == client->addr )
+ if( 0x60 == client->addr )
mxb->tuner = client;
}
@@ -222,7 +222,7 @@ static int mxb_probe(struct saa7146_dev* dev)
return -ENODEV;
}
- /* all devices are present, probe was successful */
+ /* all devices are present, probe was successful */
/* we store the pointer in our private data field */
dev->ext_priv = mxb;
@@ -230,7 +230,7 @@ static int mxb_probe(struct saa7146_dev* dev)
return 0;
}
-/* some init data for the saa7740, the so-called 'sound arena module'.
+/* some init data for the saa7740, the so-called 'sound arena module'.
there are no specs available, so we simply use some init values */
static struct {
int length;
@@ -330,7 +330,7 @@ static int mxb_init_done(struct saa7146_dev* dev)
v4l2_std_id std = V4L2_STD_PAL_BG;
int i = 0, err = 0;
- struct tea6415c_multiplex vm;
+ struct tea6415c_multiplex vm;
/* select video mode in saa7111a */
i = VIDEO_MODE_PAL;
@@ -380,16 +380,16 @@ static int mxb_init_done(struct saa7146_dev* dev)
vm.in = 3;
vm.out = 13;
mxb->tea6415c->driver->command(mxb->tea6415c,TEA6415C_SWITCH, &vm);
-
+
/* the rest for mxb */
mxb->cur_input = 0;
mxb->cur_mute = 1;
mxb->cur_mode = V4L2_TUNER_MODE_STEREO;
mxb->tda9840->driver->command(mxb->tda9840, TDA9840_SWITCH, &mxb->cur_mode);
-
+
/* check if the saa7740 (aka 'sound arena module') is present
- on the mxb. if so, we must initialize it. due to lack of
+ on the mxb. if so, we must initialize it. due to lack of
informations about the saa7740, the values were reverse
engineered. */
msg.addr = 0x1b;
@@ -409,7 +409,7 @@ static int mxb_init_done(struct saa7146_dev* dev)
break;
}
- msg.len = mxb_saa7740_init[i].length;
+ msg.len = mxb_saa7740_init[i].length;
msg.buf = &mxb_saa7740_init[i].data[0];
if( 1 != (err = i2c_transfer(&mxb->i2c_adapter, &msg, 1))) {
DEB_D(("failed to initialize 'sound arena module'.\n"));
@@ -418,12 +418,12 @@ static int mxb_init_done(struct saa7146_dev* dev)
}
INFO(("'sound arena module' detected.\n"));
}
-err:
+err:
/* the rest for saa7146: you should definitely set some basic values
for the input-port handling of the saa7146. */
/* ext->saa has been filled by the core driver */
-
+
/* some stuff is done via variables */
saa7146_set_hps_source_and_sync(dev, input_port_selection[mxb->cur_input].hps_source, input_port_selection[mxb->cur_input].hps_sync);
@@ -431,7 +431,7 @@ err:
/* this is ugly, but because of the fact that this is completely
hardware dependend, it should be done directly... */
- saa7146_write(dev, DD1_STREAM_B, 0x00000000);
+ saa7146_write(dev, DD1_STREAM_B, 0x00000000);
saa7146_write(dev, DD1_INIT, 0x02000200);
saa7146_write(dev, MC2, (MASK_09 | MASK_25 | MASK_10 | MASK_26));
@@ -453,7 +453,7 @@ static struct saa7146_ext_vv vv_data;
static int mxb_attach(struct saa7146_dev* dev, struct saa7146_pci_extension_data *info)
{
struct mxb* mxb = (struct mxb*)dev->ext_priv;
-
+
DEB_EE(("dev:%p\n",dev));
/* checking for i2c-devices can be omitted here, because we
@@ -464,7 +464,7 @@ static int mxb_attach(struct saa7146_dev* dev, struct saa7146_pci_extension_data
ERR(("cannot register capture v4l2 device. skipping.\n"));
return -1;
}
-
+
/* initialization stuff (vbi) (only for revision > 0 and for extensions which want it)*/
if( 0 != MXB_BOARD_CAN_DO_VBI(dev)) {
if( 0 != saa7146_register_device(&mxb->vbi_dev, dev, "mxb", VFL_TYPE_VBI)) {
@@ -513,17 +513,17 @@ static int mxb_detach(struct saa7146_dev* dev)
return 0;
}
-static int mxb_ioctl(struct saa7146_fh *fh, unsigned int cmd, void *arg)
+static int mxb_ioctl(struct saa7146_fh *fh, unsigned int cmd, void *arg)
{
struct saa7146_dev *dev = fh->dev;
struct mxb* mxb = (struct mxb*)dev->ext_priv;
- struct saa7146_vv *vv = dev->vv_data;
-
+ struct saa7146_vv *vv = dev->vv_data;
+
switch(cmd) {
case VIDIOC_ENUMINPUT:
{
struct v4l2_input *i = arg;
-
+
DEB_EE(("VIDIOC_ENUMINPUT %d.\n",i->index));
if( i->index < 0 || i->index >= MXB_INPUTS) {
return -EINVAL;
@@ -559,11 +559,11 @@ static int mxb_ioctl(struct saa7146_fh *fh, unsigned int cmd, void *arg)
break;
}
}
-
+
if( i < 0 ) {
return -EAGAIN;
}
-
+
switch (vc->id ) {
case V4L2_CID_AUDIO_MUTE: {
vc->value = mxb->cur_mute;
@@ -571,7 +571,7 @@ static int mxb_ioctl(struct saa7146_fh *fh, unsigned int cmd, void *arg)
return 0;
}
}
-
+
DEB_EE(("VIDIOC_G_CTRL V4L2_CID_AUDIO_MUTE:%d.\n",vc->value));
return 0;
}
@@ -580,17 +580,17 @@ static int mxb_ioctl(struct saa7146_fh *fh, unsigned int cmd, void *arg)
{
struct v4l2_control *vc = arg;
int i = 0;
-
+
for (i = MAXCONTROLS - 1; i >= 0; i--) {
if (mxb_controls[i].id == vc->id) {
break;
}
}
-
+
if( i < 0 ) {
return -EAGAIN;
}
-
+
switch (vc->id ) {
case V4L2_CID_AUDIO_MUTE: {
mxb->cur_mute = vc->value;
@@ -614,12 +614,12 @@ static int mxb_ioctl(struct saa7146_fh *fh, unsigned int cmd, void *arg)
*input = mxb->cur_input;
DEB_EE(("VIDIOC_G_INPUT %d.\n",*input));
- return 0;
- }
+ return 0;
+ }
case VIDIOC_S_INPUT:
{
int input = *(int *)arg;
- struct tea6415c_multiplex vm;
+ struct tea6415c_multiplex vm;
int i = 0;
DEB_EE(("VIDIOC_S_INPUT %d.\n",input));
@@ -627,34 +627,34 @@ static int mxb_ioctl(struct saa7146_fh *fh, unsigned int cmd, void *arg)
if (input < 0 || input >= MXB_INPUTS) {
return -EINVAL;
}
-
+
/* fixme: locke das setzen des inputs mit hilfe des mutexes
mutex_lock(&dev->lock);
video_mux(dev,*i);
mutex_unlock(&dev->lock);
*/
-
+
/* fixme: check if streaming capture
if ( 0 != dev->streaming ) {
DEB_D(("VIDIOC_S_INPUT illegal while streaming.\n"));
return -EPERM;
}
*/
-
+
mxb->cur_input = input;
-
+
saa7146_set_hps_source_and_sync(dev, input_port_selection[input].hps_source, input_port_selection[input].hps_sync);
-
+
/* prepare switching of tea6415c and saa7111a;
have a look at the 'background'-file for further informations */
switch( input ) {
-
+
case TUNER:
{
i = 0;
vm.in = 3;
vm.out = 17;
-
+
if ( 0 != mxb->tea6415c->driver->command(mxb->tea6415c,TEA6415C_SWITCH, &vm)) {
printk("VIDIOC_S_INPUT: could not address tea6415c #1\n");
return -EFAULT;
@@ -662,7 +662,7 @@ static int mxb_ioctl(struct saa7146_fh *fh, unsigned int cmd, void *arg)
/* connect tuner-output always to multicable */
vm.in = 3;
vm.out = 13;
- break;
+ break;
}
case AUX3_YC:
{
@@ -703,11 +703,11 @@ static int mxb_ioctl(struct saa7146_fh *fh, unsigned int cmd, void *arg)
break;
}
}
-
+
/* switch video in saa7111a */
if ( 0 != mxb->saa7111a->driver->command(mxb->saa7111a,DECODER_SET_INPUT, &i)) {
printk("VIDIOC_S_INPUT: could not address saa7111a #1.\n");
- }
+ }
/* switch the audio-source only if necessary */
if( 0 == mxb->cur_mute ) {
@@ -738,11 +738,11 @@ static int mxb_ioctl(struct saa7146_fh *fh, unsigned int cmd, void *arg)
t->rangehigh = 13684; /* 855.25 MHz / 62.5 kHz = 13684 */
/* FIXME: add the real signal strength here */
t->signal = 0xffff;
- t->afc = 0;
+ t->afc = 0;
mxb->tda9840->driver->command(mxb->tda9840,TDA9840_DETECT, &byte);
t->audmode = mxb->cur_mode;
-
+
if( byte < 0 ) {
t->rxsubchans = V4L2_TUNER_SUB_MONO;
} else {
@@ -777,12 +777,12 @@ static int mxb_ioctl(struct saa7146_fh *fh, unsigned int cmd, void *arg)
struct v4l2_tuner *t = arg;
int result = 0;
int byte = 0;
-
+
if( 0 != t->index ) {
DEB_D(("VIDIOC_S_TUNER: channel %d does not have a tuner attached.\n",t->index));
return -EINVAL;
}
-
+
switch(t->audmode) {
case V4L2_TUNER_MODE_STEREO: {
mxb->cur_mode = V4L2_TUNER_MODE_STEREO;
@@ -813,7 +813,7 @@ static int mxb_ioctl(struct saa7146_fh *fh, unsigned int cmd, void *arg)
if( 0 != (result = mxb->tda9840->driver->command(mxb->tda9840, TDA9840_SWITCH, &byte))) {
printk("VIDIOC_S_TUNER error. result:%d, byte:%d\n",result,byte);
}
-
+
return 0;
}
case VIDIOC_G_FREQUENCY:
@@ -839,7 +839,7 @@ static int mxb_ioctl(struct saa7146_fh *fh, unsigned int cmd, void *arg)
if (V4L2_TUNER_ANALOG_TV != f->type)
return -EINVAL;
-
+
if(0 != mxb->cur_input) {
DEB_D(("VIDIOC_S_FREQ: channel %d does not have a tuner!\n",mxb->cur_input));
return -EINVAL;
@@ -848,7 +848,7 @@ static int mxb_ioctl(struct saa7146_fh *fh, unsigned int cmd, void *arg)
mxb->cur_freq = *f;
DEB_EE(("VIDIOC_S_FREQUENCY: freq:0x%08x.\n", mxb->cur_freq.frequency));
- /* tune in desired frequency */
+ /* tune in desired frequency */
mxb->tuner->driver->command(mxb->tuner, VIDIOC_S_FREQUENCY, &mxb->cur_freq);
/* hack: changing the frequency should invalidate the vbi-counter (=> alevt) */
@@ -861,12 +861,12 @@ static int mxb_ioctl(struct saa7146_fh *fh, unsigned int cmd, void *arg)
case MXB_S_AUDIO_CD:
{
int i = *(int*)arg;
-
+
if( i < 0 || i >= MXB_AUDIOS ) {
DEB_D(("illegal argument to MXB_S_AUDIO_CD: i:%d.\n",i));
return -EINVAL;
}
-
+
DEB_EE(("MXB_S_AUDIO_CD: i:%d.\n",i));
mxb->tea6420_1->driver->command(mxb->tea6420_1,TEA6420_SWITCH, &TEA6420_cd[i][0]);
@@ -877,12 +877,12 @@ static int mxb_ioctl(struct saa7146_fh *fh, unsigned int cmd, void *arg)
case MXB_S_AUDIO_LINE:
{
int i = *(int*)arg;
-
+
if( i < 0 || i >= MXB_AUDIOS ) {
DEB_D(("illegal argument to MXB_S_AUDIO_LINE: i:%d.\n",i));
return -EINVAL;
}
-
+
DEB_EE(("MXB_S_AUDIO_LINE: i:%d.\n",i));
mxb->tea6420_1->driver->command(mxb->tea6420_1,TEA6420_SWITCH, &TEA6420_line[i][0]);
mxb->tea6420_2->driver->command(mxb->tea6420_2,TEA6420_SWITCH, &TEA6420_line[i][1]);
@@ -894,13 +894,13 @@ static int mxb_ioctl(struct saa7146_fh *fh, unsigned int cmd, void *arg)
struct v4l2_audio *a = arg;
if( a->index < 0 || a->index > MXB_INPUTS ) {
- DEB_D(("VIDIOC_G_AUDIO %d out of range.\n",a->index));
+ DEB_D(("VIDIOC_G_AUDIO %d out of range.\n",a->index));
return -EINVAL;
}
-
- DEB_EE(("VIDIOC_G_AUDIO %d.\n",a->index));
+
+ DEB_EE(("VIDIOC_G_AUDIO %d.\n",a->index));
memcpy(a, &mxb_audios[video_audio_connect[mxb->cur_input]], sizeof(struct v4l2_audio));
-
+
return 0;
}
case VIDIOC_S_AUDIO:
@@ -908,7 +908,7 @@ static int mxb_ioctl(struct saa7146_fh *fh, unsigned int cmd, void *arg)
struct v4l2_audio *a = arg;
DEB_D(("VIDIOC_S_AUDIO %d.\n",a->index));
return 0;
- }
+ }
default:
/*
DEB2(printk("does not handle this ioctl.\n"));
@@ -928,7 +928,7 @@ static int std_callback(struct saa7146_dev* dev, struct saa7146_standard *std)
v4l2_std_id std = V4L2_STD_PAL_I;
DEB_D(("VIDIOC_S_STD: setting mxb for PAL_I.\n"));
/* set the 7146 gpio register -- I don't know what this does exactly */
- saa7146_write(dev, GPIO_CTRL, 0x00404050);
+ saa7146_write(dev, GPIO_CTRL, 0x00404050);
/* unset the 7111 gpio register -- I don't know what this does exactly */
mxb->saa7111a->driver->command(mxb->saa7111a,DECODER_SET_GPIO, &zero);
mxb->tuner->driver->command(mxb->tuner, VIDIOC_S_STD, &std);
@@ -936,7 +936,7 @@ static int std_callback(struct saa7146_dev* dev, struct saa7146_standard *std)
v4l2_std_id std = V4L2_STD_PAL_BG;
DEB_D(("VIDIOC_S_STD: setting mxb for PAL/NTSC/SECAM.\n"));
/* set the 7146 gpio register -- I don't know what this does exactly */
- saa7146_write(dev, GPIO_CTRL, 0x00404050);
+ saa7146_write(dev, GPIO_CTRL, 0x00404050);
/* set the 7111 gpio register -- I don't know what this does exactly */
mxb->saa7111a->driver->command(mxb->saa7111a,DECODER_SET_GPIO, &one);
mxb->tuner->driver->command(mxb->tuner, VIDIOC_S_STD, &std);
@@ -969,8 +969,8 @@ static struct saa7146_standard standard[] = {
};
static struct saa7146_pci_extension_data mxb = {
- .ext_priv = "Multimedia eXtension Board",
- .ext = &extension,
+ .ext_priv = "Multimedia eXtension Board",
+ .ext = &extension,
};
static struct pci_device_id pci_tbl[] = {
@@ -992,7 +992,7 @@ static struct saa7146_ext_vv vv_data = {
.capabilities = V4L2_CAP_TUNER | V4L2_CAP_VBI_CAPTURE,
.stds = &standard[0],
.num_stds = sizeof(standard)/sizeof(struct saa7146_standard),
- .std_callback = &std_callback,
+ .std_callback = &std_callback,
.ioctls = &ioctls[0],
.ioctl = mxb_ioctl,
};
@@ -1000,7 +1000,7 @@ static struct saa7146_ext_vv vv_data = {
static struct saa7146_extension extension = {
.name = MXB_IDENTIFIER,
.flags = SAA7146_USE_I2C_IRQ,
-
+
.pci_tbl = &pci_tbl[0],
.module = THIS_MODULE,
@@ -1010,7 +1010,7 @@ static struct saa7146_extension extension = {
.irq_mask = 0,
.irq_func = NULL,
-};
+};
static int __init mxb_init_module(void)
{
@@ -1018,7 +1018,7 @@ static int __init mxb_init_module(void)
DEB_S(("failed to register extension.\n"));
return -ENODEV;
}
-
+
return 0;
}
diff --git a/drivers/media/video/mxb.h b/drivers/media/video/mxb.h
index 2332ed5f7c6..400a57ba62e 100644
--- a/drivers/media/video/mxb.h
+++ b/drivers/media/video/mxb.h
@@ -38,5 +38,5 @@ static struct v4l2_audio mxb_audios[MXB_AUDIOS] = {
.name = "CD-ROM (X10)",
.capability = V4L2_AUDCAP_STEREO,
}
-};
+};
#endif
diff --git a/drivers/media/video/tda9840.c b/drivers/media/video/tda9840.c
index ed4c04119cc..0243700f58a 100644
--- a/drivers/media/video/tda9840.c
+++ b/drivers/media/video/tda9840.c
@@ -24,6 +24,7 @@
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
+
#include <linux/module.h>
#include <linux/ioctl.h>
#include <linux/i2c.h>
@@ -222,7 +223,7 @@ static int detach(struct i2c_client *client)
static struct i2c_driver driver = {
.driver = {
- .name = "tda9840",
+ .name = "tda9840",
},
.id = I2C_DRIVERID_TDA9840,
.attach_adapter = attach,
diff --git a/drivers/media/video/tea6415c.c b/drivers/media/video/tea6415c.c
index bb35844e384..774ed0dbc56 100644
--- a/drivers/media/video/tea6415c.c
+++ b/drivers/media/video/tea6415c.c
@@ -26,6 +26,7 @@
Foundation, Inc., 675 Mvss Ave, Cambridge, MA 02139, USA.
*/
+
#include <linux/module.h>
#include <linux/ioctl.h>
#include <linux/i2c.h>
@@ -107,7 +108,7 @@ static int switch_matrix(struct i2c_client *client, int i, int o)
{
u8 byte = 0;
int ret;
-
+
dprintk("adr:0x%02x, i:%d, o:%d\n", client->addr, i, o);
/* check if the pins are valid */
@@ -191,7 +192,7 @@ static int command(struct i2c_client *client, unsigned int cmd, void *arg)
static struct i2c_driver driver = {
.driver = {
- .name = "tea6415c",
+ .name = "tea6415c",
},
.id = I2C_DRIVERID_TEA6415C,
.attach_adapter = attach,
diff --git a/drivers/media/video/tea6420.c b/drivers/media/video/tea6420.c
index 4dcba5a4fff..ad7d2872cfb 100644
--- a/drivers/media/video/tea6420.c
+++ b/drivers/media/video/tea6420.c
@@ -26,6 +26,7 @@
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
+
#include <linux/module.h>
#include <linux/ioctl.h>
#include <linux/i2c.h>
@@ -83,7 +84,7 @@ static int tea6420_switch(struct i2c_client *client, int i, int o, int g)
dprintk("i2c_smbus_write_byte() failed, ret:%d\n", ret);
return -EIO;
}
-
+
return 0;
}
@@ -167,7 +168,7 @@ static int command(struct i2c_client *client, unsigned int cmd, void *arg)
static struct i2c_driver driver = {
.driver = {
- .name = "tea6420",
+ .name = "tea6420",
},
.id = I2C_DRIVERID_TEA6420,
.attach_adapter = attach,