162306a36Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0-or-later */ 262306a36Sopenharmony_ci/* 362306a36Sopenharmony_ci Functions to query card hardware 462306a36Sopenharmony_ci Copyright (C) 2003-2004 Kevin Thayer <nufan_wfk at yahoo.com> 562306a36Sopenharmony_ci Copyright (C) 2005-2007 Hans Verkuil <hverkuil@xs4all.nl> 662306a36Sopenharmony_ci 762306a36Sopenharmony_ci */ 862306a36Sopenharmony_ci 962306a36Sopenharmony_ci#ifndef IVTV_CARDS_H 1062306a36Sopenharmony_ci#define IVTV_CARDS_H 1162306a36Sopenharmony_ci 1262306a36Sopenharmony_ci/* Supported cards */ 1362306a36Sopenharmony_ci#define IVTV_CARD_PVR_250 0 /* WinTV PVR 250 */ 1462306a36Sopenharmony_ci#define IVTV_CARD_PVR_350 1 /* encoder, decoder, tv-out */ 1562306a36Sopenharmony_ci#define IVTV_CARD_PVR_150 2 /* WinTV PVR 150 and PVR 500 (really just two 1662306a36Sopenharmony_ci PVR150s on one PCI board) */ 1762306a36Sopenharmony_ci#define IVTV_CARD_M179 3 /* AVerMedia M179 (encoder only) */ 1862306a36Sopenharmony_ci#define IVTV_CARD_MPG600 4 /* Kuroutoshikou ITVC16-STVLP/YUAN MPG600, encoder only */ 1962306a36Sopenharmony_ci#define IVTV_CARD_MPG160 5 /* Kuroutoshikou ITVC15-STVLP/YUAN MPG160 2062306a36Sopenharmony_ci cx23415 based, but does not have tv-out */ 2162306a36Sopenharmony_ci#define IVTV_CARD_PG600 6 /* YUAN PG600/DIAMONDMM PVR-550 based on the CX Falcon 2 */ 2262306a36Sopenharmony_ci#define IVTV_CARD_AVC2410 7 /* Adaptec AVC-2410 */ 2362306a36Sopenharmony_ci#define IVTV_CARD_AVC2010 8 /* Adaptec AVD-2010 (No Tuner) */ 2462306a36Sopenharmony_ci#define IVTV_CARD_TG5000TV 9 /* NAGASE TRANSGEAR 5000TV, encoder only */ 2562306a36Sopenharmony_ci#define IVTV_CARD_VA2000MAX_SNT6 10 /* VA2000MAX-STN6 */ 2662306a36Sopenharmony_ci#define IVTV_CARD_CX23416GYC 11 /* Kuroutoshikou CX23416GYC-STVLP (Yuan MPG600GR OEM) */ 2762306a36Sopenharmony_ci#define IVTV_CARD_GV_MVPRX 12 /* I/O Data GV-MVP/RX, RX2, RX2W */ 2862306a36Sopenharmony_ci#define IVTV_CARD_GV_MVPRX2E 13 /* I/O Data GV-MVP/RX2E */ 2962306a36Sopenharmony_ci#define IVTV_CARD_GOTVIEW_PCI_DVD 14 /* GotView PCI DVD */ 3062306a36Sopenharmony_ci#define IVTV_CARD_GOTVIEW_PCI_DVD2 15 /* GotView PCI DVD2 */ 3162306a36Sopenharmony_ci#define IVTV_CARD_YUAN_MPC622 16 /* Yuan MPC622 miniPCI */ 3262306a36Sopenharmony_ci#define IVTV_CARD_DCTMTVP1 17 /* DIGITAL COWBOY DCT-MTVP1 */ 3362306a36Sopenharmony_ci#define IVTV_CARD_PG600V2 18 /* Yuan PG600V2/GotView PCI DVD Lite */ 3462306a36Sopenharmony_ci#define IVTV_CARD_CLUB3D 19 /* Club3D ZAP-TV1x01 */ 3562306a36Sopenharmony_ci#define IVTV_CARD_AVERTV_MCE116 20 /* AVerTV MCE 116 Plus */ 3662306a36Sopenharmony_ci#define IVTV_CARD_ASUS_FALCON2 21 /* ASUS Falcon2 */ 3762306a36Sopenharmony_ci#define IVTV_CARD_AVER_PVR150PLUS 22 /* AVerMedia PVR-150 Plus */ 3862306a36Sopenharmony_ci#define IVTV_CARD_AVER_EZMAKER 23 /* AVerMedia EZMaker PCI Deluxe */ 3962306a36Sopenharmony_ci#define IVTV_CARD_AVER_M104 24 /* AverMedia M104 miniPCI card */ 4062306a36Sopenharmony_ci#define IVTV_CARD_BUFFALO_MV5L 25 /* Buffalo PC-MV5L/PCI card */ 4162306a36Sopenharmony_ci#define IVTV_CARD_AVER_ULTRA1500MCE 26 /* AVerMedia UltraTV 1500 MCE */ 4262306a36Sopenharmony_ci#define IVTV_CARD_KIKYOU 27 /* Sony VAIO Giga Pocket (ENX Kikyou) */ 4362306a36Sopenharmony_ci#define IVTV_CARD_LAST 27 4462306a36Sopenharmony_ci 4562306a36Sopenharmony_ci/* Variants of existing cards but with the same PCI IDs. The driver 4662306a36Sopenharmony_ci detects these based on other device information. 4762306a36Sopenharmony_ci These cards must always come last. 4862306a36Sopenharmony_ci New cards must be inserted above, and the indices of the cards below 4962306a36Sopenharmony_ci must be adjusted accordingly. */ 5062306a36Sopenharmony_ci 5162306a36Sopenharmony_ci/* PVR-350 V1 (uses saa7114) */ 5262306a36Sopenharmony_ci#define IVTV_CARD_PVR_350_V1 (IVTV_CARD_LAST+1) 5362306a36Sopenharmony_ci/* 2 variants of Kuroutoshikou CX23416GYC-STVLP (Yuan MPG600GR OEM) */ 5462306a36Sopenharmony_ci#define IVTV_CARD_CX23416GYC_NOGR (IVTV_CARD_LAST+2) 5562306a36Sopenharmony_ci#define IVTV_CARD_CX23416GYC_NOGRYCS (IVTV_CARD_LAST+3) 5662306a36Sopenharmony_ci 5762306a36Sopenharmony_ci/* system vendor and device IDs */ 5862306a36Sopenharmony_ci#define PCI_VENDOR_ID_ICOMP 0x4444 5962306a36Sopenharmony_ci#define PCI_DEVICE_ID_IVTV15 0x0803 6062306a36Sopenharmony_ci#define PCI_DEVICE_ID_IVTV16 0x0016 6162306a36Sopenharmony_ci 6262306a36Sopenharmony_ci/* subsystem vendor ID */ 6362306a36Sopenharmony_ci#define IVTV_PCI_ID_HAUPPAUGE 0x0070 6462306a36Sopenharmony_ci#define IVTV_PCI_ID_HAUPPAUGE_ALT1 0x0270 6562306a36Sopenharmony_ci#define IVTV_PCI_ID_HAUPPAUGE_ALT2 0x4070 6662306a36Sopenharmony_ci#define IVTV_PCI_ID_ADAPTEC 0x9005 6762306a36Sopenharmony_ci#define IVTV_PCI_ID_ASUSTEK 0x1043 6862306a36Sopenharmony_ci#define IVTV_PCI_ID_AVERMEDIA 0x1461 6962306a36Sopenharmony_ci#define IVTV_PCI_ID_YUAN1 0x12ab 7062306a36Sopenharmony_ci#define IVTV_PCI_ID_YUAN2 0xff01 7162306a36Sopenharmony_ci#define IVTV_PCI_ID_YUAN3 0xffab 7262306a36Sopenharmony_ci#define IVTV_PCI_ID_YUAN4 0xfbab 7362306a36Sopenharmony_ci#define IVTV_PCI_ID_DIAMONDMM 0xff92 7462306a36Sopenharmony_ci#define IVTV_PCI_ID_IODATA 0x10fc 7562306a36Sopenharmony_ci#define IVTV_PCI_ID_MELCO 0x1154 7662306a36Sopenharmony_ci#define IVTV_PCI_ID_GOTVIEW1 0xffac 7762306a36Sopenharmony_ci#define IVTV_PCI_ID_GOTVIEW2 0xffad 7862306a36Sopenharmony_ci#define IVTV_PCI_ID_SONY 0x104d 7962306a36Sopenharmony_ci 8062306a36Sopenharmony_ci/* hardware flags, no gaps allowed */ 8162306a36Sopenharmony_cienum ivtv_hw_bits { 8262306a36Sopenharmony_ci IVTV_HW_BIT_CX25840, 8362306a36Sopenharmony_ci IVTV_HW_BIT_SAA7115, 8462306a36Sopenharmony_ci IVTV_HW_BIT_SAA7127, 8562306a36Sopenharmony_ci IVTV_HW_BIT_MSP34XX, 8662306a36Sopenharmony_ci IVTV_HW_BIT_TUNER, 8762306a36Sopenharmony_ci IVTV_HW_BIT_WM8775, 8862306a36Sopenharmony_ci IVTV_HW_BIT_CS53L32A, 8962306a36Sopenharmony_ci IVTV_HW_BIT_TVEEPROM, 9062306a36Sopenharmony_ci IVTV_HW_BIT_SAA7114, 9162306a36Sopenharmony_ci IVTV_HW_BIT_UPD64031A, 9262306a36Sopenharmony_ci IVTV_HW_BIT_UPD6408X, 9362306a36Sopenharmony_ci IVTV_HW_BIT_SAA717X, 9462306a36Sopenharmony_ci IVTV_HW_BIT_WM8739, 9562306a36Sopenharmony_ci IVTV_HW_BIT_VP27SMPX, 9662306a36Sopenharmony_ci IVTV_HW_BIT_M52790, 9762306a36Sopenharmony_ci IVTV_HW_BIT_GPIO, 9862306a36Sopenharmony_ci IVTV_HW_BIT_I2C_IR_RX_AVER, 9962306a36Sopenharmony_ci IVTV_HW_BIT_I2C_IR_RX_HAUP_EXT, /* External before internal */ 10062306a36Sopenharmony_ci IVTV_HW_BIT_I2C_IR_RX_HAUP_INT, 10162306a36Sopenharmony_ci IVTV_HW_BIT_Z8F0811_IR_HAUP, 10262306a36Sopenharmony_ci IVTV_HW_BIT_I2C_IR_RX_ADAPTEC, 10362306a36Sopenharmony_ci 10462306a36Sopenharmony_ci IVTV_HW_MAX_BITS /* Should be the last one */ 10562306a36Sopenharmony_ci}; 10662306a36Sopenharmony_ci 10762306a36Sopenharmony_ci#define IVTV_HW_CX25840 BIT(IVTV_HW_BIT_CX25840) 10862306a36Sopenharmony_ci#define IVTV_HW_SAA7115 BIT(IVTV_HW_BIT_SAA7115) 10962306a36Sopenharmony_ci#define IVTV_HW_SAA7127 BIT(IVTV_HW_BIT_SAA7127) 11062306a36Sopenharmony_ci#define IVTV_HW_MSP34XX BIT(IVTV_HW_BIT_MSP34XX) 11162306a36Sopenharmony_ci#define IVTV_HW_TUNER BIT(IVTV_HW_BIT_TUNER) 11262306a36Sopenharmony_ci#define IVTV_HW_WM8775 BIT(IVTV_HW_BIT_WM8775) 11362306a36Sopenharmony_ci#define IVTV_HW_CS53L32A BIT(IVTV_HW_BIT_CS53L32A) 11462306a36Sopenharmony_ci#define IVTV_HW_TVEEPROM BIT(IVTV_HW_BIT_TVEEPROM) 11562306a36Sopenharmony_ci#define IVTV_HW_SAA7114 BIT(IVTV_HW_BIT_SAA7114) 11662306a36Sopenharmony_ci#define IVTV_HW_UPD64031A BIT(IVTV_HW_BIT_UPD64031A) 11762306a36Sopenharmony_ci#define IVTV_HW_UPD6408X BIT(IVTV_HW_BIT_UPD6408X) 11862306a36Sopenharmony_ci#define IVTV_HW_SAA717X BIT(IVTV_HW_BIT_SAA717X) 11962306a36Sopenharmony_ci#define IVTV_HW_WM8739 BIT(IVTV_HW_BIT_WM8739) 12062306a36Sopenharmony_ci#define IVTV_HW_VP27SMPX BIT(IVTV_HW_BIT_VP27SMPX) 12162306a36Sopenharmony_ci#define IVTV_HW_M52790 BIT(IVTV_HW_BIT_M52790) 12262306a36Sopenharmony_ci#define IVTV_HW_GPIO BIT(IVTV_HW_BIT_GPIO) 12362306a36Sopenharmony_ci#define IVTV_HW_I2C_IR_RX_AVER BIT(IVTV_HW_BIT_I2C_IR_RX_AVER) 12462306a36Sopenharmony_ci#define IVTV_HW_I2C_IR_RX_HAUP_EXT BIT(IVTV_HW_BIT_I2C_IR_RX_HAUP_EXT) 12562306a36Sopenharmony_ci#define IVTV_HW_I2C_IR_RX_HAUP_INT BIT(IVTV_HW_BIT_I2C_IR_RX_HAUP_INT) 12662306a36Sopenharmony_ci#define IVTV_HW_Z8F0811_IR_HAUP BIT(IVTV_HW_BIT_Z8F0811_IR_HAUP) 12762306a36Sopenharmony_ci#define IVTV_HW_I2C_IR_RX_ADAPTEC BIT(IVTV_HW_BIT_I2C_IR_RX_ADAPTEC) 12862306a36Sopenharmony_ci 12962306a36Sopenharmony_ci#define IVTV_HW_SAA711X (IVTV_HW_SAA7115 | IVTV_HW_SAA7114) 13062306a36Sopenharmony_ci 13162306a36Sopenharmony_ci#define IVTV_HW_IR_ANY (IVTV_HW_I2C_IR_RX_AVER | \ 13262306a36Sopenharmony_ci IVTV_HW_I2C_IR_RX_HAUP_EXT | \ 13362306a36Sopenharmony_ci IVTV_HW_I2C_IR_RX_HAUP_INT | \ 13462306a36Sopenharmony_ci IVTV_HW_Z8F0811_IR_HAUP | \ 13562306a36Sopenharmony_ci IVTV_HW_I2C_IR_RX_ADAPTEC) 13662306a36Sopenharmony_ci 13762306a36Sopenharmony_ci/* video inputs */ 13862306a36Sopenharmony_ci#define IVTV_CARD_INPUT_VID_TUNER 1 13962306a36Sopenharmony_ci#define IVTV_CARD_INPUT_SVIDEO1 2 14062306a36Sopenharmony_ci#define IVTV_CARD_INPUT_SVIDEO2 3 14162306a36Sopenharmony_ci#define IVTV_CARD_INPUT_COMPOSITE1 4 14262306a36Sopenharmony_ci#define IVTV_CARD_INPUT_COMPOSITE2 5 14362306a36Sopenharmony_ci#define IVTV_CARD_INPUT_COMPOSITE3 6 14462306a36Sopenharmony_ci 14562306a36Sopenharmony_ci/* audio inputs */ 14662306a36Sopenharmony_ci#define IVTV_CARD_INPUT_AUD_TUNER 1 14762306a36Sopenharmony_ci#define IVTV_CARD_INPUT_LINE_IN1 2 14862306a36Sopenharmony_ci#define IVTV_CARD_INPUT_LINE_IN2 3 14962306a36Sopenharmony_ci 15062306a36Sopenharmony_ci#define IVTV_CARD_MAX_VIDEO_INPUTS 6 15162306a36Sopenharmony_ci#define IVTV_CARD_MAX_AUDIO_INPUTS 3 15262306a36Sopenharmony_ci#define IVTV_CARD_MAX_TUNERS 3 15362306a36Sopenharmony_ci 15462306a36Sopenharmony_ci/* SAA71XX HW inputs */ 15562306a36Sopenharmony_ci#define IVTV_SAA71XX_COMPOSITE0 0 15662306a36Sopenharmony_ci#define IVTV_SAA71XX_COMPOSITE1 1 15762306a36Sopenharmony_ci#define IVTV_SAA71XX_COMPOSITE2 2 15862306a36Sopenharmony_ci#define IVTV_SAA71XX_COMPOSITE3 3 15962306a36Sopenharmony_ci#define IVTV_SAA71XX_COMPOSITE4 4 16062306a36Sopenharmony_ci#define IVTV_SAA71XX_COMPOSITE5 5 16162306a36Sopenharmony_ci#define IVTV_SAA71XX_SVIDEO0 6 16262306a36Sopenharmony_ci#define IVTV_SAA71XX_SVIDEO1 7 16362306a36Sopenharmony_ci#define IVTV_SAA71XX_SVIDEO2 8 16462306a36Sopenharmony_ci#define IVTV_SAA71XX_SVIDEO3 9 16562306a36Sopenharmony_ci 16662306a36Sopenharmony_ci/* SAA717X needs to mark the tuner input by ORing with this flag */ 16762306a36Sopenharmony_ci#define IVTV_SAA717X_TUNER_FLAG 0x80 16862306a36Sopenharmony_ci 16962306a36Sopenharmony_ci/* Dummy HW input */ 17062306a36Sopenharmony_ci#define IVTV_DUMMY_AUDIO 0 17162306a36Sopenharmony_ci 17262306a36Sopenharmony_ci/* GPIO HW inputs */ 17362306a36Sopenharmony_ci#define IVTV_GPIO_TUNER 0 17462306a36Sopenharmony_ci#define IVTV_GPIO_LINE_IN 1 17562306a36Sopenharmony_ci 17662306a36Sopenharmony_ci/* SAA717X HW inputs */ 17762306a36Sopenharmony_ci#define IVTV_SAA717X_IN0 0 17862306a36Sopenharmony_ci#define IVTV_SAA717X_IN1 1 17962306a36Sopenharmony_ci#define IVTV_SAA717X_IN2 2 18062306a36Sopenharmony_ci 18162306a36Sopenharmony_ci/* V4L2 capability aliases */ 18262306a36Sopenharmony_ci#define IVTV_CAP_ENCODER (V4L2_CAP_VIDEO_CAPTURE | V4L2_CAP_TUNER | \ 18362306a36Sopenharmony_ci V4L2_CAP_AUDIO | V4L2_CAP_READWRITE | V4L2_CAP_VBI_CAPTURE | \ 18462306a36Sopenharmony_ci V4L2_CAP_SLICED_VBI_CAPTURE) 18562306a36Sopenharmony_ci#define IVTV_CAP_DECODER (V4L2_CAP_VIDEO_OUTPUT | V4L2_CAP_SLICED_VBI_OUTPUT) 18662306a36Sopenharmony_ci 18762306a36Sopenharmony_cistruct ivtv_card_video_input { 18862306a36Sopenharmony_ci u8 video_type; /* video input type */ 18962306a36Sopenharmony_ci u8 audio_index; /* index in ivtv_card_audio_input array */ 19062306a36Sopenharmony_ci u16 video_input; /* hardware video input */ 19162306a36Sopenharmony_ci}; 19262306a36Sopenharmony_ci 19362306a36Sopenharmony_cistruct ivtv_card_audio_input { 19462306a36Sopenharmony_ci u8 audio_type; /* audio input type */ 19562306a36Sopenharmony_ci u32 audio_input; /* hardware audio input */ 19662306a36Sopenharmony_ci u16 muxer_input; /* hardware muxer input for boards with a 19762306a36Sopenharmony_ci multiplexer chip */ 19862306a36Sopenharmony_ci}; 19962306a36Sopenharmony_ci 20062306a36Sopenharmony_cistruct ivtv_card_output { 20162306a36Sopenharmony_ci u8 name[32]; 20262306a36Sopenharmony_ci u16 video_output; /* hardware video output */ 20362306a36Sopenharmony_ci}; 20462306a36Sopenharmony_ci 20562306a36Sopenharmony_cistruct ivtv_card_pci_info { 20662306a36Sopenharmony_ci u16 device; 20762306a36Sopenharmony_ci u16 subsystem_vendor; 20862306a36Sopenharmony_ci u16 subsystem_device; 20962306a36Sopenharmony_ci}; 21062306a36Sopenharmony_ci 21162306a36Sopenharmony_ci/* GPIO definitions */ 21262306a36Sopenharmony_ci 21362306a36Sopenharmony_ci/* The mask is the set of bits used by the operation */ 21462306a36Sopenharmony_ci 21562306a36Sopenharmony_cistruct ivtv_gpio_init { /* set initial GPIO DIR and OUT values */ 21662306a36Sopenharmony_ci u16 direction; /* DIR setting. Leave to 0 if no init is needed */ 21762306a36Sopenharmony_ci u16 initial_value; 21862306a36Sopenharmony_ci}; 21962306a36Sopenharmony_ci 22062306a36Sopenharmony_cistruct ivtv_gpio_video_input { /* select tuner/line in input */ 22162306a36Sopenharmony_ci u16 mask; /* leave to 0 if not supported */ 22262306a36Sopenharmony_ci u16 tuner; 22362306a36Sopenharmony_ci u16 composite; 22462306a36Sopenharmony_ci u16 svideo; 22562306a36Sopenharmony_ci}; 22662306a36Sopenharmony_ci 22762306a36Sopenharmony_cistruct ivtv_gpio_audio_input { /* select tuner/line in input */ 22862306a36Sopenharmony_ci u16 mask; /* leave to 0 if not supported */ 22962306a36Sopenharmony_ci u16 tuner; 23062306a36Sopenharmony_ci u16 linein; 23162306a36Sopenharmony_ci u16 radio; 23262306a36Sopenharmony_ci}; 23362306a36Sopenharmony_ci 23462306a36Sopenharmony_cistruct ivtv_gpio_audio_mute { 23562306a36Sopenharmony_ci u16 mask; /* leave to 0 if not supported */ 23662306a36Sopenharmony_ci u16 mute; /* set this value to mute, 0 to unmute */ 23762306a36Sopenharmony_ci}; 23862306a36Sopenharmony_ci 23962306a36Sopenharmony_cistruct ivtv_gpio_audio_mode { 24062306a36Sopenharmony_ci u16 mask; /* leave to 0 if not supported */ 24162306a36Sopenharmony_ci u16 mono; /* set audio to mono */ 24262306a36Sopenharmony_ci u16 stereo; /* set audio to stereo */ 24362306a36Sopenharmony_ci u16 lang1; /* set audio to the first language */ 24462306a36Sopenharmony_ci u16 lang2; /* set audio to the second language */ 24562306a36Sopenharmony_ci u16 both; /* both languages are output */ 24662306a36Sopenharmony_ci}; 24762306a36Sopenharmony_ci 24862306a36Sopenharmony_cistruct ivtv_gpio_audio_freq { 24962306a36Sopenharmony_ci u16 mask; /* leave to 0 if not supported */ 25062306a36Sopenharmony_ci u16 f32000; 25162306a36Sopenharmony_ci u16 f44100; 25262306a36Sopenharmony_ci u16 f48000; 25362306a36Sopenharmony_ci}; 25462306a36Sopenharmony_ci 25562306a36Sopenharmony_cistruct ivtv_gpio_audio_detect { 25662306a36Sopenharmony_ci u16 mask; /* leave to 0 if not supported */ 25762306a36Sopenharmony_ci u16 stereo; /* if the input matches this value then 25862306a36Sopenharmony_ci stereo is detected */ 25962306a36Sopenharmony_ci}; 26062306a36Sopenharmony_ci 26162306a36Sopenharmony_cistruct ivtv_card_tuner { 26262306a36Sopenharmony_ci v4l2_std_id std; /* standard for which the tuner is suitable */ 26362306a36Sopenharmony_ci int tuner; /* tuner ID (from tuner.h) */ 26462306a36Sopenharmony_ci}; 26562306a36Sopenharmony_ci 26662306a36Sopenharmony_cistruct ivtv_card_tuner_i2c { 26762306a36Sopenharmony_ci unsigned short radio[2];/* radio tuner i2c address to probe */ 26862306a36Sopenharmony_ci unsigned short demod[2];/* demodulator i2c address to probe */ 26962306a36Sopenharmony_ci unsigned short tv[4]; /* tv tuner i2c addresses to probe */ 27062306a36Sopenharmony_ci}; 27162306a36Sopenharmony_ci 27262306a36Sopenharmony_ci/* for card information/parameters */ 27362306a36Sopenharmony_cistruct ivtv_card { 27462306a36Sopenharmony_ci int type; 27562306a36Sopenharmony_ci char *name; 27662306a36Sopenharmony_ci char *comment; 27762306a36Sopenharmony_ci u32 v4l2_capabilities; 27862306a36Sopenharmony_ci u32 hw_video; /* hardware used to process video */ 27962306a36Sopenharmony_ci u32 hw_audio; /* hardware used to process audio */ 28062306a36Sopenharmony_ci u32 hw_audio_ctrl; /* hardware used for the V4L2 controls (only 1 dev allowed) */ 28162306a36Sopenharmony_ci u32 hw_muxer; /* hardware used to multiplex audio input */ 28262306a36Sopenharmony_ci u32 hw_all; /* all hardware used by the board */ 28362306a36Sopenharmony_ci struct ivtv_card_video_input video_inputs[IVTV_CARD_MAX_VIDEO_INPUTS]; 28462306a36Sopenharmony_ci struct ivtv_card_audio_input audio_inputs[IVTV_CARD_MAX_AUDIO_INPUTS]; 28562306a36Sopenharmony_ci struct ivtv_card_audio_input radio_input; 28662306a36Sopenharmony_ci int nof_outputs; 28762306a36Sopenharmony_ci const struct ivtv_card_output *video_outputs; 28862306a36Sopenharmony_ci u8 gr_config; /* config byte for the ghost reduction device */ 28962306a36Sopenharmony_ci u8 xceive_pin; /* XCeive tuner GPIO reset pin */ 29062306a36Sopenharmony_ci 29162306a36Sopenharmony_ci /* GPIO card-specific settings */ 29262306a36Sopenharmony_ci struct ivtv_gpio_init gpio_init; 29362306a36Sopenharmony_ci struct ivtv_gpio_video_input gpio_video_input; 29462306a36Sopenharmony_ci struct ivtv_gpio_audio_input gpio_audio_input; 29562306a36Sopenharmony_ci struct ivtv_gpio_audio_mute gpio_audio_mute; 29662306a36Sopenharmony_ci struct ivtv_gpio_audio_mode gpio_audio_mode; 29762306a36Sopenharmony_ci struct ivtv_gpio_audio_freq gpio_audio_freq; 29862306a36Sopenharmony_ci struct ivtv_gpio_audio_detect gpio_audio_detect; 29962306a36Sopenharmony_ci 30062306a36Sopenharmony_ci struct ivtv_card_tuner tuners[IVTV_CARD_MAX_TUNERS]; 30162306a36Sopenharmony_ci struct ivtv_card_tuner_i2c *i2c; 30262306a36Sopenharmony_ci 30362306a36Sopenharmony_ci /* list of device and subsystem vendor/devices that 30462306a36Sopenharmony_ci correspond to this card type. */ 30562306a36Sopenharmony_ci const struct ivtv_card_pci_info *pci_list; 30662306a36Sopenharmony_ci}; 30762306a36Sopenharmony_ci 30862306a36Sopenharmony_ciint ivtv_get_input(struct ivtv *itv, u16 index, struct v4l2_input *input); 30962306a36Sopenharmony_ciint ivtv_get_output(struct ivtv *itv, u16 index, struct v4l2_output *output); 31062306a36Sopenharmony_ciint ivtv_get_audio_input(struct ivtv *itv, u16 index, struct v4l2_audio *input); 31162306a36Sopenharmony_ciint ivtv_get_audio_output(struct ivtv *itv, u16 index, struct v4l2_audioout *output); 31262306a36Sopenharmony_ciconst struct ivtv_card *ivtv_get_card(u16 index); 31362306a36Sopenharmony_ci 31462306a36Sopenharmony_ci#endif 315