linux/drivers/media/video/ivtv/ivtv-cards.c
<<
>>
Prefs
   1/*
   2    Functions to query card hardware
   3    Copyright (C) 2003-2004  Kevin Thayer <nufan_wfk at yahoo.com>
   4    Copyright (C) 2005-2007  Hans Verkuil <hverkuil@xs4all.nl>
   5
   6    This program is free software; you can redistribute it and/or modify
   7    it under the terms of the GNU General Public License as published by
   8    the Free Software Foundation; either version 2 of the License, or
   9    (at your option) any later version.
  10
  11    This program is distributed in the hope that it will be useful,
  12    but WITHOUT ANY WARRANTY; without even the implied warranty of
  13    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  14    GNU General Public License for more details.
  15
  16    You should have received a copy of the GNU General Public License
  17    along with this program; if not, write to the Free Software
  18    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  19 */
  20
  21#include "ivtv-driver.h"
  22#include "ivtv-cards.h"
  23#include "ivtv-i2c.h"
  24
  25#include <media/msp3400.h>
  26#include <media/m52790.h>
  27#include <media/wm8775.h>
  28#include <media/cs53l32a.h>
  29#include <media/cx25840.h>
  30#include <media/upd64031a.h>
  31
  32#define MSP_TUNER  MSP_INPUT(MSP_IN_SCART1, MSP_IN_TUNER1, \
  33                                MSP_DSP_IN_TUNER, MSP_DSP_IN_TUNER)
  34#define MSP_SCART1 MSP_INPUT(MSP_IN_SCART1, MSP_IN_TUNER1, \
  35                                MSP_DSP_IN_SCART, MSP_DSP_IN_SCART)
  36#define MSP_SCART2 MSP_INPUT(MSP_IN_SCART2, MSP_IN_TUNER1, \
  37                                MSP_DSP_IN_SCART, MSP_DSP_IN_SCART)
  38#define MSP_SCART3 MSP_INPUT(MSP_IN_SCART3, MSP_IN_TUNER1, \
  39                                MSP_DSP_IN_SCART, MSP_DSP_IN_SCART)
  40#define MSP_MONO   MSP_INPUT(MSP_IN_MONO, MSP_IN_TUNER1, \
  41                                MSP_DSP_IN_SCART, MSP_DSP_IN_SCART)
  42
  43#define V4L2_STD_PAL_SECAM (V4L2_STD_PAL|V4L2_STD_SECAM)
  44
  45/* usual i2c tuner addresses to probe */
  46static struct ivtv_card_tuner_i2c ivtv_i2c_std = {
  47        .radio = { I2C_CLIENT_END },
  48        .demod = { 0x43, I2C_CLIENT_END },
  49        .tv    = { 0x61, 0x60, I2C_CLIENT_END },
  50};
  51
  52/* as above, but with possible radio tuner */
  53static struct ivtv_card_tuner_i2c ivtv_i2c_radio = {
  54        .radio = { 0x60, I2C_CLIENT_END },
  55        .demod = { 0x43, I2C_CLIENT_END },
  56        .tv    = { 0x61, I2C_CLIENT_END },
  57};
  58
  59/* using the tda8290+75a combo */
  60static struct ivtv_card_tuner_i2c ivtv_i2c_tda8290 = {
  61        .radio = { I2C_CLIENT_END },
  62        .demod = { I2C_CLIENT_END },
  63        .tv    = { 0x4b, I2C_CLIENT_END },
  64};
  65
  66/********************** card configuration *******************************/
  67
  68/* Please add new PCI IDs to: http://pci-ids.ucw.cz/iii
  69   This keeps the PCI ID database up to date. Note that the entries
  70   must be added under vendor 0x4444 (Conexant) as subsystem IDs.
  71   New vendor IDs should still be added to the vendor ID list. */
  72
  73/* Hauppauge PVR-250 cards */
  74
  75/* Note: for Hauppauge cards the tveeprom information is used instead of PCI IDs */
  76static const struct ivtv_card ivtv_card_pvr250 = {
  77        .type = IVTV_CARD_PVR_250,
  78        .name = "Hauppauge WinTV PVR-250",
  79        .v4l2_capabilities = IVTV_CAP_ENCODER,
  80        .hw_video = IVTV_HW_SAA7115,
  81        .hw_audio = IVTV_HW_MSP34XX,
  82        .hw_audio_ctrl = IVTV_HW_MSP34XX,
  83        .hw_all = IVTV_HW_MSP34XX | IVTV_HW_SAA7115 |
  84                  IVTV_HW_TVEEPROM | IVTV_HW_TUNER,
  85        .video_inputs = {
  86                { IVTV_CARD_INPUT_VID_TUNER,  0, IVTV_SAA71XX_COMPOSITE4 },
  87                { IVTV_CARD_INPUT_SVIDEO1,    1, IVTV_SAA71XX_SVIDEO0    },
  88                { IVTV_CARD_INPUT_COMPOSITE1, 1, IVTV_SAA71XX_COMPOSITE0 },
  89                { IVTV_CARD_INPUT_SVIDEO2,    2, IVTV_SAA71XX_SVIDEO1    },
  90                { IVTV_CARD_INPUT_COMPOSITE2, 2, IVTV_SAA71XX_COMPOSITE1 },
  91                { IVTV_CARD_INPUT_COMPOSITE3, 1, IVTV_SAA71XX_COMPOSITE5 },
  92        },
  93        .audio_inputs = {
  94                { IVTV_CARD_INPUT_AUD_TUNER,  MSP_TUNER  },
  95                { IVTV_CARD_INPUT_LINE_IN1,   MSP_SCART1 },
  96                { IVTV_CARD_INPUT_LINE_IN2,   MSP_SCART3 },
  97        },
  98        .radio_input = { IVTV_CARD_INPUT_AUD_TUNER, MSP_SCART2 },
  99        .i2c = &ivtv_i2c_std,
 100};
 101
 102/* ------------------------------------------------------------------------- */
 103
 104/* Hauppauge PVR-350 cards */
 105
 106/* Outputs for Hauppauge PVR350 cards */
 107static struct ivtv_card_output ivtv_pvr350_outputs[] = {
 108        {
 109                .name = "S-Video + Composite",
 110                .video_output = 0,
 111        }, {
 112                .name = "Composite",
 113                .video_output = 1,
 114        }, {
 115                .name = "S-Video",
 116                .video_output = 2,
 117        }, {
 118                .name = "RGB",
 119                .video_output = 3,
 120        }, {
 121                .name = "YUV C",
 122                .video_output = 4,
 123        }, {
 124                .name = "YUV V",
 125                .video_output = 5,
 126        }
 127};
 128
 129static const struct ivtv_card ivtv_card_pvr350 = {
 130        .type = IVTV_CARD_PVR_350,
 131        .name = "Hauppauge WinTV PVR-350",
 132        .v4l2_capabilities = IVTV_CAP_ENCODER | IVTV_CAP_DECODER,
 133        .video_outputs = ivtv_pvr350_outputs,
 134        .nof_outputs = ARRAY_SIZE(ivtv_pvr350_outputs),
 135        .hw_video = IVTV_HW_SAA7115,
 136        .hw_audio = IVTV_HW_MSP34XX,
 137        .hw_audio_ctrl = IVTV_HW_MSP34XX,
 138        .hw_all = IVTV_HW_MSP34XX | IVTV_HW_SAA7115 |
 139                  IVTV_HW_SAA7127 | IVTV_HW_TVEEPROM | IVTV_HW_TUNER |
 140                  IVTV_HW_I2C_IR_RX_HAUP_EXT | IVTV_HW_I2C_IR_RX_HAUP_INT,
 141        .video_inputs = {
 142                { IVTV_CARD_INPUT_VID_TUNER,  0, IVTV_SAA71XX_COMPOSITE4 },
 143                { IVTV_CARD_INPUT_SVIDEO1,    1, IVTV_SAA71XX_SVIDEO0    },
 144                { IVTV_CARD_INPUT_COMPOSITE1, 1, IVTV_SAA71XX_COMPOSITE0 },
 145                { IVTV_CARD_INPUT_SVIDEO2,    2, IVTV_SAA71XX_SVIDEO1    },
 146                { IVTV_CARD_INPUT_COMPOSITE2, 2, IVTV_SAA71XX_COMPOSITE1 },
 147                { IVTV_CARD_INPUT_COMPOSITE3, 1, IVTV_SAA71XX_COMPOSITE5 },
 148        },
 149        .audio_inputs = {
 150                { IVTV_CARD_INPUT_AUD_TUNER,  MSP_TUNER  },
 151                { IVTV_CARD_INPUT_LINE_IN1,   MSP_SCART1 },
 152                { IVTV_CARD_INPUT_LINE_IN2,   MSP_SCART3 },
 153        },
 154        .radio_input = { IVTV_CARD_INPUT_AUD_TUNER, MSP_SCART2 },
 155        .i2c = &ivtv_i2c_std,
 156};
 157
 158/* PVR-350 V1 boards have a different audio tuner input and use a
 159   saa7114 instead of a saa7115.
 160   Note that the info below comes from a pre-production model so it may
 161   not be correct. Especially the audio behaves strangely (mono only it seems) */
 162static const struct ivtv_card ivtv_card_pvr350_v1 = {
 163        .type = IVTV_CARD_PVR_350_V1,
 164        .name = "Hauppauge WinTV PVR-350 (V1)",
 165        .v4l2_capabilities = IVTV_CAP_ENCODER | IVTV_CAP_DECODER,
 166        .video_outputs = ivtv_pvr350_outputs,
 167        .nof_outputs = ARRAY_SIZE(ivtv_pvr350_outputs),
 168        .hw_video = IVTV_HW_SAA7114,
 169        .hw_audio = IVTV_HW_MSP34XX,
 170        .hw_audio_ctrl = IVTV_HW_MSP34XX,
 171        .hw_all = IVTV_HW_MSP34XX | IVTV_HW_SAA7114 |
 172                  IVTV_HW_SAA7127 | IVTV_HW_TVEEPROM | IVTV_HW_TUNER,
 173        .video_inputs = {
 174                { IVTV_CARD_INPUT_VID_TUNER,  0, IVTV_SAA71XX_COMPOSITE4 },
 175                { IVTV_CARD_INPUT_SVIDEO1,    1, IVTV_SAA71XX_SVIDEO0    },
 176                { IVTV_CARD_INPUT_COMPOSITE1, 1, IVTV_SAA71XX_COMPOSITE0 },
 177                { IVTV_CARD_INPUT_SVIDEO2,    2, IVTV_SAA71XX_SVIDEO1    },
 178                { IVTV_CARD_INPUT_COMPOSITE2, 2, IVTV_SAA71XX_COMPOSITE1 },
 179                { IVTV_CARD_INPUT_COMPOSITE3, 1, IVTV_SAA71XX_COMPOSITE5 },
 180        },
 181        .audio_inputs = {
 182                { IVTV_CARD_INPUT_AUD_TUNER,  MSP_MONO   },
 183                { IVTV_CARD_INPUT_LINE_IN1,   MSP_SCART1 },
 184                { IVTV_CARD_INPUT_LINE_IN2,   MSP_SCART3 },
 185        },
 186        .radio_input = { IVTV_CARD_INPUT_AUD_TUNER, MSP_SCART2 },
 187        .i2c = &ivtv_i2c_std,
 188};
 189
 190/* ------------------------------------------------------------------------- */
 191
 192/* Hauppauge PVR-150/PVR-500 cards */
 193
 194static const struct ivtv_card ivtv_card_pvr150 = {
 195        .type = IVTV_CARD_PVR_150,
 196        .name = "Hauppauge WinTV PVR-150",
 197        .v4l2_capabilities = IVTV_CAP_ENCODER,
 198        .hw_video = IVTV_HW_CX25840,
 199        .hw_audio = IVTV_HW_CX25840,
 200        .hw_audio_ctrl = IVTV_HW_CX25840,
 201        .hw_muxer = IVTV_HW_WM8775,
 202        .hw_all = IVTV_HW_WM8775 | IVTV_HW_CX25840 |
 203                  IVTV_HW_TVEEPROM | IVTV_HW_TUNER |
 204                  IVTV_HW_I2C_IR_RX_HAUP_EXT | IVTV_HW_I2C_IR_RX_HAUP_INT |
 205                  IVTV_HW_Z8F0811_IR_HAUP,
 206        .video_inputs = {
 207                { IVTV_CARD_INPUT_VID_TUNER,  0, CX25840_COMPOSITE7 },
 208                { IVTV_CARD_INPUT_SVIDEO1,    1, CX25840_SVIDEO1    },
 209                { IVTV_CARD_INPUT_COMPOSITE1, 1, CX25840_COMPOSITE3 },
 210                { IVTV_CARD_INPUT_SVIDEO2,    2, CX25840_SVIDEO2    },
 211                { IVTV_CARD_INPUT_COMPOSITE2, 2, CX25840_COMPOSITE4 },
 212        },
 213        .audio_inputs = {
 214                { IVTV_CARD_INPUT_AUD_TUNER,
 215                  CX25840_AUDIO8, WM8775_AIN2 },
 216                { IVTV_CARD_INPUT_LINE_IN1,
 217                  CX25840_AUDIO_SERIAL, WM8775_AIN2 },
 218                { IVTV_CARD_INPUT_LINE_IN2,
 219                  CX25840_AUDIO_SERIAL, WM8775_AIN3 },
 220        },
 221        .radio_input = { IVTV_CARD_INPUT_AUD_TUNER,
 222                         CX25840_AUDIO_SERIAL, WM8775_AIN4 },
 223        /* apparently needed for the IR blaster */
 224        .gpio_init = { .direction = 0x1f01, .initial_value = 0x26f3 },
 225        .i2c = &ivtv_i2c_std,
 226};
 227
 228/* ------------------------------------------------------------------------- */
 229
 230/* AVerMedia M179 cards */
 231
 232static const struct ivtv_card_pci_info ivtv_pci_m179[] = {
 233        { PCI_DEVICE_ID_IVTV15, IVTV_PCI_ID_AVERMEDIA, 0xa3cf },
 234        { PCI_DEVICE_ID_IVTV15, IVTV_PCI_ID_AVERMEDIA, 0xa3ce },
 235        { 0, 0, 0 }
 236};
 237
 238static const struct ivtv_card ivtv_card_m179 = {
 239        .type = IVTV_CARD_M179,
 240        .name = "AVerMedia M179",
 241        .v4l2_capabilities = IVTV_CAP_ENCODER,
 242        .hw_video = IVTV_HW_SAA7114,
 243        .hw_audio = IVTV_HW_GPIO,
 244        .hw_audio_ctrl = IVTV_HW_GPIO,
 245        .hw_all = IVTV_HW_GPIO | IVTV_HW_SAA7114 | IVTV_HW_TUNER,
 246        .video_inputs = {
 247                { IVTV_CARD_INPUT_VID_TUNER,  0, IVTV_SAA71XX_COMPOSITE4 },
 248                { IVTV_CARD_INPUT_SVIDEO1,    1, IVTV_SAA71XX_SVIDEO0    },
 249                { IVTV_CARD_INPUT_COMPOSITE1, 1, IVTV_SAA71XX_COMPOSITE3 },
 250        },
 251        .audio_inputs = {
 252                { IVTV_CARD_INPUT_AUD_TUNER,  IVTV_GPIO_TUNER   },
 253                { IVTV_CARD_INPUT_LINE_IN1,   IVTV_GPIO_LINE_IN },
 254        },
 255        .gpio_init = { .direction = 0xe380, .initial_value = 0x8290 },
 256        .gpio_audio_input  = { .mask = 0x8040, .tuner  = 0x8000, .linein = 0x0000 },
 257        .gpio_audio_mute   = { .mask = 0x2000, .mute   = 0x2000 },
 258        .gpio_audio_mode   = { .mask = 0x4300, .mono   = 0x4000, .stereo = 0x0200,
 259                              .lang1 = 0x0200, .lang2  = 0x0100, .both   = 0x0000 },
 260        .gpio_audio_freq   = { .mask = 0x0018, .f32000 = 0x0000,
 261                             .f44100 = 0x0008, .f48000 = 0x0010 },
 262        .gpio_audio_detect = { .mask = 0x4000, .stereo = 0x0000 },
 263        .tuners = {
 264                /* As far as we know all M179 cards use this tuner */
 265                { .std = V4L2_STD_ALL, .tuner = TUNER_PHILIPS_NTSC },
 266        },
 267        .pci_list = ivtv_pci_m179,
 268        .i2c = &ivtv_i2c_std,
 269};
 270
 271/* ------------------------------------------------------------------------- */
 272
 273/* Yuan MPG600/Kuroutoshikou ITVC16-STVLP cards */
 274
 275static const struct ivtv_card_pci_info ivtv_pci_mpg600[] = {
 276        { PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_YUAN1, 0xfff3 },
 277        { PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_YUAN1, 0xffff },
 278        { 0, 0, 0 }
 279};
 280
 281static const struct ivtv_card ivtv_card_mpg600 = {
 282        .type = IVTV_CARD_MPG600,
 283        .name = "Yuan MPG600, Kuroutoshikou ITVC16-STVLP",
 284        .v4l2_capabilities = IVTV_CAP_ENCODER,
 285        .hw_video = IVTV_HW_SAA7115,
 286        .hw_audio = IVTV_HW_GPIO,
 287        .hw_audio_ctrl = IVTV_HW_GPIO,
 288        .hw_all = IVTV_HW_GPIO | IVTV_HW_SAA7115 | IVTV_HW_TUNER,
 289        .video_inputs = {
 290                { IVTV_CARD_INPUT_VID_TUNER,  0, IVTV_SAA71XX_COMPOSITE4 },
 291                { IVTV_CARD_INPUT_SVIDEO1,    1, IVTV_SAA71XX_SVIDEO0    },
 292                { IVTV_CARD_INPUT_COMPOSITE1, 1, IVTV_SAA71XX_COMPOSITE3 },
 293        },
 294        .audio_inputs = {
 295                { IVTV_CARD_INPUT_AUD_TUNER,  IVTV_GPIO_TUNER   },
 296                { IVTV_CARD_INPUT_LINE_IN1,   IVTV_GPIO_LINE_IN },
 297        },
 298        .gpio_init = { .direction = 0x3080, .initial_value = 0x0004 },
 299        .gpio_audio_input  = { .mask = 0x3000, .tuner  = 0x0000, .linein = 0x2000 },
 300        .gpio_audio_mute   = { .mask = 0x0001, .mute   = 0x0001 },
 301        .gpio_audio_mode   = { .mask = 0x000e, .mono   = 0x0006, .stereo = 0x0004,
 302                              .lang1 = 0x0004, .lang2  = 0x0000, .both   = 0x0008 },
 303        .gpio_audio_detect = { .mask = 0x0900, .stereo = 0x0100 },
 304        .tuners = {
 305                /* The PAL tuner is confirmed */
 306                { .std = V4L2_STD_PAL_SECAM, .tuner = TUNER_PHILIPS_FQ1216ME },
 307                { .std = V4L2_STD_ALL, .tuner = TUNER_PHILIPS_FQ1286 },
 308        },
 309        .pci_list = ivtv_pci_mpg600,
 310        .i2c = &ivtv_i2c_std,
 311};
 312
 313/* ------------------------------------------------------------------------- */
 314
 315/* Yuan MPG160/Kuroutoshikou ITVC15-STVLP cards */
 316
 317static const struct ivtv_card_pci_info ivtv_pci_mpg160[] = {
 318        { PCI_DEVICE_ID_IVTV15, IVTV_PCI_ID_YUAN1, 0 },
 319        { PCI_DEVICE_ID_IVTV15, IVTV_PCI_ID_IODATA, 0x40a0 },
 320        { 0, 0, 0 }
 321};
 322
 323static const struct ivtv_card ivtv_card_mpg160 = {
 324        .type = IVTV_CARD_MPG160,
 325        .name = "YUAN MPG160, Kuroutoshikou ITVC15-STVLP, I/O Data GV-M2TV/PCI",
 326        .v4l2_capabilities = IVTV_CAP_ENCODER,
 327        .hw_video = IVTV_HW_SAA7114,
 328        .hw_audio = IVTV_HW_GPIO,
 329        .hw_audio_ctrl = IVTV_HW_GPIO,
 330        .hw_all = IVTV_HW_GPIO | IVTV_HW_SAA7114 | IVTV_HW_TUNER,
 331        .video_inputs = {
 332                { IVTV_CARD_INPUT_VID_TUNER,  0, IVTV_SAA71XX_COMPOSITE4 },
 333                { IVTV_CARD_INPUT_SVIDEO1,    1, IVTV_SAA71XX_SVIDEO0    },
 334                { IVTV_CARD_INPUT_COMPOSITE1, 1, IVTV_SAA71XX_COMPOSITE3 },
 335        },
 336        .audio_inputs = {
 337                { IVTV_CARD_INPUT_AUD_TUNER,  IVTV_GPIO_TUNER   },
 338                { IVTV_CARD_INPUT_LINE_IN1,   IVTV_GPIO_LINE_IN },
 339        },
 340        .gpio_init = { .direction = 0x7080, .initial_value = 0x400c },
 341        .gpio_audio_input  = { .mask = 0x3000, .tuner  = 0x0000, .linein = 0x2000 },
 342        .gpio_audio_mute   = { .mask = 0x0001, .mute   = 0x0001 },
 343        .gpio_audio_mode   = { .mask = 0x000e, .mono   = 0x0006, .stereo = 0x0004,
 344                              .lang1 = 0x0004, .lang2  = 0x0000, .both   = 0x0008 },
 345        .gpio_audio_detect = { .mask = 0x0900, .stereo = 0x0100 },
 346        .tuners = {
 347                { .std = V4L2_STD_PAL_SECAM, .tuner = TUNER_PHILIPS_FQ1216ME },
 348                { .std = V4L2_STD_ALL, .tuner = TUNER_PHILIPS_FQ1286 },
 349        },
 350        .pci_list = ivtv_pci_mpg160,
 351        .i2c = &ivtv_i2c_std,
 352};
 353
 354/* ------------------------------------------------------------------------- */
 355
 356/* Yuan PG600/Diamond PVR-550 cards */
 357
 358static const struct ivtv_card_pci_info ivtv_pci_pg600[] = {
 359        { PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_DIAMONDMM, 0x0070 },
 360        { PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_YUAN3,     0x0600 },
 361        { 0, 0, 0 }
 362};
 363
 364static const struct ivtv_card ivtv_card_pg600 = {
 365        .type = IVTV_CARD_PG600,
 366        .name = "Yuan PG600, Diamond PVR-550",
 367        .v4l2_capabilities = IVTV_CAP_ENCODER,
 368        .hw_video = IVTV_HW_CX25840,
 369        .hw_audio = IVTV_HW_CX25840,
 370        .hw_audio_ctrl = IVTV_HW_CX25840,
 371        .hw_all = IVTV_HW_CX25840 | IVTV_HW_TUNER,
 372        .video_inputs = {
 373                { IVTV_CARD_INPUT_VID_TUNER,  0, CX25840_COMPOSITE2 },
 374                { IVTV_CARD_INPUT_SVIDEO1,    1,
 375                  CX25840_SVIDEO_LUMA3 | CX25840_SVIDEO_CHROMA4 },
 376                { IVTV_CARD_INPUT_COMPOSITE1, 1, CX25840_COMPOSITE1 },
 377        },
 378        .audio_inputs = {
 379                { IVTV_CARD_INPUT_AUD_TUNER,  CX25840_AUDIO5       },
 380                { IVTV_CARD_INPUT_LINE_IN1,   CX25840_AUDIO_SERIAL },
 381        },
 382        .tuners = {
 383                { .std = V4L2_STD_PAL_SECAM, .tuner = TUNER_PHILIPS_FQ1216ME },
 384                { .std = V4L2_STD_ALL, .tuner = TUNER_PHILIPS_FQ1286 },
 385        },
 386        .pci_list = ivtv_pci_pg600,
 387        .i2c = &ivtv_i2c_std,
 388};
 389
 390/* ------------------------------------------------------------------------- */
 391
 392/* Adaptec VideOh! AVC-2410 card */
 393
 394static const struct ivtv_card_pci_info ivtv_pci_avc2410[] = {
 395        { PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_ADAPTEC, 0x0093 },
 396        { 0, 0, 0 }
 397};
 398
 399static const struct ivtv_card ivtv_card_avc2410 = {
 400        .type = IVTV_CARD_AVC2410,
 401        .name = "Adaptec VideOh! AVC-2410",
 402        .v4l2_capabilities = IVTV_CAP_ENCODER,
 403        .hw_video = IVTV_HW_SAA7115,
 404        .hw_audio = IVTV_HW_MSP34XX,
 405        .hw_audio_ctrl = IVTV_HW_MSP34XX,
 406        .hw_muxer = IVTV_HW_CS53L32A,
 407        .hw_all = IVTV_HW_MSP34XX | IVTV_HW_CS53L32A |
 408                  IVTV_HW_SAA7115 | IVTV_HW_TUNER,
 409        .video_inputs = {
 410                { IVTV_CARD_INPUT_VID_TUNER,  0, IVTV_SAA71XX_COMPOSITE4 },
 411                { IVTV_CARD_INPUT_SVIDEO1,    1, IVTV_SAA71XX_SVIDEO0    },
 412                { IVTV_CARD_INPUT_COMPOSITE1, 1, IVTV_SAA71XX_COMPOSITE3 },
 413        },
 414        .audio_inputs = {
 415                { IVTV_CARD_INPUT_AUD_TUNER,
 416                  MSP_TUNER, CS53L32A_IN0 },
 417                { IVTV_CARD_INPUT_LINE_IN1,
 418                  MSP_SCART1, CS53L32A_IN2 },
 419        },
 420        /* This card has no eeprom and in fact the Windows driver relies
 421           on the country/region setting of the user to decide which tuner
 422           is available. */
 423        .tuners = {
 424                { .std = V4L2_STD_PAL_SECAM, .tuner = TUNER_PHILIPS_FM1216ME_MK3 },
 425                { .std = V4L2_STD_ALL - V4L2_STD_NTSC_M_JP,
 426                        .tuner = TUNER_PHILIPS_FM1236_MK3 },
 427                { .std = V4L2_STD_NTSC_M_JP, .tuner = TUNER_PHILIPS_FQ1286 },
 428        },
 429        .pci_list = ivtv_pci_avc2410,
 430        .i2c = &ivtv_i2c_std,
 431};
 432
 433/* ------------------------------------------------------------------------- */
 434
 435/* Adaptec VideOh! AVC-2010 card */
 436
 437static const struct ivtv_card_pci_info ivtv_pci_avc2010[] = {
 438        { PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_ADAPTEC, 0x0092 },
 439        { 0, 0, 0 }
 440};
 441
 442static const struct ivtv_card ivtv_card_avc2010 = {
 443        .type = IVTV_CARD_AVC2010,
 444        .name = "Adaptec VideOh! AVC-2010",
 445        .v4l2_capabilities = IVTV_CAP_ENCODER,
 446        .hw_video = IVTV_HW_SAA7115,
 447        .hw_audio = IVTV_HW_CS53L32A,
 448        .hw_audio_ctrl = IVTV_HW_CS53L32A,
 449        .hw_all = IVTV_HW_CS53L32A | IVTV_HW_SAA7115,
 450        .video_inputs = {
 451                { IVTV_CARD_INPUT_SVIDEO1,    0, IVTV_SAA71XX_SVIDEO0    },
 452                { IVTV_CARD_INPUT_COMPOSITE1, 0, IVTV_SAA71XX_COMPOSITE3 },
 453        },
 454        .audio_inputs = {
 455                { IVTV_CARD_INPUT_LINE_IN1,   CS53L32A_IN2 },
 456        },
 457        /* Does not have a tuner */
 458        .pci_list = ivtv_pci_avc2010,
 459};
 460
 461/* ------------------------------------------------------------------------- */
 462
 463/* Nagase Transgear 5000TV card */
 464
 465static const struct ivtv_card_pci_info ivtv_pci_tg5000tv[] = {
 466        { PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_AVERMEDIA, 0xbfff },
 467        { 0, 0, 0 }
 468};
 469
 470static const struct ivtv_card ivtv_card_tg5000tv = {
 471        .type = IVTV_CARD_TG5000TV,
 472        .name = "Nagase Transgear 5000TV",
 473        .v4l2_capabilities = IVTV_CAP_ENCODER,
 474        .hw_video = IVTV_HW_SAA7114 | IVTV_HW_UPD64031A | IVTV_HW_UPD6408X |
 475        IVTV_HW_GPIO,
 476        .hw_audio = IVTV_HW_GPIO,
 477        .hw_audio_ctrl = IVTV_HW_GPIO,
 478        .hw_all = IVTV_HW_GPIO | IVTV_HW_SAA7114 | IVTV_HW_TUNER |
 479                  IVTV_HW_UPD64031A | IVTV_HW_UPD6408X,
 480        .video_inputs = {
 481                { IVTV_CARD_INPUT_VID_TUNER,  0, IVTV_SAA71XX_SVIDEO0 },
 482                { IVTV_CARD_INPUT_SVIDEO1,    1, IVTV_SAA71XX_SVIDEO2 },
 483                { IVTV_CARD_INPUT_COMPOSITE1, 1, IVTV_SAA71XX_SVIDEO2 },
 484        },
 485        .audio_inputs = {
 486                { IVTV_CARD_INPUT_AUD_TUNER,  IVTV_GPIO_TUNER   },
 487                { IVTV_CARD_INPUT_LINE_IN1,   IVTV_GPIO_LINE_IN },
 488        },
 489        .gr_config = UPD64031A_VERTICAL_EXTERNAL,
 490        .gpio_init = { .direction = 0xe080, .initial_value = 0x8000 },
 491        .gpio_audio_input  = { .mask = 0x8080, .tuner  = 0x8000, .linein = 0x0080 },
 492        .gpio_audio_mute   = { .mask = 0x6000, .mute   = 0x6000 },
 493        .gpio_audio_mode   = { .mask = 0x4300, .mono   = 0x4000, .stereo = 0x0200,
 494                              .lang1 = 0x0300, .lang2  = 0x0000, .both   = 0x0200 },
 495        .gpio_video_input  = { .mask = 0x0030, .tuner  = 0x0000,
 496                          .composite = 0x0010, .svideo = 0x0020 },
 497        .tuners = {
 498                { .std = V4L2_STD_MN, .tuner = TUNER_PHILIPS_FQ1286 },
 499        },
 500        .pci_list = ivtv_pci_tg5000tv,
 501        .i2c = &ivtv_i2c_std,
 502};
 503
 504/* ------------------------------------------------------------------------- */
 505
 506/* AOpen VA2000MAX-SNT6 card */
 507
 508static const struct ivtv_card_pci_info ivtv_pci_va2000[] = {
 509        { PCI_DEVICE_ID_IVTV16, 0, 0xff5f },
 510        { 0, 0, 0 }
 511};
 512
 513static const struct ivtv_card ivtv_card_va2000 = {
 514        .type = IVTV_CARD_VA2000MAX_SNT6,
 515        .name = "AOpen VA2000MAX-SNT6",
 516        .v4l2_capabilities = IVTV_CAP_ENCODER,
 517        .hw_video = IVTV_HW_SAA7115 | IVTV_HW_UPD6408X,
 518        .hw_audio = IVTV_HW_MSP34XX,
 519        .hw_audio_ctrl = IVTV_HW_MSP34XX,
 520        .hw_all = IVTV_HW_MSP34XX | IVTV_HW_SAA7115 |
 521                  IVTV_HW_UPD6408X | IVTV_HW_TUNER,
 522        .video_inputs = {
 523                { IVTV_CARD_INPUT_VID_TUNER, 0, IVTV_SAA71XX_SVIDEO0 },
 524        },
 525        .audio_inputs = {
 526                { IVTV_CARD_INPUT_AUD_TUNER, MSP_TUNER },
 527        },
 528        .tuners = {
 529                { .std = V4L2_STD_MN, .tuner = TUNER_PHILIPS_FQ1286 },
 530        },
 531        .pci_list = ivtv_pci_va2000,
 532        .i2c = &ivtv_i2c_std,
 533};
 534
 535/* ------------------------------------------------------------------------- */
 536
 537/* Yuan MPG600GR/Kuroutoshikou CX23416GYC-STVLP cards */
 538
 539static const struct ivtv_card_pci_info ivtv_pci_cx23416gyc[] = {
 540        { PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_YUAN1, 0x0600 },
 541        { PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_YUAN4, 0x0600 },
 542        { PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_MELCO, 0x0523 },
 543        { 0, 0, 0 }
 544};
 545
 546static const struct ivtv_card ivtv_card_cx23416gyc = {
 547        .type = IVTV_CARD_CX23416GYC,
 548        .name = "Yuan MPG600GR, Kuroutoshikou CX23416GYC-STVLP",
 549        .v4l2_capabilities = IVTV_CAP_ENCODER,
 550        .hw_video = IVTV_HW_SAA717X | IVTV_HW_GPIO |
 551                IVTV_HW_UPD64031A | IVTV_HW_UPD6408X,
 552        .hw_audio = IVTV_HW_SAA717X,
 553        .hw_audio_ctrl = IVTV_HW_SAA717X,
 554        .hw_all = IVTV_HW_GPIO | IVTV_HW_SAA717X | IVTV_HW_TUNER |
 555                  IVTV_HW_UPD64031A | IVTV_HW_UPD6408X,
 556        .video_inputs = {
 557                { IVTV_CARD_INPUT_VID_TUNER,  0, IVTV_SAA71XX_SVIDEO3 |
 558                                                 IVTV_SAA717X_TUNER_FLAG },
 559                { IVTV_CARD_INPUT_SVIDEO1,    1, IVTV_SAA71XX_SVIDEO0 },
 560                { IVTV_CARD_INPUT_COMPOSITE1, 1, IVTV_SAA71XX_SVIDEO3 },
 561        },
 562        .audio_inputs = {
 563                { IVTV_CARD_INPUT_AUD_TUNER,  IVTV_SAA717X_IN2 },
 564                { IVTV_CARD_INPUT_LINE_IN1,   IVTV_SAA717X_IN0 },
 565        },
 566        .gr_config = UPD64031A_VERTICAL_EXTERNAL,
 567        .gpio_init = { .direction = 0xf880, .initial_value = 0x8800 },
 568        .gpio_video_input  = { .mask = 0x0020, .tuner  = 0x0000,
 569                               .composite = 0x0020, .svideo = 0x0020 },
 570        .gpio_audio_freq   = { .mask = 0xc000, .f32000 = 0x0000,
 571                             .f44100 = 0x4000, .f48000 = 0x8000 },
 572        .tuners = {
 573                { .std = V4L2_STD_PAL_SECAM, .tuner = TUNER_PHILIPS_FM1216ME_MK3 },
 574                { .std = V4L2_STD_ALL, .tuner = TUNER_PHILIPS_FM1236_MK3 },
 575        },
 576        .pci_list = ivtv_pci_cx23416gyc,
 577        .i2c = &ivtv_i2c_std,
 578};
 579
 580static const struct ivtv_card ivtv_card_cx23416gyc_nogr = {
 581        .type = IVTV_CARD_CX23416GYC_NOGR,
 582        .name = "Yuan MPG600GR, Kuroutoshikou CX23416GYC-STVLP (no GR)",
 583        .v4l2_capabilities = IVTV_CAP_ENCODER,
 584        .hw_video = IVTV_HW_SAA717X | IVTV_HW_GPIO | IVTV_HW_UPD6408X,
 585        .hw_audio = IVTV_HW_SAA717X,
 586        .hw_audio_ctrl = IVTV_HW_SAA717X,
 587        .hw_all = IVTV_HW_GPIO | IVTV_HW_SAA717X | IVTV_HW_TUNER |
 588                  IVTV_HW_UPD6408X,
 589        .video_inputs = {
 590                { IVTV_CARD_INPUT_VID_TUNER,  0, IVTV_SAA71XX_COMPOSITE4 |
 591                                                 IVTV_SAA717X_TUNER_FLAG },
 592                { IVTV_CARD_INPUT_SVIDEO1,    1, IVTV_SAA71XX_SVIDEO0    },
 593                { IVTV_CARD_INPUT_COMPOSITE1, 1, IVTV_SAA71XX_COMPOSITE0 },
 594        },
 595        .audio_inputs = {
 596                { IVTV_CARD_INPUT_AUD_TUNER,  IVTV_SAA717X_IN2 },
 597                { IVTV_CARD_INPUT_LINE_IN1,   IVTV_SAA717X_IN0 },
 598        },
 599        .gpio_init = { .direction = 0xf880, .initial_value = 0x8800 },
 600        .gpio_video_input  = { .mask = 0x0020, .tuner  = 0x0000,
 601                               .composite = 0x0020, .svideo = 0x0020 },
 602        .gpio_audio_freq   = { .mask = 0xc000, .f32000 = 0x0000,
 603                             .f44100 = 0x4000, .f48000 = 0x8000 },
 604        .tuners = {
 605                { .std = V4L2_STD_PAL_SECAM, .tuner = TUNER_PHILIPS_FM1216ME_MK3 },
 606                { .std = V4L2_STD_ALL, .tuner = TUNER_PHILIPS_FM1236_MK3 },
 607        },
 608        .i2c = &ivtv_i2c_std,
 609};
 610
 611static const struct ivtv_card ivtv_card_cx23416gyc_nogrycs = {
 612        .type = IVTV_CARD_CX23416GYC_NOGRYCS,
 613        .name = "Yuan MPG600GR, Kuroutoshikou CX23416GYC-STVLP (no GR/YCS)",
 614        .v4l2_capabilities = IVTV_CAP_ENCODER,
 615        .hw_video = IVTV_HW_SAA717X | IVTV_HW_GPIO,
 616        .hw_audio = IVTV_HW_SAA717X,
 617        .hw_audio_ctrl = IVTV_HW_SAA717X,
 618        .hw_all = IVTV_HW_GPIO | IVTV_HW_SAA717X | IVTV_HW_TUNER,
 619        .video_inputs = {
 620                { IVTV_CARD_INPUT_VID_TUNER,  0, IVTV_SAA71XX_COMPOSITE4 |
 621                                                 IVTV_SAA717X_TUNER_FLAG },
 622                { IVTV_CARD_INPUT_SVIDEO1,    1, IVTV_SAA71XX_SVIDEO0    },
 623                { IVTV_CARD_INPUT_COMPOSITE1, 1, IVTV_SAA71XX_COMPOSITE0 },
 624        },
 625        .audio_inputs = {
 626                { IVTV_CARD_INPUT_AUD_TUNER,  IVTV_SAA717X_IN2 },
 627                { IVTV_CARD_INPUT_LINE_IN1,   IVTV_SAA717X_IN0 },
 628        },
 629        .gpio_init = { .direction = 0xf880, .initial_value = 0x8800 },
 630        .gpio_video_input  = { .mask = 0x0020, .tuner  = 0x0000,
 631                               .composite = 0x0020, .svideo = 0x0020 },
 632        .gpio_audio_freq   = { .mask = 0xc000, .f32000 = 0x0000,
 633                             .f44100 = 0x4000, .f48000 = 0x8000 },
 634        .tuners = {
 635                { .std = V4L2_STD_PAL_SECAM, .tuner = TUNER_PHILIPS_FM1216ME_MK3 },
 636                { .std = V4L2_STD_ALL, .tuner = TUNER_PHILIPS_FM1236_MK3 },
 637        },
 638        .i2c = &ivtv_i2c_std,
 639};
 640
 641/* ------------------------------------------------------------------------- */
 642
 643/* I/O Data GV-MVP/RX & GV-MVP/RX2W (dual tuner) cards */
 644
 645static const struct ivtv_card_pci_info ivtv_pci_gv_mvprx[] = {
 646        { PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_IODATA, 0xd01e },
 647        { PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_IODATA, 0xd038 }, /* 2W unit #1 */
 648        { PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_IODATA, 0xd039 }, /* 2W unit #2 */
 649        { 0, 0, 0 }
 650};
 651
 652static const struct ivtv_card ivtv_card_gv_mvprx = {
 653        .type = IVTV_CARD_GV_MVPRX,
 654        .name = "I/O Data GV-MVP/RX, GV-MVP/RX2W (dual tuner)",
 655        .v4l2_capabilities = IVTV_CAP_ENCODER,
 656        .hw_video = IVTV_HW_SAA7115 | IVTV_HW_UPD64031A | IVTV_HW_UPD6408X,
 657        .hw_audio = IVTV_HW_GPIO,
 658        .hw_audio_ctrl = IVTV_HW_WM8739,
 659        .hw_all = IVTV_HW_GPIO | IVTV_HW_SAA7115 | IVTV_HW_VP27SMPX |
 660                  IVTV_HW_TUNER | IVTV_HW_WM8739 |
 661                  IVTV_HW_UPD64031A | IVTV_HW_UPD6408X,
 662        .video_inputs = {
 663                { IVTV_CARD_INPUT_VID_TUNER,  0, IVTV_SAA71XX_SVIDEO0    },
 664                { IVTV_CARD_INPUT_SVIDEO1,    1, IVTV_SAA71XX_SVIDEO1    },
 665                { IVTV_CARD_INPUT_COMPOSITE1, 1, IVTV_SAA71XX_SVIDEO2    },
 666        },
 667        .audio_inputs = {
 668                { IVTV_CARD_INPUT_AUD_TUNER,  IVTV_GPIO_TUNER   },
 669                { IVTV_CARD_INPUT_LINE_IN1,   IVTV_GPIO_LINE_IN },
 670        },
 671        .gpio_init = { .direction = 0xc301, .initial_value = 0x0200 },
 672        .gpio_audio_input  = { .mask = 0xffff, .tuner  = 0x0200, .linein = 0x0300 },
 673        .tuners = {
 674                /* This card has the Panasonic VP27 tuner */
 675                { .std = V4L2_STD_MN, .tuner = TUNER_PANASONIC_VP27 },
 676        },
 677        .pci_list = ivtv_pci_gv_mvprx,
 678        .i2c = &ivtv_i2c_std,
 679};
 680
 681/* ------------------------------------------------------------------------- */
 682
 683/* I/O Data GV-MVP/RX2E card */
 684
 685static const struct ivtv_card_pci_info ivtv_pci_gv_mvprx2e[] = {
 686        { PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_IODATA, 0xd025 },
 687        {0, 0, 0}
 688};
 689
 690static const struct ivtv_card ivtv_card_gv_mvprx2e = {
 691        .type = IVTV_CARD_GV_MVPRX2E,
 692        .name = "I/O Data GV-MVP/RX2E",
 693        .v4l2_capabilities = IVTV_CAP_ENCODER,
 694        .hw_video = IVTV_HW_SAA7115,
 695        .hw_audio = IVTV_HW_GPIO,
 696        .hw_audio_ctrl = IVTV_HW_WM8739,
 697        .hw_all = IVTV_HW_GPIO | IVTV_HW_SAA7115 | IVTV_HW_TUNER |
 698                  IVTV_HW_VP27SMPX | IVTV_HW_WM8739,
 699        .video_inputs = {
 700                { IVTV_CARD_INPUT_VID_TUNER,  0, IVTV_SAA71XX_COMPOSITE4 },
 701                { IVTV_CARD_INPUT_SVIDEO1,    1, IVTV_SAA71XX_SVIDEO0    },
 702                { IVTV_CARD_INPUT_COMPOSITE1, 1, IVTV_SAA71XX_COMPOSITE3 },
 703        },
 704        .audio_inputs = {
 705                { IVTV_CARD_INPUT_AUD_TUNER,  IVTV_GPIO_TUNER   },
 706                { IVTV_CARD_INPUT_LINE_IN1,   IVTV_GPIO_LINE_IN },
 707        },
 708        .gpio_init = { .direction = 0xc301, .initial_value = 0x0200 },
 709        .gpio_audio_input  = { .mask = 0xffff, .tuner  = 0x0200, .linein = 0x0300 },
 710        .tuners = {
 711                /* This card has the Panasonic VP27 tuner */
 712                { .std = V4L2_STD_MN, .tuner = TUNER_PANASONIC_VP27 },
 713        },
 714        .pci_list = ivtv_pci_gv_mvprx2e,
 715        .i2c = &ivtv_i2c_std,
 716};
 717
 718/* ------------------------------------------------------------------------- */
 719
 720/* GotVIEW PCI DVD card */
 721
 722static const struct ivtv_card_pci_info ivtv_pci_gotview_pci_dvd[] = {
 723        { PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_YUAN1, 0x0600 },
 724        { 0, 0, 0 }
 725};
 726
 727static const struct ivtv_card ivtv_card_gotview_pci_dvd = {
 728        .type = IVTV_CARD_GOTVIEW_PCI_DVD,
 729        .name = "GotView PCI DVD",
 730        .v4l2_capabilities = IVTV_CAP_ENCODER,
 731        .hw_video = IVTV_HW_SAA717X,
 732        .hw_audio = IVTV_HW_SAA717X,
 733        .hw_audio_ctrl = IVTV_HW_SAA717X,
 734        .hw_all = IVTV_HW_SAA717X | IVTV_HW_TUNER,
 735        .video_inputs = {
 736                { IVTV_CARD_INPUT_VID_TUNER,  0, IVTV_SAA71XX_COMPOSITE1 },  /* pin 116 */
 737                { IVTV_CARD_INPUT_SVIDEO1,    1, IVTV_SAA71XX_SVIDEO0 },     /* pin 114/109 */
 738                { IVTV_CARD_INPUT_COMPOSITE1, 1, IVTV_SAA71XX_COMPOSITE3 },  /* pin 118 */
 739        },
 740        .audio_inputs = {
 741                { IVTV_CARD_INPUT_AUD_TUNER,  IVTV_SAA717X_IN0 },
 742                { IVTV_CARD_INPUT_LINE_IN1,   IVTV_SAA717X_IN2 },
 743        },
 744        .gpio_init = { .direction = 0xf000, .initial_value = 0xA000 },
 745        .tuners = {
 746                /* This card has a Philips FQ1216ME MK3 tuner */
 747                { .std = V4L2_STD_PAL_SECAM, .tuner = TUNER_PHILIPS_FM1216ME_MK3 },
 748        },
 749        .pci_list = ivtv_pci_gotview_pci_dvd,
 750        .i2c = &ivtv_i2c_std,
 751};
 752
 753/* ------------------------------------------------------------------------- */
 754
 755/* GotVIEW PCI DVD2 Deluxe card */
 756
 757static const struct ivtv_card_pci_info ivtv_pci_gotview_pci_dvd2[] = {
 758        { PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_GOTVIEW1, 0x0600 },
 759        { 0, 0, 0 }
 760};
 761
 762static const struct ivtv_card ivtv_card_gotview_pci_dvd2 = {
 763        .type = IVTV_CARD_GOTVIEW_PCI_DVD2,
 764        .name = "GotView PCI DVD2 Deluxe",
 765        .v4l2_capabilities = IVTV_CAP_ENCODER,
 766        .hw_video = IVTV_HW_CX25840,
 767        .hw_audio = IVTV_HW_CX25840,
 768        .hw_audio_ctrl = IVTV_HW_CX25840,
 769        .hw_muxer = IVTV_HW_GPIO,
 770        .hw_all = IVTV_HW_CX25840 | IVTV_HW_TUNER,
 771        .video_inputs = {
 772                { IVTV_CARD_INPUT_VID_TUNER,  0, CX25840_COMPOSITE2 },
 773                { IVTV_CARD_INPUT_SVIDEO1,    1,
 774                  CX25840_SVIDEO_LUMA3 | CX25840_SVIDEO_CHROMA4 },
 775                { IVTV_CARD_INPUT_COMPOSITE1, 1, CX25840_COMPOSITE1 },
 776        },
 777        .audio_inputs = {
 778                { IVTV_CARD_INPUT_AUD_TUNER,  CX25840_AUDIO5,       0 },
 779                { IVTV_CARD_INPUT_LINE_IN1,   CX25840_AUDIO_SERIAL, 1 },
 780        },
 781        .radio_input = { IVTV_CARD_INPUT_AUD_TUNER, CX25840_AUDIO_SERIAL, 2 },
 782        .gpio_init = { .direction = 0x0800, .initial_value = 0 },
 783        .gpio_audio_input  = { .mask = 0x0800, .tuner = 0, .linein = 0, .radio = 0x0800 },
 784        .tuners = {
 785                /* This card has a Philips FQ1216ME MK5 tuner */
 786                { .std = V4L2_STD_PAL_SECAM, .tuner = TUNER_PHILIPS_FM1216ME_MK3 },
 787        },
 788        .pci_list = ivtv_pci_gotview_pci_dvd2,
 789        .i2c = &ivtv_i2c_std,
 790};
 791
 792/* ------------------------------------------------------------------------- */
 793
 794/* Yuan MPC622 miniPCI card */
 795
 796static const struct ivtv_card_pci_info ivtv_pci_yuan_mpc622[] = {
 797        { PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_YUAN2, 0xd998 },
 798        { 0, 0, 0 }
 799};
 800
 801static const struct ivtv_card ivtv_card_yuan_mpc622 = {
 802        .type = IVTV_CARD_YUAN_MPC622,
 803        .name = "Yuan MPC622",
 804        .v4l2_capabilities = IVTV_CAP_ENCODER,
 805        .hw_video = IVTV_HW_CX25840,
 806        .hw_audio = IVTV_HW_CX25840,
 807        .hw_audio_ctrl = IVTV_HW_CX25840,
 808        .hw_all = IVTV_HW_CX25840 | IVTV_HW_TUNER,
 809        .video_inputs = {
 810                { IVTV_CARD_INPUT_VID_TUNER,  0, CX25840_COMPOSITE2 },
 811                { IVTV_CARD_INPUT_SVIDEO1,    1,
 812                  CX25840_SVIDEO_LUMA3 | CX25840_SVIDEO_CHROMA4 },
 813                { IVTV_CARD_INPUT_COMPOSITE1, 1, CX25840_COMPOSITE1 },
 814        },
 815        .audio_inputs = {
 816                { IVTV_CARD_INPUT_AUD_TUNER,  CX25840_AUDIO5       },
 817                { IVTV_CARD_INPUT_LINE_IN1,   CX25840_AUDIO_SERIAL },
 818        },
 819        .gpio_init = { .direction = 0x00ff, .initial_value = 0x0002 },
 820        .tuners = {
 821                /* This card has the TDA8290/TDA8275 tuner chips */
 822                { .std = V4L2_STD_ALL, .tuner = TUNER_PHILIPS_TDA8290 },
 823        },
 824        .pci_list = ivtv_pci_yuan_mpc622,
 825        .i2c = &ivtv_i2c_tda8290,
 826};
 827
 828/* ------------------------------------------------------------------------- */
 829
 830/* DIGITAL COWBOY DCT-MTVP1 card */
 831
 832static const struct ivtv_card_pci_info ivtv_pci_dctmvtvp1[] = {
 833        { PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_AVERMEDIA, 0xbfff },
 834        { 0, 0, 0 }
 835};
 836
 837static const struct ivtv_card ivtv_card_dctmvtvp1 = {
 838        .type = IVTV_CARD_DCTMTVP1,
 839        .name = "Digital Cowboy DCT-MTVP1",
 840        .v4l2_capabilities = IVTV_CAP_ENCODER,
 841        .hw_video = IVTV_HW_SAA7115 | IVTV_HW_UPD64031A | IVTV_HW_UPD6408X |
 842                IVTV_HW_GPIO,
 843        .hw_audio = IVTV_HW_GPIO,
 844        .hw_audio_ctrl = IVTV_HW_GPIO,
 845        .hw_all = IVTV_HW_GPIO | IVTV_HW_SAA7115 | IVTV_HW_TUNER |
 846                IVTV_HW_UPD64031A | IVTV_HW_UPD6408X,
 847        .video_inputs = {
 848                { IVTV_CARD_INPUT_VID_TUNER,  0, IVTV_SAA71XX_SVIDEO0    },
 849                { IVTV_CARD_INPUT_SVIDEO1,    1, IVTV_SAA71XX_SVIDEO2    },
 850                { IVTV_CARD_INPUT_COMPOSITE1, 1, IVTV_SAA71XX_SVIDEO2 },
 851        },
 852        .audio_inputs = {
 853                { IVTV_CARD_INPUT_AUD_TUNER,  IVTV_GPIO_TUNER   },
 854                { IVTV_CARD_INPUT_LINE_IN1,   IVTV_GPIO_LINE_IN },
 855        },
 856        .gpio_init = { .direction = 0xe080, .initial_value = 0x8000 },
 857        .gpio_audio_input  = { .mask = 0x8080, .tuner  = 0x8000, .linein = 0x0080 },
 858        .gpio_audio_mute   = { .mask = 0x6000, .mute   = 0x6000 },
 859        .gpio_audio_mode   = { .mask = 0x4300, .mono   = 0x4000, .stereo = 0x0200,
 860                              .lang1 = 0x0300, .lang2  = 0x0000, .both   = 0x0200 },
 861        .gpio_video_input  = { .mask = 0x0030, .tuner  = 0x0000,
 862                               .composite = 0x0010, .svideo = 0x0020},
 863        .tuners = {
 864                { .std = V4L2_STD_MN, .tuner = TUNER_PHILIPS_FQ1286 },
 865        },
 866        .pci_list = ivtv_pci_dctmvtvp1,
 867        .i2c = &ivtv_i2c_std,
 868};
 869
 870/* ------------------------------------------------------------------------- */
 871
 872/* Yuan PG600-2/GotView PCI DVD Lite cards */
 873
 874static const struct ivtv_card_pci_info ivtv_pci_pg600v2[] = {
 875        { PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_YUAN3,     0x0600 },
 876        { PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_GOTVIEW2,  0x0600 },
 877        { 0, 0, 0 }
 878};
 879
 880static const struct ivtv_card ivtv_card_pg600v2 = {
 881        .type = IVTV_CARD_PG600V2,
 882        .name = "Yuan PG600-2, GotView PCI DVD Lite",
 883        .v4l2_capabilities = IVTV_CAP_ENCODER,
 884        .hw_video = IVTV_HW_CX25840,
 885        .hw_audio = IVTV_HW_CX25840,
 886        .hw_audio_ctrl = IVTV_HW_CX25840,
 887        .hw_all = IVTV_HW_CX25840 | IVTV_HW_TUNER,
 888        /* XC2028 support apparently works for the Yuan, it's still
 889           uncertain whether it also works with the GotView. */
 890        .video_inputs = {
 891                { IVTV_CARD_INPUT_VID_TUNER,  0, CX25840_COMPOSITE2 },
 892                { IVTV_CARD_INPUT_SVIDEO1,    1,
 893                  CX25840_SVIDEO_LUMA3 | CX25840_SVIDEO_CHROMA4 },
 894                { IVTV_CARD_INPUT_COMPOSITE1, 1, CX25840_COMPOSITE1 },
 895        },
 896        .audio_inputs = {
 897                { IVTV_CARD_INPUT_AUD_TUNER,  CX25840_AUDIO5       },
 898                { IVTV_CARD_INPUT_LINE_IN1,   CX25840_AUDIO_SERIAL },
 899        },
 900        .radio_input = { IVTV_CARD_INPUT_AUD_TUNER, CX25840_AUDIO5 },
 901        .xceive_pin = 12,
 902        .tuners = {
 903                { .std = V4L2_STD_ALL, .tuner = TUNER_XC2028 },
 904        },
 905        .pci_list = ivtv_pci_pg600v2,
 906        .i2c = &ivtv_i2c_std,
 907};
 908
 909/* ------------------------------------------------------------------------- */
 910
 911/* Club3D ZAP-TV1x01 cards */
 912
 913static const struct ivtv_card_pci_info ivtv_pci_club3d[] = {
 914        { PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_YUAN3,     0x0600 },
 915        { 0, 0, 0 }
 916};
 917
 918static const struct ivtv_card ivtv_card_club3d = {
 919        .type = IVTV_CARD_CLUB3D,
 920        .name = "Club3D ZAP-TV1x01",
 921        .v4l2_capabilities = IVTV_CAP_ENCODER,
 922        .hw_video = IVTV_HW_CX25840,
 923        .hw_audio = IVTV_HW_CX25840,
 924        .hw_audio_ctrl = IVTV_HW_CX25840,
 925        .hw_all = IVTV_HW_CX25840 | IVTV_HW_TUNER,
 926        .video_inputs = {
 927                { IVTV_CARD_INPUT_VID_TUNER,  0, CX25840_COMPOSITE2 },
 928                { IVTV_CARD_INPUT_SVIDEO1,    1,
 929                  CX25840_SVIDEO_LUMA3 | CX25840_SVIDEO_CHROMA4 },
 930                { IVTV_CARD_INPUT_COMPOSITE1, 1, CX25840_COMPOSITE3 },
 931        },
 932        .audio_inputs = {
 933                { IVTV_CARD_INPUT_AUD_TUNER,  CX25840_AUDIO5       },
 934                { IVTV_CARD_INPUT_LINE_IN1,   CX25840_AUDIO_SERIAL },
 935        },
 936        .radio_input = { IVTV_CARD_INPUT_AUD_TUNER, CX25840_AUDIO5 },
 937        .xceive_pin = 12,
 938        .tuners = {
 939                { .std = V4L2_STD_ALL, .tuner = TUNER_XC2028 },
 940        },
 941        .pci_list = ivtv_pci_club3d,
 942        .i2c = &ivtv_i2c_std,
 943};
 944
 945/* ------------------------------------------------------------------------- */
 946
 947/* AVerTV MCE 116 Plus (M116) card */
 948
 949static const struct ivtv_card_pci_info ivtv_pci_avertv_mce116[] = {
 950        { PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_AVERMEDIA, 0xc439 },
 951        { 0, 0, 0 }
 952};
 953
 954static const struct ivtv_card ivtv_card_avertv_mce116 = {
 955        .type = IVTV_CARD_AVERTV_MCE116,
 956        .name = "AVerTV MCE 116 Plus",
 957        .v4l2_capabilities = IVTV_CAP_ENCODER,
 958        .hw_video = IVTV_HW_CX25840,
 959        .hw_audio = IVTV_HW_CX25840,
 960        .hw_audio_ctrl = IVTV_HW_CX25840,
 961        .hw_all = IVTV_HW_CX25840 | IVTV_HW_TUNER | IVTV_HW_WM8739 |
 962                  IVTV_HW_I2C_IR_RX_AVER,
 963        .video_inputs = {
 964                { IVTV_CARD_INPUT_VID_TUNER,  0, CX25840_COMPOSITE2 },
 965                { IVTV_CARD_INPUT_SVIDEO1,    1, CX25840_SVIDEO3    },
 966                { IVTV_CARD_INPUT_COMPOSITE1, 1, CX25840_COMPOSITE1 },
 967        },
 968        .audio_inputs = {
 969                { IVTV_CARD_INPUT_AUD_TUNER,  CX25840_AUDIO5       },
 970                { IVTV_CARD_INPUT_LINE_IN1,   CX25840_AUDIO_SERIAL, 1 },
 971        },
 972        .radio_input = { IVTV_CARD_INPUT_AUD_TUNER,  CX25840_AUDIO5 },
 973        /* enable line-in */
 974        .gpio_init = { .direction = 0xe000, .initial_value = 0x4000 },
 975        .xceive_pin = 10,
 976        .tuners = {
 977                { .std = V4L2_STD_ALL, .tuner = TUNER_XC2028 },
 978        },
 979        .pci_list = ivtv_pci_avertv_mce116,
 980        .i2c = &ivtv_i2c_std,
 981};
 982
 983/* ------------------------------------------------------------------------- */
 984
 985/* AVerMedia PVR-150 Plus / AVerTV M113 cards with a Daewoo/Partsnic Tuner */
 986
 987static const struct ivtv_card_pci_info ivtv_pci_aver_pvr150[] = {
 988        { PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_AVERMEDIA, 0xc034 }, /* NTSC */
 989        { PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_AVERMEDIA, 0xc035 }, /* NTSC FM */
 990        { 0, 0, 0 }
 991};
 992
 993static const struct ivtv_card ivtv_card_aver_pvr150 = {
 994        .type = IVTV_CARD_AVER_PVR150PLUS,
 995        .name = "AVerMedia PVR-150 Plus / AVerTV M113 Partsnic (Daewoo) Tuner",
 996        .v4l2_capabilities = IVTV_CAP_ENCODER,
 997        .hw_video = IVTV_HW_CX25840,
 998        .hw_audio = IVTV_HW_CX25840,
 999        .hw_audio_ctrl = IVTV_HW_CX25840,
1000        .hw_muxer = IVTV_HW_GPIO,
1001        .hw_all = IVTV_HW_CX25840 | IVTV_HW_TUNER |
1002                  IVTV_HW_WM8739 | IVTV_HW_GPIO,
1003        .video_inputs = {
1004                { IVTV_CARD_INPUT_VID_TUNER,  0, CX25840_COMPOSITE2 },
1005                { IVTV_CARD_INPUT_SVIDEO1,    1, CX25840_SVIDEO3    },
1006                { IVTV_CARD_INPUT_COMPOSITE1, 1, CX25840_COMPOSITE1 },
1007        },
1008        .audio_inputs = {
1009                { IVTV_CARD_INPUT_AUD_TUNER,  CX25840_AUDIO5,       0 },
1010                { IVTV_CARD_INPUT_LINE_IN1,   CX25840_AUDIO_SERIAL, 1 },
1011        },
1012        .radio_input = { IVTV_CARD_INPUT_AUD_TUNER, CX25840_AUDIO_SERIAL, 2 },
1013        /* The 74HC4052 Dual 4:1 multiplexer is controlled by 2 GPIO lines */
1014        .gpio_init = { .direction = 0xc000, .initial_value = 0 },
1015        .gpio_audio_input  = { .mask   = 0xc000,
1016                               .tuner  = 0x0000,
1017                               .linein = 0x4000,
1018                               .radio  = 0x8000 },
1019        .tuners = {
1020                /* Subsystem ID's 0xc03[45] have a Partsnic PTI-5NF05 tuner */
1021                { .std = V4L2_STD_MN, .tuner = TUNER_PARTSNIC_PTI_5NF05 },
1022        },
1023        .pci_list = ivtv_pci_aver_pvr150,
1024        /* Subsystem ID 0xc035 has a TEA5767(?) FM tuner, 0xc034 does not */
1025        .i2c = &ivtv_i2c_radio,
1026};
1027
1028/* ------------------------------------------------------------------------- */
1029
1030/* AVerMedia UltraTV 1500 MCE (newer non-cx88 version, M113 variant) card */
1031
1032static const struct ivtv_card_pci_info ivtv_pci_aver_ultra1500mce[] = {
1033        { PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_AVERMEDIA, 0xc019 }, /* NTSC */
1034        { PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_AVERMEDIA, 0xc01b }, /* PAL/SECAM */
1035        { 0, 0, 0 }
1036};
1037
1038static const struct ivtv_card ivtv_card_aver_ultra1500mce = {
1039        .type = IVTV_CARD_AVER_ULTRA1500MCE,
1040        .name = "AVerMedia UltraTV 1500 MCE / AVerTV M113 Philips Tuner",
1041        .comment = "For non-NTSC tuners, use the pal= or secam= module options",
1042        .v4l2_capabilities = IVTV_CAP_ENCODER,
1043        .hw_video = IVTV_HW_CX25840,
1044        .hw_audio = IVTV_HW_CX25840,
1045        .hw_audio_ctrl = IVTV_HW_CX25840,
1046        .hw_muxer = IVTV_HW_GPIO,
1047        .hw_all = IVTV_HW_CX25840 | IVTV_HW_TUNER |
1048                  IVTV_HW_WM8739 | IVTV_HW_GPIO,
1049        .video_inputs = {
1050                { IVTV_CARD_INPUT_VID_TUNER,  0, CX25840_COMPOSITE2 },
1051                { IVTV_CARD_INPUT_SVIDEO1,    1, CX25840_SVIDEO3    },
1052                { IVTV_CARD_INPUT_COMPOSITE1, 1, CX25840_COMPOSITE1 },
1053        },
1054        .audio_inputs = {
1055                { IVTV_CARD_INPUT_AUD_TUNER,  CX25840_AUDIO5,       0 },
1056                { IVTV_CARD_INPUT_LINE_IN1,   CX25840_AUDIO_SERIAL, 1 },
1057        },
1058        .radio_input = { IVTV_CARD_INPUT_AUD_TUNER, CX25840_AUDIO_SERIAL, 2 },
1059        /* The 74HC4052 Dual 4:1 multiplexer is controlled by 2 GPIO lines */
1060        .gpio_init = { .direction = 0xc000, .initial_value = 0 },
1061        .gpio_audio_input  = { .mask   = 0xc000,
1062                               .tuner  = 0x0000,
1063                               .linein = 0x4000,
1064                               .radio  = 0x8000 },
1065        .tuners = {
1066                /* The UltraTV 1500 MCE has a Philips FM1236 MK5 TV/FM tuner */
1067                { .std = V4L2_STD_MN, .tuner = TUNER_PHILIPS_FM1236_MK3 },
1068                { .std = V4L2_STD_PAL_SECAM, .tuner = TUNER_PHILIPS_FM1216MK5 },
1069        },
1070        .pci_list = ivtv_pci_aver_ultra1500mce,
1071        .i2c = &ivtv_i2c_std,
1072};
1073
1074/* ------------------------------------------------------------------------- */
1075
1076/* AVerMedia EZMaker PCI Deluxe card */
1077
1078static const struct ivtv_card_pci_info ivtv_pci_aver_ezmaker[] = {
1079        { PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_AVERMEDIA, 0xc03f },
1080        { 0, 0, 0 }
1081};
1082
1083static const struct ivtv_card ivtv_card_aver_ezmaker = {
1084        .type = IVTV_CARD_AVER_EZMAKER,
1085        .name = "AVerMedia EZMaker PCI Deluxe",
1086        .v4l2_capabilities = IVTV_CAP_ENCODER,
1087        .hw_video = IVTV_HW_CX25840,
1088        .hw_audio = IVTV_HW_CX25840,
1089        .hw_audio_ctrl = IVTV_HW_CX25840,
1090        .hw_all = IVTV_HW_CX25840 | IVTV_HW_WM8739,
1091        .video_inputs = {
1092                { IVTV_CARD_INPUT_SVIDEO1,    0, CX25840_SVIDEO3 },
1093                { IVTV_CARD_INPUT_COMPOSITE1, 0, CX25840_COMPOSITE1 },
1094        },
1095        .audio_inputs = {
1096                { IVTV_CARD_INPUT_LINE_IN1,   CX25840_AUDIO_SERIAL, 0 },
1097        },
1098        .gpio_init = { .direction = 0x4000, .initial_value = 0x4000 },
1099        /* Does not have a tuner */
1100        .pci_list = ivtv_pci_aver_ezmaker,
1101};
1102
1103/* ------------------------------------------------------------------------- */
1104
1105/* ASUS Falcon2 */
1106
1107static const struct ivtv_card_pci_info ivtv_pci_asus_falcon2[] = {
1108        { PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_ASUSTEK, 0x4b66 },
1109        { PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_ASUSTEK, 0x462e },
1110        { PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_ASUSTEK, 0x4b2e },
1111        { 0, 0, 0 }
1112};
1113
1114static const struct ivtv_card ivtv_card_asus_falcon2 = {
1115        .type = IVTV_CARD_ASUS_FALCON2,
1116        .name = "ASUS Falcon2",
1117        .v4l2_capabilities = IVTV_CAP_ENCODER,
1118        .hw_video = IVTV_HW_CX25840,
1119        .hw_audio = IVTV_HW_CX25840,
1120        .hw_audio_ctrl = IVTV_HW_CX25840,
1121        .hw_muxer = IVTV_HW_M52790,
1122        .hw_all = IVTV_HW_CX25840 | IVTV_HW_M52790 | IVTV_HW_TUNER,
1123        .video_inputs = {
1124                { IVTV_CARD_INPUT_VID_TUNER,  0, CX25840_COMPOSITE2 },
1125                { IVTV_CARD_INPUT_SVIDEO1,    1, CX25840_SVIDEO3    },
1126                { IVTV_CARD_INPUT_COMPOSITE1, 2, CX25840_COMPOSITE2 },
1127        },
1128        .audio_inputs = {
1129                { IVTV_CARD_INPUT_AUD_TUNER, CX25840_AUDIO5, M52790_IN_TUNER },
1130                { IVTV_CARD_INPUT_LINE_IN1, CX25840_AUDIO_SERIAL,
1131                        M52790_IN_V2 | M52790_SW1_YCMIX | M52790_SW2_YCMIX },
1132                { IVTV_CARD_INPUT_LINE_IN1, CX25840_AUDIO_SERIAL, M52790_IN_V2 },
1133        },
1134        .radio_input = { IVTV_CARD_INPUT_AUD_TUNER, CX25840_AUDIO_SERIAL, M52790_IN_TUNER },
1135        .tuners = {
1136                { .std = V4L2_STD_MN, .tuner = TUNER_PHILIPS_FM1236_MK3 },
1137        },
1138        .pci_list = ivtv_pci_asus_falcon2,
1139        .i2c = &ivtv_i2c_std,
1140};
1141
1142/* ------------------------------------------------------------------------- */
1143
1144/* AVerMedia M104 miniPCI card */
1145
1146static const struct ivtv_card_pci_info ivtv_pci_aver_m104[] = {
1147        { PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_AVERMEDIA, 0xc136 },
1148        { 0, 0, 0 }
1149};
1150
1151static const struct ivtv_card ivtv_card_aver_m104 = {
1152        .type = IVTV_CARD_AVER_M104,
1153        .name = "AVerMedia M104",
1154        .comment = "Not yet supported!\n",
1155        .v4l2_capabilities = 0, /*IVTV_CAP_ENCODER,*/
1156        .hw_video = IVTV_HW_CX25840,
1157        .hw_audio = IVTV_HW_CX25840,
1158        .hw_audio_ctrl = IVTV_HW_CX25840,
1159        .hw_all = IVTV_HW_CX25840 | IVTV_HW_TUNER | IVTV_HW_WM8739,
1160        .video_inputs = {
1161                { IVTV_CARD_INPUT_SVIDEO1,    0, CX25840_SVIDEO3    },
1162                { IVTV_CARD_INPUT_COMPOSITE1, 0, CX25840_COMPOSITE1 },
1163        },
1164        .audio_inputs = {
1165                { IVTV_CARD_INPUT_LINE_IN1,   CX25840_AUDIO_SERIAL, 1 },
1166        },
1167        .radio_input = { IVTV_CARD_INPUT_AUD_TUNER, CX25840_AUDIO_SERIAL, 2 },
1168        /* enable line-in + reset tuner */
1169        .gpio_init = { .direction = 0xe000, .initial_value = 0x4000 },
1170        .xceive_pin = 10,
1171        .tuners = {
1172                { .std = V4L2_STD_ALL, .tuner = TUNER_XC2028 },
1173        },
1174        .pci_list = ivtv_pci_aver_m104,
1175        .i2c = &ivtv_i2c_std,
1176};
1177
1178/* ------------------------------------------------------------------------- */
1179
1180/* Buffalo PC-MV5L/PCI cards */
1181
1182static const struct ivtv_card_pci_info ivtv_pci_buffalo[] = {
1183        { PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_MELCO, 0x052b },
1184        { 0, 0, 0 }
1185};
1186
1187static const struct ivtv_card ivtv_card_buffalo = {
1188        .type = IVTV_CARD_BUFFALO_MV5L,
1189        .name = "Buffalo PC-MV5L/PCI",
1190        .v4l2_capabilities = IVTV_CAP_ENCODER,
1191        .hw_video = IVTV_HW_CX25840,
1192        .hw_audio = IVTV_HW_CX25840,
1193        .hw_audio_ctrl = IVTV_HW_CX25840,
1194        .hw_all = IVTV_HW_CX25840 | IVTV_HW_TUNER,
1195        .video_inputs = {
1196                { IVTV_CARD_INPUT_VID_TUNER,  0, CX25840_COMPOSITE2 },
1197                { IVTV_CARD_INPUT_SVIDEO1,    1,
1198                        CX25840_SVIDEO_LUMA3 | CX25840_SVIDEO_CHROMA4 },
1199                { IVTV_CARD_INPUT_COMPOSITE1, 1, CX25840_COMPOSITE1 },
1200        },
1201        .audio_inputs = {
1202                { IVTV_CARD_INPUT_AUD_TUNER,  CX25840_AUDIO5       },
1203                { IVTV_CARD_INPUT_LINE_IN1,   CX25840_AUDIO_SERIAL },
1204        },
1205        .xceive_pin = 12,
1206        .tuners = {
1207                { .std = V4L2_STD_ALL, .tuner = TUNER_XC2028 },
1208        },
1209        .pci_list = ivtv_pci_buffalo,
1210        .i2c = &ivtv_i2c_std,
1211};
1212
1213/* ------------------------------------------------------------------------- */
1214/* Sony Kikyou */
1215
1216static const struct ivtv_card_pci_info ivtv_pci_kikyou[] = {
1217        { PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_SONY, 0x813d },
1218        { 0, 0, 0 }
1219};
1220
1221static const struct ivtv_card ivtv_card_kikyou = {
1222        .type = IVTV_CARD_KIKYOU,
1223        .name = "Sony VAIO Giga Pocket (ENX Kikyou)",
1224        .v4l2_capabilities = IVTV_CAP_ENCODER,
1225        .hw_video = IVTV_HW_SAA7115,
1226        .hw_audio = IVTV_HW_GPIO,
1227        .hw_audio_ctrl = IVTV_HW_GPIO,
1228        .hw_all = IVTV_HW_GPIO | IVTV_HW_SAA7115 | IVTV_HW_TUNER,
1229        .video_inputs = {
1230        { IVTV_CARD_INPUT_VID_TUNER,  0, IVTV_SAA71XX_COMPOSITE1 },
1231        { IVTV_CARD_INPUT_COMPOSITE1, 1, IVTV_SAA71XX_COMPOSITE1 },
1232        { IVTV_CARD_INPUT_SVIDEO1,    1, IVTV_SAA71XX_SVIDEO1 },
1233        },
1234        .audio_inputs = {
1235             { IVTV_CARD_INPUT_AUD_TUNER,  IVTV_GPIO_TUNER },
1236             { IVTV_CARD_INPUT_LINE_IN1,   IVTV_GPIO_LINE_IN },
1237             { IVTV_CARD_INPUT_LINE_IN2,   IVTV_GPIO_LINE_IN },
1238        },
1239        .gpio_init = { .direction = 0x03e1, .initial_value = 0x0320 },
1240        .gpio_audio_input = { .mask   = 0x0060,
1241                              .tuner  = 0x0020,
1242                              .linein = 0x0000,
1243                              .radio  = 0x0060 },
1244        .gpio_audio_mute  = { .mask = 0x0000,
1245                              .mute = 0x0000 }, /* 0x200? Disable for now. */
1246        .gpio_audio_mode  = { .mask   = 0x0080,
1247                              .mono   = 0x0000,
1248                              .stereo = 0x0000, /* SAP */
1249                              .lang1  = 0x0080,
1250                              .lang2  = 0x0000,
1251                              .both   = 0x0080 },
1252        .tuners = {
1253             { .std = V4L2_STD_ALL, .tuner = TUNER_SONY_BTF_PXN01Z },
1254        },
1255        .pci_list = ivtv_pci_kikyou,
1256        .i2c = &ivtv_i2c_std,
1257};
1258
1259
1260static const struct ivtv_card *ivtv_card_list[] = {
1261        &ivtv_card_pvr250,
1262        &ivtv_card_pvr350,
1263        &ivtv_card_pvr150,
1264        &ivtv_card_m179,
1265        &ivtv_card_mpg600,
1266        &ivtv_card_mpg160,
1267        &ivtv_card_pg600,
1268        &ivtv_card_avc2410,
1269        &ivtv_card_avc2010,
1270        &ivtv_card_tg5000tv,
1271        &ivtv_card_va2000,
1272        &ivtv_card_cx23416gyc,
1273        &ivtv_card_gv_mvprx,
1274        &ivtv_card_gv_mvprx2e,
1275        &ivtv_card_gotview_pci_dvd,
1276        &ivtv_card_gotview_pci_dvd2,
1277        &ivtv_card_yuan_mpc622,
1278        &ivtv_card_dctmvtvp1,
1279        &ivtv_card_pg600v2,
1280        &ivtv_card_club3d,
1281        &ivtv_card_avertv_mce116,
1282        &ivtv_card_asus_falcon2,
1283        &ivtv_card_aver_pvr150,
1284        &ivtv_card_aver_ezmaker,
1285        &ivtv_card_aver_m104,
1286        &ivtv_card_buffalo,
1287        &ivtv_card_aver_ultra1500mce,
1288        &ivtv_card_kikyou,
1289
1290        /* Variations of standard cards but with the same PCI IDs.
1291           These cards must come last in this list. */
1292        &ivtv_card_pvr350_v1,
1293        &ivtv_card_cx23416gyc_nogr,
1294        &ivtv_card_cx23416gyc_nogrycs,
1295};
1296
1297const struct ivtv_card *ivtv_get_card(u16 index)
1298{
1299        if (index >= ARRAY_SIZE(ivtv_card_list))
1300                return NULL;
1301        return ivtv_card_list[index];
1302}
1303
1304int ivtv_get_input(struct ivtv *itv, u16 index, struct v4l2_input *input)
1305{
1306        const struct ivtv_card_video_input *card_input = itv->card->video_inputs + index;
1307        static const char * const input_strs[] = {
1308                "Tuner 1",
1309                "S-Video 1",
1310                "S-Video 2",
1311                "Composite 1",
1312                "Composite 2",
1313                "Composite 3"
1314        };
1315
1316        memset(input, 0, sizeof(*input));
1317        if (index >= itv->nof_inputs)
1318                return -EINVAL;
1319        input->index = index;
1320        strlcpy(input->name, input_strs[card_input->video_type - 1],
1321                        sizeof(input->name));
1322        input->type = (card_input->video_type == IVTV_CARD_INPUT_VID_TUNER ?
1323                        V4L2_INPUT_TYPE_TUNER : V4L2_INPUT_TYPE_CAMERA);
1324        input->audioset = (1 << itv->nof_audio_inputs) - 1;
1325        input->std = (input->type == V4L2_INPUT_TYPE_TUNER) ?
1326                                itv->tuner_std : V4L2_STD_ALL;
1327        return 0;
1328}
1329
1330int ivtv_get_output(struct ivtv *itv, u16 index, struct v4l2_output *output)
1331{
1332        const struct ivtv_card_output *card_output = itv->card->video_outputs + index;
1333
1334        memset(output, 0, sizeof(*output));
1335        if (index >= itv->card->nof_outputs)
1336                return -EINVAL;
1337        output->index = index;
1338        strlcpy(output->name, card_output->name, sizeof(output->name));
1339        output->type = V4L2_OUTPUT_TYPE_ANALOG;
1340        output->audioset = 1;
1341        output->std = V4L2_STD_ALL;
1342        return 0;
1343}
1344
1345int ivtv_get_audio_input(struct ivtv *itv, u16 index, struct v4l2_audio *audio)
1346{
1347        const struct ivtv_card_audio_input *aud_input = itv->card->audio_inputs + index;
1348        static const char * const input_strs[] = {
1349                "Tuner 1",
1350                "Line In 1",
1351                "Line In 2"
1352        };
1353
1354        memset(audio, 0, sizeof(*audio));
1355        if (index >= itv->nof_audio_inputs)
1356                return -EINVAL;
1357        strlcpy(audio->name, input_strs[aud_input->audio_type - 1],
1358                        sizeof(audio->name));
1359        audio->index = index;
1360        audio->capability = V4L2_AUDCAP_STEREO;
1361        return 0;
1362}
1363
1364int ivtv_get_audio_output(struct ivtv *itv, u16 index, struct v4l2_audioout *aud_output)
1365{
1366        memset(aud_output, 0, sizeof(*aud_output));
1367        if (itv->card->video_outputs == NULL || index != 0)
1368                return -EINVAL;
1369        strlcpy(aud_output->name, "A/V Audio Out", sizeof(aud_output->name));
1370        return 0;
1371}
1372