Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 612570f2 authored by Hans Verkuil's avatar Hans Verkuil Committed by Mauro Carvalho Chehab
Browse files

V4L/DVB (6091): ivtv: header cleanup



- add guards
- remove unused header includes
- move card-specific stuff from ivtv-driver.h to ivtv-cards.h
- move YUV-specific stuff from ivtv-driver.h to ivtv-yuv.h

Signed-off-by: default avatarHans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@infradead.org>
parent 459a52fa
Loading
Loading
Loading
Loading
+0 −3
Original line number Diff line number Diff line
@@ -19,13 +19,10 @@
 */

#include "ivtv-driver.h"
#include "ivtv-mailbox.h"
#include "ivtv-i2c.h"
#include "ivtv-gpio.h"
#include "ivtv-cards.h"
#include "ivtv-audio.h"
#include <media/msp3400.h>
#include <linux/videodev.h>

/* Selects the audio input and output according to the current
   settings. */
+5 −0
Original line number Diff line number Diff line
@@ -18,6 +18,11 @@
    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */

#ifndef IVTV_AUDIO_H
#define IVTV_AUDIO_H

int ivtv_audio_set_io(struct ivtv *itv);
void ivtv_audio_set_route(struct ivtv *itv, struct v4l2_routing *route);
void ivtv_audio_set_audio_clock_freq(struct ivtv *itv, u8 freq);

#endif
+64 −0
Original line number Diff line number Diff line
@@ -18,6 +18,68 @@
    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */

#ifndef IVTV_CARDS_H
#define IVTV_CARDS_H

/* Supported cards */
#define IVTV_CARD_PVR_250 	      0	/* WinTV PVR 250 */
#define IVTV_CARD_PVR_350 	      1	/* encoder, decoder, tv-out */
#define IVTV_CARD_PVR_150 	      2	/* WinTV PVR 150 and PVR 500 (really just two
					   PVR150s on one PCI board) */
#define IVTV_CARD_M179    	      3	/* AVerMedia M179 (encoder only) */
#define IVTV_CARD_MPG600  	      4	/* Kuroutoshikou ITVC16-STVLP/YUAN MPG600, encoder only */
#define IVTV_CARD_MPG160  	      5	/* Kuroutoshikou ITVC15-STVLP/YUAN MPG160
					   cx23415 based, but does not have tv-out */
#define IVTV_CARD_PG600 	      6	/* YUAN PG600/DIAMONDMM PVR-550 based on the CX Falcon 2 */
#define IVTV_CARD_AVC2410 	      7	/* Adaptec AVC-2410 */
#define IVTV_CARD_AVC2010 	      8	/* Adaptec AVD-2010 (No Tuner) */
#define IVTV_CARD_TG5000TV   	      9 /* NAGASE TRANSGEAR 5000TV, encoder only */
#define IVTV_CARD_VA2000MAX_SNT6     10 /* VA2000MAX-STN6 */
#define IVTV_CARD_CX23416GYC 	     11 /* Kuroutoshikou CX23416GYC-STVLP (Yuan MPG600GR OEM) */
#define IVTV_CARD_GV_MVPRX   	     12 /* I/O Data GV-MVP/RX, RX2, RX2W */
#define IVTV_CARD_GV_MVPRX2E 	     13 /* I/O Data GV-MVP/RX2E */
#define IVTV_CARD_GOTVIEW_PCI_DVD    14	/* GotView PCI DVD */
#define IVTV_CARD_GOTVIEW_PCI_DVD2   15	/* GotView PCI DVD2 */
#define IVTV_CARD_YUAN_MPC622        16	/* Yuan MPC622 miniPCI */
#define IVTV_CARD_DCTMTVP1 	     17 /* DIGITAL COWBOY DCT-MTVP1 */
#define IVTV_CARD_PG600V2	     18 /* Yuan PG600V2/GotView PCI DVD Lite */
#define IVTV_CARD_CLUB3D	     19 /* Club3D ZAP-TV1x01 */
#define IVTV_CARD_AVERTV_MCE116	     20 /* AVerTV MCE 116 Plus */
#define IVTV_CARD_LAST 		     20

/* Variants of existing cards but with the same PCI IDs. The driver
   detects these based on other device information.
   These cards must always come last.
   New cards must be inserted above, and the indices of the cards below
   must be adjusted accordingly. */

/* PVR-350 V1 (uses saa7114) */
#define IVTV_CARD_PVR_350_V1 	     (IVTV_CARD_LAST+1)
/* 2 variants of Kuroutoshikou CX23416GYC-STVLP (Yuan MPG600GR OEM) */
#define IVTV_CARD_CX23416GYC_NOGR    (IVTV_CARD_LAST+2)
#define IVTV_CARD_CX23416GYC_NOGRYCS (IVTV_CARD_LAST+3)

/* system vendor and device IDs */
#define PCI_VENDOR_ID_ICOMP  0x4444
#define PCI_DEVICE_ID_IVTV15 0x0803
#define PCI_DEVICE_ID_IVTV16 0x0016

/* subsystem vendor ID */
#define IVTV_PCI_ID_HAUPPAUGE 		0x0070
#define IVTV_PCI_ID_HAUPPAUGE_ALT1 	0x0270
#define IVTV_PCI_ID_HAUPPAUGE_ALT2 	0x4070
#define IVTV_PCI_ID_ADAPTEC 		0x9005
#define IVTV_PCI_ID_AVERMEDIA 		0x1461
#define IVTV_PCI_ID_YUAN1		0x12ab
#define IVTV_PCI_ID_YUAN2 		0xff01
#define IVTV_PCI_ID_YUAN3 		0xffab
#define IVTV_PCI_ID_YUAN4 		0xfbab
#define IVTV_PCI_ID_DIAMONDMM 		0xff92
#define IVTV_PCI_ID_IODATA 		0x10fc
#define IVTV_PCI_ID_MELCO 		0x1154
#define IVTV_PCI_ID_GOTVIEW1		0xffac
#define IVTV_PCI_ID_GOTVIEW2 		0xffad

/* hardware flags */
#define IVTV_HW_CX25840   (1 << 0)
#define IVTV_HW_SAA7115   (1 << 1)
@@ -206,3 +268,5 @@ int ivtv_get_output(struct ivtv *itv, u16 index, struct v4l2_output *output);
int ivtv_get_audio_input(struct ivtv *itv, u16 index, struct v4l2_audio *input);
int ivtv_get_audio_output(struct ivtv *itv, u16 index, struct v4l2_audioout *output);
const struct ivtv_card *ivtv_get_card(u16 index);

#endif
+5 −0
Original line number Diff line number Diff line
@@ -18,4 +18,9 @@
    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */

#ifndef IVTV_CONTROLS_H
#define IVTV_CONTROLS_H

int ivtv_control_ioctls(struct ivtv *itv, unsigned int cmd, void *arg);

#endif
+0 −7
Original line number Diff line number Diff line
@@ -87,13 +87,6 @@ static struct pci_device_id ivtv_pci_tbl[] __devinitdata = {

MODULE_DEVICE_TABLE(pci,ivtv_pci_tbl);

const u32 yuv_offset[4] = {
	IVTV_YUV_BUFFER_OFFSET,
	IVTV_YUV_BUFFER_OFFSET_1,
	IVTV_YUV_BUFFER_OFFSET_2,
	IVTV_YUV_BUFFER_OFFSET_3
};

/* Parameter declarations */
static int cardtype[IVTV_MAX_CARDS];
static int tuner[IVTV_MAX_CARDS] = { -1, -1, -1, -1, -1, -1, -1, -1,
Loading