* [linux-dvb] S2API tune return code - potential problem?
@ 2008-11-12 20:32 Alex Betis
2008-11-12 20:54 ` Darron Broad
0 siblings, 1 reply; 4+ messages in thread
From: Alex Betis @ 2008-11-12 20:32 UTC (permalink / raw)
To: linux-dvb@linuxtv.org, Igor M. Liplianin
[-- Attachment #1.1: Type: text/plain, Size: 1230 bytes --]
Hi All,
A question regarding the error code returned from the driver when using
DTV_TUNE property.
Following the code I came to dvb_frontend_ioctl_legacy function and reached
the FE_SET_FRONTEND case.
Looking on the logic I couldn't see any handling of error tuning, an event
is added to the frontend and zero is returned:
fepriv->state = FESTATE_RETUNE;
dvb_frontend_wakeup(fe);
dvb_frontend_add_event(fe, 0);
fepriv->status = 0;
err = 0;
break;
How should an application know that DTV_TUNE command succeed?
Monitoring the LOCK bit is not good, here's an example why I ask the
question:
Assuming the cx24116 driver is locked on a channel. Application sends tune
command to another channel while specifying
AUTO settings for modulation and FEC. The driver for that chip cant handle
AUTO settings and return error, while its still connected
to previous channel. So in that case LOCK bit will be ON, while the tune
command was ignored.
I thought of an workaround to query the driver for locked frequency and
check whenever its in bounds of frequency that was ordered
to be tuned + - some delta, but that's a very dirty solution.
Any thoughts? Or I'm missing something?
Thanks.
[-- Attachment #1.2: Type: text/html, Size: 1611 bytes --]
[-- Attachment #2: Type: text/plain, Size: 150 bytes --]
_______________________________________________
linux-dvb mailing list
linux-dvb@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [linux-dvb] S2API tune return code - potential problem?
2008-11-12 20:32 [linux-dvb] S2API tune return code - potential problem? Alex Betis
@ 2008-11-12 20:54 ` Darron Broad
2008-11-12 21:04 ` Alex Betis
0 siblings, 1 reply; 4+ messages in thread
From: Darron Broad @ 2008-11-12 20:54 UTC (permalink / raw)
To: Alex Betis; +Cc: linux-dvb@linuxtv.org
In message <c74595dc0811121232s48a95a14v93edf27360ed5c21@mail.gmail.com>, "Alex Betis" wrote:
>
>Hi All,
Hi.
>A question regarding the error code returned from the driver when using
>DTV_TUNE property.
>Following the code I came to dvb_frontend_ioctl_legacy function and reached
>the FE_SET_FRONTEND case.
>Looking on the logic I couldn't see any handling of error tuning, an event
>is added to the frontend and zero is returned:
>
> fepriv->state = FESTATE_RETUNE;
> dvb_frontend_wakeup(fe);
> dvb_frontend_add_event(fe, 0);
> fepriv->status = 0;
> err = 0;
> break;
>
>How should an application know that DTV_TUNE command succeed?
>Monitoring the LOCK bit is not good, here's an example why I ask the
>question:
>
>Assuming the cx24116 driver is locked on a channel. Application sends tune
>command to another channel while specifying
>AUTO settings for modulation and FEC. The driver for that chip cant handle
>AUTO settings and return error, while its still connected
>to previous channel. So in that case LOCK bit will be ON, while the tune
>command was ignored.
>
>I thought of an workaround to query the driver for locked frequency and
>check whenever its in bounds of frequency that was ordered
>to be tuned + - some delta, but that's a very dirty solution.
>
>Any thoughts? Or I'm missing something?
Correct me if I am wrong, but I remember looking at this before...
The problem is that no capabilities are available for S2API demods as yet
so TUNE always succeeds whether the parameters are wrong or right.
What is needed is:
1. caps for s2api aware demods.
2. extend dvb_frontend_check_parameters() for s2api aware demods.
This hasn't been done as yet.
cya
--
// /
{:)==={ Darron Broad <darron@kewl.org>
\\ \
_______________________________________________
linux-dvb mailing list
linux-dvb@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [linux-dvb] S2API tune return code - potential problem?
2008-11-12 20:54 ` Darron Broad
@ 2008-11-12 21:04 ` Alex Betis
2008-11-12 21:11 ` Darron Broad
0 siblings, 1 reply; 4+ messages in thread
From: Alex Betis @ 2008-11-12 21:04 UTC (permalink / raw)
To: Darron Broad; +Cc: linux-dvb@linuxtv.org
[-- Attachment #1.1: Type: text/plain, Size: 2395 bytes --]
On Wed, Nov 12, 2008 at 10:54 PM, Darron Broad <darron@kewl.org> wrote:
> In message <c74595dc0811121232s48a95a14v93edf27360ed5c21@mail.gmail.com>,
> "Alex Betis" wrote:
> >
> >Hi All,
>
> Hi.
>
> >A question regarding the error code returned from the driver when using
> >DTV_TUNE property.
> >Following the code I came to dvb_frontend_ioctl_legacy function and
> reached
> >the FE_SET_FRONTEND case.
> >Looking on the logic I couldn't see any handling of error tuning, an event
> >is added to the frontend and zero is returned:
> >
> > fepriv->state = FESTATE_RETUNE;
> > dvb_frontend_wakeup(fe);
> > dvb_frontend_add_event(fe, 0);
> > fepriv->status = 0;
> > err = 0;
> > break;
> >
> >How should an application know that DTV_TUNE command succeed?
> >Monitoring the LOCK bit is not good, here's an example why I ask the
> >question:
> >
> >Assuming the cx24116 driver is locked on a channel. Application sends tune
> >command to another channel while specifying
> >AUTO settings for modulation and FEC. The driver for that chip cant handle
> >AUTO settings and return error, while its still connected
> >to previous channel. So in that case LOCK bit will be ON, while the tune
> >command was ignored.
> >
> >I thought of an workaround to query the driver for locked frequency and
> >check whenever its in bounds of frequency that was ordered
> >to be tuned + - some delta, but that's a very dirty solution.
> >
> >Any thoughts? Or I'm missing something?
>
> Correct me if I am wrong, but I remember looking at this before...
>
> The problem is that no capabilities are available for S2API demods as yet
> so TUNE always succeeds whether the parameters are wrong or right.
>
> What is needed is:
> 1. caps for s2api aware demods.
> 2. extend dvb_frontend_check_parameters() for s2api aware demods.
>
You mean passing the parameter to the demods to be checked before performing
the tuning?
Is there an example of that usage?
What about some unexpected failures that can't be checked before the tuning?
Can't think of a real example since I'm not too familiar with
the code.
I thought about a property of "last error code" that can be queried from the
driver, but in that case the application has to be aware when
the tuning is finished.
>
> This hasn't been done as yet.
>
> cya
>
> --
>
> // /
> {:)==={ Darron Broad <darron@kewl.org>
> \\ \
>
>
[-- Attachment #1.2: Type: text/html, Size: 3458 bytes --]
[-- Attachment #2: Type: text/plain, Size: 150 bytes --]
_______________________________________________
linux-dvb mailing list
linux-dvb@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [linux-dvb] S2API tune return code - potential problem?
2008-11-12 21:04 ` Alex Betis
@ 2008-11-12 21:11 ` Darron Broad
0 siblings, 0 replies; 4+ messages in thread
From: Darron Broad @ 2008-11-12 21:11 UTC (permalink / raw)
To: Alex Betis; +Cc: linux-dvb@linuxtv.org
In message <c74595dc0811121304o44e4270am67173ed5857f6945@mail.gmail.com>, "Alex Betis" wrote:
>On Wed, Nov 12, 2008 at 10:54 PM, Darron Broad <darron@kewl.org> wrote:
>
>> In message <c74595dc0811121232s48a95a14v93edf27360ed5c21@mail.gmail.com>,
>> "Alex Betis" wrote:
>> >
>> >Hi All,
>>
>> Hi.
>>
>> >A question regarding the error code returned from the driver when using
>> >DTV_TUNE property.
>> >Following the code I came to dvb_frontend_ioctl_legacy function and
>> reached
>> >the FE_SET_FRONTEND case.
>> >Looking on the logic I couldn't see any handling of error tuning, an event
>> >is added to the frontend and zero is returned:
>> >
>> > fepriv->state = FESTATE_RETUNE;
>> > dvb_frontend_wakeup(fe);
>> > dvb_frontend_add_event(fe, 0);
>> > fepriv->status = 0;
>> > err = 0;
>> > break;
>> >
>> >How should an application know that DTV_TUNE command succeed?
>> >Monitoring the LOCK bit is not good, here's an example why I ask the
>> >question:
>> >
>> >Assuming the cx24116 driver is locked on a channel. Application sends tune
>> >command to another channel while specifying
>> >AUTO settings for modulation and FEC. The driver for that chip cant handle
>> >AUTO settings and return error, while its still connected
>> >to previous channel. So in that case LOCK bit will be ON, while the tune
>> >command was ignored.
>> >
>> >I thought of an workaround to query the driver for locked frequency and
>> >check whenever its in bounds of frequency that was ordered
>> >to be tuned + - some delta, but that's a very dirty solution.
>> >
>> >Any thoughts? Or I'm missing something?
>>
>> Correct me if I am wrong, but I remember looking at this before...
>>
>> The problem is that no capabilities are available for S2API demods as yet
>> so TUNE always succeeds whether the parameters are wrong or right.
>>
>> What is needed is:
>> 1. caps for s2api aware demods.
>> 2. extend dvb_frontend_check_parameters() for s2api aware demods.
>>
>You mean passing the parameter to the demods to be checked before performing
>the tuning?
Not entirely, I mean more that they expose their caps. This isn't available as yet.
>Is there an example of that usage?
No.
>What about some unexpected failures that can't be checked before the tuning?
I am only thinking about the legitimacy of the parameters not whether
they work or not.
>Can't think of a real example since I'm not too familiar with
>the code.
Okay.
>I thought about a property of "last error code" that can be queried from the
>driver, but in that case the application has to be aware when
>the tuning is finished.
Tuning actually occurs in the frontend thread. The frontend status
tells you if it worked or not but not whether the parameters were
wrong. I agree that perhaps broken parameters could de-tune, but
there are not enough rules for s2api as yet to know how to proceed.
cya
--
// /
{:)==={ Darron Broad <darron@kewl.org>
\\ \
_______________________________________________
linux-dvb mailing list
linux-dvb@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2008-11-12 21:11 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-11-12 20:32 [linux-dvb] S2API tune return code - potential problem? Alex Betis
2008-11-12 20:54 ` Darron Broad
2008-11-12 21:04 ` Alex Betis
2008-11-12 21:11 ` Darron Broad
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox