diff options
author | Dave Kleikamp <shaggy@austin.ibm.com> | 2006-01-24 14:34:47 -0600 |
---|---|---|
committer | Dave Kleikamp <shaggy@austin.ibm.com> | 2006-01-24 14:34:47 -0600 |
commit | 0a0fc0ddbe732779366ab6b1b879f62195e65967 (patch) | |
tree | 7b42490a676cf39ae0691b6859ecf7fd410f229b /include/media | |
parent | 4d5dbd0945d9e0833dd7964a3d6ee33157f7cc7a (diff) | |
parent | 3ee68c4af3fd7228c1be63254b9f884614f9ebb2 (diff) |
Merge with /home/shaggy/git/linus-clean/
Diffstat (limited to 'include/media')
-rw-r--r-- | include/media/audiochip.h | 16 | ||||
-rw-r--r-- | include/media/ir-common.h | 1 | ||||
-rw-r--r-- | include/media/ir-kbd-i2c.h | 2 | ||||
-rw-r--r-- | include/media/saa7146.h | 12 | ||||
-rw-r--r-- | include/media/saa7146_vv.h | 12 | ||||
-rw-r--r-- | include/media/tuner-types.h | 55 | ||||
-rw-r--r-- | include/media/tuner.h | 110 | ||||
-rw-r--r-- | include/media/tveeprom.h | 4 | ||||
-rw-r--r-- | include/media/v4l2-common.h | 183 |
9 files changed, 313 insertions, 82 deletions
diff --git a/include/media/audiochip.h b/include/media/audiochip.h index b7d4b093040..295d256ee81 100644 --- a/include/media/audiochip.h +++ b/include/media/audiochip.h @@ -23,11 +23,6 @@ enum audiochip { /* ---------------------------------------------------------------------- */ -/* v4l device was opened in Radio mode */ -#define AUDC_SET_RADIO _IO('m',2) -/* select from TV,radio,extern,MUTE */ -#define AUDC_SET_INPUT _IOW('m',17,int) - /* audio inputs */ #define AUDIO_TUNER 0x00 #define AUDIO_RADIO 0x01 @@ -40,15 +35,4 @@ enum audiochip { #define AUDIO_MUTE 0x80 #define AUDIO_UNMUTE 0x81 -/* all the stuff below is obsolete and just here for reference. I'll - * remove it once the driver is tested and works fine. - * - * Instead creating alot of tiny API's for all kinds of different - * chips, we'll just pass throuth the v4l ioctl structs (v4l2 not - * yet...). It is a bit less flexible, but most/all used i2c chips - * make sense in v4l context only. So I think that's acceptable... - */ - -/* misc stuff to pass around config info to i2c chips */ -#define AUDC_CONFIG_PINNACLE _IOW('m',32,int) #endif /* AUDIOCHIP_H */ diff --git a/include/media/ir-common.h b/include/media/ir-common.h index 0f1ba95ec8d..ad3e9bb670c 100644 --- a/include/media/ir-common.h +++ b/include/media/ir-common.h @@ -49,6 +49,7 @@ struct ir_input_state { extern IR_KEYTAB_TYPE ir_codes_rc5_tv[IR_KEYTAB_SIZE]; extern IR_KEYTAB_TYPE ir_codes_winfast[IR_KEYTAB_SIZE]; +extern IR_KEYTAB_TYPE ir_codes_pinnacle[IR_KEYTAB_SIZE]; extern IR_KEYTAB_TYPE ir_codes_empty[IR_KEYTAB_SIZE]; extern IR_KEYTAB_TYPE ir_codes_hauppauge_new[IR_KEYTAB_SIZE]; extern IR_KEYTAB_TYPE ir_codes_pixelview[IR_KEYTAB_SIZE]; diff --git a/include/media/ir-kbd-i2c.h b/include/media/ir-kbd-i2c.h index 00fa57eb9fd..730f21ed91d 100644 --- a/include/media/ir-kbd-i2c.h +++ b/include/media/ir-kbd-i2c.h @@ -19,4 +19,6 @@ struct IR_i2c { char phys[32]; int (*get_key)(struct IR_i2c*, u32*, u32*); }; + +int get_key_pinnacle(struct IR_i2c *ir, u32 *ir_key, u32 *ir_raw); #endif diff --git a/include/media/saa7146.h b/include/media/saa7146.h index 2a897c3a6a9..2bc634fcb7b 100644 --- a/include/media/saa7146.h +++ b/include/media/saa7146.h @@ -14,21 +14,21 @@ #include <linux/vmalloc.h> /* for vmalloc() */ #include <linux/mm.h> /* for vmalloc_to_page() */ -#define SAA7146_VERSION_CODE 0x000500 /* 0.5.0 */ +#define SAA7146_VERSION_CODE 0x000500 /* 0.5.0 */ #define saa7146_write(sxy,adr,dat) writel((dat),(sxy->mem+(adr))) #define saa7146_read(sxy,adr) readl(sxy->mem+(adr)) extern unsigned int saa7146_debug; -//#define DEBUG_PROLOG printk("(0x%08x)(0x%08x) %s: %s(): ",(dev==0?-1:(dev->mem==0?-1:saa7146_read(dev,RPS_ADDR0))),(dev==0?-1:(dev->mem==0?-1:saa7146_read(dev,IER))),__stringify(KBUILD_MODNAME),__FUNCTION__) +//#define DEBUG_PROLOG printk("(0x%08x)(0x%08x) %s: %s(): ",(dev==0?-1:(dev->mem==0?-1:saa7146_read(dev,RPS_ADDR0))),(dev==0?-1:(dev->mem==0?-1:saa7146_read(dev,IER))),KBUILD_MODNAME,__FUNCTION__) #ifndef DEBUG_VARIABLE #define DEBUG_VARIABLE saa7146_debug #endif -#define DEBUG_PROLOG printk("%s: %s(): ",__stringify(KBUILD_MODNAME),__FUNCTION__) -#define INFO(x) { printk("%s: ",__stringify(KBUILD_MODNAME)); printk x; } +#define DEBUG_PROLOG printk("%s: %s(): ",KBUILD_MODNAME,__FUNCTION__) +#define INFO(x) { printk("%s: ",KBUILD_MODNAME); printk x; } #define ERR(x) { DEBUG_PROLOG; printk x; } @@ -112,7 +112,7 @@ struct saa7146_dev /* different device locks */ spinlock_t slock; - struct semaphore lock; + struct semaphore lock; unsigned char __iomem *mem; /* pointer to mapped IO memory */ int revision; /* chip revision; needed for bug-workarounds*/ @@ -133,7 +133,7 @@ struct saa7146_dev void (*vv_callback)(struct saa7146_dev *dev, unsigned long status); /* i2c-stuff */ - struct semaphore i2c_lock; + struct semaphore i2c_lock; u32 i2c_bitrate; struct saa7146_dma d_i2c; /* pointer to i2c memory */ wait_queue_head_t i2c_wq; diff --git a/include/media/saa7146_vv.h b/include/media/saa7146_vv.h index 64691753721..e5e749e984e 100644 --- a/include/media/saa7146_vv.h +++ b/include/media/saa7146_vv.h @@ -113,7 +113,7 @@ struct saa7146_vv /* vbi capture */ struct saa7146_dmaqueue vbi_q; /* vbi workaround interrupt queue */ - wait_queue_head_t vbi_wq; + wait_queue_head_t vbi_wq; int vbi_fieldcount; struct saa7146_fh *vbi_streaming; @@ -178,13 +178,15 @@ struct saa7146_ext_vv struct saa7146_extension_ioctls *ioctls; int (*ioctl)(struct saa7146_fh*, unsigned int cmd, void *arg); + + struct file_operations vbi_fops; }; struct saa7146_use_ops { - void (*init)(struct saa7146_dev *, struct saa7146_vv *); - int(*open)(struct saa7146_dev *, struct file *); - void (*release)(struct saa7146_dev *, struct file *); - void (*irq_done)(struct saa7146_dev *, unsigned long status); + void (*init)(struct saa7146_dev *, struct saa7146_vv *); + 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 __user *, size_t, loff_t *); }; diff --git a/include/media/tuner-types.h b/include/media/tuner-types.h new file mode 100644 index 00000000000..15821ab14a9 --- /dev/null +++ b/include/media/tuner-types.h @@ -0,0 +1,55 @@ +/* + * descriptions for simple tuners. + */ + +#ifndef __TUNER_TYPES_H__ +#define __TUNER_TYPES_H__ + +enum param_type { + TUNER_PARAM_TYPE_RADIO, \ + TUNER_PARAM_TYPE_PAL, \ + TUNER_PARAM_TYPE_SECAM, \ + TUNER_PARAM_TYPE_NTSC +}; + +struct tuner_range { + unsigned short limit; + unsigned char cb; +}; + +struct tuner_params { + enum param_type type; + /* Many Philips based tuners have a comment like this in their + * datasheet: + * + * For channel selection involving band switching, and to ensure + * smooth tuning to the desired channel without causing + * unnecessary charge pump action, it is recommended to consider + * the difference between wanted channel frequency and the + * current channel frequency. Unnecessary charge pump action + * will result in very low tuning voltage which may drive the + * oscillator to extreme conditions. + * + * Set cb_first_if_lower_freq to 1, if this check is + * required for this tuner. + * + * I tested this for PAL by first setting the TV frequency to + * 203 MHz and then switching to 96.6 MHz FM radio. The result was + * static unless the control byte was sent first. + */ + unsigned int cb_first_if_lower_freq:1; + unsigned char config; /* to be moved into struct tuner_range for dvb-pll merge */ + + unsigned int count; + struct tuner_range *ranges; +}; + +struct tunertype { + char *name; + struct tuner_params *params; +}; + +extern struct tunertype tuners[]; +extern unsigned const int tuner_count; + +#endif diff --git a/include/media/tuner.h b/include/media/tuner.h index 9184e534b7e..a5beeac495c 100644 --- a/include/media/tuner.h +++ b/include/media/tuner.h @@ -23,6 +23,7 @@ #define _TUNER_H #include <linux/videodev2.h> +#include <media/tuner-types.h> #define ADDR_UNSET (255) @@ -82,9 +83,9 @@ #define TUNER_PHILIPS_FM1236_MK3 43 #define TUNER_PHILIPS_4IN1 44 /* ATI TV Wonder Pro - Conexant */ -/* Microtune mergeged with Temic 12/31/1999 partially financed by Alps - these may be similar to Temic */ +/* Microtune merged with Temic 12/31/1999 partially financed by Alps - these may be similar to Temic */ #define TUNER_MICROTUNE_4049FM5 45 -#define TUNER_MICROTUNE_4042_FI5 46 +#define TUNER_PANASONIC_VP27 46 #define TUNER_LG_NTSC_TAPE 47 #define TUNER_TNF_8831BGFF 48 @@ -102,7 +103,7 @@ #define TUNER_YMEC_TVF_8531MF 58 #define TUNER_YMEC_TVF_5533MF 59 /* Pixelview Pro Ultra NTSC */ -#define TUNER_THOMSON_DTT7611 60 /* DViCO FusionHDTV 3 Gold-T */ +#define TUNER_THOMSON_DTT761X 60 /* DTT 7611 7611A 7612 7613 7613A 7614 7615 7615A */ #define TUNER_TENA_9533_DI 61 #define TUNER_TEA5767 62 /* Only FM Radio Tuner */ #define TUNER_PHILIPS_FMD1216ME_MK3 63 @@ -113,48 +114,29 @@ #define TUNER_PHILIPS_TD1316 67 #define TUNER_PHILIPS_TUV1236D 68 /* ATI HDTV Wonder */ - -#define NOTUNER 0 -#define PAL 1 /* PAL_BG */ -#define PAL_I 2 -#define NTSC 3 -#define SECAM 4 -#define ATSC 5 -#define RADIO 6 - -#define NoTuner 0 -#define Philips 1 -#define TEMIC 2 -#define Sony 3 -#define Alps 4 -#define LGINNOTEK 5 -#define SHARP 6 -#define Samsung 7 -#define Microtune 8 -#define HITACHI 9 -#define Panasonic 10 -#define TCL 11 -#define THOMSON 12 - -#define TUNER_SET_TYPE_ADDR _IOW('T',3,int) -#define TUNER_SET_STANDBY _IOW('T',4,int) -#define TDA9887_SET_CONFIG _IOW('t',5,int) +#define TUNER_TNF_5335MF 69 /* Sabrent Bt848 */ +#define TUNER_SAMSUNG_TCPN_2121P30A 70 /* Hauppauge PVR-500MCE NTSC */ /* tv card specific */ -# define TDA9887_PRESENT (1<<0) -# define TDA9887_PORT1_INACTIVE (1<<1) -# define TDA9887_PORT2_INACTIVE (1<<2) -# define TDA9887_QSS (1<<3) -# define TDA9887_INTERCARRIER (1<<4) -# define TDA9887_PORT1_ACTIVE (1<<5) -# define TDA9887_PORT2_ACTIVE (1<<6) -# define TDA9887_INTERCARRIER_NTSC (1<<7) +#define TDA9887_PRESENT (1<<0) +#define TDA9887_PORT1_INACTIVE (1<<1) +#define TDA9887_PORT2_INACTIVE (1<<2) +#define TDA9887_QSS (1<<3) +#define TDA9887_INTERCARRIER (1<<4) +#define TDA9887_PORT1_ACTIVE (1<<5) +#define TDA9887_PORT2_ACTIVE (1<<6) +#define TDA9887_INTERCARRIER_NTSC (1<<7) +/* Tuner takeover point adjustment, in dB, -16 <= top <= 15 */ +#define TDA9887_TOP_MASK (0x3f << 8) +#define TDA9887_TOP_SET (1 << 13) +#define TDA9887_TOP(top) (TDA9887_TOP_SET | (((16 + (top)) & 0x1f) << 8)) + /* config options */ -# define TDA9887_DEEMPHASIS_MASK (3<<16) -# define TDA9887_DEEMPHASIS_NONE (1<<16) -# define TDA9887_DEEMPHASIS_50 (2<<16) -# define TDA9887_DEEMPHASIS_75 (3<<16) -# define TDA9887_AUTOMUTE (1<<18) +#define TDA9887_DEEMPHASIS_MASK (3<<16) +#define TDA9887_DEEMPHASIS_NONE (1<<16) +#define TDA9887_DEEMPHASIS_50 (2<<16) +#define TDA9887_DEEMPHASIS_75 (3<<16) +#define TDA9887_AUTOMUTE (1<<18) #ifdef __KERNEL__ @@ -166,10 +148,26 @@ enum tuner_mode { T_STANDBY = 1 << 31 }; +/* Older boards only had a single tuner device. Nowadays multiple tuner + devices may be present on a single board. Using TUNER_SET_TYPE_ADDR + to pass the tuner_setup structure it is possible to setup each tuner + device in turn. + + Since multiple devices may be present it is no longer sufficient to + send a command to a single i2c device. Instead you should broadcast + the command to all i2c devices. + + By setting the mode_mask correctly you can select which commands are + accepted by a specific tuner device. For example, set mode_mask to + T_RADIO if the device is a radio-only tuner. That specific tuner will + only accept commands when the tuner is in radio mode and ignore them + when the tuner is set to TV mode. + */ + struct tuner_setup { - unsigned short addr; - unsigned int type; - unsigned int mode_mask; + unsigned short addr; /* I2C address */ + unsigned int type; /* Tuner type */ + unsigned int mode_mask; /* Allowed tuner modes */ }; struct tuner { @@ -181,7 +179,9 @@ struct tuner { unsigned int mode; unsigned int mode_mask; /* Combination of allowable modes */ - unsigned int freq; /* keep track of the current settings */ + unsigned int tv_freq; /* keep track of the current settings */ + unsigned int radio_freq; + u16 last_div; unsigned int audmode; v4l2_std_id std; @@ -199,14 +199,13 @@ struct tuner { unsigned int sgIF; /* function ptrs */ - void (*tv_freq)(struct i2c_client *c, unsigned int freq); - void (*radio_freq)(struct i2c_client *c, unsigned int freq); + void (*set_tv_freq)(struct i2c_client *c, unsigned int freq); + void (*set_radio_freq)(struct i2c_client *c, unsigned int freq); int (*has_signal)(struct i2c_client *c); int (*is_stereo)(struct i2c_client *c); void (*standby)(struct i2c_client *c); }; -extern unsigned int tuner_debug; extern unsigned const int tuner_count; extern int microtune_init(struct i2c_client *c); @@ -217,15 +216,16 @@ extern int default_tuner_init(struct i2c_client *c); extern int tea5767_autodetection(struct i2c_client *c); #define tuner_warn(fmt, arg...) do {\ - printk(KERN_WARNING "%s %d-%04x: " fmt, t->i2c.driver->name, \ - t->i2c.adapter->nr, t->i2c.addr , ##arg); } while (0) + printk(KERN_WARNING "%s %d-%04x: " fmt, t->i2c.driver->driver.name, \ + i2c_adapter_id(t->i2c.adapter), t->i2c.addr , ##arg); } while (0) #define tuner_info(fmt, arg...) do {\ - printk(KERN_INFO "%s %d-%04x: " fmt, t->i2c.driver->name, \ - t->i2c.adapter->nr, t->i2c.addr , ##arg); } while (0) + printk(KERN_INFO "%s %d-%04x: " fmt, t->i2c.driver->driver.name, \ + i2c_adapter_id(t->i2c.adapter), t->i2c.addr , ##arg); } while (0) #define tuner_dbg(fmt, arg...) do {\ + extern int tuner_debug; \ if (tuner_debug) \ - printk(KERN_DEBUG "%s %d-%04x: " fmt, t->i2c.driver->name, \ - t->i2c.adapter->nr, t->i2c.addr , ##arg); } while (0) + printk(KERN_DEBUG "%s %d-%04x: " fmt, t->i2c.driver->driver.name, \ + i2c_adapter_id(t->i2c.adapter), t->i2c.addr , ##arg); } while (0) #endif /* __KERNEL__ */ diff --git a/include/media/tveeprom.h b/include/media/tveeprom.h index e2035c7da09..e9fc1a78549 100644 --- a/include/media/tveeprom.h +++ b/include/media/tveeprom.h @@ -4,12 +4,15 @@ struct tveeprom { u32 has_radio; u32 has_ir; /* 0: no IR, 1: IR present, 2: unknown */ + u32 has_MAC_address; /* 0: no MAC, 1: MAC present, 2: unknown */ u32 tuner_type; u32 tuner_formats; + u32 tuner_hauppauge_model; u32 tuner2_type; u32 tuner2_formats; + u32 tuner2_hauppauge_model; u32 digitizer; u32 digitizer_formats; @@ -21,6 +24,7 @@ struct tveeprom { u32 revision; u32 serial_number; char rev_str[5]; + u8 MAC_address[6]; }; void tveeprom_hauppauge_analog(struct i2c_client *c, struct tveeprom *tvee, diff --git a/include/media/v4l2-common.h b/include/media/v4l2-common.h new file mode 100644 index 00000000000..d4030a7e16e --- /dev/null +++ b/include/media/v4l2-common.h @@ -0,0 +1,183 @@ +/* + v4l2 common internal API header + + This header contains internal shared ioctl definitions for use by the + internal low-level v4l2 drivers. + Each ioctl begins with VIDIOC_INT_ to clearly mark that it is an internal + define, + + Copyright (C) 2005 Hans Verkuil <hverkuil@xs4all.nl> + + 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 + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#ifndef V4L2_COMMON_H_ +#define V4L2_COMMON_H_ + +/* v4l debugging and diagnostics */ + +/* Common printk constucts for v4l-i2c drivers. These macros create a unique + prefix consisting of the driver name, the adapter number and the i2c + address. */ +#define v4l_printk(level, name, adapter, addr, fmt, arg...) \ + printk(level "%s %d-%04x: " fmt, name, i2c_adapter_id(adapter), addr , ## arg) + +#define v4l_client_printk(level, client, fmt, arg...) \ + v4l_printk(level, (client)->driver->driver.name, (client)->adapter, \ + (client)->addr, fmt , ## arg) + +#define v4l_err(client, fmt, arg...) \ + v4l_client_printk(KERN_ERR, client, fmt , ## arg) + +#define v4l_warn(client, fmt, arg...) \ + v4l_client_printk(KERN_WARNING, client, fmt , ## arg) + +#define v4l_info(client, fmt, arg...) \ + v4l_client_printk(KERN_INFO, client, fmt , ## arg) + +/* These three macros assume that the debug level is set with a module + parameter called 'debug'. */ +#define v4l_dbg(level, debug, client, fmt, arg...) \ + do { \ + if (debug >= (level)) \ + v4l_client_printk(KERN_DEBUG, client, fmt , ## arg); \ + } while (0) + +/* Prints the ioctl in a human-readable format */ +extern void v4l_printk_ioctl(unsigned int cmd); + +/* Use this macro for non-I2C drivers. Pass the driver name as the first arg. */ +#define v4l_print_ioctl(name, cmd) \ + do { \ + printk(KERN_DEBUG "%s: ", name); \ + v4l_printk_ioctl(cmd); \ + } while (0) + +/* Use this macro in I2C drivers where 'client' is the struct i2c_client + pointer */ +#define v4l_i2c_print_ioctl(client, cmd) \ + do { \ + v4l_client_printk(KERN_DEBUG, client, ""); \ + v4l_printk_ioctl(cmd); \ + } while (0) + +/* ------------------------------------------------------------------------- */ + +/* Internal ioctls */ + +/* VIDIOC_INT_G_REGISTER and VIDIOC_INT_S_REGISTER */ +struct v4l2_register { + u32 i2c_id; /* I2C driver ID of the I2C chip. 0 for the I2C adapter. */ + unsigned long reg; + u32 val; +}; + +/* VIDIOC_INT_DECODE_VBI_LINE */ +struct v4l2_decode_vbi_line { + u32 is_second_field; /* Set to 0 for the first (odd) field, + set to 1 for the second (even) field. */ + u8 *p; /* Pointer to the sliced VBI data from the decoder. + On exit points to the start of the payload. */ + u32 line; /* Line number of the sliced VBI data (1-23) */ + u32 type; /* VBI service type (V4L2_SLICED_*). 0 if no service found */ +}; + +/* VIDIOC_INT_G_CHIP_IDENT: identifies the actual chip installed on the board */ +enum v4l2_chip_ident { + /* general idents: reserved range 0-49 */ + V4L2_IDENT_UNKNOWN = 0, + + /* module saa7115: reserved range 100-149 */ + V4L2_IDENT_SAA7114 = 104, + V4L2_IDENT_SAA7115 = 105, + + /* module saa7127: reserved range 150-199 */ + V4L2_IDENT_SAA7127 = 157, + V4L2_IDENT_SAA7129 = 159, + + /* module cx25840: reserved range 200-249 */ + V4L2_IDENT_CX25840 = 240, + V4L2_IDENT_CX25841 = 241, + V4L2_IDENT_CX25842 = 242, + V4L2_IDENT_CX25843 = 243, +}; + +/* audio ioctls */ +/* v4l device was opened in Radio mode */ +#define AUDC_SET_RADIO _IO('d',88) +/* select from TV,radio,extern,MUTE */ +#define AUDC_SET_INPUT _IOW('d',89,int) + +/* msp3400 ioctl: will be removed in the near future */ +struct msp_matrix { + int input; + int output; +}; +#define MSP_SET_MATRIX _IOW('m',17,struct msp_matrix) + +/* tuner ioctls */ +/* Sets tuner type and its I2C addr */ +#define TUNER_SET_TYPE_ADDR _IOW('d',90,int) +/* Puts tuner on powersaving state, disabling it, except for i2c */ +#define TUNER_SET_STANDBY _IOW('d',91,int) +/* Sets tda9887 specific stuff, like port1, port2 and qss */ +#define TDA9887_SET_CONFIG _IOW('d',92,int) + +/* only implemented if CONFIG_VIDEO_ADV_DEBUG is defined */ +#define VIDIOC_INT_S_REGISTER _IOR ('d', 100, struct v4l2_register) +#define VIDIOC_INT_G_REGISTER _IOWR('d', 101, struct v4l2_register) + +/* Reset the I2C chip */ +#define VIDIOC_INT_RESET _IO ('d', 102) + +/* Set the frequency (in Hz) of the audio clock output. + Used to slave an audio processor to the video decoder, ensuring that audio + and video remain synchronized. + Usual values for the frequency are 48000, 44100 or 32000 Hz. + If the frequency is not supported, then -EINVAL is returned. */ +#define VIDIOC_INT_AUDIO_CLOCK_FREQ _IOW ('d', 103, u32) + +/* Video decoders that support sliced VBI need to implement this ioctl. + Field p of the v4l2_sliced_vbi_line struct is set to the start of the VBI + data that was generated by the decoder. The driver then parses the sliced + VBI data and sets the other fields in the struct accordingly. The pointer p + is updated to point to the start of the payload which can be copied + verbatim into the data field of the v4l2_sliced_vbi_data struct. If no + valid VBI data was found, then the type field is set to 0 on return. */ +#define VIDIOC_INT_DECODE_VBI_LINE _IOWR('d', 104, struct v4l2_decode_vbi_line) + +/* Used to generate VBI signals on a video signal. v4l2_sliced_vbi_data is + filled with the data packets that should be output. Note that if you set + the line field to 0, then that VBI signal is disabled. */ +#define VIDIOC_INT_S_VBI_DATA _IOW ('d', 105, struct v4l2_sliced_vbi_data) + +/* Used to obtain the sliced VBI packet from a readback register. Not all + video decoders support this. If no data is available because the readback + register contains invalid or erroneous data -EIO is returned. Note that + you must fill in the 'id' member and the 'field' member (to determine + whether CC data from the first or second field should be obtained). */ +#define VIDIOC_INT_G_VBI_DATA _IOWR('d', 106, struct v4l2_sliced_vbi_data *) + +/* Returns the chip identifier or V4L2_IDENT_UNKNOWN if no identification can + be made. */ +#define VIDIOC_INT_G_CHIP_IDENT _IOR ('d', 107, enum v4l2_chip_ident *) + +/* Sets I2S speed in bps. This is used to provide a standard way to select I2S + clock used by driving digital audio streams at some board designs. + Usual values for the frequency are 1024000 and 2048000. + If the frequency is not supported, then -EINVAL is returned. */ +#define VIDIOC_INT_I2S_CLOCK_FREQ _IOW ('d', 108, u32) + +#endif /* V4L2_COMMON_H_ */ |