I've had this card working for a while now (104d/813d) with myth. Attached is a patch against
video4linux-20071208. A few notes:

1. The tuner on the card doesn't seem to match any standard ones. I modified an existing tuner entry. Ideally a new tuner entry should be created. (The only difference from the one I modified is that the low-to-mid range frequency cut-off
     is slightly different, as are the bit config settings.)

2. It wasn't obvious how to choose a second audio input other than using "radio" as an option. Basically there's two GPIO audio inputs. Using radio allowed me to avoid major restructuring
    to the code. (perhaps other cards don't have this often../)

3. It's not clear that there's a mute setting that works. Not sure why.

4. I haven't had a chance to test the two Svideo inputs. I set them to COMPOSITE1 and SVIDEO2, but I'm not sure those are the correct settings. The standard composite video
    inputs seem to work.

Hans, can you pick up this patch as-is? Or does it need more cleaning up? Or more information? I'm also happy to test out a future build if you have a chance to merge it in.

Thanks.

-Eric
*** video4linux-20071208.orig/linux/drivers/media/video/tuner-types.c   
2007-12-08 02:52:49.000000000 -0800
--- video4linux-20071208/linux/drivers/media/video/tuner-types.c        
2007-12-27 01:07:58.000000000 -0800
***************
*** 171,179 ****
  /* ------------ TUNER_ALPS_TSBH1_NTSC - TEMIC NTSC ------------ */
  
  static struct tuner_range tuner_alps_tsb_1_ranges[] = {
!       { 16 * 137.25 /*MHz*/, 0x8e, 0x01, },
!       { 16 * 385.25 /*MHz*/, 0x8e, 0x02, },
!       { 16 * 999.99        , 0x8e, 0x08, },
  };
  
  static struct tuner_params tuner_alps_tsbh1_ntsc_params[] = {
--- 171,182 ----
  /* ------------ TUNER_ALPS_TSBH1_NTSC - TEMIC NTSC ------------ */
  
  static struct tuner_range tuner_alps_tsb_1_ranges[] = {
!     //        { 16 * 137.25 /*MHz*/, 0x8e, 0x01, },
!     //        { 16 * 385.25 /*MHz*/, 0x8e, 0x02, },
!     //        { 16 * 999.99        , 0x8e, 0x08, },
!       { 16 * 137.25 /*MHz*/, 0x8e, 0x01, },
!       { 16 * 367.25 /*MHz*/, 0x8e, 0x02, }, // KIKYO -ETA
!       { 16 * 999.99        , 0x8e, 0x04, }, // KIKYO -ETA
  };
  
  static struct tuner_params tuner_alps_tsbh1_ntsc_params[] = {
*** video4linux-20071208.orig/linux/drivers/media/video/ivtv/ivtv-cards.h       
2007-12-08 02:52:48.000000000 -0800
--- video4linux-20071208/linux/drivers/media/video/ivtv/ivtv-cards.h    
2007-12-27 00:44:01.000000000 -0800
***************
*** 47,53 ****
  #define IVTV_CARD_AVERTV_MCE116            20 /* AVerTV MCE 116 Plus */
  #define IVTV_CARD_ASUS_FALCON2             21 /* ASUS Falcon2 */
  #define IVTV_CARD_AVER_PVR150PLUS    22 /* AVerMedia PVR-150 Plus */
! #define IVTV_CARD_LAST                     22
  
  /* Variants of existing cards but with the same PCI IDs. The driver
     detects these based on other device information.
--- 47,54 ----
  #define IVTV_CARD_AVERTV_MCE116            20 /* AVerTV MCE 116 Plus */
  #define IVTV_CARD_ASUS_FALCON2             21 /* ASUS Falcon2 */
  #define IVTV_CARD_AVER_PVR150PLUS    22 /* AVerMedia PVR-150 Plus */
! #define IVTV_CARD_KIKYO              23 /* Sony gigapocket */
! #define IVTV_CARD_LAST                     23
  
  /* Variants of existing cards but with the same PCI IDs. The driver
     detects these based on other device information.
*** video4linux-20071208.orig/linux/drivers/media/video/ivtv/ivtv-cards.c       
2007-12-08 02:52:48.000000000 -0800
--- video4linux-20071208/linux/drivers/media/video/ivtv/ivtv-cards.c    
2007-12-28 00:02:07.000000000 -0800
***************
*** 1036,1041 ****
--- 1036,1084 ----
        .pci_list = ivtv_pci_asus_falcon2,
  };
  
+ /* ------------------------------------------------------------------------- 
*/
+ /* Sony Kikyo */
+ 
+ static const struct ivtv_card_pci_info ivtv_pci_kikyo[] = {
+       { PCI_DEVICE_ID_IVTV16, 0x104d, 0x813d },
+       { 0, 0, 0 }
+ };
+ 
+ static const struct ivtv_card ivtv_card_kikyo = {
+       .type = IVTV_CARD_KIKYO,
+       .name = "Sony Gigapocket (Kikyo)",
+       .v4l2_capabilities = IVTV_CAP_ENCODER,
+       .hw_video = IVTV_HW_SAA7115,
+       .hw_audio = IVTV_HW_GPIO,
+       .hw_audio_ctrl = IVTV_HW_GPIO,
+       .hw_all = IVTV_HW_GPIO | IVTV_HW_SAA7115 | IVTV_HW_TUNER,
+       .video_inputs = {
+       { IVTV_CARD_INPUT_VID_TUNER,  0, IVTV_SAA71XX_COMPOSITE5 }, // Tuner
+       { IVTV_CARD_INPUT_COMPOSITE1, 1, IVTV_SAA71XX_COMPOSITE4 }, // 
Video1=rear
+       { IVTV_CARD_INPUT_COMPOSITE2, 2, IVTV_SAA71XX_COMPOSITE1 }, // 
Video2=front
+       { IVTV_CARD_INPUT_SVIDEO1,    1, IVTV_SAA71XX_COMPOSITE1 }, // ?? <need 
to test>
+       { IVTV_CARD_INPUT_SVIDEO2,    2, IVTV_SAA71XX_SVIDEO2 },    // ?? <need 
to test>
+       },
+       .audio_inputs = {
+            { IVTV_CARD_INPUT_AUD_TUNER,  IVTV_GPIO_TUNER },
+            { IVTV_CARD_INPUT_LINE_IN1,   IVTV_GPIO_LINE_IN },
+            { IVTV_CARD_INPUT_LINE_IN2,   2 },  // IVTV_GPIO_RADIO?? <-- 
pretend to have "radio" for 2nd audio GPIO.
+       },
+         // Sony windows software seems to set 0x200 when unmuting. Does it do 
anything?. -ETA
+         // Not clear what 0x100 does either.
+       .gpio_init = { .direction = 0x0381, .initial_value = 0x0320 },
+         .gpio_audio_input = { .mask = 0x0060, .tuner = 0x0000, .linein = 
0x0060, .radio=0x0020 },
+         .gpio_audio_mute  = { .mask = 0x0000, .mute = 0x0000 }, // 0x200? 
Disable for now.
+         .gpio_audio_mode  = { .mask = 0x0080, .mono = 0x0, .stereo = 0x0,  // 
SAP
+                             .lang1 = 0x0080, .lang2 = 0x0000, .both = 0x0080 
},
+       .tuners = {
+            { .std = V4L2_STD_ALL, .tuner = TUNER_ALPS_TSBH1_NTSC },  // 
TEMPORARY HACK!! -ETA
+       },
+       .pci_list = ivtv_pci_kikyo,
+ };
+ 
+ 
+ 
  static const struct ivtv_card *ivtv_card_list[] = {
        &ivtv_card_pvr250,
        &ivtv_card_pvr350,
***************
*** 1061,1066 ****
--- 1104,1111 ----
        &ivtv_card_asus_falcon2,
        &ivtv_card_aver_pvr150,
  
+         &ivtv_card_kikyo,
+ 
        /* Variations of standard cards but with the same PCI IDs.
           These cards must come last in this list. */
        &ivtv_card_pvr350_v1,




On Jan 8, 2008, at 10:21 AM, Sander Sweers wrote:

On ma, 2008-01-07 at 17:42 -0500, Paul Romer wrote:
I sent an email requesting support for a Sony Vaio OEM tuner card and
found that I gave the wrong vender/device ID's. The correct ones are:
104d/813d. I believe the card is called the Sony Giga Pocket TV tuner.
It uses the cx23416 based encoder.

Please post the INIT IVTV start to end as it might contain useful info
on the card (don't "dmesg | grep ivtv" as it will miss a lot of info).

Is this a pci card from which you can take detailed pictures or read the
text on the chips? If so please do and e-mail them to this list. The
important part is the text on the chips.

You can also try out passing different card types to ivtv. You can do
this by passing it cardtype=3 through 24.

For example: modprobe ivtv cardtype=4.

Greets
Sander


_______________________________________________
ivtv-devel mailing list
[email protected]
http://ivtvdriver.org/mailman/listinfo/ivtv-devel

_______________________________________________
ivtv-devel mailing list
[email protected]
http://ivtvdriver.org/mailman/listinfo/ivtv-devel

Reply via email to