[Pending] - Support for CI with KNC BDA DVBS2 Tuner

Discussion in 'Submit: code patches (MediaPortal/TV-Server/etc.)' started by Fragone, June 20, 2014.

  1. Fragone

    Fragone Portal Pro

    Joined:
    August 3, 2006
    Messages:
    56
    Likes Received:
    0
    Ratings:
    +0 / 0
    In GlobeTV (the Software delivered by KNCOne), the CAM ist detected and works. In Mediaportal, it doesn't. I searched the source code and found a possible fix for that.

    My TVService.log:
    Code (Text):
    1.  
    2. ...
    3. [2014-06-20 13:40:20,753] [Log  ] [TVService] [INFO ] - Detected new digital BDA tuner device 7160 KNC BDA DVBS2 Tuner @device:pnp:\\?\pci#ven_1131&dev_7160&subsys_02101894&rev_02#4&391a8fc1&0&00e0#{71985f48-1ca1-11d3-9cc8-00c04f7971e0}\{9bb4f27f-515c-43ca-8e7d-f07c00080000}
    4. [2014-06-20 13:40:20,753] [Log  ] [TVService] [DEBUG] -  check type with MS NP
    5. [2014-06-20 13:40:20,773] [Log  ] [TVService] [DEBUG] -  network type count = 1
    6. [2014-06-20 13:40:20,773] [Log  ] [TVService] [DEBUG] -  network type 0 = fa4b375a-45b4-4d45-8440-263957b11623
    7. [2014-06-20 13:40:20,773] [Log  ] [TVService] [INFO ] -  tuner type = DvbS
    8. [2014-06-20 13:40:20,773] [Log  ] [TVService] [INFO ] - Controller: add device 7160 KNC BDA DVBS2 Tuner @device:pnp:\\?\pci#ven_1131&dev_7160&subsys_02101894&rev_02#4&391a8fc1&0&00e0#{71985f48-1ca1-11d3-9cc8-00c04f7971e0}\{9bb4f27f-515c-43ca-8e7d-f07c00080000}
    9. [2014-06-20 13:40:20,778] [Log  ] [TVService] [INFO ] - Controller: preloading device
    10. [2014-06-20 13:40:20,778] [Log  ] [TVService] [INFO ] - dvbs:BuildGraph
    11. [2014-06-20 13:40:20,778] [Log  ] [TVService] [INFO ] - dvb:AddNetworkProviderFilter
    12. [2014-06-20 13:40:20,783] [Log  ] [TVService] [INFO ] - dvb:AddNetworkProviderFilter
    13. [2014-06-20 13:40:20,783] [Log  ] [TVService] [INFO ] - dvb:Add DVBS Network Provider
    14. [2014-06-20 13:40:20,788] [Log  ] [TVService] [INFO ] - dvb:  Add Mediaportal TsWriter filter
    15. [2014-06-20 13:40:20,793] [Log  ] [TVService] [INFO ] - dvbs:CreateTuningSpace()
    16. [2014-06-20 13:40:20,803] [Log  ] [TVService] [INFO ] - dvbs:found correct tuningspace MediaPortal DVBS TuningSpace
    17. [2014-06-20 13:40:20,803] [Log  ] [TVService] [INFO ] - dvb:Add MPEG2 Demultiplexer filter
    18. [2014-06-20 13:40:20,808] [Log  ] [TVService] [INFO ] - dvb:AddAndConnectBDABoardFilters
    19. [2014-06-20 13:40:20,808] [Log  ] [TVService] [INFO ] - dvb: find bda tuner
    20. [2014-06-20 13:40:20,818] [Log  ] [TVService] [INFO ] - dvb:  using [Tuner]: 7160 KNC BDA DVBS2 Tuner
    21. [2014-06-20 13:40:20,818] [Log  ] [TVService] [INFO ] - dvb:  Render [Network provider]->[Tuner] OK
    22. [2014-06-20 13:40:20,818] [Log  ] [TVService] [INFO ] - dvb:  Setting lastFilter to Tuner filter
    23. [2014-06-20 13:40:20,823] [Log  ] [TVService] [INFO ] - dvb:  Find BDA receiver
    24. [2014-06-20 13:40:20,823] [Log  ] [TVService] [INFO ] - dvb:  match Capture by Tuner device path
    25. [2014-06-20 13:40:20,828] [Log  ] [TVService] [INFO ] - dvb:  -7160 KNC BDA Digital Capture DVBS2
    26. [2014-06-20 13:40:20,833] [Log  ] [TVService] [INFO ] - dvb:  Render [Tuner]->[Capture] AOK
    27. [2014-06-20 13:40:20,833] [Log  ] [TVService] [INFO ] - dvb:  Setting lastFilter to Capture device
    28. [2014-06-20 13:40:20,838] [Log  ] [TVService] [INFO ] - dvb:  WinTv CI module not detected.
    29. [2014-06-20 13:40:20,843] [Log  ] [TVService] [INFO ] - dvb:add Inf Tee filter
    30. [2014-06-20 13:40:20,843] [Log  ] [TVService] [INFO ] - dvb:  Render ...->[inftee]
    31. [2014-06-20 13:40:20,848] [Log  ] [TVService] [INFO ] - dvb:  Setting lastFilter to Inf Tee
    32. [2014-06-20 13:40:20,848] [Log  ] [TVService] [INFO ] - dvb:  Render [inftee]->[demux]
    33. [2014-06-20 13:40:20,848] [Log  ] [TVService] [INFO ] - dvb:  AddTransportStreamFiltersToGraph
    34. [2014-06-20 13:40:20,853] [Log  ] [TVService] [INFO ] -  add BDA MPEG2 Transport Information Filter filter
    35. [2014-06-20 13:40:20,853] [Log  ] [TVService] [INFO ] -  pinTif:name:IB Input [3/0] Direction:Input Connected:False
    36. [2014-06-20 13:40:20,853] [Log  ] [TVService] [INFO ] -  Connect tif and mpeg2 sections and tables
    37. [2014-06-20 13:40:20,853] [Log  ] [TVService] [INFO ] - dvb:try tif:name:001 [4/0] Direction:Output Connected:False
    38. [2014-06-20 13:40:20,858] [Log  ] [TVService] [INFO ] -  tif connected
    39. [2014-06-20 13:40:20,858] [Log  ] [TVService] [INFO ] - dvb:  Render ..->[TsWriter]
    40. [2014-06-20 13:40:20,858] [Log  ] [TVService] [INFO ] - dvb: Checking for hardware specific extensions
    41. [2014-06-20 13:40:20,858] [Log  ] [TVService] [INFO ] - CAM is Default model
    42. [2014-06-20 13:40:20,858] [Log  ] [TVService] [INFO ] - Check for KNC
    43. [2014-06-20 13:40:20,863] [Log  ] [TVService] [INFO ] - KNC: IsKNC False
    44. [2014-06-20 13:40:20,863] [Log  ] [TVService] [DEBUG] - KNC: Disable CI
    45. [2014-06-20 13:40:20,868] [Log  ] [TVService] [DEBUG] - KNC: Disposing CI handler
    46. [2014-06-20 13:40:20,868] [Log  ] [TVService] [INFO ] - Check for Digital Everywhere
    47. ...
    As far as i could find out, the problem is here:

    ConditionalAccess.cs from line 136 (calls KNCAPI)
    Code (Text):
    1.  
    2.  Log.Log.WriteFile("Check for KNC");
    3.  // Lookup device index of current card. only counting KNC cards by device path
    4.  int DeviceIndex = KNCDeviceLookup.GetDeviceIndex(card);
    5.  _knc = new KNCAPI(tunerFilter, (uint)DeviceIndex);
    6.  if (_knc.IsKNC)
    7.  {
    8.  //if (_knc.IsCamReady())
    9.  _ciMenu = _knc; // Register KNC CI Menu capabilities when CAM detected and ready
    10.  Log.Log.WriteFile("KNC card detected");    //// <-- never reached
    11.  return;
    12.  }
    13.  Release.DisposeToNull(ref _knc);
    14.  

    KNCAPI.cs from line 347 (Checks device desc against array ValidTuners)
    Code (Text):
    1.  
    2. public KNCAPI(IBaseFilter tunerFilter, uint DeviceIndex)
    3.  {
    4.  ptrPmt = Marshal.AllocCoTaskMem(1024);
    5.  ptrCallback = Marshal.AllocCoTaskMem(7 * 4); // 7*Int32
    6.  _ptrDataInstance = Marshal.AllocCoTaskMem(1024);
    7.  
    8.  m_tunerFilter = tunerFilter;
    9.  
    10.  FilterInfo info;
    11.  tunerFilter.QueryFilterInfo(out info);
    12.  foreach (String validTuner in ValidTuners)
    13.  {
    14.  if (info.achName == validTuner)
    15.  {
    16.  m_bIsKNC = true;  //// <-- never reached
    17.  break;
    18.  }
    19.  }
    20.  if (!m_bIsKNC)
    21.  {
    22.  return;
    23.  }
    24.  
    25.  // iDeviceIndex passed by TvLibrary ! Enumerated by DevicePath
    26.  m_iDeviceIndex = DeviceIndex;
    27.  Log.Log.Debug("KNC: card {0} detected: {1}", m_iDeviceIndex, info.achName);
    28.  
    29.  OpenCI();
    30.  }
    31.  


    KNCAPI.cs from line 209:
    Code (Text):
    1.  
    2.  #region constants
    3.  
    4.  private string[] ValidTuners = new string[]
    5.  {
    6.  "KNC BDA DVB-S",
    7.  "KNC BDA DVB-S2",
    8.  "KNC BDA DVB-C",
    9.  "KNC BDA DVB-T",
    10.  "Mystique SaTiX DVB-S",
    11.  "Mystique SaTiX DVB-S2",
    12.  "Mystique CaBiX DVB-C2",
    13.  "Mystique TeRiX DVB-T2",
    14.  "Mystique SaTiX-S",
    15.  "Mystique SaTiX-S2",
    16.  "Mystique CaBiX-C2",
    17.  "Mystique TeRiX-T2"
    18.  };
    19.  
    20.  #endregion
    21.  
    As you can see above, the card identifies itself as "KNC BDA DVBS2" without hyphen. Maybe this could be the problem that the acces to the CAM menu doesn't work - at least i suppose that from the code (I'm not a .NET coder, but other languages).



    I would be glad if the ValidTuners array could be enlarged by the "KNC BDA DVBS2" without hyphen.

    Thank you!
    Thomas Candrian
     
  2. Google AdSense Guest Advertisement



    to hide all adverts.
  3. Fragone

    Fragone Portal Pro

    Joined:
    August 3, 2006
    Messages:
    56
    Likes Received:
    0
    Ratings:
    +0 / 0

    Attached Files:

    • KNCBDACTRL.7z
      File size:
      16.4 KB
      Uploaded:
      June 20, 2014
      Views:
      215
    • VistaW7.7z
      File size:
      638.7 KB
      Uploaded:
      June 20, 2014
      Views:
      181
  4. mm1352000
    • Team MediaPortal

    mm1352000 Development Group

    Joined:
    September 1, 2008
    Messages:
    21,527
    Likes Received:
    4,738
    Ratings:
    +8,205 / 17
    Home Country:
    New Zealand New Zealand
    Hello

    Support for the Twin CI slots requires much more than just the name change. The Twin is supported in TVE 3.5 already...

    mm
     
Loading...

Users Viewing Thread (Users: 0, Guests: 0)

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice
  • About The Project

    The vision of the MediaPortal project is to create a free open source media centre application, which supports all advanced media centre functions, and is accessible to all Windows users.

    In reaching this goal we are working every day to make sure our software is one of the best.

             

  • Support MediaPortal!

    The team works very hard to make sure the community is running the best HTPC-software. We give away MediaPortal for free but hosting and software is not for us.

    Care to support our work with a few bucks? We'd really appreciate it!