[mythtv-commits] Ticket #1552: Revisit DVB Tuning

MythTV mythtv at cvs.mythtv.org
Sun Mar 19 16:55:12 UTC 2006


#1552: Revisit DVB Tuning
---------------------+------------------------------------------------------
 Reporter:  danielk  |       Owner:  danielk
     Type:  task     |      Status:  new    
 Priority:  minor    |   Milestone:  0.20   
Component:  mythtv   |     Version:  head   
 Severity:  medium   |  
---------------------+------------------------------------------------------
 I'd like to take Marcus' comments into account in the tuning. I don't want
 to use a
 300 ms delay for the DVB-T and ATSC cards, since it would slow down tuning
 quite a bit and make the antenna adjust very slow; but that delay should
 be fine for DVB-S. I'd also like to incorporate the retuning and the
 DiSEqC delays. -- dtk

 Marcus (March 18th, 2006):
 There are several problems that have to be taken into account. First of
 all, there really are some cards that take up to 4 seconds to tune (mostly
 DVB-S which also have to switch diseqc). Some cards get confused when you
 hit the i2c bus too often (i.e. check status) and may not tune in that
 case.

 So what I do is :
 {{{
 1) Set the diseqc and voltage and wait for 10000 usecs.
 2) set the frontend
 3) wait 300000 usecs check status
 4) if you get a has_lock, everything is fine, otherwise repeat step 3
    for a couple of times (3 times).
 5) If there is still no lock (very rare) repeat 3)+4)
 6) still no lock try resetting the diseqc (if there is one) and repeat
    from 29.
 }}}
 I implemented that in my libdvb and also added a check for tuning times
 and I got times from 0.2s to 4s for DVB-S cards, always characteristic for
 the respective card. I did not test many DVB-T cards, but they usually
 tune much faster.

 For some cards the usleeps can be shorter, but I put in values that fit
 all the cards I could test.

 In any case you can forget about the FE_GET_EVENT, this was a relict from
 the original Nokia API which was made for some specific Nokia API. Most
 drivers don't implement the events because you would have to implement a
 polling loop in the driver which you can do just as well with steps 3) and
 4).

-- 
Ticket URL: <http://svn.mythtv.org/trac/ticket/1552>
MythTV <http://www.mythtv.org/>
MythTV


More information about the mythtv-commits mailing list