Re-tuning to same channel failes (1 Viewer)

elacris

Portal Member
October 31, 2006
16
0
Home Country
Denmark Denmark
MediaPortal Version: 1.1.2
MediaPortal Skin: Blue3
Windows Version: Windows 7 Pro
CPU Type: Athlon64 X2 3800+ 2.0GHz
HDD: SpinPoint 250GB + 640GB
Memory: 2 GB Dana-E DDR2
Motherboard: ASUS M2N-SLI Deluxe
Video Card: ASUS ENGT240 Silent
Video Card Driver:
Sound Card:
Sound Card AC3:
Sound Card Driver:
1. TV Card: Hauppauge HVR-1100
1. TV Card Type: DVB-T
1. TV Card Driver:
2. TV Card: Cinergy S2 PCI HD CI
2. TV Card Type: DVB-S, DVB-S2
2. TV Card Driver: 1.1.1501
3. TV Card:
3. TV Card Type:
3. TV Card Driver:
4. TV Card:
4. TV Card Type:
4. TV Card Driver:
MPEG2 Video Codec: NVidia PureVideo
MPEG2 Audio Codec: NVidia PureVideo
h.264 Video Codec: CoreAVC 2.0
Satelite/CableTV Provider: Canal Digital / Thor 0.8W
HTPC Case: Antec Performance One 150
Cooling:
Power Supply:
Remote:
TV:
TV - HTPC Connection: HDMI


Re-tuning to same channel failes on my Cinergy S2 PCI HD CI card. I happens when I:

A) Press stop followed by Live TV. The result is unknown error.
B) Playing DVD, Videofiles og recorded TV followed by Live TV. Again result is unknown error.

Only solution is to tune to another channel and the back again. BUT that is not a solution when a scheduled recording starts on the same channel as I have last tuned to and not currently watching as Live TV. I will loose the recording.

Looking at the TV-Server log, I get the following:

2011-01-23 15:21:52.511718 [(4)]: dvb:GetNewSubChannel:0 #0
2011-01-23 15:21:52.516601 [(4)]: TvDvbChannel ctor new subchIndex:0
2011-01-23 15:21:52.517578 [(4)]: LNB low:9750 hi:10600 switch:11700
2011-01-23 15:21:52.518554 [(4)]: Twinhan DVB-S2 modulation set to:ModNotSet
2011-01-23 15:21:52.519531 [(4)]: Twinhan DVB-S2 Pilot set to:NotSet
2011-01-23 15:21:52.520507 [(4)]: Twinhan DVB-S2 RollOff set to:NotSet
2011-01-23 15:21:52.520507 [(4)]: Twinhan DVB-S2 fec set to:Rate7_8
2011-01-23 15:21:52.521484 [(4)]: dvbs:channel modulation is set to ModNotSet
2011-01-23 15:21:52.522460 [(4)]: dvbs:channel FECRate is set to Rate7_8
2011-01-23 15:21:52.523437 [(4)]: Twinhan: SetLnb diseqc port:0 22khz:1 low:9750 hi:10600 switch:11700 power:True
2011-01-23 15:21:52.524414 [(4)]: Twinhan: SetLNB ok 0x0
2011-01-23 15:21:52.525390 [(4)]: 0000|04 00 00 00 E0 10 38 FE 00 00 00 00 00 00 00 00 |______8_________
2011-01-23 15:21:52.643554 [(4)]: dvb:confused:ubmiting tunerequest Channel:TV6 subChannel:0
2011-01-23 15:21:52.644531 [(4)]: dvb:using existing subchannel:0
2011-01-23 15:21:52.645507 [(4)]: dvb:confused:ubmit tunerequest size:1 new:0
2011-01-23 15:21:52.646484 [(4)]: subch:0 OnBeforeTune
2011-01-23 15:21:52.648437 [(4)]: dvb:confused:ubmit tunerequest calling put_TuneRequest
2011-01-23 15:21:52.649414 [(4)]: dvb:confused:ubmit tunerequest done calling put_TuneRequest
2011-01-23 15:21:52.656250 [TwinHan CiMenuHandler(16)]: MMI State MMI_STATUS_GET_MENU_CLOSED
2011-01-23 15:21:52.684570 [(4)]: dvb:confused:ubmitTuneRequest returns:0x1 - S_FALSEThe file %2 could not be processed by the application %1 because it requires Indeo® Decoders of type %3


I doesn't make sense, since Indeo Decoder is no longer supported on Vista/Windows 7. Maybe the Cinergy returns false when it is allready tuned to the channel? It could be interesting to see what would happen if TV-Server just ignorede the error.

I have tried the following Cinergy drivers without improvement:

1.1.0.601
1.1.0.701 (from my installation CD)
1.1.1.301
1.1.1.901
1.1.2.101
1.1.2.301
1.1.2.501

Changing in the card properties doesn't help either (fx. Preferred network provider).
 

Attachments

  • Log-Mediaportal.zip
    22.3 KB

mm1352000

Retired Team Member
  • Premium Supporter
  • September 1, 2008
    21,544
    8,236
    Home Country
    New Zealand New Zealand
    You need to give us a little more time to respond ;)

    That is certainly a strange error! I haven't seen anyone else complain about something like this. I'd like to build a test version of TV Server for you that checks whether the tuner is already tuned to the channel, however I'm not sure which version of MediaPortal you're using. Your post says 1.1.2 and your logs say 1.1.1. Which is correct?
     

    elacris

    Portal Member
    October 31, 2006
    16
    0
    Home Country
    Denmark Denmark
    Yes you are right. I have been trying both 1.1.1 and 1.1.2 to see if there was any difference, but the log contains the same errors. I can give your the log from 1.1.2 if it helps. I am currently on 1.1.2.

    It would be great if you could build a TV server test version!!!

    Using DVBViewer with my Cinergy S2 works perfectly, but I have been using MediaPortal since ... well forever, so DVBViewer is just not good enough for me :)

    Don't know if I helps but if in tune to channel A, then tune to channel B. Stops live TV and then again tune to channel B it fails (unknown error on screen + Indeo error in log). If I then exit MediaPortal and run DVBViewer, I can directly tune to channel B without any problems i DVBViewer.

    To me it looks like the Cinergy driver returns error, where is should return success, when tuning to a channel that is already tuned to. DVBViewer is able to handle that somehow. I am no expert in the DVB standard and C# (been using C++ for 15 years instead :)) , so I may be completely of course.

    :D
     

    mm1352000

    Retired Team Member
  • Premium Supporter
  • September 1, 2008
    21,544
    8,236
    Home Country
    New Zealand New Zealand
    Okay, I'll make a test patch for 1.1.2. Unfortunately I'm away all weekend so you'll have to wait for 5 days or so...
     

    mm1352000

    Retired Team Member
  • Premium Supporter
  • September 1, 2008
    21,544
    8,236
    Home Country
    New Zealand New Zealand
    Hi again elacris

    I ended up not going away, so you get a patch a little early. :)
    Instructions:

    1. Stop TV Server.
    2. Take a backup of the TVLibrary.dll in your TV Server install folder.
    3. Download and extract the attached TVLibrary.dll into your TV Server install folder.
    4. Start TV Server.
    5. Attempt to replicate the issue again.

    My only concern is that I don't think this is a very good long term solution even if it does solve the problem. There is basically zero chance of this patch being included in MediaPortal as the patch is a real hack...

    I did some research and found this thread. Another Terratec card; same symptoms as you; even same operating system. Different drivers seemed to help in that situation. I see that you've already tried a range of different drivers so maybe it would be a good idea to contact Terratec about this issue. This seems to be a driver/hardware specific behaviour that only they (or their driver engineers) can fix...
     

    Attachments

    • TVLibrary.zip
      150.7 KB

    elacris

    Portal Member
    October 31, 2006
    16
    0
    Home Country
    Denmark Denmark
    Hi.

    It did help. Stopping and starting Live TV works.

    What still doesn't work is stopping Live TV + watch movie with "dynamic refresh rate change" + starting Live TV. I'm getting "no picture".

    But still - it is an big improvement and maybe my scheduled recordings won't fail :)

    I have attached the log files again.

    Yes I have tried at lot of different drivers. No matter what driver I use, I have this problem. There is a difference between old and new drivers in another matter. Using older drivers I get stutter in may Live TV. I have checked with "DPC Latency checker" and it is the Cinergy driver that is causing the problem. Changing to at newer driver helps on the stutter, but then I am unable to get it to work correctly with my Hauppauge DVB-T card. Tuning Cinergy->Hauppauge->Cinergy fails :(

    May I ask what you changed in the code? (I guess it is some where around SubmitTuneRequest(..)). Maybe I can patch 1.2 my self when it is released!

    :D
    Brian
     

    mm1352000

    Retired Team Member
  • Premium Supporter
  • September 1, 2008
    21,544
    8,236
    Home Country
    New Zealand New Zealand
    Hi again Brian
    It did help. Stopping and starting Live TV works.
    Great :D

    What still doesn't work is stopping Live TV + watch movie with "dynamic refresh rate change" + starting Live TV. I'm getting "no picture".
    I have absolutely no idea about dynamic refresh rate changer so I'm sorry but I can't help with that.

    May I ask what you changed in the code? (I guess it is some where around SubmitTuneRequest(..)). Maybe I can patch 1.2 my self when it is released!
    Compiling MediaPortal couldn't be easier if you ask me. I'd absolutely encourage you to "dabble". ;)
    Your logs show that it is safe to just ignore the error and carry on with tuning. If you look at the source code, all I did was comment out one line in TvEngine3\TVLibrary\TVLibrary\Implementations\DVB\Graphs\TvCardDvbBase.cs:

    Code:
                Log.Log.WriteFile("dvb:Submit tunerequest calling put_TuneRequest");
                int hr = ((ITuner)_filterNetworkProvider).put_TuneRequest(tuneRequest);
                Log.Log.WriteFile("dvb:Submit tunerequest done calling put_TuneRequest");
                if (hr != 0)
                {
                  Log.Log.WriteFile("dvb:SubmitTuneRequest  returns:0x{0:X} - {1}{2}", hr, HResult.GetDXErrorString(hr),
                                    DsError.GetErrorText(hr));
                  [B]throw new TvException("Unable to tune to channel");[/B]
                }

    In other words, if you don't throw the exception, tuning will carry on as usual...

    I actually wonder whether this issue would be resolved for you if you upgrade to 1.2.0a and use the new "pause graph" option. The real "issue" seems to be that the tuner driver is warning you that it is already successfully tuned to a particular transponder and that it won't retune the hardware. If you were able to avoid submitting a tune request to the driver when it is already tuned to a transponder then I think you would get rid of the error.

    TV Server already avoids submitting a tune request if you change channels but don't change transponder (which is why you don't see any error happening with that situation). However, when you actually stop TV, TV Server wipes the tuning history (ie. it no longer remembers the last channel you were tuned to). A new tune request will *always* be submitted when you start TV again, and that would trigger the problem that you're seeing here. The tuner driver remembers what channel was last tuned even after we stop the channel but TV Server doesn't (for compatibility and to allow forcing a retune)...

    Now how might 1.2.0a help I hear you ask? In 1.2.0a we added an optimisation that only *pauses* the channel behind the scenes when you stop live TV. It makes changing channels a lot faster on some tuners. There is a downside in that some drivers don't like us doing that (it is optional, but turned on by default for 1.2.0a). The critical thing is that unlike with a full stop, TV Server actually remembers the tuning history with the pause option. Hence, when "stop" TV (pause behind the scenes) then try to view a channel on the same transponder TV Server will remember that it is already tuned to the appropriate transponder and won't bother submitting a tune request to the driver, theoretically avoiding the issue!

    I apologise for the technicality of the above explanation but figured that you would probably appreciate a full explanation. Especially considering that you know how to programme. ;)
    The only potential issue that I can see with the above resolution is that the Cinergy may not support the pause behaviour. I guess there is only one way to find out if it will work... :D
     

    elacris

    Portal Member
    October 31, 2006
    16
    0
    Home Country
    Denmark Denmark
    Hi!

    I will be waiting for 1.2.0 to see what happens. If the pause thing doesn't help I will comment out the throw (and maybe add some info to the log).

    I am using Visual Studio every day. Setting it up for C# + SDK 7.1 (without losing SDK 6.0a) can't be that hard :D Maybe some day i'll even get the time to contribute. :)

    Again thanks
    Brian
     

    Users who are viewing this thread

    Top Bottom