[mythtv] [PATCH] Remove use of deprecated DVB events.

Kenneth Aafl°y lists at kenneth.aafloy.net
Thu Sep 1 13:07:01 UTC 2005


torsdag 01 september 2005, 14:45, skrev Stuart Auchterlonie:
> On Thu, Sep 01, 2005 at 02:30:18PM +0200, Kenneth Aafl°y wrote:
> > Wonder where I got the idea that the status wasn't returned through
> > ioctls pointer argument, doh!
>
> Probably the same sleep deprivation that makes me forget to attach
> patches....

 :)

> > Good idea, since the select will poll for events and the events is
> > signaled from dvb_frontend's kernel thread on status changes:
> >
> >                         if (fe->ops->read_status)
> >                                 fe->ops->read_status(fe, &s);
> >                         if (s != fepriv->status) {
> >                                 dvb_frontend_add_event(fe, s);
> >                                 fepriv->status = s;
> >                         }
> >
> > I'm confused however, about what the first select+read_status is for,
> > since it's not actually doing anything. Was the intention that it
> > should have triggered a retune if lock had been lost?
> >
> > Tiny problem with this is that as long as you don't empty the event
> > queue, the select will return with isset even if it timed out while
> > waiting (dvb_frontend.c:dvb_frontend_poll).
>
> That question is the answer to your previous question.
>
> The theory is that we check to see if there are any events waiting
> and if there are we retrieve them BEFORE we tune. I probably should
> turn it into a while loop to drain more than one event.
>
> In practice I see that there is already an event there before the
> tune every time I change channel. The status returned is always
>
> status=0x1f, Signal,Carrier,FEC Stable,Sync,Lock

The attached patch,

With 'while (ioctl(fd_frontend, FE_GET_EVENT, &event) == 0);' commented out:

2005-09-01 14:58:53.277 DVB#0 Frequency: 12322000 Symbol Rate: 27800000 Pol: 
H/L Inv: Auto
2005-09-01 14:58:53.588 DVB#0 DiSEqC 1.0 Switch - Port 1
2005-09-01 14:58:53.608 DVB#0 DiSEqC Sending 1.0 Command: e0 10 38 f7
status = 0
[repeats ~300 times]
status = 3
[repeats ~100 times]
status = 1
status = 1
status = 1
status = 3
status = 7
status = 7
status = 7
status = 7
status = 7
status = 7
status = 7
status = 7
status = 1f
2005-09-01 14:58:53.852 DVB#0 Frequency tuning successful.

Flushing events:

2005-09-01 15:03:32.225 DVB#0 DiSEqC Sending 1.0 Command: e0 10 38 f7
status = 0
status = 1f
2005-09-01 15:03:32.535 DVB#0 Frequency tuning successful.

Kenneth
-------------- next part --------------
A non-text attachment was scrubbed...
Name: dvbchannel.patch
Type: text/x-diff
Size: 8159 bytes
Desc: not available
Url : http://mythtv.org/pipermail/mythtv-dev/attachments/20050901/bbafede4/dvbchannel.bin


More information about the mythtv-dev mailing list