Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

V4L/DVB (3537a): Whitespace cleanup

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>

authored by

Mauro Carvalho Chehab and committed by
Linus Torvalds
a8733ca5 4caba426

+125 -122
+29 -29
drivers/media/video/dpc7146.c
··· 1 1 /* 2 2 dpc7146.c - v4l2 driver for the dpc7146 demonstration board 3 - 3 + 4 4 Copyright (C) 2000-2003 Michael Hunold <michael@mihu.de> 5 5 6 6 This program is free software; you can redistribute it and/or modify ··· 52 52 #define SAA711X_DECODED_BYTES_OF_TS_2 0x1C 53 53 #define SAA711X_STATUS_BYTE 0x1F 54 54 55 - #define DPC_BOARD_CAN_DO_VBI(dev) (dev->revision != 0) 55 + #define DPC_BOARD_CAN_DO_VBI(dev) (dev->revision != 0) 56 56 57 57 static int debug = 0; 58 58 module_param(debug, int, 0); ··· 81 81 struct video_device *video_dev; 82 82 struct video_device *vbi_dev; 83 83 84 - struct i2c_adapter i2c_adapter; 84 + struct i2c_adapter i2c_adapter; 85 85 struct i2c_client *saa7111a; 86 - 86 + 87 87 int cur_input; /* current input */ 88 88 }; 89 89 90 90 /* fixme: add vbi stuff here */ 91 91 static int dpc_probe(struct saa7146_dev* dev) 92 92 { 93 - struct dpc* dpc = NULL; 93 + struct dpc* dpc = NULL; 94 94 struct i2c_client *client; 95 95 struct list_head *item; 96 96 ··· 118 118 /* loop through all i2c-devices on the bus and look who is there */ 119 119 list_for_each(item,&dpc->i2c_adapter.clients) { 120 120 client = list_entry(item, struct i2c_client, list); 121 - if( I2C_SAA7111A == client->addr ) 121 + if( I2C_SAA7111A == client->addr ) 122 122 dpc->saa7111a = client; 123 123 } 124 124 125 125 /* check if all devices are present */ 126 126 if( 0 == dpc->saa7111a ) { 127 - DEB_D(("dpc_v4l2.o: dpc_attach failed for this device.\n")); 127 + DEB_D(("dpc_v4l2.o: dpc_attach failed for this device.\n")); 128 128 i2c_del_adapter(&dpc->i2c_adapter); 129 129 kfree(dpc); 130 130 return -ENODEV; 131 131 } 132 - 133 - /* all devices are present, probe was successful */ 134 - DEB_D(("dpc_v4l2.o: dpc_probe succeeded for this device.\n")); 132 + 133 + /* all devices are present, probe was successful */ 134 + DEB_D(("dpc_v4l2.o: dpc_probe succeeded for this device.\n")); 135 135 136 136 /* we store the pointer in our private data field */ 137 137 dev->ext_priv = dpc; ··· 182 182 static int dpc_attach(struct saa7146_dev* dev, struct saa7146_pci_extension_data *info) 183 183 { 184 184 struct dpc* dpc = (struct dpc*)dev->ext_priv; 185 - 185 + 186 186 DEB_D(("dpc_v4l2.o: dpc_attach called.\n")); 187 187 188 188 /* checking for i2c-devices can be omitted here, because we ··· 193 193 ERR(("cannot register capture v4l2 device. skipping.\n")); 194 194 return -1; 195 195 } 196 - 196 + 197 197 /* initialization stuff (vbi) (only for revision > 0 and for extensions which want it)*/ 198 198 if( 0 != DPC_BOARD_CAN_DO_VBI(dev)) { 199 199 if( 0 != saa7146_register_device(&dpc->vbi_dev, dev, "dpc", VFL_TYPE_VBI)) { ··· 205 205 206 206 printk("dpc: found 'dpc7146 demonstration board'-%d.\n",dpc_num); 207 207 dpc_num++; 208 - 208 + 209 209 /* the rest */ 210 210 dpc->cur_input = 0; 211 211 dpc_init_done(dev); 212 - 212 + 213 213 return 0; 214 214 } 215 215 216 216 static int dpc_detach(struct saa7146_dev* dev) 217 217 { 218 218 struct dpc* dpc = (struct dpc*)dev->ext_priv; 219 - 219 + 220 220 DEB_EE(("dev:%p\n",dev)); 221 221 222 222 i2c_release_client(dpc->saa7111a); ··· 238 238 int dpc_vbi_bypass(struct saa7146_dev* dev) 239 239 { 240 240 struct dpc* dpc = (struct dpc*)dev->ext_priv; 241 - 241 + 242 242 int i = 1; 243 243 244 244 /* switch bypass in saa7111a */ 245 245 if ( 0 != dpc->saa7111a->driver->command(dpc->saa7111a,SAA711X_VBI_BYPASS, &i)) { 246 246 printk("dpc_v4l2.o: VBI_BYPASS: could not address saa7111a.\n"); 247 247 return -1; 248 - } 248 + } 249 249 250 250 return 0; 251 251 } 252 252 #endif 253 253 254 - static int dpc_ioctl(struct saa7146_fh *fh, unsigned int cmd, void *arg) 254 + static int dpc_ioctl(struct saa7146_fh *fh, unsigned int cmd, void *arg) 255 255 { 256 256 struct saa7146_dev *dev = fh->dev; 257 257 struct dpc* dpc = (struct dpc*)dev->ext_priv; 258 258 /* 259 - struct saa7146_vv *vv = dev->vv_data; 259 + struct saa7146_vv *vv = dev->vv_data; 260 260 */ 261 261 switch(cmd) 262 262 { ··· 264 264 { 265 265 struct v4l2_input *i = arg; 266 266 DEB_EE(("VIDIOC_ENUMINPUT %d.\n",i->index)); 267 - 267 + 268 268 if( i->index < 0 || i->index >= DPC_INPUTS) { 269 269 return -EINVAL; 270 270 } 271 - 271 + 272 272 memcpy(i, &dpc_inputs[i->index], sizeof(struct v4l2_input)); 273 273 274 274 DEB_D(("dpc_v4l2.o: v4l2_ioctl: VIDIOC_ENUMINPUT %d.\n",i->index)); ··· 289 289 if (input < 0 || input >= DPC_INPUTS) { 290 290 return -EINVAL; 291 291 } 292 - 292 + 293 293 dpc->cur_input = input; 294 294 295 295 /* fixme: switch input here, switch audio, too! */ 296 296 // saa7146_set_hps_source_and_sync(dev, input_port_selection[input].hps_source, input_port_selection[input].hps_sync); 297 297 printk("dpc_v4l2.o: VIDIOC_S_INPUT: fixme switch input.\n"); 298 - 298 + 299 299 return 0; 300 300 } 301 301 default: ··· 334 334 static struct saa7146_extension extension; 335 335 336 336 static struct saa7146_pci_extension_data dpc = { 337 - .ext_priv = "Multimedia eXtension Board", 338 - .ext = &extension, 337 + .ext_priv = "Multimedia eXtension Board", 338 + .ext = &extension, 339 339 }; 340 340 341 341 static struct pci_device_id pci_tbl[] = { ··· 357 357 .capabilities = V4L2_CAP_VBI_CAPTURE, 358 358 .stds = &standard[0], 359 359 .num_stds = sizeof(standard)/sizeof(struct saa7146_standard), 360 - .std_callback = &std_callback, 360 + .std_callback = &std_callback, 361 361 .ioctls = &ioctls[0], 362 362 .ioctl = dpc_ioctl, 363 363 }; ··· 365 365 static struct saa7146_extension extension = { 366 366 .name = "dpc7146 demonstration board", 367 367 .flags = SAA7146_USE_I2C_IRQ, 368 - 368 + 369 369 .pci_tbl = &pci_tbl[0], 370 370 .module = THIS_MODULE, 371 371 ··· 375 375 376 376 .irq_mask = 0, 377 377 .irq_func = NULL, 378 - }; 378 + }; 379 379 380 380 static int __init dpc_init_module(void) 381 381 { ··· 383 383 DEB_S(("failed to register extension.\n")); 384 384 return -ENODEV; 385 385 } 386 - 386 + 387 387 return 0; 388 388 } 389 389
+5 -5
drivers/media/video/hexium_gemini.c
··· 1 1 /* 2 2 hexium_gemini.c - v4l2 driver for Hexium Gemini frame grabber cards 3 - 3 + 4 4 Visit http://www.mihu.de/linux/saa7146/ and follow the link 5 5 to "hexium" for further details about this card. 6 - 6 + 7 7 Copyright (C) 2003 Michael Hunold <michael@mihu.de> 8 8 9 9 This program is free software; you can redistribute it and/or modify ··· 81 81 82 82 struct video_device *video_dev; 83 83 struct i2c_adapter i2c_adapter; 84 - 84 + 85 85 int cur_input; /* current input */ 86 86 v4l2_std_id cur_std; /* current standard */ 87 87 int cur_bw; /* current black/white status */ ··· 174 174 .h_offset = 1, .h_pixels = 720, 175 175 .v_max_out = 576, .h_max_out = 768, 176 176 } 177 - }; 177 + }; 178 178 179 179 /* bring hardware to a sane state. this has to be done, just in case someone 180 180 wants to capture from this device before it has been properly initialized. ··· 311 311 struct saa7146_dev *dev = fh->dev; 312 312 struct hexium *hexium = (struct hexium *) dev->ext_priv; 313 313 /* 314 - struct saa7146_vv *vv = dev->vv_data; 314 + struct saa7146_vv *vv = dev->vv_data; 315 315 */ 316 316 switch (cmd) { 317 317 case VIDIOC_ENUMINPUT:
+9 -9
drivers/media/video/hexium_orion.c
··· 3 3 4 4 Visit http://www.mihu.de/linux/saa7146/ and follow the link 5 5 to "hexium" for further details about this card. 6 - 6 + 7 7 Copyright (C) 2003 Michael Hunold <michael@mihu.de> 8 8 9 9 This program is free software; you can redistribute it and/or modify ··· 69 69 { 70 70 int type; 71 71 struct video_device *video_dev; 72 - struct i2c_adapter i2c_adapter; 72 + struct i2c_adapter i2c_adapter; 73 73 74 74 int cur_input; /* current input */ 75 75 }; ··· 86 86 }; 87 87 88 88 static struct { 89 - struct hexium_data data[8]; 89 + struct hexium_data data[8]; 90 90 } hexium_input_select[] = { 91 91 { 92 92 { /* cvbs 1 */ ··· 153 153 { 0x30, 0x60 }, 154 154 { 0x31, 0xB5 }, // ?? 155 155 { 0x21, 0x03 }, 156 - } 156 + } 157 157 }, { 158 158 { /* y/c 1 */ 159 159 { 0x06, 0x80 }, ··· 187 187 { 0x31, 0x75 }, 188 188 { 0x21, 0x21 }, 189 189 } 190 - } 190 + } 191 191 }; 192 192 193 193 static struct saa7146_standard hexium_standards[] = { ··· 207 207 .h_offset = 1, .h_pixels = 720, 208 208 .v_max_out = 576, .h_max_out = 768, 209 209 } 210 - }; 210 + }; 211 211 212 212 /* this is only called for old HV-PCI6/Orion cards 213 213 without eeprom */ ··· 272 272 return 0; 273 273 } 274 274 275 - /* check if this is an old hexium Orion card by looking at 275 + /* check if this is an old hexium Orion card by looking at 276 276 a saa7110 at address 0x4e */ 277 277 if (0 == (err = i2c_smbus_xfer(&hexium->i2c_adapter, 0x4e, 0, I2C_SMBUS_READ, 0x00, I2C_SMBUS_BYTE_DATA, &data))) { 278 278 printk("hexium_orion: device is a Hexium HV-PCI6/Orion (old).\n"); ··· 314 314 { 315 315 union i2c_smbus_data data; 316 316 int i = 0; 317 - 317 + 318 318 DEB_D((".\n")); 319 319 320 320 for (i = 0; i < 8; i++) { ··· 375 375 struct saa7146_dev *dev = fh->dev; 376 376 struct hexium *hexium = (struct hexium *) dev->ext_priv; 377 377 /* 378 - struct saa7146_vv *vv = dev->vv_data; 378 + struct saa7146_vv *vv = dev->vv_data; 379 379 */ 380 380 switch (cmd) { 381 381 case VIDIOC_ENUMINPUT:
+73 -73
drivers/media/video/mxb.c
··· 1 1 /* 2 2 mxb - v4l2 driver for the Multimedia eXtension Board 3 - 3 + 4 4 Copyright (C) 1998-2006 Michael Hunold <michael@mihu.de> 5 5 6 6 Visit http://www.mihu.de/linux/saa7146/mxb/ 7 7 for further details about this card. 8 - 8 + 9 9 This program is free software; you can redistribute it and/or modify 10 10 it under the terms of the GNU General Public License as published by 11 11 the Free Software Foundation; either version 2 of the License, or ··· 35 35 36 36 #define I2C_SAA7111 0x24 37 37 38 - #define MXB_BOARD_CAN_DO_VBI(dev) (dev->revision != 0) 38 + #define MXB_BOARD_CAN_DO_VBI(dev) (dev->revision != 0) 39 39 40 40 /* global variable */ 41 41 static int mxb_num = 0; 42 42 43 - /* initial frequence the tuner will be tuned to. 43 + /* initial frequence the tuner will be tuned to. 44 44 in verden (lower saxony, germany) 4148 is a 45 45 channel called "phoenix" */ 46 46 static int freq = 4148; ··· 55 55 enum { TUNER, AUX1, AUX3, AUX3_YC }; 56 56 57 57 static struct v4l2_input mxb_inputs[MXB_INPUTS] = { 58 - { TUNER, "Tuner", V4L2_INPUT_TYPE_TUNER, 1, 0, V4L2_STD_PAL_BG|V4L2_STD_NTSC_M, 0 }, 58 + { TUNER, "Tuner", V4L2_INPUT_TYPE_TUNER, 1, 0, V4L2_STD_PAL_BG|V4L2_STD_NTSC_M, 0 }, 59 59 { AUX1, "AUX1", V4L2_INPUT_TYPE_CAMERA, 2, 0, V4L2_STD_PAL_BG|V4L2_STD_NTSC_M, 0 }, 60 60 { AUX3, "AUX3 Composite", V4L2_INPUT_TYPE_CAMERA, 4, 0, V4L2_STD_PAL_BG|V4L2_STD_NTSC_M, 0 }, 61 61 { AUX3_YC, "AUX3 S-Video", V4L2_INPUT_TYPE_CAMERA, 4, 0, V4L2_STD_PAL_BG|V4L2_STD_NTSC_M, 0 }, ··· 66 66 static struct { 67 67 int hps_source; 68 68 int hps_sync; 69 - } input_port_selection[MXB_INPUTS] = { 69 + } input_port_selection[MXB_INPUTS] = { 70 70 { SAA7146_HPS_SOURCE_PORT_A, SAA7146_HPS_SYNC_PORT_A }, 71 71 { SAA7146_HPS_SOURCE_PORT_A, SAA7146_HPS_SYNC_PORT_A }, 72 72 { SAA7146_HPS_SOURCE_PORT_A, SAA7146_HPS_SYNC_PORT_A }, ··· 81 81 /* these are the necessary input-output-pins for bringing one audio source 82 82 (see above) to the CD-output */ 83 83 static struct tea6420_multiplex TEA6420_cd[MXB_AUDIOS+1][2] = 84 - { 84 + { 85 85 {{1,1,0},{1,1,0}}, /* Tuner */ 86 86 {{5,1,0},{6,1,0}}, /* AUX 1 */ 87 87 {{4,1,0},{6,1,0}}, /* AUX 2 */ ··· 122 122 { VIDIOC_S_FREQUENCY, SAA7146_EXCLUSIVE }, 123 123 { VIDIOC_G_AUDIO, SAA7146_EXCLUSIVE }, 124 124 { VIDIOC_S_AUDIO, SAA7146_EXCLUSIVE }, 125 - { MXB_S_AUDIO_CD, SAA7146_EXCLUSIVE }, /* custom control */ 126 - { MXB_S_AUDIO_LINE, SAA7146_EXCLUSIVE }, /* custom control */ 125 + { MXB_S_AUDIO_CD, SAA7146_EXCLUSIVE }, /* custom control */ 126 + { MXB_S_AUDIO_LINE, SAA7146_EXCLUSIVE }, /* custom control */ 127 127 { 0, 0 } 128 128 }; 129 129 ··· 132 132 struct video_device *video_dev; 133 133 struct video_device *vbi_dev; 134 134 135 - struct i2c_adapter i2c_adapter; 135 + struct i2c_adapter i2c_adapter; 136 136 137 137 struct i2c_client* saa7111a; 138 138 struct i2c_client* tda9840; ··· 200 200 client = list_entry(item, struct i2c_client, list); 201 201 if( I2C_TEA6420_1 == client->addr ) 202 202 mxb->tea6420_1 = client; 203 - if( I2C_TEA6420_2 == client->addr ) 203 + if( I2C_TEA6420_2 == client->addr ) 204 204 mxb->tea6420_2 = client; 205 - if( I2C_TEA6415C_2 == client->addr ) 205 + if( I2C_TEA6415C_2 == client->addr ) 206 206 mxb->tea6415c = client; 207 - if( I2C_TDA9840 == client->addr ) 207 + if( I2C_TDA9840 == client->addr ) 208 208 mxb->tda9840 = client; 209 209 if( I2C_SAA7111 == client->addr ) 210 210 mxb->saa7111a = client; 211 - if( 0x60 == client->addr ) 211 + if( 0x60 == client->addr ) 212 212 mxb->tuner = client; 213 213 } 214 214 ··· 222 222 return -ENODEV; 223 223 } 224 224 225 - /* all devices are present, probe was successful */ 225 + /* all devices are present, probe was successful */ 226 226 227 227 /* we store the pointer in our private data field */ 228 228 dev->ext_priv = mxb; ··· 230 230 return 0; 231 231 } 232 232 233 - /* some init data for the saa7740, the so-called 'sound arena module'. 233 + /* some init data for the saa7740, the so-called 'sound arena module'. 234 234 there are no specs available, so we simply use some init values */ 235 235 static struct { 236 236 int length; ··· 330 330 v4l2_std_id std = V4L2_STD_PAL_BG; 331 331 332 332 int i = 0, err = 0; 333 - struct tea6415c_multiplex vm; 333 + struct tea6415c_multiplex vm; 334 334 335 335 /* select video mode in saa7111a */ 336 336 i = VIDEO_MODE_PAL; ··· 380 380 vm.in = 3; 381 381 vm.out = 13; 382 382 mxb->tea6415c->driver->command(mxb->tea6415c,TEA6415C_SWITCH, &vm); 383 - 383 + 384 384 /* the rest for mxb */ 385 385 mxb->cur_input = 0; 386 386 mxb->cur_mute = 1; 387 387 388 388 mxb->cur_mode = V4L2_TUNER_MODE_STEREO; 389 389 mxb->tda9840->driver->command(mxb->tda9840, TDA9840_SWITCH, &mxb->cur_mode); 390 - 390 + 391 391 /* check if the saa7740 (aka 'sound arena module') is present 392 - on the mxb. if so, we must initialize it. due to lack of 392 + on the mxb. if so, we must initialize it. due to lack of 393 393 informations about the saa7740, the values were reverse 394 394 engineered. */ 395 395 msg.addr = 0x1b; ··· 409 409 break; 410 410 } 411 411 412 - msg.len = mxb_saa7740_init[i].length; 412 + msg.len = mxb_saa7740_init[i].length; 413 413 msg.buf = &mxb_saa7740_init[i].data[0]; 414 414 if( 1 != (err = i2c_transfer(&mxb->i2c_adapter, &msg, 1))) { 415 415 DEB_D(("failed to initialize 'sound arena module'.\n")); ··· 418 418 } 419 419 INFO(("'sound arena module' detected.\n")); 420 420 } 421 - err: 421 + err: 422 422 /* the rest for saa7146: you should definitely set some basic values 423 423 for the input-port handling of the saa7146. */ 424 424 425 425 /* ext->saa has been filled by the core driver */ 426 - 426 + 427 427 /* some stuff is done via variables */ 428 428 saa7146_set_hps_source_and_sync(dev, input_port_selection[mxb->cur_input].hps_source, input_port_selection[mxb->cur_input].hps_sync); 429 429 ··· 431 431 432 432 /* this is ugly, but because of the fact that this is completely 433 433 hardware dependend, it should be done directly... */ 434 - saa7146_write(dev, DD1_STREAM_B, 0x00000000); 434 + saa7146_write(dev, DD1_STREAM_B, 0x00000000); 435 435 saa7146_write(dev, DD1_INIT, 0x02000200); 436 436 saa7146_write(dev, MC2, (MASK_09 | MASK_25 | MASK_10 | MASK_26)); 437 437 ··· 453 453 static int mxb_attach(struct saa7146_dev* dev, struct saa7146_pci_extension_data *info) 454 454 { 455 455 struct mxb* mxb = (struct mxb*)dev->ext_priv; 456 - 456 + 457 457 DEB_EE(("dev:%p\n",dev)); 458 458 459 459 /* checking for i2c-devices can be omitted here, because we ··· 464 464 ERR(("cannot register capture v4l2 device. skipping.\n")); 465 465 return -1; 466 466 } 467 - 467 + 468 468 /* initialization stuff (vbi) (only for revision > 0 and for extensions which want it)*/ 469 469 if( 0 != MXB_BOARD_CAN_DO_VBI(dev)) { 470 470 if( 0 != saa7146_register_device(&mxb->vbi_dev, dev, "mxb", VFL_TYPE_VBI)) { ··· 513 513 return 0; 514 514 } 515 515 516 - static int mxb_ioctl(struct saa7146_fh *fh, unsigned int cmd, void *arg) 516 + static int mxb_ioctl(struct saa7146_fh *fh, unsigned int cmd, void *arg) 517 517 { 518 518 struct saa7146_dev *dev = fh->dev; 519 519 struct mxb* mxb = (struct mxb*)dev->ext_priv; 520 - struct saa7146_vv *vv = dev->vv_data; 521 - 520 + struct saa7146_vv *vv = dev->vv_data; 521 + 522 522 switch(cmd) { 523 523 case VIDIOC_ENUMINPUT: 524 524 { 525 525 struct v4l2_input *i = arg; 526 - 526 + 527 527 DEB_EE(("VIDIOC_ENUMINPUT %d.\n",i->index)); 528 528 if( i->index < 0 || i->index >= MXB_INPUTS) { 529 529 return -EINVAL; ··· 559 559 break; 560 560 } 561 561 } 562 - 562 + 563 563 if( i < 0 ) { 564 564 return -EAGAIN; 565 565 } 566 - 566 + 567 567 switch (vc->id ) { 568 568 case V4L2_CID_AUDIO_MUTE: { 569 569 vc->value = mxb->cur_mute; ··· 571 571 return 0; 572 572 } 573 573 } 574 - 574 + 575 575 DEB_EE(("VIDIOC_G_CTRL V4L2_CID_AUDIO_MUTE:%d.\n",vc->value)); 576 576 return 0; 577 577 } ··· 580 580 { 581 581 struct v4l2_control *vc = arg; 582 582 int i = 0; 583 - 583 + 584 584 for (i = MAXCONTROLS - 1; i >= 0; i--) { 585 585 if (mxb_controls[i].id == vc->id) { 586 586 break; 587 587 } 588 588 } 589 - 589 + 590 590 if( i < 0 ) { 591 591 return -EAGAIN; 592 592 } 593 - 593 + 594 594 switch (vc->id ) { 595 595 case V4L2_CID_AUDIO_MUTE: { 596 596 mxb->cur_mute = vc->value; ··· 614 614 *input = mxb->cur_input; 615 615 616 616 DEB_EE(("VIDIOC_G_INPUT %d.\n",*input)); 617 - return 0; 618 - } 617 + return 0; 618 + } 619 619 case VIDIOC_S_INPUT: 620 620 { 621 621 int input = *(int *)arg; 622 - struct tea6415c_multiplex vm; 622 + struct tea6415c_multiplex vm; 623 623 int i = 0; 624 624 625 625 DEB_EE(("VIDIOC_S_INPUT %d.\n",input)); ··· 627 627 if (input < 0 || input >= MXB_INPUTS) { 628 628 return -EINVAL; 629 629 } 630 - 630 + 631 631 /* fixme: locke das setzen des inputs mit hilfe des mutexes 632 632 mutex_lock(&dev->lock); 633 633 video_mux(dev,*i); 634 634 mutex_unlock(&dev->lock); 635 635 */ 636 - 636 + 637 637 /* fixme: check if streaming capture 638 638 if ( 0 != dev->streaming ) { 639 639 DEB_D(("VIDIOC_S_INPUT illegal while streaming.\n")); 640 640 return -EPERM; 641 641 } 642 642 */ 643 - 643 + 644 644 mxb->cur_input = input; 645 - 645 + 646 646 saa7146_set_hps_source_and_sync(dev, input_port_selection[input].hps_source, input_port_selection[input].hps_sync); 647 - 647 + 648 648 /* prepare switching of tea6415c and saa7111a; 649 649 have a look at the 'background'-file for further informations */ 650 650 switch( input ) { 651 - 651 + 652 652 case TUNER: 653 653 { 654 654 i = 0; 655 655 vm.in = 3; 656 656 vm.out = 17; 657 - 657 + 658 658 if ( 0 != mxb->tea6415c->driver->command(mxb->tea6415c,TEA6415C_SWITCH, &vm)) { 659 659 printk("VIDIOC_S_INPUT: could not address tea6415c #1\n"); 660 660 return -EFAULT; ··· 662 662 /* connect tuner-output always to multicable */ 663 663 vm.in = 3; 664 664 vm.out = 13; 665 - break; 665 + break; 666 666 } 667 667 case AUX3_YC: 668 668 { ··· 703 703 break; 704 704 } 705 705 } 706 - 706 + 707 707 /* switch video in saa7111a */ 708 708 if ( 0 != mxb->saa7111a->driver->command(mxb->saa7111a,DECODER_SET_INPUT, &i)) { 709 709 printk("VIDIOC_S_INPUT: could not address saa7111a #1.\n"); 710 - } 710 + } 711 711 712 712 /* switch the audio-source only if necessary */ 713 713 if( 0 == mxb->cur_mute ) { ··· 738 738 t->rangehigh = 13684; /* 855.25 MHz / 62.5 kHz = 13684 */ 739 739 /* FIXME: add the real signal strength here */ 740 740 t->signal = 0xffff; 741 - t->afc = 0; 741 + t->afc = 0; 742 742 743 743 mxb->tda9840->driver->command(mxb->tda9840,TDA9840_DETECT, &byte); 744 744 t->audmode = mxb->cur_mode; 745 - 745 + 746 746 if( byte < 0 ) { 747 747 t->rxsubchans = V4L2_TUNER_SUB_MONO; 748 748 } else { ··· 777 777 struct v4l2_tuner *t = arg; 778 778 int result = 0; 779 779 int byte = 0; 780 - 780 + 781 781 if( 0 != t->index ) { 782 782 DEB_D(("VIDIOC_S_TUNER: channel %d does not have a tuner attached.\n",t->index)); 783 783 return -EINVAL; 784 784 } 785 - 785 + 786 786 switch(t->audmode) { 787 787 case V4L2_TUNER_MODE_STEREO: { 788 788 mxb->cur_mode = V4L2_TUNER_MODE_STEREO; ··· 813 813 if( 0 != (result = mxb->tda9840->driver->command(mxb->tda9840, TDA9840_SWITCH, &byte))) { 814 814 printk("VIDIOC_S_TUNER error. result:%d, byte:%d\n",result,byte); 815 815 } 816 - 816 + 817 817 return 0; 818 818 } 819 819 case VIDIOC_G_FREQUENCY: ··· 839 839 840 840 if (V4L2_TUNER_ANALOG_TV != f->type) 841 841 return -EINVAL; 842 - 842 + 843 843 if(0 != mxb->cur_input) { 844 844 DEB_D(("VIDIOC_S_FREQ: channel %d does not have a tuner!\n",mxb->cur_input)); 845 845 return -EINVAL; ··· 848 848 mxb->cur_freq = *f; 849 849 DEB_EE(("VIDIOC_S_FREQUENCY: freq:0x%08x.\n", mxb->cur_freq.frequency)); 850 850 851 - /* tune in desired frequency */ 851 + /* tune in desired frequency */ 852 852 mxb->tuner->driver->command(mxb->tuner, VIDIOC_S_FREQUENCY, &mxb->cur_freq); 853 853 854 854 /* hack: changing the frequency should invalidate the vbi-counter (=> alevt) */ ··· 861 861 case MXB_S_AUDIO_CD: 862 862 { 863 863 int i = *(int*)arg; 864 - 864 + 865 865 if( i < 0 || i >= MXB_AUDIOS ) { 866 866 DEB_D(("illegal argument to MXB_S_AUDIO_CD: i:%d.\n",i)); 867 867 return -EINVAL; 868 868 } 869 - 869 + 870 870 DEB_EE(("MXB_S_AUDIO_CD: i:%d.\n",i)); 871 871 872 872 mxb->tea6420_1->driver->command(mxb->tea6420_1,TEA6420_SWITCH, &TEA6420_cd[i][0]); ··· 877 877 case MXB_S_AUDIO_LINE: 878 878 { 879 879 int i = *(int*)arg; 880 - 880 + 881 881 if( i < 0 || i >= MXB_AUDIOS ) { 882 882 DEB_D(("illegal argument to MXB_S_AUDIO_LINE: i:%d.\n",i)); 883 883 return -EINVAL; 884 884 } 885 - 885 + 886 886 DEB_EE(("MXB_S_AUDIO_LINE: i:%d.\n",i)); 887 887 mxb->tea6420_1->driver->command(mxb->tea6420_1,TEA6420_SWITCH, &TEA6420_line[i][0]); 888 888 mxb->tea6420_2->driver->command(mxb->tea6420_2,TEA6420_SWITCH, &TEA6420_line[i][1]); ··· 894 894 struct v4l2_audio *a = arg; 895 895 896 896 if( a->index < 0 || a->index > MXB_INPUTS ) { 897 - DEB_D(("VIDIOC_G_AUDIO %d out of range.\n",a->index)); 897 + DEB_D(("VIDIOC_G_AUDIO %d out of range.\n",a->index)); 898 898 return -EINVAL; 899 899 } 900 - 901 - DEB_EE(("VIDIOC_G_AUDIO %d.\n",a->index)); 900 + 901 + DEB_EE(("VIDIOC_G_AUDIO %d.\n",a->index)); 902 902 memcpy(a, &mxb_audios[video_audio_connect[mxb->cur_input]], sizeof(struct v4l2_audio)); 903 - 903 + 904 904 return 0; 905 905 } 906 906 case VIDIOC_S_AUDIO: ··· 908 908 struct v4l2_audio *a = arg; 909 909 DEB_D(("VIDIOC_S_AUDIO %d.\n",a->index)); 910 910 return 0; 911 - } 911 + } 912 912 default: 913 913 /* 914 914 DEB2(printk("does not handle this ioctl.\n")); ··· 928 928 v4l2_std_id std = V4L2_STD_PAL_I; 929 929 DEB_D(("VIDIOC_S_STD: setting mxb for PAL_I.\n")); 930 930 /* set the 7146 gpio register -- I don't know what this does exactly */ 931 - saa7146_write(dev, GPIO_CTRL, 0x00404050); 931 + saa7146_write(dev, GPIO_CTRL, 0x00404050); 932 932 /* unset the 7111 gpio register -- I don't know what this does exactly */ 933 933 mxb->saa7111a->driver->command(mxb->saa7111a,DECODER_SET_GPIO, &zero); 934 934 mxb->tuner->driver->command(mxb->tuner, VIDIOC_S_STD, &std); ··· 936 936 v4l2_std_id std = V4L2_STD_PAL_BG; 937 937 DEB_D(("VIDIOC_S_STD: setting mxb for PAL/NTSC/SECAM.\n")); 938 938 /* set the 7146 gpio register -- I don't know what this does exactly */ 939 - saa7146_write(dev, GPIO_CTRL, 0x00404050); 939 + saa7146_write(dev, GPIO_CTRL, 0x00404050); 940 940 /* set the 7111 gpio register -- I don't know what this does exactly */ 941 941 mxb->saa7111a->driver->command(mxb->saa7111a,DECODER_SET_GPIO, &one); 942 942 mxb->tuner->driver->command(mxb->tuner, VIDIOC_S_STD, &std); ··· 969 969 }; 970 970 971 971 static struct saa7146_pci_extension_data mxb = { 972 - .ext_priv = "Multimedia eXtension Board", 973 - .ext = &extension, 972 + .ext_priv = "Multimedia eXtension Board", 973 + .ext = &extension, 974 974 }; 975 975 976 976 static struct pci_device_id pci_tbl[] = { ··· 992 992 .capabilities = V4L2_CAP_TUNER | V4L2_CAP_VBI_CAPTURE, 993 993 .stds = &standard[0], 994 994 .num_stds = sizeof(standard)/sizeof(struct saa7146_standard), 995 - .std_callback = &std_callback, 995 + .std_callback = &std_callback, 996 996 .ioctls = &ioctls[0], 997 997 .ioctl = mxb_ioctl, 998 998 }; ··· 1000 1000 static struct saa7146_extension extension = { 1001 1001 .name = MXB_IDENTIFIER, 1002 1002 .flags = SAA7146_USE_I2C_IRQ, 1003 - 1003 + 1004 1004 .pci_tbl = &pci_tbl[0], 1005 1005 .module = THIS_MODULE, 1006 1006 ··· 1010 1010 1011 1011 .irq_mask = 0, 1012 1012 .irq_func = NULL, 1013 - }; 1013 + }; 1014 1014 1015 1015 static int __init mxb_init_module(void) 1016 1016 { ··· 1018 1018 DEB_S(("failed to register extension.\n")); 1019 1019 return -ENODEV; 1020 1020 } 1021 - 1021 + 1022 1022 return 0; 1023 1023 } 1024 1024
+1 -1
drivers/media/video/mxb.h
··· 38 38 .name = "CD-ROM (X10)", 39 39 .capability = V4L2_AUDCAP_STEREO, 40 40 } 41 - }; 41 + }; 42 42 #endif
+2 -1
drivers/media/video/tda9840.c
··· 24 24 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 25 25 */ 26 26 27 + 27 28 #include <linux/module.h> 28 29 #include <linux/ioctl.h> 29 30 #include <linux/i2c.h> ··· 223 222 224 223 static struct i2c_driver driver = { 225 224 .driver = { 226 - .name = "tda9840", 225 + .name = "tda9840", 227 226 }, 228 227 .id = I2C_DRIVERID_TDA9840, 229 228 .attach_adapter = attach,
+3 -2
drivers/media/video/tea6415c.c
··· 26 26 Foundation, Inc., 675 Mvss Ave, Cambridge, MA 02139, USA. 27 27 */ 28 28 29 + 29 30 #include <linux/module.h> 30 31 #include <linux/ioctl.h> 31 32 #include <linux/i2c.h> ··· 108 107 { 109 108 u8 byte = 0; 110 109 int ret; 111 - 110 + 112 111 dprintk("adr:0x%02x, i:%d, o:%d\n", client->addr, i, o); 113 112 114 113 /* check if the pins are valid */ ··· 192 191 193 192 static struct i2c_driver driver = { 194 193 .driver = { 195 - .name = "tea6415c", 194 + .name = "tea6415c", 196 195 }, 197 196 .id = I2C_DRIVERID_TEA6415C, 198 197 .attach_adapter = attach,
+3 -2
drivers/media/video/tea6420.c
··· 26 26 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 27 27 */ 28 28 29 + 29 30 #include <linux/module.h> 30 31 #include <linux/ioctl.h> 31 32 #include <linux/i2c.h> ··· 84 83 dprintk("i2c_smbus_write_byte() failed, ret:%d\n", ret); 85 84 return -EIO; 86 85 } 87 - 86 + 88 87 return 0; 89 88 } 90 89 ··· 168 167 169 168 static struct i2c_driver driver = { 170 169 .driver = { 171 - .name = "tea6420", 170 + .name = "tea6420", 172 171 }, 173 172 .id = I2C_DRIVERID_TEA6420, 174 173 .attach_adapter = attach,