V4L/DVB (8319): saa7134: Add support for analog only ASUSTeK P7131
authorHermann Pitton <hermann-pitton@arcor.de>
Sat, 12 Jul 2008 15:27:59 +0000 (12:27 -0300)
committerMauro Carvalho Chehab <mchehab@infradead.org>
Sun, 20 Jul 2008 10:24:45 +0000 (07:24 -0300)
saa7134: add a separate entry for the ASUSTeK P7131 analog only
         and do some eeprom detection to escape from the TVFM7135
         with the same PCI subsystem on auto detection.

Signed-off-by: Hermann Pitton <hermann-pitton@arcor.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Documentation/video4linux/CARDLIST.saa7134
drivers/media/video/saa7134/saa7134-cards.c
drivers/media/video/saa7134/saa7134-input.c
drivers/media/video/saa7134/saa7134.h

index 171905e872f1ffadd96a811e800f8fc61fb9b673..39868af9cf9fe665a6bbd991a4927e55061232d3 100644 (file)
 143 -> Beholder BeholdTV M63                    [5ace:6191]
 144 -> Beholder BeholdTV M6 Extra               [5ace:6193]
 145 -> AVerMedia MiniPCI DVB-T Hybrid M103      [1461:f636]
+146 -> ASUSTeK P7131 Analog
index 4e6e5ccaa35e88ef0073dfaf2a5ee44ac2f7f1e9..6893f998d292957313facf76d9fdb69ecd4bba0f 100644 (file)
@@ -3519,6 +3519,39 @@ struct saa7134_board saa7134_boards[] = {
                        .amux = TV,
                        .gpio = 0x0200000,
                },
+       },
+       [SAA7134_BOARD_ASUSTeK_P7131_ANALOG] = {
+              .name           = "ASUSTeK P7131 Analog",
+              .audio_clock    = 0x00187de7,
+              .tuner_type     = TUNER_PHILIPS_TDA8290,
+              .radio_type     = UNSET,
+              .tuner_addr     = ADDR_UNSET,
+              .radio_addr     = ADDR_UNSET,
+              .gpiomask       = 1 << 21,
+              .inputs         = {{
+                      .name = name_tv,
+                      .vmux = 1,
+                      .amux = TV,
+                      .tv   = 1,
+                      .gpio = 0x0000000,
+              }, {
+                      .name = name_comp1,
+                      .vmux = 3,
+                      .amux = LINE2,
+              }, {
+                      .name = name_comp2,
+                      .vmux = 0,
+                      .amux = LINE2,
+              }, {
+                      .name = name_svideo,
+                      .vmux = 8,
+                      .amux = LINE2,
+              } },
+              .radio = {
+                      .name = name_radio,
+                      .amux = TV,
+                      .gpio = 0x0200000,
+              },
        },
        [SAA7134_BOARD_SABRENT_TV_PCB05] = {
                .name           = "Sabrent PCMCIA TV-PCB05",
@@ -5605,6 +5638,7 @@ int saa7134_board_init1(struct saa7134_dev *dev)
        case SAA7134_BOARD_FLYDVBT_LR301:
        case SAA7134_BOARD_ASUSTeK_P7131_DUAL:
        case SAA7134_BOARD_ASUSTeK_P7131_HYBRID_LNA:
+       case SAA7134_BOARD_ASUSTeK_P7131_ANALOG:
        case SAA7134_BOARD_FLYDVBTDUO:
        case SAA7134_BOARD_PROTEUS_2309:
        case SAA7134_BOARD_AVERMEDIA_A16AR:
@@ -5941,6 +5975,15 @@ int saa7134_board_init2(struct saa7134_dev *dev)
                i2c_transfer(&dev->i2c_adap, &msg, 1);
                break;
        }
+       case SAA7134_BOARD_ASUSTeK_TVFM7135:
+       /* The card below is detected as card=53, but is different */
+              if (dev->autodetected && (dev->eedata[0x27] == 0x03)) {
+                      dev->board = SAA7134_BOARD_ASUSTeK_P7131_ANALOG;
+                      printk(KERN_INFO "%s: P7131 analog only, using "
+                                                      "entry of %s\n",
+                      dev->name, saa7134_boards[dev->board].name);
+              }
+              break;
        case SAA7134_BOARD_HAUPPAUGE_HVR1110:
                hauppauge_eeprom(dev, dev->eedata+0x80);
                /* break intentionally omitted */
index 6edabc06e6d0d9d206d37f1b0b66703a104983ce..e6217fe13339d71402de676a7a8f24cf4de56564 100644 (file)
@@ -409,6 +409,7 @@ int saa7134_input_init1(struct saa7134_dev *dev)
                break;
        case SAA7134_BOARD_ASUSTeK_P7131_DUAL:
        case SAA7134_BOARD_ASUSTeK_P7131_HYBRID_LNA:
+       case SAA7134_BOARD_ASUSTeK_P7131_ANALOG:
                ir_codes     = ir_codes_asus_pc39;
                mask_keydown = 0x0040000;
                rc5_gpio = 1;
index 6e5a4094d6bec3b4afe649161b00ec4f343c1b5e..6927cbea86245b6e49cd268af82fc04da600ff76 100644 (file)
@@ -267,6 +267,7 @@ struct saa7134_format {
 #define SAA7134_BOARD_BEHOLD_M63      143
 #define SAA7134_BOARD_BEHOLD_M6_EXTRA    144
 #define SAA7134_BOARD_AVERMEDIA_M103    145
+#define SAA7134_BOARD_ASUSTeK_P7131_ANALOG 146
 
 #define SAA7134_MAXBOARDS 8
 #define SAA7134_INPUT_MAX 8