* [linux-dvb] [PATCH] cx24116 DVB-S modulation fix
@ 2008-10-14 9:33 Christophe Thommeret
2008-10-14 10:29 ` Darron Broad
0 siblings, 1 reply; 9+ messages in thread
From: Christophe Thommeret @ 2008-10-14 9:33 UTC (permalink / raw)
To: linux-dvb
[-- Attachment #1: Type: text/plain, Size: 170 bytes --]
Hi,
This patch makes cx24116 to behave like other dvb-s frontends.
This is needed especially because QAM_AUTO is used in a lot of scan files.
--
Christophe Thommeret
[-- Attachment #2: cx24116-dvbs_modulation-fix.diff --]
[-- Type: text/x-diff, Size: 1884 bytes --]
diff -r 6b6e9be35963 linux/drivers/media/dvb/frontends/cx24116.c
--- a/linux/drivers/media/dvb/frontends/cx24116.c Mon Oct 13 18:35:50 2008 -0400
+++ b/linux/drivers/media/dvb/frontends/cx24116.c Tue Oct 14 11:20:57 2008 +0200
@@ -1230,23 +1230,14 @@ static int cx24116_set_frontend(struct d
case SYS_DVBS:
dprintk("%s: DVB-S delivery system selected\n", __func__);
- /* Only QPSK is supported for DVB-S */
- if (c->modulation != QPSK) {
- dprintk("%s: unsupported modulation selected (%d)\n",
- __func__, c->modulation);
- return -EOPNOTSUPP;
- }
+ /* Only QPSK is supported for DVB-S,then .. */
+ state->dnxt.modulation = QPSK;
/* Pilot doesn't exist in DVB-S, turn bit off */
state->dnxt.pilot_val = CX24116_PILOT_OFF;
retune = 1;
- /* DVB-S only supports 0.35 */
- if (c->rolloff != ROLLOFF_35) {
- dprintk("%s: unsupported rolloff selected (%d)\n",
- __func__, c->rolloff);
- return -EOPNOTSUPP;
- }
+ /* DVB-S only supports 0.35, then .. */
state->dnxt.rolloff_val = CX24116_ROLLOFF_035;
break;
@@ -1262,6 +1253,7 @@ static int cx24116_set_frontend(struct d
__func__, c->modulation);
return -EOPNOTSUPP;
}
+ state->dnxt.modulation = c->modulation;
switch (c->pilot) {
case PILOT_AUTO: /* Not supported but emulated */
@@ -1301,7 +1293,6 @@ static int cx24116_set_frontend(struct d
__func__, c->delivery_system);
return -EOPNOTSUPP;
}
- state->dnxt.modulation = c->modulation;
state->dnxt.frequency = c->frequency;
state->dnxt.pilot = c->pilot;
state->dnxt.rolloff = c->rolloff;
@@ -1311,7 +1302,7 @@ static int cx24116_set_frontend(struct d
return ret;
/* FEC_NONE/AUTO for DVB-S2 is not supported and detected here */
- ret = cx24116_set_fec(state, c->modulation, c->fec_inner);
+ ret = cx24116_set_fec(state, state->dnxt.modulation, c->fec_inner);
if (ret != 0)
return ret;
[-- Attachment #3: 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] 9+ messages in thread
* Re: [linux-dvb] [PATCH] cx24116 DVB-S modulation fix
2008-10-14 9:33 [linux-dvb] [PATCH] cx24116 DVB-S modulation fix Christophe Thommeret
@ 2008-10-14 10:29 ` Darron Broad
2008-10-14 12:51 ` Christophe Thommeret
0 siblings, 1 reply; 9+ messages in thread
From: Darron Broad @ 2008-10-14 10:29 UTC (permalink / raw)
To: Christophe Thommeret; +Cc: linux-dvb
In message <200810141133.36559.hftom@free.fr>, Christophe Thommeret wrote:
hi
>Hi,
>
>This patch makes cx24116 to behave like other dvb-s frontends.
Unlike most DVB-S cards the those with a cx24116 use S2API
this makes them somewhat different.
>This is needed especially because QAM_AUTO is used in a lot of scan files.
What scan files are you referring to? The
cx24116 only does PSK, not AM. QAM_AUTO
doesn't sound right. the cx24116 can't
auto detect anything, but that's another
story...
if you are seeing problems with the S2API then
ensure that you issue a DTV_CLEAR prior to programming
the correct parameters for a particular delivery
system.
if you are seeing problems with the legacy
API then there could be a problem with the legacy
to S2API cache sync, you need to give more details
for this to be investigated.
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] 9+ messages in thread
* Re: [linux-dvb] [PATCH] cx24116 DVB-S modulation fix
2008-10-14 10:29 ` Darron Broad
@ 2008-10-14 12:51 ` Christophe Thommeret
2008-10-14 15:10 ` Steven Toth
` (2 more replies)
0 siblings, 3 replies; 9+ messages in thread
From: Christophe Thommeret @ 2008-10-14 12:51 UTC (permalink / raw)
To: Darron Broad; +Cc: linux-dvb
Le Tuesday 14 October 2008 12:29:49 Darron Broad, vous avez écrit :
> In message <200810141133.36559.hftom@free.fr>, Christophe Thommeret wrote:
>
> hi
>
> >Hi,
> >
> >This patch makes cx24116 to behave like other dvb-s frontends.
>
> Unlike most DVB-S cards the those with a cx24116 use S2API
> this makes them somewhat different.
>
> >This is needed especially because QAM_AUTO is used in a lot of scan files.
>
> What scan files are you referring to? The
> cx24116 only does PSK, not AM. QAM_AUTO
> doesn't sound right. the cx24116 can't
> auto detect anything, but that's another
> story...
dvbscan initial tuning data files for DVB-S don't have an entry for
modulation. So an app like kaffeine simply set modulation to QAM_AUTO.
Why not QPSK, you ask? Simply because DVB-S standard allows QPSK and 16QAM.
Maybe there is not a single 16QAM TP all over the world, but it's still a
valid modulation for DVB-S.
So, we set modulation to QAM_AUTO when it's unknown/unspecified, like in
dvbscan files (those being also used by kaffeine). And it works pretty well,
just because most dvb-s can only do QPSK and so force modulation to QPSK
instead of returning a notsup.
See this as software QAM_AUTO :)
P.S.
This is with s2api.
--
Christophe Thommeret
_______________________________________________
linux-dvb mailing list
linux-dvb@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [linux-dvb] [PATCH] cx24116 DVB-S modulation fix
2008-10-14 12:51 ` Christophe Thommeret
@ 2008-10-14 15:10 ` Steven Toth
2008-10-14 17:02 ` Darron Broad
2008-10-14 21:05 ` Andreas Oberritter
2 siblings, 0 replies; 9+ messages in thread
From: Steven Toth @ 2008-10-14 15:10 UTC (permalink / raw)
To: Christophe Thommeret; +Cc: linux-dvb
Christophe Thommeret wrote:
> Le Tuesday 14 October 2008 12:29:49 Darron Broad, vous avez écrit :
>> In message <200810141133.36559.hftom@free.fr>, Christophe Thommeret wrote:
>>
>> hi
>>
>>> Hi,
>>>
>>> This patch makes cx24116 to behave like other dvb-s frontends.
>> Unlike most DVB-S cards the those with a cx24116 use S2API
>> this makes them somewhat different.
>>
>>> This is needed especially because QAM_AUTO is used in a lot of scan files.
>> What scan files are you referring to? The
>> cx24116 only does PSK, not AM. QAM_AUTO
>> doesn't sound right. the cx24116 can't
>> auto detect anything, but that's another
>> story...
>
> dvbscan initial tuning data files for DVB-S don't have an entry for
> modulation. So an app like kaffeine simply set modulation to QAM_AUTO.
> Why not QPSK, you ask? Simply because DVB-S standard allows QPSK and 16QAM.
> Maybe there is not a single 16QAM TP all over the world, but it's still a
> valid modulation for DVB-S.
> So, we set modulation to QAM_AUTO when it's unknown/unspecified, like in
> dvbscan files (those being also used by kaffeine). And it works pretty well,
> just because most dvb-s can only do QPSK and so force modulation to QPSK
> instead of returning a notsup.
> See this as software QAM_AUTO :)
I've only glanced briefly at the patch but setting the modulation type
to QAM_AUTO, and expecting the card to support it I think is a bad idea.
I can accept the argument that the current driver will not accept 16QAM,
but that's not the problem being discussed. (I'll address this in a
separate patch)
Call DTV_CLEAR should also default your rolloff to 3.5.
Let's investigate a better approach.
kaffeine should be working well already, with the current code. Unless
it was recently broken - in which case please discuss.
- Steve
_______________________________________________
linux-dvb mailing list
linux-dvb@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [linux-dvb] [PATCH] cx24116 DVB-S modulation fix
2008-10-14 12:51 ` Christophe Thommeret
2008-10-14 15:10 ` Steven Toth
@ 2008-10-14 17:02 ` Darron Broad
2008-10-15 16:46 ` Christophe Thommeret
2008-10-14 21:05 ` Andreas Oberritter
2 siblings, 1 reply; 9+ messages in thread
From: Darron Broad @ 2008-10-14 17:02 UTC (permalink / raw)
To: Christophe Thommeret; +Cc: linux-dvb
In message <200810141451.02941.hftom@free.fr>, Christophe Thommeret wrote:
LO
>Le Tuesday 14 October 2008 12:29:49 Darron Broad, vous avez =E9crit=A0:
>> In message <200810141133.36559.hftom@free.fr>, Christophe Thommeret wrote:
>>
>> hi
>>
>> >Hi,
>> >
>> >This patch makes cx24116 to behave like other dvb-s frontends.
>>
>> Unlike most DVB-S cards the those with a cx24116 use S2API
>> this makes them somewhat different.
>>
>> >This is needed especially because QAM_AUTO is used in a lot of scan file=
>s.
>>
>> What scan files are you referring to? The
>> cx24116 only does PSK, not AM. QAM_AUTO
>> doesn't sound right. the cx24116 can't
>> auto detect anything, but that's another
>> story...
>
>dvbscan initial tuning data files for DVB-S don't have an entry for=20
>modulation. So an app like kaffeine simply set modulation to QAM_AUTO.
>Why not QPSK, you ask? Simply because DVB-S standard allows QPSK and 16QAM.=
>
It doesn't include modulation because QPSK is implied.
>Maybe there is not a single 16QAM TP all over the world, but it's still a=20
>valid modulation for DVB-S.
As is said, the cx24116 only does PSK.
The driver should return unsupported for anything it can't do.
If someone out there actually uses 16-QAM (who are you?) and that person
switches to an adapter with a cx24116 they should be informed of error
when tuning 16-QAM, not acceptance of something it doesn't support.
>So, we set modulation to QAM_AUTO when it's unknown/unspecified, like in=20
>dvbscan files (those being also used by kaffeine). And it works pretty well=
>,=20
>just because most dvb-s can only do QPSK and so force modulation to QPSK=20
>instead of returning a notsup.
>See this as software QAM_AUTO :)
>P.S.
>This is with s2api.
When you use DVB-S delivery you should set the modulation to QPSK. If
an end-user out there really needs 16-QAM then you should allow them
the option to change it to QAM_16. I do not think this is going
inconvenience many people.
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] 9+ messages in thread
* Re: [linux-dvb] [PATCH] cx24116 DVB-S modulation fix
2008-10-14 12:51 ` Christophe Thommeret
2008-10-14 15:10 ` Steven Toth
2008-10-14 17:02 ` Darron Broad
@ 2008-10-14 21:05 ` Andreas Oberritter
2 siblings, 0 replies; 9+ messages in thread
From: Andreas Oberritter @ 2008-10-14 21:05 UTC (permalink / raw)
To: Christophe Thommeret; +Cc: linux-dvb
Christophe Thommeret wrote:
> dvbscan initial tuning data files for DVB-S don't have an entry for
> modulation. So an app like kaffeine simply set modulation to QAM_AUTO.
> Why not QPSK, you ask? Simply because DVB-S standard allows QPSK and 16QAM.
> Maybe there is not a single 16QAM TP all over the world, but it's still a
> valid modulation for DVB-S.
> So, we set modulation to QAM_AUTO when it's unknown/unspecified, like in
> dvbscan files (those being also used by kaffeine). And it works pretty well,
> just because most dvb-s can only do QPSK and so force modulation to QPSK
> instead of returning a notsup.
> See this as software QAM_AUTO :)
It simply doesn't make sense to specify QAM_AUTO if dvb_frontend_info.caps
doesn't contain FE_CAN_QAM_AUTO (or FE_CAN_QAM_16 for that matter).
Regards,
Andreas
_______________________________________________
linux-dvb mailing list
linux-dvb@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [linux-dvb] [PATCH] cx24116 DVB-S modulation fix
2008-10-14 17:02 ` Darron Broad
@ 2008-10-15 16:46 ` Christophe Thommeret
2008-10-15 17:22 ` Darron Broad
0 siblings, 1 reply; 9+ messages in thread
From: Christophe Thommeret @ 2008-10-15 16:46 UTC (permalink / raw)
To: Darron Broad; +Cc: linux-dvb
Le Tuesday 14 October 2008 19:02:03 Darron Broad, vous avez écrit :
> In message <200810141451.02941.hftom@free.fr>, Christophe Thommeret wrote:
>
> LO
>
> >Le Tuesday 14 October 2008 12:29:49 Darron Broad, vous avez =E9crit=A0:
> >> In message <200810141133.36559.hftom@free.fr>, Christophe Thommeret
> >> wrote:
> >>
> >> hi
> >>
> >> >Hi,
> >> >
> >> >This patch makes cx24116 to behave like other dvb-s frontends.
> >>
> >> Unlike most DVB-S cards the those with a cx24116 use S2API
> >> this makes them somewhat different.
> >>
> >> >This is needed especially because QAM_AUTO is used in a lot of scan
> >> > file=
> >
> >s.
> >
> >> What scan files are you referring to? The
> >> cx24116 only does PSK, not AM. QAM_AUTO
> >> doesn't sound right. the cx24116 can't
> >> auto detect anything, but that's another
> >> story...
> >
> >dvbscan initial tuning data files for DVB-S don't have an entry for=20
> >modulation. So an app like kaffeine simply set modulation to QAM_AUTO.
> >Why not QPSK, you ask? Simply because DVB-S standard allows QPSK and
> > 16QAM.=
>
> It doesn't include modulation because QPSK is implied.
>
> >Maybe there is not a single 16QAM TP all over the world, but it's still
> > a=20 valid modulation for DVB-S.
>
> As is said, the cx24116 only does PSK.
>
> The driver should return unsupported for anything it can't do.
>
> If someone out there actually uses 16-QAM (who are you?) and that person
> switches to an adapter with a cx24116 they should be informed of error
> when tuning 16-QAM, not acceptance of something it doesn't support.
>
> >So, we set modulation to QAM_AUTO when it's unknown/unspecified, like
> > in=20 dvbscan files (those being also used by kaffeine). And it works
> > pretty well= ,=20
> >just because most dvb-s can only do QPSK and so force modulation to
> > QPSK=20 instead of returning a notsup.
> >See this as software QAM_AUTO :)
> >
> >P.S.
> >This is with s2api.
>
> When you use DVB-S delivery you should set the modulation to QPSK. If
> an end-user out there really needs 16-QAM then you should allow them
> the option to change it to QAM_16. I do not think this is going
> inconvenience many people.
Ok, you win :)
Other subject:
Would you accept some patch to enhance cx24116 pilot_auto emulation?
--
Christophe Thommeret
_______________________________________________
linux-dvb mailing list
linux-dvb@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [linux-dvb] [PATCH] cx24116 DVB-S modulation fix
2008-10-15 16:46 ` Christophe Thommeret
@ 2008-10-15 17:22 ` Darron Broad
2008-10-15 18:59 ` Christophe Thommeret
0 siblings, 1 reply; 9+ messages in thread
From: Darron Broad @ 2008-10-15 17:22 UTC (permalink / raw)
To: Christophe Thommeret; +Cc: linux-dvb
In message <200810151846.59042.hftom@free.fr>, Christophe Thommeret wrote:
hi.
<snip>
>Other subject:
>Would you accept some patch to enhance cx24116 pilot_auto emulation?
If you present your patch and it enhances or fixes something
then I am sure people will support it.
good luck.
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] 9+ messages in thread
* Re: [linux-dvb] [PATCH] cx24116 DVB-S modulation fix
2008-10-15 17:22 ` Darron Broad
@ 2008-10-15 18:59 ` Christophe Thommeret
0 siblings, 0 replies; 9+ messages in thread
From: Christophe Thommeret @ 2008-10-15 18:59 UTC (permalink / raw)
To: Darron Broad; +Cc: linux-dvb
Le Wednesday 15 October 2008 19:22:35 Darron Broad, vous avez écrit :
> In message <200810151846.59042.hftom@free.fr>, Christophe Thommeret wrote:
>
> hi.
>
> <snip>
>
> >Other subject:
> >Would you accept some patch to enhance cx24116 pilot_auto emulation?
>
> If you present your patch and it enhances or fixes something
> then I am sure people will support it.
I don't know to which tree to apply, so i give the code as is (it's pretty
simple):
Since 8PSK (and higher mod) signals are very likely to have pilot symbols,
pilot_auto should start with pilot_on for 8PSK.
And since QPSK signals are unlikely to have pilot, pilot_auto should start
with pilot_off for QPSK.
Without the patch:
QPSK tuning delay: ~100ms
8PSK tuning delay: ~900ms
with patch:
QPSK tuning delay: ~100ms
8PSK tuning delay: ~100ms
static int cx24116_set_frontend(struct dvb_frontend* fe, struct
dvb_frontend_parameters *p)
....
....
case SYS_DVBS2:
...
...
switch(c->pilot) {
case PILOT_AUTO: /* Not supported but emulated */
retune = 2; /* Fall-through */
if ( c->modulation==QPSK )
state->dnxt.pilot_val = CX24116_PILOT_OFF;
else
state->dnxt.pilot_val = CX24116_PILOT_ON;
break;
...
...
/* Toggle pilot bit when in auto-pilot */
if(state->dcur.pilot == PILOT_AUTO) {
if ( state->dnxt.pilot_val== CX24116_PILOT_OFF )
cmd.args[0x07] ^= CX24116_PILOT_ON;
else
cmd.args[0x07] ^= CX24116_PILOT_OFF;
}
....
...
--
Christophe Thommeret
_______________________________________________
linux-dvb mailing list
linux-dvb@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2008-10-15 19:00 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-10-14 9:33 [linux-dvb] [PATCH] cx24116 DVB-S modulation fix Christophe Thommeret
2008-10-14 10:29 ` Darron Broad
2008-10-14 12:51 ` Christophe Thommeret
2008-10-14 15:10 ` Steven Toth
2008-10-14 17:02 ` Darron Broad
2008-10-15 16:46 ` Christophe Thommeret
2008-10-15 17:22 ` Darron Broad
2008-10-15 18:59 ` Christophe Thommeret
2008-10-14 21:05 ` Andreas Oberritter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox