Subversion Repositories shark

Compare Revisions

Ignore whitespace Rev 458 → Rev 459

/shark/trunk/drivers/linuxc26/include/media/tea6415c.h
0,0 → 1,39
#ifndef __INCLUDED_TEA6415C__
#define __INCLUDED_TEA6415C__
 
/* possible i2c-addresses */
#define I2C_TEA6415C_1 0x03
#define I2C_TEA6415C_2 0x43
 
/* the tea6415c's design is quite brain-dead. although there are
8 inputs and 6 outputs, these aren't enumerated in any way. because
I don't want to say "connect input pin 20 to output pin 17", I define
a "virtual" pin-order. */
 
/* input pins */
#define TEA6415C_OUTPUT1 18
#define TEA6415C_OUTPUT2 14
#define TEA6415C_OUTPUT3 16
#define TEA6415C_OUTPUT4 17
#define TEA6415C_OUTPUT5 13
#define TEA6415C_OUTPUT6 15
 
/* output pins */
#define TEA6415C_INPUT1 5
#define TEA6415C_INPUT2 8
#define TEA6415C_INPUT3 3
#define TEA6415C_INPUT4 20
#define TEA6415C_INPUT5 6
#define TEA6415C_INPUT6 10
#define TEA6415C_INPUT7 1
#define TEA6415C_INPUT8 11
 
struct tea6415c_multiplex
{
int in; /* input-pin */
int out; /* output-pin */
};
 
#define TEA6415C_SWITCH _IOW('v',1,struct tea6415c_multiplex)
 
#endif
/shark/trunk/drivers/linuxc26/include/media/tda9840.h
0,0 → 1,35
#ifndef __INCLUDED_TDA9840__
#define __INCLUDED_TDA9840__
 
#define I2C_TDA9840 0x42
 
#define TDA9840_DETECT _IOR('v',1,int)
/* return values for TDA9840_DETCT */
#define TDA9840_MONO_DETECT 0x0
#define TDA9840_DUAL_DETECT 0x1
#define TDA9840_STEREO_DETECT 0x2
#define TDA9840_INCORRECT_DETECT 0x3
 
#define TDA9840_SWITCH _IOW('v',2,int)
/* modes than can be set with TDA9840_SWITCH */
#define TDA9840_SET_MUTE 0x00
#define TDA9840_SET_MONO 0x10
#define TDA9840_SET_STEREO 0x2a
#define TDA9840_SET_LANG1 0x12
#define TDA9840_SET_LANG2 0x1e
#define TDA9840_SET_BOTH 0x1a
#define TDA9840_SET_BOTH_R 0x16
#define TDA9840_SET_EXTERNAL 0x7a
 
/* values may range between +2.5 and -2.0;
the value has to be multiplied with 10 */
#define TDA9840_LEVEL_ADJUST _IOW('v',3,int)
 
/* values may range between +2.5 and -2.4;
the value has to be multiplied with 10 */
#define TDA9840_STEREO_ADJUST _IOW('v',4,int)
 
/* currently not implemented */
#define TDA9840_TEST _IOW('v',5,int)
 
#endif
/shark/trunk/drivers/linuxc26/include/media/saa7146_vv.h
2,10 → 2,9
#define __SAA7146_VV__
 
#include <linux/videodev2.h>
#include <drivers/saa7146.h>
#include <drivers/video-buf.h>
 
#include <media/saa7146.h>
#include <media/video-buf.h>
 
#define MAX_SAA7146_CAPTURE_BUFFERS 32 /* arbitrary */
#define BUFFER_TIMEOUT (HZ/2) /* 0.5 seconds */
 
26,12 → 25,15
u32 num_line_byte;
};
 
#define FORMAT_BYTE_SWAP 0x1
#define FORMAT_IS_PLANAR 0x2
 
struct saa7146_format {
char *name;
int pixelformat;
u32 pixelformat;
u32 trans;
u8 depth;
int swap;
u8 flags;
};
 
struct saa7146_standard
97,6 → 99,8
struct videobuf_queue vbi_q;
struct v4l2_vbi_format vbi_fmt;
struct timer_list vbi_read_timeout;
 
unsigned int resources; /* resource management for device open */
};
 
struct saa7146_vv
121,7 → 125,7
struct saa7146_dmaqueue video_q;
struct saa7146_fh *streaming;
enum v4l2_field last_field;
 
/* common: fixme? shouldn't this be in saa7146_fh?
(this leads to a more complicated question: shall the driver
store the different settings (for example S_INPUT) for every open
136,6 → 140,8
int current_hps_sync;
 
struct saa7146_dma d_clipping; /* pointer to clipping memory */
 
unsigned int resources; /* resource management for device */
};
 
#define SAA7146_EXCLUSIVE 0x1
149,7 → 155,6
};
 
/* flags */
#define SAA7146_EXT_SWAP_ODD_EVEN 0x1 /* needs odd/even fields swapped */
#define SAA7146_USE_PORT_B_FOR_VBI 0x2 /* use input port b for vbi hardware bug workaround */
 
struct saa7146_ext_vv
171,12 → 176,10
 
struct saa7146_use_ops {
void (*init)(struct saa7146_dev *, struct saa7146_vv *);
void(*open)(struct saa7146_dev *, struct saa7146_fh *);
void (*release)(struct saa7146_dev *, struct saa7146_fh *,struct file *);
int(*open)(struct saa7146_dev *, struct file *);
void (*release)(struct saa7146_dev *, struct file *);
void (*irq_done)(struct saa7146_dev *, unsigned long status);
ssize_t (*read)(struct file *, char *, size_t, loff_t *);
int (*capture_begin)(struct saa7146_fh *);
int (*capture_end)(struct saa7146_fh *);
};
 
/* from saa7146_fops.c */
191,9 → 194,10
int saa7146_vv_init(struct saa7146_dev* dev, struct saa7146_ext_vv *ext_vv);
int saa7146_vv_release(struct saa7146_dev* dev);
 
/* from saa7146_hlp.c */
int saa7146_enable_overlay(struct saa7146_fh *fh);
void saa7146_disable_overlay(struct saa7146_fh *fh);
 
/* from saa7146_hlp.c */
void saa7146_set_overlay(struct saa7146_dev *dev, struct saa7146_fh *fh, int v);
void saa7146_set_capture(struct saa7146_dev *dev, struct saa7146_buf *buf, struct saa7146_buf *next);
void saa7146_write_out_dma(struct saa7146_dev* dev, int which, struct saa7146_video_dma* vdma) ;
void saa7146_set_hps_source_and_sync(struct saa7146_dev *saa, int source, int sync);
207,6 → 211,16
/* from saa7146_vbi.c */
extern struct saa7146_use_ops saa7146_vbi_uops;
 
/* resource management functions */
int saa7146_res_get(struct saa7146_fh *fh, unsigned int bit);
int saa7146_res_check(struct saa7146_fh *fh, unsigned int bit);
int saa7146_res_locked(struct saa7146_dev *dev, unsigned int bit);
void saa7146_res_free(struct saa7146_fh *fh, unsigned int bits);
 
#define RESOURCE_DMA1_HPS 0x1
#define RESOURCE_DMA2_CLP 0x2
#define RESOURCE_DMA3_BRS 0x4
 
/* saa7146 source inputs */
#define SAA7146_HPS_SOURCE_PORT_A 0x00
#define SAA7146_HPS_SOURCE_PORT_B 0x01
/shark/trunk/drivers/linuxc26/include/media/tea6420.h
0,0 → 1,17
#ifndef __INCLUDED_TEA6420__
#define __INCLUDED_TEA6420__
 
/* possible addresses */
#define I2C_TEA6420_1 0x4c
#define I2C_TEA6420_2 0x4d
 
struct tea6420_multiplex
{
int in; /* input of audio switch */
int out; /* output of audio switch */
int gain; /* gain of connection */
};
 
#define TEA6420_SWITCH _IOW('v',1,struct tea6420_multiplex)
 
#endif
/shark/trunk/drivers/linuxc26/include/media/saa7146.h
67,6 → 67,8
dma_addr_t dma;
/* used for offsets for u,v planes for planar capture modes */
unsigned long offset;
/* used for custom pagetables (used for example by budget dvb cards) */
struct scatterlist *slist;
};
 
struct saa7146_pci_extension_data {
87,8 → 89,9
{
char name[32]; /* name of the device */
#define SAA7146_USE_I2C_IRQ 0x1
#define SAA7146_I2C_SHORT_DELAY 0x2
int flags;
/* pairs of subvendor and subdevice ids for
supported devices, last entry 0xffff, 0xfff */
struct module *module;
162,9 → 165,10
struct saa7146_format* format_by_fourcc(struct saa7146_dev *dev, int fourcc);
int saa7146_pgtable_alloc(struct pci_dev *pci, struct saa7146_pgtable *pt);
void saa7146_pgtable_free(struct pci_dev *pci, struct saa7146_pgtable *pt);
void saa7146_pgtable_build_single(struct pci_dev *pci, struct saa7146_pgtable *pt, struct scatterlist *list, int length );
int saa7146_pgtable_build_single(struct pci_dev *pci, struct saa7146_pgtable *pt, struct scatterlist *list, int length );
char *saa7146_vmalloc_build_pgtable(struct pci_dev *pci, long length, struct saa7146_pgtable *pt);
void saa7146_setgpio(struct saa7146_dev *dev, int port, u32 data);
int saa7146_wait_for_debi_done(struct saa7146_dev *dev);
 
/* some memory sizes */
#define SAA7146_I2C_MEM ( 1*PAGE_SIZE)
187,6 → 191,9
#define SAA7146_GPIO_OUTLO 0x40
#define SAA7146_GPIO_OUTHI 0x50
 
/* debi defines */
#define DEBINOSWAP 0x000e0000
 
/* define for the register programming sequencer (rps) */
#define CMD_NOP 0x00000000 /* No operation */
#define CMD_CLR_EVENT 0x00000000 /* Clear event */
/shark/trunk/drivers/linuxc26/include/media/mxb.h
0,0 → 1,42
#ifndef __MXB__
#define __MXB__
 
#define BASE_VIDIOC_MXB 10
 
#define MXB_S_AUDIO_CD _IOW ('V', BASE_VIDIOC_PRIVATE+BASE_VIDIOC_MXB+0, int)
#define MXB_S_AUDIO_LINE _IOW ('V', BASE_VIDIOC_PRIVATE+BASE_VIDIOC_MXB+1, int)
 
#define MXB_IDENTIFIER "Multimedia eXtension Board"
 
#define MXB_AUDIOS 6
 
/* these are the available audio sources, which can switched
to the line- and cd-output individually */
struct v4l2_audio mxb_audios[MXB_AUDIOS] = {
{
.index = 0,
.name = "Tuner",
.capability = V4L2_AUDCAP_STEREO,
} , {
.index = 1,
.name = "AUX1",
.capability = V4L2_AUDCAP_STEREO,
} , {
.index = 2,
.name = "AUX2",
.capability = V4L2_AUDCAP_STEREO,
} , {
.index = 3,
.name = "AUX3",
.capability = V4L2_AUDCAP_STEREO,
} , {
.index = 4,
.name = "Radio (X9)",
.capability = V4L2_AUDCAP_STEREO,
} , {
.index = 5,
.name = "CD-ROM (X10)",
.capability = V4L2_AUDCAP_STEREO,
}
};
#endif