* [linux-dvb] S2API - Status - Thu Sep 11th
@ 2008-09-12 5:51 Steven Toth
2008-09-12 6:26 ` Christophe Thommeret
` (3 more replies)
0 siblings, 4 replies; 45+ messages in thread
From: Steven Toth @ 2008-09-12 5:51 UTC (permalink / raw)
To: linux-dvb, Steven Toth
Hello!
More progress today, 7 new patches were merged - all related to the
feedback and suggestions we had.... And a bugfix. :)
The DTV_SET/GET command syntax has been rationalised, as Hans requested.
This cleans up the application API nicely. Various internal improvements
and code cleanup related to variable length arrays, moving values
to/from userspace to the kernel. Interfacing to the demods to allow them
to interact with set/get property requests, if they chose to do so.
Quite a lot of changes internally and to the user facing API.
If you're planning to test then you'll need the tune-v0.0.5.c to see the
different. (steventoth.net/linux/s2/tune-v0.0.5.tgz)
In addition, some related news:
mkrufky spent some time adding S2API isdb-t support to the siano driver,
that's working pretty well - tuning via the S2API app.
Two tree here, offering slightly different approaches, one with S2API,
one using some spare bits in the DVB-T tuning fields.
http://linuxtv.org/hg/~mkrufky/sms1xxx-s2api-isdbt/
http://linuxtv.org/hg/~mkrufky/sms1xxx-isdbt-as-dvbt/
(See tune-v0.0.5.tgz for example ISDB-T tuning code)
If you're interested in seeing the impact of switching to S2API for this
driver, see the set_frontend() func, it's a small change - just a few
lines to reference the dtv_frontend_properties cache.
I don't think we're quite ready to announce we've conquered the complete
ISDB-T API, so don't assume that this is concrete.... As we experiment
with other ISDB-T products we'll probably find reasons to tweak the API
a little further as a standard begins to form..... but tuning through a
clean API is a great step forward, and its working now, today. Thank you
mkrufky :)
Hans Werner sent a large patch for the multifrontend HVR3000/HVR4000
combined DVB-T/DVB-S/S2 support for the S2API tree. (Thanks Hans - this
was obviously a lot of manual merge work, it's greatly appreciated.)
What would everyone like to see happen with this patch?
Would you prefer to see this dealt with outside of the S2API discussion,
or would you like to see this included and merged? Let me know your
thoughts. Andreas also has the multifrontend thread running, so comment
here if you would like to see this as part of the S2API patches, or
comment on the Andreas thread of you want this as a separate patchset at
a later date.
Darron Broad has offered to bring the cx24116.c driver up to date with
some additions he has in his repositories. With any luck we may see
these merged into the current cx24116 driver within a few days. Thank
you Darron.
Patrick, I haven't looked at your 1.7MHz bandwidth suggestion - I'm open
to ideas on how you think we should do this. Take a look at todays
linux/dvb/frontend.h and see if these updates help, or whether you need
more changes.
Igor has been busy patching the szap-s2 tool
(http://liplianindvb.sourceforge.net/hg/szap-s2/) so many thanks to
Igor! Gregoire has been running some basic tests and appears to be
having some success, that's encouraging. Thank you.
What's next?
Now's probably a good time to start patching dvb-apps. I think the
frontend.h changes are close enough for that work to begin. This will
probably start Friday, so keep your eyes and open for the
stoth/s2api-dvb-apps tree appearing ... and an announcement here.
Thanks again to everyone, your efforts are appreciated!
Regards,
Steve
_______________________________________________
linux-dvb mailing list
linux-dvb@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb
^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: [linux-dvb] S2API - Status - Thu Sep 11th
2008-09-12 5:51 [linux-dvb] S2API - Status - Thu Sep 11th Steven Toth
@ 2008-09-12 6:26 ` Christophe Thommeret
2008-09-12 13:18 ` Steven Toth
[not found] ` <48CC12BF.7050803@hauppauge.com>
2008-09-12 8:00 ` [linux-dvb] Siano ISDB [was: Re: S2API - Status - Thu Sep 11th] barry bouwsma
` (2 subsequent siblings)
3 siblings, 2 replies; 45+ messages in thread
From: Christophe Thommeret @ 2008-09-12 6:26 UTC (permalink / raw)
To: linux-dvb; +Cc: Steven Toth
Le Friday 12 September 2008 07:51:17 Steven Toth, vous avez écrit :
> Hello!
>
> More progress today, 7 new patches were merged - all related to the
> feedback and suggestions we had.... And a bugfix. :)
>
> The DTV_SET/GET command syntax has been rationalised, as Hans requested.
> This cleans up the application API nicely. Various internal improvements
> and code cleanup related to variable length arrays, moving values
> to/from userspace to the kernel. Interfacing to the demods to allow them
> to interact with set/get property requests, if they chose to do so.
> Quite a lot of changes internally and to the user facing API.
>
> If you're planning to test then you'll need the tune-v0.0.5.c to see the
> different. (steventoth.net/linux/s2/tune-v0.0.5.tgz)
>
> In addition, some related news:
>
> mkrufky spent some time adding S2API isdb-t support to the siano driver,
> that's working pretty well - tuning via the S2API app.
>
> Two tree here, offering slightly different approaches, one with S2API,
> one using some spare bits in the DVB-T tuning fields.
>
> http://linuxtv.org/hg/~mkrufky/sms1xxx-s2api-isdbt/
> http://linuxtv.org/hg/~mkrufky/sms1xxx-isdbt-as-dvbt/
>
> (See tune-v0.0.5.tgz for example ISDB-T tuning code)
>
> If you're interested in seeing the impact of switching to S2API for this
> driver, see the set_frontend() func, it's a small change - just a few
> lines to reference the dtv_frontend_properties cache.
>
> I don't think we're quite ready to announce we've conquered the complete
> ISDB-T API, so don't assume that this is concrete.... As we experiment
> with other ISDB-T products we'll probably find reasons to tweak the API
> a little further as a standard begins to form..... but tuning through a
> clean API is a great step forward, and its working now, today. Thank you
> mkrufky :)
>
> Hans Werner sent a large patch for the multifrontend HVR3000/HVR4000
> combined DVB-T/DVB-S/S2 support for the S2API tree. (Thanks Hans - this
> was obviously a lot of manual merge work, it's greatly appreciated.)
>
> What would everyone like to see happen with this patch?
>
> Would you prefer to see this dealt with outside of the S2API discussion,
> or would you like to see this included and merged? Let me know your
> thoughts. Andreas also has the multifrontend thread running, so comment
> here if you would like to see this as part of the S2API patches, or
> comment on the Andreas thread of you want this as a separate patchset at
> a later date.
>
> Darron Broad has offered to bring the cx24116.c driver up to date with
> some additions he has in his repositories. With any luck we may see
> these merged into the current cx24116 driver within a few days. Thank
> you Darron.
>
> Patrick, I haven't looked at your 1.7MHz bandwidth suggestion - I'm open
> to ideas on how you think we should do this. Take a look at todays
> linux/dvb/frontend.h and see if these updates help, or whether you need
> more changes.
>
> Igor has been busy patching the szap-s2 tool
> (http://liplianindvb.sourceforge.net/hg/szap-s2/) so many thanks to
> Igor! Gregoire has been running some basic tests and appears to be
> having some success, that's encouraging. Thank you.
>
> What's next?
>
> Now's probably a good time to start patching dvb-apps. I think the
> frontend.h changes are close enough for that work to begin. This will
> probably start Friday, so keep your eyes and open for the
> stoth/s2api-dvb-apps tree appearing ... and an announcement here.
>
> Thanks again to everyone, your efforts are appreciated!
>
> Regards,
>
> Steve
Good work.
I've just gave it a try:
First i tried old api (kaffeine)-> everything works as expected.
Then i tried new API (with latest tune.c) -> nova-t and nova-s work, cinergyT2
doesn't. I've also noticed that FE_SET_PROPERTY ioctl always return -1, even
when success..
Then i tried old api again -> now dvb-s doesn't lock and dvb-t always lock on
the freq used in tune.c
--
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] 45+ messages in thread
* [linux-dvb] Siano ISDB [was: Re: S2API - Status - Thu Sep 11th]
2008-09-12 5:51 [linux-dvb] S2API - Status - Thu Sep 11th Steven Toth
2008-09-12 6:26 ` Christophe Thommeret
@ 2008-09-12 8:00 ` barry bouwsma
2008-09-12 8:24 ` [linux-dvb] Siano ISDB barry bouwsma
[not found] ` <48CA6BBB.5010802@hauppauge.com>
2008-09-12 9:17 ` [linux-dvb] S2API - Status - Thu Sep 11th Patrick Boettcher
2008-09-12 11:09 ` Hans Werner
3 siblings, 2 replies; 45+ messages in thread
From: barry bouwsma @ 2008-09-12 8:00 UTC (permalink / raw)
To: linux-dvb, Steven Toth, Steven Toth; +Cc: mkrufky
--- On Fri, 9/12/08, Steven Toth <stoth@linuxtv.org> wrote:
> mkrufky spent some time adding S2API isdb-t support to the siano driver,
> that's working pretty well - tuning via the S2API app.
>
> http://linuxtv.org/hg/~mkrufky/sms1xxx-isdbt-as-dvbt/
Just a first quick feedback, the following will need to be
frobbed appropriately:
204 if (id < DEVICE_MODE_DVBT || id > DEVICE_MODE_DVBT_BDA) {
205 sms_err("invalid firmware id specified %d", id);
206 return -EINVAL;
In order to enable ISDB modes, one will need to specify
module parameter `default_mode=5' or =6, whichever, and,
hmmm, looks like I gotta hunt down a firmware too.
Is one or the other mode, that is, BDA driver or not, to
be preferred?
Obviously I can't receive anything.
Other comments may appear in personal mail to mkrufky, unless
I should keep them here, I think...
thanks,
barry bouwsma
_______________________________________________
linux-dvb mailing list
linux-dvb@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb
^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: [linux-dvb] Siano ISDB
2008-09-12 8:00 ` [linux-dvb] Siano ISDB [was: Re: S2API - Status - Thu Sep 11th] barry bouwsma
@ 2008-09-12 8:24 ` barry bouwsma
2008-09-12 11:47 ` Uri Shkolnik
[not found] ` <48CA6BBB.5010802@hauppauge.com>
1 sibling, 1 reply; 45+ messages in thread
From: barry bouwsma @ 2008-09-12 8:24 UTC (permalink / raw)
To: linux-dvb
--- On Fri, 9/12/08, barry bouwsma <free_beer_for_all@yahoo.com> wrote:
> hmmm, looks like I gotta hunt down a firmware too.
Actually, just ignore me. Looks like the SMS1000 chip in my
device doesn't support ISDB (only DAB-related and DVB-T-related)
sorry,
barry bouwsma
_______________________________________________
linux-dvb mailing list
linux-dvb@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb
^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: [linux-dvb] S2API - Status - Thu Sep 11th
2008-09-12 5:51 [linux-dvb] S2API - Status - Thu Sep 11th Steven Toth
2008-09-12 6:26 ` Christophe Thommeret
2008-09-12 8:00 ` [linux-dvb] Siano ISDB [was: Re: S2API - Status - Thu Sep 11th] barry bouwsma
@ 2008-09-12 9:17 ` Patrick Boettcher
2008-09-12 14:04 ` Steven Toth
2008-09-13 20:02 ` Steven Toth
2008-09-12 11:09 ` Hans Werner
3 siblings, 2 replies; 45+ messages in thread
From: Patrick Boettcher @ 2008-09-12 9:17 UTC (permalink / raw)
To: Steven Toth; +Cc: linux-dvb
Hi Steve,
On Fri, 12 Sep 2008, Steven Toth wrote:
> Patrick, I haven't looked at your 1.7MHz bandwidth suggestion - I'm open
> to ideas on how you think we should do this. Take a look at todays
> linux/dvb/frontend.h and see if these updates help, or whether you need
> more changes.
I attached a patch which adds a DTV_BANDWIDTH_HZ command. That's all. I
would like to have the option to pass any bandwidth I want to the
frontend.
Also this patch includes some more things and questions around ISDB-T and
ISDB-Tsb:
--- frontend.h.old 2008-09-12 10:46:25.351332000 +0200
+++ frontend.h 2008-09-12 11:12:00.326085000 +0200
@@ -258,6 +258,12 @@
DTV_FREQUENCY,
DTV_MODULATION,
DTV_BANDWIDTH,
+
+ /* XXX PB: I would like to have field which describes the
+ * bandwidth of a channel in Hz or kHz - maybe we can remove the
+ * DTV_BANDWIDTH now and put a compat layer */
+ DTV_BANDWIDTH_HZ,
+
DTV_INVERSION,
DTV_DISEQC_MASTER,
DTV_SYMBOL_RATE,
@@ -276,18 +282,32 @@
/* New commands are always appended */
DTV_DELIVERY_SYSTEM,
+ /* XXX PB: is DTV_ISDB the good prefix for ISDB-T parameters ? XXX */
+
/* ISDB-T */
- DTV_ISDB_SEGMENT_IDX,
- DTV_ISDB_SEGMENT_WIDTH,
+ DTV_ISDB_SEGMENT_IDX, /* maybe a duplicate of DTV_ISDB_SOUND_BROADCASTING_SUBCHANNEL_ID ??? to be checked */
+ DTV_ISDB_SEGMENT_WIDTH, /* 1, 3 or 13 ??? */
+
+ DTV_ISDB_PARTIAL_RECEPTION, /* the central segment can be received independently or 1/3 seg in SB-mode */
+ DTV_ISDB_SOUND_BROADCASTING, /* sound broadcasting is used 0 = 13segment, 1 = 1 or 3 see DTV_ISDB_PARTIAL_RECEPTION */
+
+ /* only used in SB */
+ DTV_ISDB_SOUND_BROADCASTING_SUBCHANNEL_ID, /* determines the initial PRBS of the segment (to match with 13seg channel) */
+
DTV_ISDB_LAYERA_FEC,
DTV_ISDB_LAYERA_MODULATION,
DTV_ISDB_LAYERA_SEGMENT_WIDTH,
+ DTV_ISDB_LAYERA_TIME_INTERLEAVER,
+
DTV_ISDB_LAYERB_FEC,
DTV_ISDB_LAYERB_MODULATION,
DTV_ISDB_LAYERB_SEGMENT_WIDTH,
+ DTV_ISDB_LAYERB_TIME_INTERLEAVING,
+
DTV_ISDB_LAYERC_FEC,
DTV_ISDB_LAYERC_MODULATION,
DTV_ISDB_LAYERC_SEGMENT_WIDTH,
+ DTV_ISDB_LAYERC_TIME_INTERLEAVING,
} dtv_cmd_types_t;
Sorry for not integrating this into the frontend_cache yet. But I'm really
out of time (at work and even at home, working on cx24120) and I will not
be able to supply the DiBcom ISDB-T demod-driver (which would use all
that) right now.
thanks for all your efforts,
Patrick.
--
Mail: patrick.boettcher@desy.de
WWW: http://www.wi-bw.tfh-wildau.de/~pboettch/
_______________________________________________
linux-dvb mailing list
linux-dvb@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb
^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: [linux-dvb] S2API - Status - Thu Sep 11th
2008-09-12 5:51 [linux-dvb] S2API - Status - Thu Sep 11th Steven Toth
` (2 preceding siblings ...)
2008-09-12 9:17 ` [linux-dvb] S2API - Status - Thu Sep 11th Patrick Boettcher
@ 2008-09-12 11:09 ` Hans Werner
3 siblings, 0 replies; 45+ messages in thread
From: Hans Werner @ 2008-09-12 11:09 UTC (permalink / raw)
To: Steven Toth, linux-dvb
> Hans Werner sent a large patch for the multifrontend HVR3000/HVR4000
> combined DVB-T/DVB-S/S2 support for the S2API tree. (Thanks Hans - this
> was obviously a lot of manual merge work, it's greatly appreciated.)
>
> What would everyone like to see happen with this patch?
>
> Would you prefer to see this dealt with outside of the S2API discussion,
> or would you like to see this included and merged? Let me know your
> thoughts. Andreas also has the multifrontend thread running, so comment
> here if you would like to see this as part of the S2API patches, or
> comment on the Andreas thread of you want this as a separate patchset at
> a later date.
Some comments for those who have not been following this story closely. I will
try to keep this S2API-relevant.
The reason for considering adding multifrontend support to S2API is that S2API
will certainly add HVR4000 support, and at that point we need to consider
how to handle the multiple frontends of that card. The multifrontend patch is quite
orthogonal to the S2API changes, both in the sense that it does not interfere with them,
and in the sense that it is quite a different subject from changing the API.
The updates I made bring the patch right up to date so that it can be merged with
the head of the S2API repository. It is quite general -- it can support all multifrontend
cards (not just HVR3000/4000). It has been around for about 18 months when Steve
proposed it. Darron has been maintaining it at dev.kewl.org/hauppauge. I have
used it for 9 months or so with (unmodified) Kaffeine. Darron's method for
supporting DVB-S2 features is replaced by the more general S2API.
In the end what the application sees is (for the HVR4000):
/dev/dvb/adapter0/frontend0: DVB-S/S2
/dev/dvb/adapter0/frontend1: DVB-T
Andreas' thread is the place to discuss exactly how this should work. Anyway
we have here a concrete implementation of one way to do it.
We need to be careful not to confuse the issues to do with the API. The most
important thing is to perfect and debug the design of the S2 API. But I hope
multifrontend support will go in to the kernel when the HVR4000 support is added.
Perhaps we shouldn't be too scared of trying to make progress by putting it in S2API
at the most appropriate point in Steve's development schedule.
Regards,
Hans
--
Release early, release often.
GMX Kostenlose Spiele: Einfach online spielen und Spaß haben mit Pastry Passion!
http://games.entertainment.gmx.net/de/entertainment/games/free/puzzle/6169196
_______________________________________________
linux-dvb mailing list
linux-dvb@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb
^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: [linux-dvb] Siano ISDB
2008-09-12 8:24 ` [linux-dvb] Siano ISDB barry bouwsma
@ 2008-09-12 11:47 ` Uri Shkolnik
0 siblings, 0 replies; 45+ messages in thread
From: Uri Shkolnik @ 2008-09-12 11:47 UTC (permalink / raw)
To: linux-dvb, free_beer_for_all
--- On Fri, 9/12/08, barry bouwsma <free_beer_for_all@yahoo.com> wrote:
> From: barry bouwsma <free_beer_for_all@yahoo.com>
> Subject: Re: [linux-dvb] Siano ISDB
> To: "linux-dvb" <linux-dvb@linuxtv.org>
> Date: Friday, September 12, 2008, 11:24 AM
> --- On Fri, 9/12/08, barry bouwsma
> <free_beer_for_all@yahoo.com> wrote:
>
> > hmmm, looks like I gotta hunt down a firmware too.
>
> Actually, just ignore me. Looks like the SMS1000 chip in
> my
> device doesn't support ISDB (only DAB-related and
> DVB-T-related)
>
> sorry,
> barry bouwsma
>
>
True. SMS10xx doesn't support ISDB-T.
Only 11xx and 12xx support it.
_______________________________________________
linux-dvb mailing list
linux-dvb@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb
^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: [linux-dvb] S2API - Status - Thu Sep 11th
2008-09-12 6:26 ` Christophe Thommeret
@ 2008-09-12 13:18 ` Steven Toth
2008-09-12 13:29 ` Christophe Thommeret
[not found] ` <48CC12BF.7050803@hauppauge.com>
1 sibling, 1 reply; 45+ messages in thread
From: Steven Toth @ 2008-09-12 13:18 UTC (permalink / raw)
To: Christophe Thommeret; +Cc: Steven Toth, linux-dvb
Christophe Thommeret wrote:
> Le Friday 12 September 2008 07:51:17 Steven Toth, vous avez écrit :
>> Hello!
>>
>> More progress today, 7 new patches were merged - all related to the
>> feedback and suggestions we had.... And a bugfix. :)
>>
>> The DTV_SET/GET command syntax has been rationalised, as Hans requested.
>> This cleans up the application API nicely. Various internal improvements
>> and code cleanup related to variable length arrays, moving values
>> to/from userspace to the kernel. Interfacing to the demods to allow them
>> to interact with set/get property requests, if they chose to do so.
>> Quite a lot of changes internally and to the user facing API.
>>
>> If you're planning to test then you'll need the tune-v0.0.5.c to see the
>> different. (steventoth.net/linux/s2/tune-v0.0.5.tgz)
>>
>> In addition, some related news:
>>
>> mkrufky spent some time adding S2API isdb-t support to the siano driver,
>> that's working pretty well - tuning via the S2API app.
>>
>> Two tree here, offering slightly different approaches, one with S2API,
>> one using some spare bits in the DVB-T tuning fields.
>>
>> http://linuxtv.org/hg/~mkrufky/sms1xxx-s2api-isdbt/
>> http://linuxtv.org/hg/~mkrufky/sms1xxx-isdbt-as-dvbt/
>>
>> (See tune-v0.0.5.tgz for example ISDB-T tuning code)
>>
>> If you're interested in seeing the impact of switching to S2API for this
>> driver, see the set_frontend() func, it's a small change - just a few
>> lines to reference the dtv_frontend_properties cache.
>>
>> I don't think we're quite ready to announce we've conquered the complete
>> ISDB-T API, so don't assume that this is concrete.... As we experiment
>> with other ISDB-T products we'll probably find reasons to tweak the API
>> a little further as a standard begins to form..... but tuning through a
>> clean API is a great step forward, and its working now, today. Thank you
>> mkrufky :)
>>
>> Hans Werner sent a large patch for the multifrontend HVR3000/HVR4000
>> combined DVB-T/DVB-S/S2 support for the S2API tree. (Thanks Hans - this
>> was obviously a lot of manual merge work, it's greatly appreciated.)
>>
>> What would everyone like to see happen with this patch?
>>
>> Would you prefer to see this dealt with outside of the S2API discussion,
>> or would you like to see this included and merged? Let me know your
>> thoughts. Andreas also has the multifrontend thread running, so comment
>> here if you would like to see this as part of the S2API patches, or
>> comment on the Andreas thread of you want this as a separate patchset at
>> a later date.
>>
>> Darron Broad has offered to bring the cx24116.c driver up to date with
>> some additions he has in his repositories. With any luck we may see
>> these merged into the current cx24116 driver within a few days. Thank
>> you Darron.
>>
>> Patrick, I haven't looked at your 1.7MHz bandwidth suggestion - I'm open
>> to ideas on how you think we should do this. Take a look at todays
>> linux/dvb/frontend.h and see if these updates help, or whether you need
>> more changes.
>>
>> Igor has been busy patching the szap-s2 tool
>> (http://liplianindvb.sourceforge.net/hg/szap-s2/) so many thanks to
>> Igor! Gregoire has been running some basic tests and appears to be
>> having some success, that's encouraging. Thank you.
>>
>> What's next?
>>
>> Now's probably a good time to start patching dvb-apps. I think the
>> frontend.h changes are close enough for that work to begin. This will
>> probably start Friday, so keep your eyes and open for the
>> stoth/s2api-dvb-apps tree appearing ... and an announcement here.
>>
>> Thanks again to everyone, your efforts are appreciated!
>>
>> Regards,
>>
>> Steve
>
> Good work.
> I've just gave it a try:
>
> First i tried old api (kaffeine)-> everything works as expected.
> Then i tried new API (with latest tune.c) -> nova-t and nova-s work, cinergyT2
> doesn't. I've also noticed that FE_SET_PROPERTY ioctl always return -1, even
> when success..
> Then i tried old api again -> now dvb-s doesn't lock and dvb-t always lock on
> the freq used in tune.c
>
Christophe, thanks for the feedback. I'm not familiar with the cinergyT2
driver so I'll look into this tonight and see what's causing the tuning
to fail.
Thanks for highlighting this.
Regards,
Steve
_______________________________________________
linux-dvb mailing list
linux-dvb@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb
^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: [linux-dvb] S2API - Status - Thu Sep 11th
2008-09-12 13:18 ` Steven Toth
@ 2008-09-12 13:29 ` Christophe Thommeret
2008-09-12 13:31 ` Christophe Thommeret
2008-09-12 14:08 ` Steven Toth
0 siblings, 2 replies; 45+ messages in thread
From: Christophe Thommeret @ 2008-09-12 13:29 UTC (permalink / raw)
To: Steven Toth; +Cc: Steven Toth, linux-dvb
Le Friday 12 September 2008 15:18:38 Steven Toth, vous avez écrit :
> Christophe Thommeret wrote:
> > Le Friday 12 September 2008 07:51:17 Steven Toth, vous avez écrit :
> >> Hello!
> >>
> >> More progress today, 7 new patches were merged - all related to the
> >> feedback and suggestions we had.... And a bugfix. :)
> >>
> >> The DTV_SET/GET command syntax has been rationalised, as Hans requested.
> >> This cleans up the application API nicely. Various internal improvements
> >> and code cleanup related to variable length arrays, moving values
> >> to/from userspace to the kernel. Interfacing to the demods to allow them
> >> to interact with set/get property requests, if they chose to do so.
> >> Quite a lot of changes internally and to the user facing API.
> >>
> >> If you're planning to test then you'll need the tune-v0.0.5.c to see the
> >> different. (steventoth.net/linux/s2/tune-v0.0.5.tgz)
> >>
> >> In addition, some related news:
> >>
> >> mkrufky spent some time adding S2API isdb-t support to the siano driver,
> >> that's working pretty well - tuning via the S2API app.
> >>
> >> Two tree here, offering slightly different approaches, one with S2API,
> >> one using some spare bits in the DVB-T tuning fields.
> >>
> >> http://linuxtv.org/hg/~mkrufky/sms1xxx-s2api-isdbt/
> >> http://linuxtv.org/hg/~mkrufky/sms1xxx-isdbt-as-dvbt/
> >>
> >> (See tune-v0.0.5.tgz for example ISDB-T tuning code)
> >>
> >> If you're interested in seeing the impact of switching to S2API for this
> >> driver, see the set_frontend() func, it's a small change - just a few
> >> lines to reference the dtv_frontend_properties cache.
> >>
> >> I don't think we're quite ready to announce we've conquered the complete
> >> ISDB-T API, so don't assume that this is concrete.... As we experiment
> >> with other ISDB-T products we'll probably find reasons to tweak the API
> >> a little further as a standard begins to form..... but tuning through a
> >> clean API is a great step forward, and its working now, today. Thank you
> >> mkrufky :)
> >>
> >> Hans Werner sent a large patch for the multifrontend HVR3000/HVR4000
> >> combined DVB-T/DVB-S/S2 support for the S2API tree. (Thanks Hans - this
> >> was obviously a lot of manual merge work, it's greatly appreciated.)
> >>
> >> What would everyone like to see happen with this patch?
> >>
> >> Would you prefer to see this dealt with outside of the S2API discussion,
> >> or would you like to see this included and merged? Let me know your
> >> thoughts. Andreas also has the multifrontend thread running, so comment
> >> here if you would like to see this as part of the S2API patches, or
> >> comment on the Andreas thread of you want this as a separate patchset at
> >> a later date.
> >>
> >> Darron Broad has offered to bring the cx24116.c driver up to date with
> >> some additions he has in his repositories. With any luck we may see
> >> these merged into the current cx24116 driver within a few days. Thank
> >> you Darron.
> >>
> >> Patrick, I haven't looked at your 1.7MHz bandwidth suggestion - I'm open
> >> to ideas on how you think we should do this. Take a look at todays
> >> linux/dvb/frontend.h and see if these updates help, or whether you need
> >> more changes.
> >>
> >> Igor has been busy patching the szap-s2 tool
> >> (http://liplianindvb.sourceforge.net/hg/szap-s2/) so many thanks to
> >> Igor! Gregoire has been running some basic tests and appears to be
> >> having some success, that's encouraging. Thank you.
> >>
> >> What's next?
> >>
> >> Now's probably a good time to start patching dvb-apps. I think the
> >> frontend.h changes are close enough for that work to begin. This will
> >> probably start Friday, so keep your eyes and open for the
> >> stoth/s2api-dvb-apps tree appearing ... and an announcement here.
> >>
> >> Thanks again to everyone, your efforts are appreciated!
> >>
> >> Regards,
> >>
> >> Steve
> >
> > Good work.
> > I've just gave it a try:
> >
> > First i tried old api (kaffeine)-> everything works as expected.
> > Then i tried new API (with latest tune.c) -> nova-t and nova-s work,
> > cinergyT2 doesn't. I've also noticed that FE_SET_PROPERTY ioctl always
> > return -1, even when success..
> > Then i tried old api again -> now dvb-s doesn't lock and dvb-t always
> > lock on the freq used in tune.c
>
> Christophe, thanks for the feedback. I'm not familiar with the cinergyT2
> driver so I'll look into this tonight and see what's causing the tuning
> to fail.
>
> Thanks for highlighting this.
As far as i understand, the cinergyT2 driver is a bit unusual, e.g.
dvb_register_frontend is never called (hence no dtv_* log messages). I don't
know if there is others drivers like this, but this has to be investigated
cause rewritting all drivers for S2API could be a bit of work :)
P.S.
I think there is an alternate driver for cinergyT2 actually in developement
but idon't remember where it's located neither its state.
--
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] 45+ messages in thread
* Re: [linux-dvb] S2API - Status - Thu Sep 11th
2008-09-12 13:29 ` Christophe Thommeret
@ 2008-09-12 13:31 ` Christophe Thommeret
2008-09-12 14:08 ` Steven Toth
1 sibling, 0 replies; 45+ messages in thread
From: Christophe Thommeret @ 2008-09-12 13:31 UTC (permalink / raw)
To: Steven Toth; +Cc: Steven Toth, linux-dvb
Le Friday 12 September 2008 15:29:41 Christophe Thommeret, vous avez écrit :
> Le Friday 12 September 2008 15:18:38 Steven Toth, vous avez écrit :
> > Christophe Thommeret wrote:
> > > Le Friday 12 September 2008 07:51:17 Steven Toth, vous avez écrit :
> > >> Hello!
> > >>
> > >> More progress today, 7 new patches were merged - all related to the
> > >> feedback and suggestions we had.... And a bugfix. :)
> > >>
> > >> The DTV_SET/GET command syntax has been rationalised, as Hans
> > >> requested. This cleans up the application API nicely. Various internal
> > >> improvements and code cleanup related to variable length arrays,
> > >> moving values to/from userspace to the kernel. Interfacing to the
> > >> demods to allow them to interact with set/get property requests, if
> > >> they chose to do so. Quite a lot of changes internally and to the user
> > >> facing API.
> > >>
> > >> If you're planning to test then you'll need the tune-v0.0.5.c to see
> > >> the different. (steventoth.net/linux/s2/tune-v0.0.5.tgz)
> > >>
> > >> In addition, some related news:
> > >>
> > >> mkrufky spent some time adding S2API isdb-t support to the siano
> > >> driver, that's working pretty well - tuning via the S2API app.
> > >>
> > >> Two tree here, offering slightly different approaches, one with S2API,
> > >> one using some spare bits in the DVB-T tuning fields.
> > >>
> > >> http://linuxtv.org/hg/~mkrufky/sms1xxx-s2api-isdbt/
> > >> http://linuxtv.org/hg/~mkrufky/sms1xxx-isdbt-as-dvbt/
> > >>
> > >> (See tune-v0.0.5.tgz for example ISDB-T tuning code)
> > >>
> > >> If you're interested in seeing the impact of switching to S2API for
> > >> this driver, see the set_frontend() func, it's a small change - just a
> > >> few lines to reference the dtv_frontend_properties cache.
> > >>
> > >> I don't think we're quite ready to announce we've conquered the
> > >> complete ISDB-T API, so don't assume that this is concrete.... As we
> > >> experiment with other ISDB-T products we'll probably find reasons to
> > >> tweak the API a little further as a standard begins to form..... but
> > >> tuning through a clean API is a great step forward, and its working
> > >> now, today. Thank you mkrufky :)
> > >>
> > >> Hans Werner sent a large patch for the multifrontend HVR3000/HVR4000
> > >> combined DVB-T/DVB-S/S2 support for the S2API tree. (Thanks Hans -
> > >> this was obviously a lot of manual merge work, it's greatly
> > >> appreciated.)
> > >>
> > >> What would everyone like to see happen with this patch?
> > >>
> > >> Would you prefer to see this dealt with outside of the S2API
> > >> discussion, or would you like to see this included and merged? Let me
> > >> know your thoughts. Andreas also has the multifrontend thread running,
> > >> so comment here if you would like to see this as part of the S2API
> > >> patches, or comment on the Andreas thread of you want this as a
> > >> separate patchset at a later date.
> > >>
> > >> Darron Broad has offered to bring the cx24116.c driver up to date with
> > >> some additions he has in his repositories. With any luck we may see
> > >> these merged into the current cx24116 driver within a few days. Thank
> > >> you Darron.
> > >>
> > >> Patrick, I haven't looked at your 1.7MHz bandwidth suggestion - I'm
> > >> open to ideas on how you think we should do this. Take a look at
> > >> todays linux/dvb/frontend.h and see if these updates help, or whether
> > >> you need more changes.
> > >>
> > >> Igor has been busy patching the szap-s2 tool
> > >> (http://liplianindvb.sourceforge.net/hg/szap-s2/) so many thanks to
> > >> Igor! Gregoire has been running some basic tests and appears to be
> > >> having some success, that's encouraging. Thank you.
> > >>
> > >> What's next?
> > >>
> > >> Now's probably a good time to start patching dvb-apps. I think the
> > >> frontend.h changes are close enough for that work to begin. This will
> > >> probably start Friday, so keep your eyes and open for the
> > >> stoth/s2api-dvb-apps tree appearing ... and an announcement here.
> > >>
> > >> Thanks again to everyone, your efforts are appreciated!
> > >>
> > >> Regards,
> > >>
> > >> Steve
> > >
> > > Good work.
> > > I've just gave it a try:
> > >
> > > First i tried old api (kaffeine)-> everything works as expected.
> > > Then i tried new API (with latest tune.c) -> nova-t and nova-s work,
> > > cinergyT2 doesn't. I've also noticed that FE_SET_PROPERTY ioctl always
> > > return -1, even when success..
> > > Then i tried old api again -> now dvb-s doesn't lock and dvb-t always
> > > lock on the freq used in tune.c
Forgot to say that cinergyT2 always work with old api
> >
> > Christophe, thanks for the feedback. I'm not familiar with the cinergyT2
> > driver so I'll look into this tonight and see what's causing the tuning
> > to fail.
> >
> > Thanks for highlighting this.
>
> As far as i understand, the cinergyT2 driver is a bit unusual, e.g.
> dvb_register_frontend is never called (hence no dtv_* log messages). I
> don't know if there is others drivers like this, but this has to be
> investigated cause rewritting all drivers for S2API could be a bit of work
> :)
>
> P.S.
> I think there is an alternate driver for cinergyT2 actually in developement
> but idon't remember where it's located neither its state.
--
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] 45+ messages in thread
* Re: [linux-dvb] Siano ISDB [was: Re: S2API - Status - Thu Sep 11th]
[not found] ` <48CA6BBB.5010802@hauppauge.com>
@ 2008-09-12 13:33 ` barry bouwsma
2008-09-12 14:13 ` Steven Toth
2008-09-12 18:01 ` Michael Krufky
1 sibling, 1 reply; 45+ messages in thread
From: barry bouwsma @ 2008-09-12 13:33 UTC (permalink / raw)
To: Steven Toth; +Cc: linux-dvb
--- On Fri, 9/12/08, Steven Toth <stoth@hauppauge.com> wrote:
> > module parameter `default_mode=5' or =6,
> >
> Correct, that tree expects a module option to load the firmware, you
> might want to check this code snippet in the other tree. The other
> detects the delivery system and reloads the firmware on the fly.
Hey, no fair, I think you're answering questions I'm about
to ask before I can send them!
Oh heck, here's what I wrote a short while ago, just in case...
=-=#=-=#=-=
In looking at the S2API code for the Siano chipsets, I had
a question which I couldn't answer by reading the code.
At present, my card supports DVB-T by default, and I can
load a different firmware to get it to (potentially) support
alternatives, say, DVB-H.
The answer might be blindingly obvious, but I don't see if
this card has the capability of saying, okay, I can give
you DVB-T, or DVB-H, or DAB, or T-DMB... Right now, I spit
DVB-T. Then an application wanting DVB-H would then be able
to initiate a reload of the firmware, and the device would
reappear as a DVB-H device.
The ability to do this firmware switch seems to be present
within the driver, but I'm wondering if the S2API, or indeed
the present APIs, can handle a case like this.
I know that `mplayer' will grab the first available device
of the appropriate standard, while my other applications
pick a fixed adapter number (or more correctly, device by
product). But I can see myself wanting to make both DVB-T
and DAB (eventually) use of this one device, without the
bother of reloading the kernel module to switch.
I did spend the night looking at the old API, and remember
virtually none of it, and the discussion of multifrontend
devices and what they mean has made me wonder about this...
thanks,
barry bouwsma
_______________________________________________
linux-dvb mailing list
linux-dvb@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb
^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: [linux-dvb] S2API - Status - Thu Sep 11th
2008-09-12 9:17 ` [linux-dvb] S2API - Status - Thu Sep 11th Patrick Boettcher
@ 2008-09-12 14:04 ` Steven Toth
2008-09-13 20:02 ` Steven Toth
1 sibling, 0 replies; 45+ messages in thread
From: Steven Toth @ 2008-09-12 14:04 UTC (permalink / raw)
To: Patrick Boettcher; +Cc: Steven Toth, linux-dvb
> Sorry for not integrating this into the frontend_cache yet. But I'm
> really out of time (at work and even at home, working on cx24120) and I
> will not be able to supply the DiBcom ISDB-T demod-driver (which would
> use all that) right now.
>
> thanks for all your efforts,
> Patrick.
Ahh, now I see what you were referring to.
I'll merge this tonight, along with your ISDBT suggestions.
Thanks for helping, much appreciated, regards,
Steve
_______________________________________________
linux-dvb mailing list
linux-dvb@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb
^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: [linux-dvb] S2API - Status - Thu Sep 11th
2008-09-12 13:29 ` Christophe Thommeret
2008-09-12 13:31 ` Christophe Thommeret
@ 2008-09-12 14:08 ` Steven Toth
2008-09-12 15:27 ` Johannes Stezenbach
1 sibling, 1 reply; 45+ messages in thread
From: Steven Toth @ 2008-09-12 14:08 UTC (permalink / raw)
To: Christophe Thommeret; +Cc: Steven Toth, linux-dvb
Christophe Thommeret wrote:
> Le Friday 12 September 2008 15:18:38 Steven Toth, vous avez écrit :
>> Christophe Thommeret wrote:
>>> Le Friday 12 September 2008 07:51:17 Steven Toth, vous avez écrit :
>>>> Hello!
>>>>
>>>> More progress today, 7 new patches were merged - all related to the
>>>> feedback and suggestions we had.... And a bugfix. :)
>>>>
>>>> The DTV_SET/GET command syntax has been rationalised, as Hans requested.
>>>> This cleans up the application API nicely. Various internal improvements
>>>> and code cleanup related to variable length arrays, moving values
>>>> to/from userspace to the kernel. Interfacing to the demods to allow them
>>>> to interact with set/get property requests, if they chose to do so.
>>>> Quite a lot of changes internally and to the user facing API.
>>>>
>>>> If you're planning to test then you'll need the tune-v0.0.5.c to see the
>>>> different. (steventoth.net/linux/s2/tune-v0.0.5.tgz)
>>>>
>>>> In addition, some related news:
>>>>
>>>> mkrufky spent some time adding S2API isdb-t support to the siano driver,
>>>> that's working pretty well - tuning via the S2API app.
>>>>
>>>> Two tree here, offering slightly different approaches, one with S2API,
>>>> one using some spare bits in the DVB-T tuning fields.
>>>>
>>>> http://linuxtv.org/hg/~mkrufky/sms1xxx-s2api-isdbt/
>>>> http://linuxtv.org/hg/~mkrufky/sms1xxx-isdbt-as-dvbt/
>>>>
>>>> (See tune-v0.0.5.tgz for example ISDB-T tuning code)
>>>>
>>>> If you're interested in seeing the impact of switching to S2API for this
>>>> driver, see the set_frontend() func, it's a small change - just a few
>>>> lines to reference the dtv_frontend_properties cache.
>>>>
>>>> I don't think we're quite ready to announce we've conquered the complete
>>>> ISDB-T API, so don't assume that this is concrete.... As we experiment
>>>> with other ISDB-T products we'll probably find reasons to tweak the API
>>>> a little further as a standard begins to form..... but tuning through a
>>>> clean API is a great step forward, and its working now, today. Thank you
>>>> mkrufky :)
>>>>
>>>> Hans Werner sent a large patch for the multifrontend HVR3000/HVR4000
>>>> combined DVB-T/DVB-S/S2 support for the S2API tree. (Thanks Hans - this
>>>> was obviously a lot of manual merge work, it's greatly appreciated.)
>>>>
>>>> What would everyone like to see happen with this patch?
>>>>
>>>> Would you prefer to see this dealt with outside of the S2API discussion,
>>>> or would you like to see this included and merged? Let me know your
>>>> thoughts. Andreas also has the multifrontend thread running, so comment
>>>> here if you would like to see this as part of the S2API patches, or
>>>> comment on the Andreas thread of you want this as a separate patchset at
>>>> a later date.
>>>>
>>>> Darron Broad has offered to bring the cx24116.c driver up to date with
>>>> some additions he has in his repositories. With any luck we may see
>>>> these merged into the current cx24116 driver within a few days. Thank
>>>> you Darron.
>>>>
>>>> Patrick, I haven't looked at your 1.7MHz bandwidth suggestion - I'm open
>>>> to ideas on how you think we should do this. Take a look at todays
>>>> linux/dvb/frontend.h and see if these updates help, or whether you need
>>>> more changes.
>>>>
>>>> Igor has been busy patching the szap-s2 tool
>>>> (http://liplianindvb.sourceforge.net/hg/szap-s2/) so many thanks to
>>>> Igor! Gregoire has been running some basic tests and appears to be
>>>> having some success, that's encouraging. Thank you.
>>>>
>>>> What's next?
>>>>
>>>> Now's probably a good time to start patching dvb-apps. I think the
>>>> frontend.h changes are close enough for that work to begin. This will
>>>> probably start Friday, so keep your eyes and open for the
>>>> stoth/s2api-dvb-apps tree appearing ... and an announcement here.
>>>>
>>>> Thanks again to everyone, your efforts are appreciated!
>>>>
>>>> Regards,
>>>>
>>>> Steve
>>> Good work.
>>> I've just gave it a try:
>>>
>>> First i tried old api (kaffeine)-> everything works as expected.
>>> Then i tried new API (with latest tune.c) -> nova-t and nova-s work,
>>> cinergyT2 doesn't. I've also noticed that FE_SET_PROPERTY ioctl always
>>> return -1, even when success..
>>> Then i tried old api again -> now dvb-s doesn't lock and dvb-t always
>>> lock on the freq used in tune.c
>> Christophe, thanks for the feedback. I'm not familiar with the cinergyT2
>> driver so I'll look into this tonight and see what's causing the tuning
>> to fail.
>>
>> Thanks for highlighting this.
>
> As far as i understand, the cinergyT2 driver is a bit unusual, e.g.
> dvb_register_frontend is never called (hence no dtv_* log messages). I don't
> know if there is others drivers like this, but this has to be investigated
> cause rewritting all drivers for S2API could be a bit of work :)
>
> P.S.
> I think there is an alternate driver for cinergyT2 actually in developement
> but idon't remember where it's located neither its state.
>
>
>
Good to know. (I also saw your followup email). I have zero experience
with the cinergyT2 but the old api should still be working reliably. I
plan to investigate this, sounds like a bug! :)
Regards,
- Steve
_______________________________________________
linux-dvb mailing list
linux-dvb@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb
^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: [linux-dvb] Siano ISDB [was: Re: S2API - Status - Thu Sep 11th]
2008-09-12 13:33 ` [linux-dvb] Siano ISDB [was: Re: S2API - Status - Thu Sep 11th] barry bouwsma
@ 2008-09-12 14:13 ` Steven Toth
2008-09-12 14:38 ` barry bouwsma
0 siblings, 1 reply; 45+ messages in thread
From: Steven Toth @ 2008-09-12 14:13 UTC (permalink / raw)
To: free_beer_for_all; +Cc: Steven Toth, linux-dvb
barry bouwsma wrote:
> --- On Fri, 9/12/08, Steven Toth <stoth@hauppauge.com> wrote:
>
>>> module parameter `default_mode=5' or =6,
>>>
>> Correct, that tree expects a module option to load the firmware, you
>> might want to check this code snippet in the other tree. The other
>> detects the delivery system and reloads the firmware on the fly.
>
> Hey, no fair, I think you're answering questions I'm about
> to ask before I can send them!
:)
>
> Oh heck, here's what I wrote a short while ago, just in case...
>
> =-=#=-=#=-=
>
> In looking at the S2API code for the Siano chipsets, I had
> a question which I couldn't answer by reading the code.
>
> At present, my card supports DVB-T by default, and I can
> load a different firmware to get it to (potentially) support
> alternatives, say, DVB-H.
>
> The answer might be blindingly obvious, but I don't see if
> this card has the capability of saying, okay, I can give
> you DVB-T, or DVB-H, or DAB, or T-DMB... Right now, I spit
> DVB-T. Then an application wanting DVB-H would then be able
> to initiate a reload of the firmware, and the device would
> reappear as a DVB-H device.
>
> The ability to do this firmware switch seems to be present
> within the driver, but I'm wondering if the S2API, or indeed
> the present APIs, can handle a case like this.
The delivery system is present in the tuning cache. Demod drivers who
need these advanced features can check the required delivery type
(c->delivery_system) and decide to load the appropriate firmware to
satisfy the users needs.
That _should_ work today, but the firmware reload in the siano demod was
added late in the evening (thanks mkrufky) so any bugs need to be shaken
out of the demod driver. Prior to this we were only testing the isdb-t
portion.
What's missing now in tune.c is the GET_PROPERTY example code to show
what delivery systems and modulations types these new drivers can support.
>
> I know that `mplayer' will grab the first available device
> of the appropriate standard, while my other applications
> pick a fixed adapter number (or more correctly, device by
> product). But I can see myself wanting to make both DVB-T
> and DAB (eventually) use of this one device, without the
> bother of reloading the kernel module to switch.
>
> I did spend the night looking at the old API, and remember
> virtually none of it, and the discussion of multifrontend
> devices and what they mean has made me wonder about this...
Regards,
Steve
_______________________________________________
linux-dvb mailing list
linux-dvb@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb
^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: [linux-dvb] Siano ISDB [was: Re: S2API - Status - Thu Sep 11th]
2008-09-12 14:13 ` Steven Toth
@ 2008-09-12 14:38 ` barry bouwsma
0 siblings, 0 replies; 45+ messages in thread
From: barry bouwsma @ 2008-09-12 14:38 UTC (permalink / raw)
To: Steven Toth; +Cc: linux-dvb
--- On Fri, 9/12/08, Steven Toth <stoth@linuxtv.org> wrote:
> The delivery system is present in the tuning cache. Demod drivers who
> need these advanced features can check the required delivery type
> (c->delivery_system) and decide to load the appropriate firmware to
> satisfy the users needs.
Sweet. Neat to see how code can be used in practice,
when I haven't the faintest idea how it should be used
when reading it.
> That _should_ work today, but the firmware reload in the siano demod was
> added late in the evening (thanks mkrufky) so any bugs need to be shaken
My only concern, and I hope it's not, 'cuz I can't read
code worth beans, is the time when the device gets the
new firmware, disconnects, and reconnects, that nothing
untoward should happen in this time. But then, I'm only
eyeballing what happens during asynchronous `insmod'
with non-S2API. Gosh -- what if mode=3 for which my
device has no firmware is selected, and the device
reappears as a generic USB device?
Probably I need not worry.
Carry On Coding.
thanks,
barry bouwsma
_______________________________________________
linux-dvb mailing list
linux-dvb@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb
^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: [linux-dvb] S2API - Status - Thu Sep 11th
2008-09-12 14:08 ` Steven Toth
@ 2008-09-12 15:27 ` Johannes Stezenbach
2008-09-12 16:17 ` Steven Toth
0 siblings, 1 reply; 45+ messages in thread
From: Johannes Stezenbach @ 2008-09-12 15:27 UTC (permalink / raw)
To: Steven Toth; +Cc: Steven Toth, linux-dvb
On Fri, Sep 12, 2008, Steven Toth wrote:
> Christophe Thommeret wrote:
> >
> > As far as i understand, the cinergyT2 driver is a bit unusual, e.g.
> > dvb_register_frontend is never called (hence no dtv_* log messages). I don't
> > know if there is others drivers like this, but this has to be investigated
> > cause rewritting all drivers for S2API could be a bit of work :)
> >
> > P.S.
> > I think there is an alternate driver for cinergyT2 actually in developement
> > but idon't remember where it's located neither its state.
>
> Good to know. (I also saw your followup email). I have zero experience
> with the cinergyT2 but the old api should still be working reliably. I
> plan to investigate this, sounds like a bug! :)
Holger was of the opinion that having the demux in dvb-core
was stupid for devices which have no hw demux, so he
programmed around dvb-core. His plan was to add a
mmap-dma-buffers kind of API to the frontend device,
but it never got implemented.
Anyway, it's bad if one driver is different than all the others.
Johannes
_______________________________________________
linux-dvb mailing list
linux-dvb@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb
^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: [linux-dvb] S2API - Status - Thu Sep 11th
2008-09-12 15:27 ` Johannes Stezenbach
@ 2008-09-12 16:17 ` Steven Toth
2008-09-14 16:47 ` Steven Toth
0 siblings, 1 reply; 45+ messages in thread
From: Steven Toth @ 2008-09-12 16:17 UTC (permalink / raw)
To: Johannes Stezenbach; +Cc: Steven Toth, linux-dvb
Johannes Stezenbach wrote:
> On Fri, Sep 12, 2008, Steven Toth wrote:
>> Christophe Thommeret wrote:
>>> As far as i understand, the cinergyT2 driver is a bit unusual, e.g.
>>> dvb_register_frontend is never called (hence no dtv_* log messages). I don't
>>> know if there is others drivers like this, but this has to be investigated
>>> cause rewritting all drivers for S2API could be a bit of work :)
>>>
>>> P.S.
>>> I think there is an alternate driver for cinergyT2 actually in developement
>>> but idon't remember where it's located neither its state.
>> Good to know. (I also saw your followup email). I have zero experience
>> with the cinergyT2 but the old api should still be working reliably. I
>> plan to investigate this, sounds like a bug! :)
>
> Holger was of the opinion that having the demux in dvb-core
> was stupid for devices which have no hw demux, so he
> programmed around dvb-core. His plan was to add a
> mmap-dma-buffers kind of API to the frontend device,
> but it never got implemented.
>
> Anyway, it's bad if one driver is different than all the others.
Hmm, I didn't realize this, good to know.
Now it's peaked my interest, I'll have to look at the code.
The existing API should still work at a bare minimum, if it's not - it
needs to.
- Steve
_______________________________________________
linux-dvb mailing list
linux-dvb@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb
^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: [linux-dvb] Siano ISDB [was: Re: S2API - Status - Thu Sep 11th]
[not found] ` <48CA6BBB.5010802@hauppauge.com>
2008-09-12 13:33 ` [linux-dvb] Siano ISDB [was: Re: S2API - Status - Thu Sep 11th] barry bouwsma
@ 2008-09-12 18:01 ` Michael Krufky
1 sibling, 0 replies; 45+ messages in thread
From: Michael Krufky @ 2008-09-12 18:01 UTC (permalink / raw)
To: Steven Toth; +Cc: linux-dvb
Steven Toth wrote:
> barry bouwsma wrote:
>> --- On Fri, 9/12/08, Steven Toth <stoth@linuxtv.org> wrote:
>>
>>
>>> mkrufky spent some time adding S2API isdb-t support to the siano
>>> driver, that's working pretty well - tuning via the S2API app.
>>>
>>> http://linuxtv.org/hg/~mkrufky/sms1xxx-isdbt-as-dvbt/
>>>
>>
>> Just a first quick feedback, the following will need to be
>> frobbed appropriately:
>>
>> 204 if (id < DEVICE_MODE_DVBT || id >
>> DEVICE_MODE_DVBT_BDA) {
>> 205 sms_err("invalid firmware id specified %d", id);
>> 206 return -EINVAL;
>>
>> In order to enable ISDB modes, one will need to specify
>> module parameter `default_mode=5' or =6, whichever, and,
>> hmmm, looks like I gotta hunt down a firmware too.
>>
>>
> Correct, that tree expects a module option to load the firmware, you
> might want to check this code snippet in the other tree. The other
> detects the delivery system and reloads the firmware on the fly.
Actually, I did not yet push up the auto-firmware load patch -- I saw a
bug here in my tests, so I'll push that one up after I get back and fix it.
-Mike
_______________________________________________
linux-dvb mailing list
linux-dvb@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb
^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: [linux-dvb] S2API - Status - Thu Sep 11th
2008-09-12 9:17 ` [linux-dvb] S2API - Status - Thu Sep 11th Patrick Boettcher
2008-09-12 14:04 ` Steven Toth
@ 2008-09-13 20:02 ` Steven Toth
2008-09-14 12:36 ` Hans Werner
1 sibling, 1 reply; 45+ messages in thread
From: Steven Toth @ 2008-09-13 20:02 UTC (permalink / raw)
To: Patrick Boettcher; +Cc: linux-dvb
Patrick Boettcher wrote:
> Hi Steve,
>
> On Fri, 12 Sep 2008, Steven Toth wrote:
>> Patrick, I haven't looked at your 1.7MHz bandwidth suggestion - I'm open
>> to ideas on how you think we should do this. Take a look at todays
>> linux/dvb/frontend.h and see if these updates help, or whether you need
>> more changes.
>
> I attached a patch which adds a DTV_BANDWIDTH_HZ command. That's all. I
> would like to have the option to pass any bandwidth I want to the frontend.
>
...
>
> Sorry for not integrating this into the frontend_cache yet. But I'm
> really out of time (at work and even at home, working on cx24120) and I
> will not be able to supply the DiBcom ISDB-T demod-driver (which would
> use all that) right now.
Great, thanks, I Merged with minor cleanup of comments.
We should discuss the ISDB specifics at plumbers. The LAYER commands are
not currently implemented and it would be good to understand atleast two
different demodulators so we can abstract their controls into an API -
and avoid any device specifics.
Changes to tune.c (v0.0.6) on steventoth.net/linux/s2
- Steve
_______________________________________________
linux-dvb mailing list
linux-dvb@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb
^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: [linux-dvb] S2API - Status - Thu Sep 11th
2008-09-13 20:02 ` Steven Toth
@ 2008-09-14 12:36 ` Hans Werner
2008-09-14 14:40 ` Steven Toth
0 siblings, 1 reply; 45+ messages in thread
From: Hans Werner @ 2008-09-14 12:36 UTC (permalink / raw)
To: linux-dvb, stoth, darron
> Patrick Boettcher wrote:
> > Hi Steve,
> >
> > On Fri, 12 Sep 2008, Steven Toth wrote:
> >> Patrick, I haven't looked at your 1.7MHz bandwidth suggestion - I'm
> open
> >> to ideas on how you think we should do this. Take a look at todays
> >> linux/dvb/frontend.h and see if these updates help, or whether you need
> >> more changes.
> >
> > I attached a patch which adds a DTV_BANDWIDTH_HZ command. That's all. I
> > would like to have the option to pass any bandwidth I want to the
> frontend.
> >
>
> ...
>
> >
> > Sorry for not integrating this into the frontend_cache yet. But I'm
> > really out of time (at work and even at home, working on cx24120) and I
> > will not be able to supply the DiBcom ISDB-T demod-driver (which would
> > use all that) right now.
>
> Great, thanks, I Merged with minor cleanup of comments.
>
> We should discuss the ISDB specifics at plumbers. The LAYER commands are
> not currently implemented and it would be good to understand atleast two
> different demodulators so we can abstract their controls into an API -
> and avoid any device specifics.
>
> Changes to tune.c (v0.0.6) on steventoth.net/linux/s2
>
> - Steve
The examples in tune 0.0.6 have two extra zeros :
it should be
{ .cmd = DTV_BANDWIDTH_HZ, .u.data = 8000000 },
not
{ .cmd = DTV_BANDWIDTH_HZ, .u.data = 800000000 },
After applying the multifrontend patch I have signal lock working with HVR4000 and
S2API on all three delivery systems:
DVB-T (tune -f 1 option)
and
DVB-S/S2 (tune -f 0 option)
The legacy API works too for DVB-T and DVB-S. Darron has a cx24116 patch which
I needed to apply.
Hans
--
Release early, release often.
GMX Kostenlose Spiele: Einfach online spielen und Spaß haben mit Pastry Passion!
http://games.entertainment.gmx.net/de/entertainment/games/free/puzzle/6169196
_______________________________________________
linux-dvb mailing list
linux-dvb@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb
^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: [linux-dvb] S2API - Status - Thu Sep 11th
2008-09-14 12:36 ` Hans Werner
@ 2008-09-14 14:40 ` Steven Toth
0 siblings, 0 replies; 45+ messages in thread
From: Steven Toth @ 2008-09-14 14:40 UTC (permalink / raw)
To: Hans Werner; +Cc: linux-dvb
Hans Werner wrote:
>> Patrick Boettcher wrote:
>>> Hi Steve,
>>>
>>> On Fri, 12 Sep 2008, Steven Toth wrote:
>>>> Patrick, I haven't looked at your 1.7MHz bandwidth suggestion - I'm
>> open
>>>> to ideas on how you think we should do this. Take a look at todays
>>>> linux/dvb/frontend.h and see if these updates help, or whether you need
>>>> more changes.
>>> I attached a patch which adds a DTV_BANDWIDTH_HZ command. That's all. I
>>> would like to have the option to pass any bandwidth I want to the
>> frontend.
>> ...
>>
>>> Sorry for not integrating this into the frontend_cache yet. But I'm
>>> really out of time (at work and even at home, working on cx24120) and I
>>> will not be able to supply the DiBcom ISDB-T demod-driver (which would
>>> use all that) right now.
>> Great, thanks, I Merged with minor cleanup of comments.
>>
>> We should discuss the ISDB specifics at plumbers. The LAYER commands are
>> not currently implemented and it would be good to understand atleast two
>> different demodulators so we can abstract their controls into an API -
>> and avoid any device specifics.
>>
>> Changes to tune.c (v0.0.6) on steventoth.net/linux/s2
>>
>> - Steve
>
> The examples in tune 0.0.6 have two extra zeros :
>
> it should be
> { .cmd = DTV_BANDWIDTH_HZ, .u.data = 8000000 },
> not
> { .cmd = DTV_BANDWIDTH_HZ, .u.data = 800000000 },
>
> After applying the multifrontend patch I have signal lock working with HVR4000 and
> S2API on all three delivery systems:
> DVB-T (tune -f 1 option)
> and
> DVB-S/S2 (tune -f 0 option)
>
> The legacy API works too for DVB-T and DVB-S. Darron has a cx24116 patch which
> I needed to apply.
Thanks for highlighting this.
Fixed in v0.0.7, available on steventoth.net/linux/s2
- Steve
_______________________________________________
linux-dvb mailing list
linux-dvb@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb
^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: [linux-dvb] S2API - Status - Thu Sep 11th
[not found] ` <48CC12BF.7050803@hauppauge.com>
@ 2008-09-14 14:46 ` Christophe Thommeret
2008-09-14 14:56 ` Christophe Thommeret
2008-09-14 15:01 ` Steven Toth
0 siblings, 2 replies; 45+ messages in thread
From: Christophe Thommeret @ 2008-09-14 14:46 UTC (permalink / raw)
To: linux-dvb@linuxtv.org
Le Saturday 13 September 2008 21:21:35 Steven Toth, vous avez écrit :
> > First i tried old api (kaffeine)-> everything works as expected.
> > Then i tried new API (with latest tune.c) -> nova-t and nova-s work,
> > cinergyT2 doesn't. I've also noticed that FE_SET_PROPERTY ioctl always
> > return -1, even when success..
> > Then i tried old api again -> now dvb-s doesn't lock and dvb-t always
> > lock on the freq used in tune.c
>
> Fixed in the current tree.
Indeed, cache bug is now fixed, old api works as expected in all cases. (Exept
for the cinergyT2 case off course)
However, i see that GETting DTV_DELIVERY_SYSTEM always returns the cached
value, so at first (after modules (re)load) it returns 0. An application
really needs to know the delivery system (and others usefull infos) to be
able to handle a device, like the old api FE_GET_INFO.
--
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] 45+ messages in thread
* Re: [linux-dvb] S2API - Status - Thu Sep 11th
2008-09-14 14:46 ` Christophe Thommeret
@ 2008-09-14 14:56 ` Christophe Thommeret
2008-09-14 16:49 ` Steven Toth
2008-09-14 15:01 ` Steven Toth
1 sibling, 1 reply; 45+ messages in thread
From: Christophe Thommeret @ 2008-09-14 14:56 UTC (permalink / raw)
To: linux-dvb
Le Sunday 14 September 2008 16:46:01 Christophe Thommeret, vous avez écrit :
> (Exept for the cinergyT2 case off course)
Missworded, cinergyT2 has always worked wit old api.
I menat, all devices work now as expected with both old and new api, except
cinergyT2 which only works with old api.
--
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] 45+ messages in thread
* Re: [linux-dvb] S2API - Status - Thu Sep 11th
2008-09-14 14:46 ` Christophe Thommeret
2008-09-14 14:56 ` Christophe Thommeret
@ 2008-09-14 15:01 ` Steven Toth
2008-09-14 15:27 ` Christophe Thommeret
1 sibling, 1 reply; 45+ messages in thread
From: Steven Toth @ 2008-09-14 15:01 UTC (permalink / raw)
To: Christophe Thommeret; +Cc: linux-dvb@linuxtv.org
Christophe Thommeret wrote:
> Le Saturday 13 September 2008 21:21:35 Steven Toth, vous avez écrit :
>>> First i tried old api (kaffeine)-> everything works as expected.
>>> Then i tried new API (with latest tune.c) -> nova-t and nova-s work,
>>> cinergyT2 doesn't. I've also noticed that FE_SET_PROPERTY ioctl always
>>> return -1, even when success..
>>> Then i tried old api again -> now dvb-s doesn't lock and dvb-t always
>>> lock on the freq used in tune.c
>> Fixed in the current tree.
>
> Indeed, cache bug is now fixed, old api works as expected in all cases. (Exept
> for the cinergyT2 case off course)
Speaking of which, I looked at this yesterday. I'll post my feedback
back to Johannes thread, where I said I'd investigate.
>
> However, i see that GETting DTV_DELIVERY_SYSTEM always returns the cached
> value, so at first (after modules (re)load) it returns 0. An application
> really needs to know the delivery system (and others usefull infos) to be
> able to handle a device, like the old api FE_GET_INFO.
>
Yes, talking with Darron we're talking about being able to identify the
existence of the API and capabilities.
We have the DTV_FE_CAPABILITY_COUNT and DTV_FE_CAPABILITY (current
defined but not connected in dvb-core) which would be the natural place
to expose every older (and newer) feature of the demods.
The command you're referring to now does exactly what it's supposed to,
it selects your last SET value (or if the demod has provided a
.get_proeprty() callback), the demod could chose to answer differently.
In principle we could add a one line fix to the cx24116 demod
"c->delivery_system = SYS_DVBS2;" to solve your initial problem - but I
don't that's the correct approach.
When the phase #1 work is done we'll fill out the capabilities changes
in dvb-core and start to expose interesting features, like LNA,
diversity, delivery systems, power controls or anything else that the
linuxtv community thinks is generalized and useful. We will take these
steps carefully.
- Steve
_______________________________________________
linux-dvb mailing list
linux-dvb@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb
^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: [linux-dvb] S2API - Status - Thu Sep 11th
2008-09-14 15:01 ` Steven Toth
@ 2008-09-14 15:27 ` Christophe Thommeret
0 siblings, 0 replies; 45+ messages in thread
From: Christophe Thommeret @ 2008-09-14 15:27 UTC (permalink / raw)
To: Steven Toth; +Cc: linux-dvb@linuxtv.org
Le Sunday 14 September 2008 17:01:49 Steven Toth, vous avez écrit :
> Christophe Thommeret wrote:
> > Le Saturday 13 September 2008 21:21:35 Steven Toth, vous avez écrit :
> >>> First i tried old api (kaffeine)-> everything works as expected.
> >>> Then i tried new API (with latest tune.c) -> nova-t and nova-s work,
> >>> cinergyT2 doesn't. I've also noticed that FE_SET_PROPERTY ioctl always
> >>> return -1, even when success..
> >>> Then i tried old api again -> now dvb-s doesn't lock and dvb-t always
> >>> lock on the freq used in tune.c
> >>
> >> Fixed in the current tree.
> >
> > Indeed, cache bug is now fixed, old api works as expected in all cases.
> > (Exept for the cinergyT2 case off course)
>
> Speaking of which, I looked at this yesterday. I'll post my feedback
> back to Johannes thread, where I said I'd investigate.
>
> > However, i see that GETting DTV_DELIVERY_SYSTEM always returns the cached
> > value, so at first (after modules (re)load) it returns 0. An application
> > really needs to know the delivery system (and others usefull infos) to be
> > able to handle a device, like the old api FE_GET_INFO.
>
> Yes, talking with Darron we're talking about being able to identify the
> existence of the API and capabilities.
>
> We have the DTV_FE_CAPABILITY_COUNT and DTV_FE_CAPABILITY (current
> defined but not connected in dvb-core) which would be the natural place
> to expose every older (and newer) feature of the demods.
>
> The command you're referring to now does exactly what it's supposed to,
> it selects your last SET value (or if the demod has provided a
> .get_proeprty() callback), the demod could chose to answer differently.
> In principle we could add a one line fix to the cx24116 demod
> "c->delivery_system = SYS_DVBS2;" to solve your initial problem - but I
> don't that's the correct approach.
>
> When the phase #1 work is done we'll fill out the capabilities changes
> in dvb-core and start to expose interesting features, like LNA,
> diversity, delivery systems, power controls or anything else that the
> linuxtv community thinks is generalized and useful. We will take these
> steps carefully.
Ok, good.
--
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] 45+ messages in thread
* Re: [linux-dvb] S2API - Status - Thu Sep 11th
2008-09-12 16:17 ` Steven Toth
@ 2008-09-14 16:47 ` Steven Toth
2008-09-14 18:04 ` Christophe Thommeret
0 siblings, 1 reply; 45+ messages in thread
From: Steven Toth @ 2008-09-14 16:47 UTC (permalink / raw)
To: linux-dvb; +Cc: Steven Toth
[-- Attachment #1: Type: text/plain, Size: 2331 bytes --]
Steven Toth wrote:
> Johannes Stezenbach wrote:
>> On Fri, Sep 12, 2008, Steven Toth wrote:
>>> Christophe Thommeret wrote:
>>>> As far as i understand, the cinergyT2 driver is a bit unusual, e.g.
>>>> dvb_register_frontend is never called (hence no dtv_* log messages).
>>>> I don't know if there is others drivers like this, but this has to
>>>> be investigated cause rewritting all drivers for S2API could be a
>>>> bit of work :)
>>>>
>>>> P.S.
>>>> I think there is an alternate driver for cinergyT2 actually in
>>>> developement but idon't remember where it's located neither its state.
>>> Good to know. (I also saw your followup email). I have zero
>>> experience with the cinergyT2 but the old api should still be working
>>> reliably. I plan to investigate this, sounds like a bug! :)
>>
>> Holger was of the opinion that having the demux in dvb-core
>> was stupid for devices which have no hw demux, so he
>> programmed around dvb-core. His plan was to add a
>> mmap-dma-buffers kind of API to the frontend device,
>> but it never got implemented.
>>
>> Anyway, it's bad if one driver is different than all the others.
>
> Hmm, I didn't realize this, good to know.
>
> Now it's peaked my interest, I'll have to look at the code.
>
> The existing API should still work at a bare minimum, if it's not - it
> needs to.
So I looked the the cinergyT2 code, that's a complete eye-opener. It has
it's own ioctl handler, outside of dvb-core.
It's a good news / bad news thing.
The good news is that this driver will not be effected by the S2API
changes, so nothing can break.
The bad news is that this driver will not be effected by the S2API
changes, so it doesn't get the benefit.
Regardless of S2API or multiproto, I see no reason why we shouldn't
bring this driver back into dvb-core.
I don't have a device to test, but here's a patch (0% tested, with bugs
probably) that converts the module back to a regular dvb-core compatible
device, so the S2API would work with this. If anyone wants to test this,
and finds bugs - I won't get back to this driver for a couple of weeks -
so your patches would be welcome. :)
Frankly, is S2API is selected for merge and we have enough users of the
current non-dvb-core driver, I'll probably re-write it from the spec.
So much to do, so little time.
- Steve
[-- Attachment #2: cinergyt2.patch --]
[-- Type: text/plain, Size: 17911 bytes --]
Index: s2/linux/drivers/media/dvb/cinergyT2/cinergyT2.c
===================================================================
--- s2.orig/linux/drivers/media/dvb/cinergyT2/cinergyT2.c 2008-09-14 12:31:34.000000000 -0400
+++ s2/linux/drivers/media/dvb/cinergyT2/cinergyT2.c 2008-09-14 12:40:47.000000000 -0400
@@ -36,6 +36,7 @@
#include "dmxdev.h"
#include "dvb_demux.h"
#include "dvb_net.h"
+#include "dvb_frontend.h"
#ifdef CONFIG_DVB_CINERGYT2_TUNING
#define STREAM_URB_COUNT (CONFIG_DVB_CINERGYT2_STREAM_URB_COUNT)
@@ -103,29 +104,17 @@
uint8_t prev_lock_bits;
} __attribute__((packed));
-static struct dvb_frontend_info cinergyt2_fe_info = {
- .name = DRIVER_NAME,
- .type = FE_OFDM,
- .frequency_min = 174000000,
- .frequency_max = 862000000,
- .frequency_stepsize = 166667,
- .caps = FE_CAN_INVERSION_AUTO | FE_CAN_FEC_1_2 | FE_CAN_FEC_2_3 |
- FE_CAN_FEC_3_4 | FE_CAN_FEC_5_6 | FE_CAN_FEC_7_8 |
- FE_CAN_FEC_AUTO |
- FE_CAN_QPSK | FE_CAN_QAM_16 | FE_CAN_QAM_64 | FE_CAN_QAM_AUTO |
- FE_CAN_TRANSMISSION_MODE_AUTO | FE_CAN_GUARD_INTERVAL_AUTO |
- FE_CAN_HIERARCHY_AUTO | FE_CAN_RECOVER | FE_CAN_MUTE_TS
-};
-
struct cinergyt2 {
struct dvb_demux demux;
struct usb_device *udev;
struct mutex sem;
struct mutex wq_sem;
struct dvb_adapter adapter;
- struct dvb_device *fedev;
struct dmxdev dmxdev;
struct dvb_net dvbnet;
+ struct dvb_frontend *frontend;
+ struct dmx_frontend fe_hw;
+ struct dmx_frontend fe_mem;
int streaming;
int sleeping;
@@ -501,266 +490,208 @@
return tps;
}
-static int cinergyt2_open (struct inode *inode, struct file *file)
+static void cinergyt2_unregister(struct cinergyt2 *cinergyt2)
+{
+ if (cinergyt2->frontend != NULL) {
+ dvb_net_release(&cinergyt2->dvbnet);
+ cinergyt2->demux.dmx.remove_frontend(&cinergyt2->demux.dmx, &cinergyt2->fe_mem);
+ cinergyt2->demux.dmx.remove_frontend(&cinergyt2->demux.dmx, &cinergyt2->fe_hw);
+ dvb_dmxdev_release(&cinergyt2->dmxdev);
+ dvb_dmx_release(&cinergyt2->demux);
+ dvb_unregister_frontend(cinergyt2->frontend);
+ dvb_frontend_detach(cinergyt2->frontend);
+ dvb_unregister_adapter(&cinergyt2->adapter);
+ }
+
+ cinergyt2_free_stream_urbs(cinergyt2);
+ kfree(cinergyt2);
+}
+
+static unsigned int cinergyt2_poll (struct file *file, struct poll_table_struct *wait)
{
struct dvb_device *dvbdev = file->private_data;
struct cinergyt2 *cinergyt2 = dvbdev->priv;
- int err = -EAGAIN;
+ unsigned int mask = 0;
if (cinergyt2->disconnect_pending)
- goto out;
- err = mutex_lock_interruptible(&cinergyt2->wq_sem);
- if (err)
- goto out;
-
- err = mutex_lock_interruptible(&cinergyt2->sem);
- if (err)
- goto out_unlock1;
-
- if ((err = dvb_generic_open(inode, file)))
- goto out_unlock2;
+ return -EAGAIN;
+ if (mutex_lock_interruptible(&cinergyt2->sem))
+ return -ERESTARTSYS;
- if ((file->f_flags & O_ACCMODE) != O_RDONLY) {
- cinergyt2_sleep(cinergyt2, 0);
- schedule_delayed_work(&cinergyt2->query_work, HZ/2);
- }
+ poll_wait(file, &cinergyt2->poll_wq, wait);
- atomic_inc(&cinergyt2->inuse);
+ if (cinergyt2->pending_fe_events != 0)
+ mask |= (POLLIN | POLLRDNORM | POLLPRI);
-out_unlock2:
mutex_unlock(&cinergyt2->sem);
-out_unlock1:
- mutex_unlock(&cinergyt2->wq_sem);
-out:
- return err;
+
+ return mask;
}
-static void cinergyt2_unregister(struct cinergyt2 *cinergyt2)
+static int cinergyt2_read_status(struct dvb_frontend* fe, fe_status_t* status)
{
- dvb_net_release(&cinergyt2->dvbnet);
- dvb_dmxdev_release(&cinergyt2->dmxdev);
- dvb_dmx_release(&cinergyt2->demux);
- dvb_unregister_device(cinergyt2->fedev);
- dvb_unregister_adapter(&cinergyt2->adapter);
+ struct cinergyt2 *cinergyt2 = fe->demodulator_priv;
+ struct dvbt_get_status_msg *s = &cinergyt2->status;
- cinergyt2_free_stream_urbs(cinergyt2);
- kfree(cinergyt2);
+ if (0xffff - le16_to_cpu(s->gain) > 30)
+ *status |= FE_HAS_SIGNAL;
+ if (s->lock_bits & (1 << 6))
+ *status |= FE_HAS_LOCK;
+ if (s->lock_bits & (1 << 5))
+ *status |= FE_HAS_SYNC;
+ if (s->lock_bits & (1 << 4))
+ *status |= FE_HAS_CARRIER;
+ if (s->lock_bits & (1 << 1))
+ *status |= FE_HAS_VITERBI;
+
+ return 0;
}
-static int cinergyt2_release (struct inode *inode, struct file *file)
+static int cinergyt2_read_ber(struct dvb_frontend* fe, u32* ber)
{
- struct dvb_device *dvbdev = file->private_data;
- struct cinergyt2 *cinergyt2 = dvbdev->priv;
+ struct cinergyt2 *cinergyt2 = fe->demodulator_priv;
+ struct dvbt_get_status_msg *s = &cinergyt2->status;
- mutex_lock(&cinergyt2->wq_sem);
+ *ber = s->viterbi_error_rate;
- if (!cinergyt2->disconnect_pending && (file->f_flags & O_ACCMODE) != O_RDONLY) {
- cancel_rearming_delayed_work(&cinergyt2->query_work);
+ return 0;
+}
- mutex_lock(&cinergyt2->sem);
- cinergyt2_sleep(cinergyt2, 1);
- mutex_unlock(&cinergyt2->sem);
- }
+static int cinergyt2_read_signal_strength(struct dvb_frontend* fe, u16* signal_strength)
+{
+ struct cinergyt2 *cinergyt2 = fe->demodulator_priv;
+ struct dvbt_get_status_msg *s = &cinergyt2->status;
- mutex_unlock(&cinergyt2->wq_sem);
+ *signal_strength = 0xffff - le16_to_cpu(s->gain);
- if (atomic_dec_and_test(&cinergyt2->inuse) && cinergyt2->disconnect_pending) {
- warn("delayed unregister in release");
- cinergyt2_unregister(cinergyt2);
- }
+ return 0;
+}
+
+static int cinergyt2_read_snr(struct dvb_frontend* fe, u16* snr)
+{
+ struct cinergyt2 *cinergyt2 = fe->demodulator_priv;
+ struct dvbt_get_status_msg *s = &cinergyt2->status;
- return dvb_generic_release(inode, file);
+ *snr = (s->snr << 8) | s->snr;
+
+ return 0;
}
-static unsigned int cinergyt2_poll (struct file *file, struct poll_table_struct *wait)
+static int cinergyt2_read_ucblocks(struct dvb_frontend* fe, u32* ucblocks)
{
- struct dvb_device *dvbdev = file->private_data;
- struct cinergyt2 *cinergyt2 = dvbdev->priv;
- unsigned int mask = 0;
+ struct cinergyt2 *cinergyt2 = fe->demodulator_priv;
- if (cinergyt2->disconnect_pending)
- return -EAGAIN;
if (mutex_lock_interruptible(&cinergyt2->sem))
return -ERESTARTSYS;
- poll_wait(file, &cinergyt2->poll_wq, wait);
+ *ucblocks = cinergyt2->uncorrected_block_count;
- if (cinergyt2->pending_fe_events != 0)
- mask |= (POLLIN | POLLRDNORM | POLLPRI);
+ cinergyt2->uncorrected_block_count = 0;
mutex_unlock(&cinergyt2->sem);
- return mask;
+ /* UNC are already converted to host byte order... */
+
+ return 0;
}
+static int cinergyt2_get_tune_settings(struct dvb_frontend* fe, struct dvb_frontend_tune_settings *tune)
+{
+ tune->min_delay_ms = 1000;
+ return 0;
+}
-static int cinergyt2_ioctl (struct inode *inode, struct file *file,
- unsigned cmd, unsigned long arg)
+static int cinergyt2_get_frontend(struct dvb_frontend* fe, struct dvb_frontend_parameters *p)
{
- struct dvb_device *dvbdev = file->private_data;
- struct cinergyt2 *cinergyt2 = dvbdev->priv;
- struct dvbt_get_status_msg *stat = &cinergyt2->status;
- fe_status_t status = 0;
+ /* Taken from the previous IOCTL handler */
- switch (cmd) {
- case FE_GET_INFO:
- return copy_to_user((void __user*) arg, &cinergyt2_fe_info,
- sizeof(struct dvb_frontend_info));
-
- case FE_READ_STATUS:
- if (0xffff - le16_to_cpu(stat->gain) > 30)
- status |= FE_HAS_SIGNAL;
- if (stat->lock_bits & (1 << 6))
- status |= FE_HAS_LOCK;
- if (stat->lock_bits & (1 << 5))
- status |= FE_HAS_SYNC;
- if (stat->lock_bits & (1 << 4))
- status |= FE_HAS_CARRIER;
- if (stat->lock_bits & (1 << 1))
- status |= FE_HAS_VITERBI;
-
- return copy_to_user((void __user*) arg, &status, sizeof(status));
-
- case FE_READ_BER:
- return put_user(le32_to_cpu(stat->viterbi_error_rate),
- (__u32 __user *) arg);
-
- case FE_READ_SIGNAL_STRENGTH:
- return put_user(0xffff - le16_to_cpu(stat->gain),
- (__u16 __user *) arg);
-
- case FE_READ_SNR:
- return put_user((stat->snr << 8) | stat->snr,
- (__u16 __user *) arg);
-
- case FE_READ_UNCORRECTED_BLOCKS:
- {
- uint32_t unc_count;
-
- if (mutex_lock_interruptible(&cinergyt2->sem))
- return -ERESTARTSYS;
- unc_count = cinergyt2->uncorrected_block_count;
- cinergyt2->uncorrected_block_count = 0;
- mutex_unlock(&cinergyt2->sem);
-
- /* UNC are already converted to host byte order... */
- return put_user(unc_count,(__u32 __user *) arg);
- }
- case FE_SET_FRONTEND:
- {
- struct dvbt_set_parameters_msg *param = &cinergyt2->param;
- struct dvb_frontend_parameters p;
- int err;
-
- if ((file->f_flags & O_ACCMODE) == O_RDONLY)
- return -EPERM;
-
- if (copy_from_user(&p, (void __user*) arg, sizeof(p)))
- return -EFAULT;
-
- if (cinergyt2->disconnect_pending)
- return -EAGAIN;
- if (mutex_lock_interruptible(&cinergyt2->sem))
- return -ERESTARTSYS;
-
- param->cmd = CINERGYT2_EP1_SET_TUNER_PARAMETERS;
- param->tps = cpu_to_le16(compute_tps(&p));
- param->freq = cpu_to_le32(p.frequency / 1000);
- param->bandwidth = 8 - p.u.ofdm.bandwidth - BANDWIDTH_8_MHZ;
+ /**
+ * trivial to implement (see struct dvbt_get_status_msg).
+ * equivalent to FE_READ ioctls, but needs
+ * TPS -> linux-dvb parameter set conversion. Feel free
+ * to implement this and send us a patch if you need this
+ * functionality.
+ */
- stat->lock_bits = 0;
- cinergyt2->pending_fe_events++;
- wake_up_interruptible(&cinergyt2->poll_wq);
+ return 0;
+}
- err = cinergyt2_command(cinergyt2,
- (char *) param, sizeof(*param),
- NULL, 0);
-
- mutex_unlock(&cinergyt2->sem);
-
- return (err < 0) ? err : 0;
- }
-
- case FE_GET_FRONTEND:
- /**
- * trivial to implement (see struct dvbt_get_status_msg).
- * equivalent to FE_READ ioctls, but needs
- * TPS -> linux-dvb parameter set conversion. Feel free
- * to implement this and send us a patch if you need this
- * functionality.
- */
- break;
-
- case FE_GET_EVENT:
- {
- /**
- * for now we only fill the status field. the parameters
- * are trivial to fill as soon FE_GET_FRONTEND is done.
- */
- struct dvb_frontend_event __user *e = (void __user *) arg;
- if (cinergyt2->pending_fe_events == 0) {
- if (file->f_flags & O_NONBLOCK)
- return -EWOULDBLOCK;
- wait_event_interruptible(cinergyt2->poll_wq,
- cinergyt2->pending_fe_events > 0);
- }
- cinergyt2->pending_fe_events = 0;
- return cinergyt2_ioctl(inode, file, FE_READ_STATUS,
- (unsigned long) &e->status);
- }
+static int cinergyt2_set_frontend(struct dvb_frontend* fe, struct dvb_frontend_parameters *p)
+{
+ struct cinergyt2 *cinergyt2 = fe->demodulator_priv;
+ struct dvbt_get_status_msg *s = &cinergyt2->status;
+ struct dvbt_set_parameters_msg *param = &cinergyt2->param;
+ int err;
- default:
- ;
- }
+ if (cinergyt2->disconnect_pending)
+ return -EAGAIN;
+ if (mutex_lock_interruptible(&cinergyt2->sem))
+ return -ERESTARTSYS;
+
+ param->cmd = CINERGYT2_EP1_SET_TUNER_PARAMETERS;
+ param->tps = cpu_to_le16(compute_tps(p));
+ param->freq = cpu_to_le32(p->frequency / 1000);
+ param->bandwidth = 8 - p->u.ofdm.bandwidth - BANDWIDTH_8_MHZ;
- return -EINVAL;
+ s->lock_bits = 0;
+ cinergyt2->pending_fe_events++;
+ wake_up_interruptible(&cinergyt2->poll_wq);
+
+ err = cinergyt2_command(cinergyt2,
+ (char *) param, sizeof(*param),
+ NULL, 0);
+
+ mutex_unlock(&cinergyt2->sem);
+
+ return (err < 0) ? err : 0;
}
-static int cinergyt2_mmap(struct file *file, struct vm_area_struct *vma)
+static int cinergyt2_fe_init(struct dvb_frontend* fe)
{
- struct dvb_device *dvbdev = file->private_data;
- struct cinergyt2 *cinergyt2 = dvbdev->priv;
- int ret = 0;
+ struct cinergyt2 *cinergyt2 = fe->demodulator_priv;
+ int err = -EAGAIN;
- lock_kernel();
+ if (cinergyt2->disconnect_pending)
+ goto out;
+ err = mutex_lock_interruptible(&cinergyt2->wq_sem);
+ if (err)
+ goto out;
- if (vma->vm_flags & (VM_WRITE | VM_EXEC)) {
- ret = -EPERM;
- goto bailout;
- }
+ err = mutex_lock_interruptible(&cinergyt2->sem);
+ if (err)
+ goto out_unlock1;
- if (vma->vm_end > vma->vm_start + STREAM_URB_COUNT * STREAM_BUF_SIZE) {
- ret = -EINVAL;
- goto bailout;
- }
+ cinergyt2_sleep(cinergyt2, 0);
+ schedule_delayed_work(&cinergyt2->query_work, HZ/2);
- vma->vm_flags |= (VM_IO | VM_DONTCOPY);
- vma->vm_file = file;
+ atomic_inc(&cinergyt2->inuse);
- ret = remap_pfn_range(vma, vma->vm_start,
- virt_to_phys(cinergyt2->streambuf) >> PAGE_SHIFT,
- vma->vm_end - vma->vm_start,
- vma->vm_page_prot) ? -EAGAIN : 0;
-bailout:
- unlock_kernel();
- return ret;
+ mutex_unlock(&cinergyt2->sem);
+out_unlock1:
+ mutex_unlock(&cinergyt2->wq_sem);
+out:
+ return err;
}
-static struct file_operations cinergyt2_fops = {
- .owner = THIS_MODULE,
- .ioctl = cinergyt2_ioctl,
- .poll = cinergyt2_poll,
- .open = cinergyt2_open,
- .release = cinergyt2_release,
- .mmap = cinergyt2_mmap
-};
+static void cinergyt2_release(struct dvb_frontend* fe)
+{
+ struct cinergyt2 *cinergyt2 = fe->demodulator_priv;
-static struct dvb_device cinergyt2_fe_template = {
- .users = ~0,
- .writers = 1,
- .readers = (~0)-1,
- .fops = &cinergyt2_fops
-};
+ mutex_lock(&cinergyt2->wq_sem);
+
+ cancel_rearming_delayed_work(&cinergyt2->query_work);
+
+ mutex_lock(&cinergyt2->sem);
+ cinergyt2_sleep(cinergyt2, 1);
+ mutex_unlock(&cinergyt2->sem);
+
+ mutex_unlock(&cinergyt2->wq_sem);
+
+ if (atomic_dec_and_test(&cinergyt2->inuse) && cinergyt2->disconnect_pending) {
+ warn("delayed unregister in release");
+ cinergyt2_unregister(cinergyt2);
+ }
+}
#ifdef ENABLE_RC
@@ -956,6 +887,8 @@
mutex_unlock(&cinergyt2->sem);
}
+static struct dvb_frontend_ops cinergyt2_fe_ops;
+
static int cinergyt2_probe (struct usb_interface *intf,
const struct usb_device_id *id)
{
@@ -995,6 +928,15 @@
return err;
}
+ /* register frontend */
+ cinergyt2->adapter.priv = cinergyt2;
+ err = dvb_register_frontend(&cinergyt2->adapter, cinergyt2->frontend);
+ if (err < 0) {
+ printk(KERN_ERR "%s: dvb_register_frontend failed "
+ "(errno = %d)\n", DRIVER_NAME, err);
+ goto fail_frontend;
+ }
+
cinergyt2->demux.priv = cinergyt2;
cinergyt2->demux.filternum = 256;
cinergyt2->demux.feednum = 256;
@@ -1006,7 +948,7 @@
if ((err = dvb_dmx_init(&cinergyt2->demux)) < 0) {
dprintk(1, "dvb_dmx_init() failed (err = %d)\n", err);
- goto bailout;
+ goto fail_dmx;
}
cinergyt2->dmxdev.filternum = cinergyt2->demux.filternum;
@@ -1015,26 +957,60 @@
if ((err = dvb_dmxdev_init(&cinergyt2->dmxdev, &cinergyt2->adapter)) < 0) {
dprintk(1, "dvb_dmxdev_init() failed (err = %d)\n", err);
- goto bailout;
+ goto fail_dmxdev;
}
+ cinergyt2->fe_hw.source = DMX_FRONTEND_0;
+ err = cinergyt2->demux.dmx.add_frontend(&cinergyt2->demux.dmx, &cinergyt2->fe_hw);
+ if (err < 0) {
+ printk(KERN_ERR "%s: add_frontend failed "
+ "(DMX_FRONTEND_0, errno = %d)\n", DRIVER_NAME, err);
+ goto fail_fe_hw;
+ }
+
+ cinergyt2->fe_mem.source = DMX_MEMORY_FE;
+ err = cinergyt2->demux.dmx.add_frontend(&cinergyt2->demux.dmx, &cinergyt2->fe_mem);
+ if (err < 0) {
+ printk(KERN_ERR "%s: add_frontend failed "
+ "(DMX_MEMORY_FE, errno = %d)\n", DRIVER_NAME, err);
+ goto fail_fe_mem;
+ }
+
+ err = cinergyt2->demux.dmx.connect_frontend(&cinergyt2->demux.dmx, &cinergyt2->fe_hw);
+ if (err < 0) {
+ printk(KERN_ERR "%s: connect_frontend failed (errno = %d)\n",
+ DRIVER_NAME, err);
+ goto fail_fe_conn;
+ }
+
+ /* Attach the DVB frontend */
+ memcpy(&cinergyt2->frontend->ops, &cinergyt2_fe_ops, sizeof(struct dvb_frontend_ops));
+ cinergyt2->frontend->demodulator_priv = cinergyt2;
+
if (dvb_net_init(&cinergyt2->adapter, &cinergyt2->dvbnet, &cinergyt2->demux.dmx))
+ /* ST- Why wouldn't this be mandatory failure? */
dprintk(1, "dvb_net_init() failed!\n");
- dvb_register_device(&cinergyt2->adapter, &cinergyt2->fedev,
- &cinergyt2_fe_template, cinergyt2,
- DVB_DEVICE_FRONTEND);
-
err = cinergyt2_register_rc(cinergyt2);
if (err)
- goto bailout;
+ goto fail_net;
return 0;
-bailout:
+fail_net:
dvb_net_release(&cinergyt2->dvbnet);
+fail_fe_conn:
+ cinergyt2->demux.dmx.remove_frontend(&cinergyt2->demux.dmx, &cinergyt2->fe_mem);
+fail_fe_mem:
+ cinergyt2->demux.dmx.remove_frontend(&cinergyt2->demux.dmx, &cinergyt2->fe_hw);
+fail_fe_hw:
dvb_dmxdev_release(&cinergyt2->dmxdev);
+fail_dmxdev:
dvb_dmx_release(&cinergyt2->demux);
+fail_dmx:
+ dvb_unregister_frontend(cinergyt2->frontend);
+fail_frontend:
+ dvb_frontend_detach(cinergyt2->frontend);
dvb_unregister_adapter(&cinergyt2->adapter);
cinergyt2_free_stream_urbs(cinergyt2);
kfree(cinergyt2);
@@ -1119,6 +1095,37 @@
MODULE_DEVICE_TABLE(usb, cinergyt2_table);
+static struct dvb_frontend_ops cinergyt2_fe_ops = {
+
+ .info = {
+ .name = DRIVER_NAME,
+ .type = FE_OFDM,
+ .frequency_min = 174000000,
+ .frequency_max = 862000000,
+ .frequency_stepsize = 166667,
+ .caps = FE_CAN_INVERSION_AUTO | FE_CAN_FEC_1_2 | FE_CAN_FEC_2_3 |
+ FE_CAN_FEC_3_4 | FE_CAN_FEC_5_6 | FE_CAN_FEC_7_8 |
+ FE_CAN_FEC_AUTO |
+ FE_CAN_QPSK | FE_CAN_QAM_16 | FE_CAN_QAM_64 | FE_CAN_QAM_AUTO |
+ FE_CAN_TRANSMISSION_MODE_AUTO | FE_CAN_GUARD_INTERVAL_AUTO |
+ FE_CAN_HIERARCHY_AUTO | FE_CAN_RECOVER | FE_CAN_MUTE_TS
+ },
+
+ .release = cinergyt2_release,
+
+ .init = cinergyt2_fe_init,
+
+ .set_frontend = cinergyt2_set_frontend,
+ .get_frontend = cinergyt2_get_frontend,
+ .get_tune_settings = cinergyt2_get_tune_settings,
+
+ .read_status = cinergyt2_read_status,
+ .read_ber = cinergyt2_read_ber,
+ .read_signal_strength = cinergyt2_read_signal_strength,
+ .read_snr = cinergyt2_read_snr,
+ .read_ucblocks = cinergyt2_read_ucblocks,
+};
+
static struct usb_driver cinergyt2_driver = {
.name = "cinergyT2",
.probe = cinergyt2_probe,
[-- 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] 45+ messages in thread
* Re: [linux-dvb] S2API - Status - Thu Sep 11th
2008-09-14 14:56 ` Christophe Thommeret
@ 2008-09-14 16:49 ` Steven Toth
0 siblings, 0 replies; 45+ messages in thread
From: Steven Toth @ 2008-09-14 16:49 UTC (permalink / raw)
To: Christophe Thommeret; +Cc: linux-dvb
Christophe Thommeret wrote:
> Le Sunday 14 September 2008 16:46:01 Christophe Thommeret, vous avez écrit :
>
>> (Exept for the cinergyT2 case off course)
> Missworded, cinergyT2 has always worked wit old api.
> I menat, all devices work now as expected with both old and new api, except
> cinergyT2 which only works with old api.
>
I understood what you meant, but thanks for clarifying.
I posted a patch to the list a few mins ago. If S2API is accept we'll
debug the patch and get the device withing with the new API. It's an old
driver (2004) but it's still being used.... it should probably come back
to dvb-core unless anyone has significant reasons why it should not.
Thanks,
- Steve
_______________________________________________
linux-dvb mailing list
linux-dvb@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb
^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: [linux-dvb] S2API - Status - Thu Sep 11th
2008-09-14 16:47 ` Steven Toth
@ 2008-09-14 18:04 ` Christophe Thommeret
2008-09-15 2:14 ` Christophe Thommeret
0 siblings, 1 reply; 45+ messages in thread
From: Christophe Thommeret @ 2008-09-14 18:04 UTC (permalink / raw)
To: Steven Toth; +Cc: Steven Toth, linux-dvb
Le Sunday 14 September 2008 18:47:00 Steven Toth, vous avez écrit :
> Steven Toth wrote:
> > Johannes Stezenbach wrote:
> >> On Fri, Sep 12, 2008, Steven Toth wrote:
> >>> Christophe Thommeret wrote:
> >>>> As far as i understand, the cinergyT2 driver is a bit unusual, e.g.
> >>>> dvb_register_frontend is never called (hence no dtv_* log messages).
> >>>> I don't know if there is others drivers like this, but this has to
> >>>> be investigated cause rewritting all drivers for S2API could be a
> >>>> bit of work :)
> >>>>
> >>>> P.S.
> >>>> I think there is an alternate driver for cinergyT2 actually in
> >>>> developement but idon't remember where it's located neither its state.
> >>>
> >>> Good to know. (I also saw your followup email). I have zero
> >>> experience with the cinergyT2 but the old api should still be working
> >>> reliably. I plan to investigate this, sounds like a bug! :)
> >>
> >> Holger was of the opinion that having the demux in dvb-core
> >> was stupid for devices which have no hw demux, so he
> >> programmed around dvb-core. His plan was to add a
> >> mmap-dma-buffers kind of API to the frontend device,
> >> but it never got implemented.
> >>
> >> Anyway, it's bad if one driver is different than all the others.
> >
> > Hmm, I didn't realize this, good to know.
> >
> > Now it's peaked my interest, I'll have to look at the code.
> >
> > The existing API should still work at a bare minimum, if it's not - it
> > needs to.
>
> So I looked the the cinergyT2 code, that's a complete eye-opener. It has
> it's own ioctl handler, outside of dvb-core.
>
> It's a good news / bad news thing.
>
> The good news is that this driver will not be effected by the S2API
> changes, so nothing can break.
>
> The bad news is that this driver will not be effected by the S2API
> changes, so it doesn't get the benefit.
>
> Regardless of S2API or multiproto, I see no reason why we shouldn't
> bring this driver back into dvb-core.
>
> I don't have a device to test, but here's a patch (0% tested, with bugs
> probably) that converts the module back to a regular dvb-core compatible
> device, so the S2API would work with this. If anyone wants to test this,
> and finds bugs - I won't get back to this driver for a couple of weeks -
> so your patches would be welcome. :)
>
> Frankly, is S2API is selected for merge and we have enough users of the
> current non-dvb-core driver, I'll probably re-write it from the spec.
>
> So much to do, so little time.
>
> - Steve
Steve,
as you expected, it's abit buggy and crashes at load ;)
i've searched for the alternative cinergyT2 driver.
it's available at: http://linuxtv.org/hg/~tmerle/cinergyT2/
haven't tried it yet but will do (at least several people seems to have it
working).
--
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] 45+ messages in thread
* Re: [linux-dvb] S2API - Status - Thu Sep 11th
2008-09-14 18:04 ` Christophe Thommeret
@ 2008-09-15 2:14 ` Christophe Thommeret
2008-09-15 3:17 ` Steven Toth
2008-09-15 11:43 ` [linux-dvb] S2API - Status - Thu Sep 11th Johannes Stezenbach
0 siblings, 2 replies; 45+ messages in thread
From: Christophe Thommeret @ 2008-09-15 2:14 UTC (permalink / raw)
To: linux-dvb; +Cc: Steven Toth
Le Sunday 14 September 2008 20:04:06 Christophe Thommeret, vous avez écrit :
> Le Sunday 14 September 2008 18:47:00 Steven Toth, vous avez écrit :
> > Steven Toth wrote:
> > > Johannes Stezenbach wrote:
> > >> On Fri, Sep 12, 2008, Steven Toth wrote:
> > >>> Christophe Thommeret wrote:
> > >>>> As far as i understand, the cinergyT2 driver is a bit unusual, e.g.
> > >>>> dvb_register_frontend is never called (hence no dtv_* log messages).
> > >>>> I don't know if there is others drivers like this, but this has to
> > >>>> be investigated cause rewritting all drivers for S2API could be a
> > >>>> bit of work :)
> > >>>>
> > >>>> P.S.
> > >>>> I think there is an alternate driver for cinergyT2 actually in
> > >>>> developement but idon't remember where it's located neither its
> > >>>> state.
> > >>>
> > >>> Good to know. (I also saw your followup email). I have zero
> > >>> experience with the cinergyT2 but the old api should still be working
> > >>> reliably. I plan to investigate this, sounds like a bug! :)
> > >>
> > >> Holger was of the opinion that having the demux in dvb-core
> > >> was stupid for devices which have no hw demux, so he
> > >> programmed around dvb-core. His plan was to add a
> > >> mmap-dma-buffers kind of API to the frontend device,
> > >> but it never got implemented.
> > >>
> > >> Anyway, it's bad if one driver is different than all the others.
> > >
> > > Hmm, I didn't realize this, good to know.
> > >
> > > Now it's peaked my interest, I'll have to look at the code.
> > >
> > > The existing API should still work at a bare minimum, if it's not - it
> > > needs to.
> >
> > So I looked the the cinergyT2 code, that's a complete eye-opener. It has
> > it's own ioctl handler, outside of dvb-core.
> >
> > It's a good news / bad news thing.
> >
> > The good news is that this driver will not be effected by the S2API
> > changes, so nothing can break.
> >
> > The bad news is that this driver will not be effected by the S2API
> > changes, so it doesn't get the benefit.
> >
> > Regardless of S2API or multiproto, I see no reason why we shouldn't
> > bring this driver back into dvb-core.
> >
> > I don't have a device to test, but here's a patch (0% tested, with bugs
> > probably) that converts the module back to a regular dvb-core compatible
> > device, so the S2API would work with this. If anyone wants to test this,
> > and finds bugs - I won't get back to this driver for a couple of weeks -
> > so your patches would be welcome. :)
> >
> > Frankly, is S2API is selected for merge and we have enough users of the
> > current non-dvb-core driver, I'll probably re-write it from the spec.
> >
> > So much to do, so little time.
> >
> > - Steve
>
> Steve,
>
> as you expected, it's abit buggy and crashes at load ;)
> i've searched for the alternative cinergyT2 driver.
> it's available at: http://linuxtv.org/hg/~tmerle/cinergyT2/
>
> haven't tried it yet but will do (at least several people seems to have it
> working).
Have it working, not as good as Holger' one (often fails to lock) but it
works, with both old and new api.
So, one problem less :)
--
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] 45+ messages in thread
* Re: [linux-dvb] S2API - Status - Thu Sep 11th
2008-09-15 2:14 ` Christophe Thommeret
@ 2008-09-15 3:17 ` Steven Toth
2008-09-15 17:08 ` Igor M. Liplianin
2008-09-15 11:43 ` [linux-dvb] S2API - Status - Thu Sep 11th Johannes Stezenbach
1 sibling, 1 reply; 45+ messages in thread
From: Steven Toth @ 2008-09-15 3:17 UTC (permalink / raw)
To: Christophe Thommeret; +Cc: Steven Toth, linux-dvb
Christophe Thommeret wrote:
> Le Sunday 14 September 2008 20:04:06 Christophe Thommeret, vous avez écrit :
>> Le Sunday 14 September 2008 18:47:00 Steven Toth, vous avez écrit :
>>> Steven Toth wrote:
>>>> Johannes Stezenbach wrote:
>>>>> On Fri, Sep 12, 2008, Steven Toth wrote:
>>>>>> Christophe Thommeret wrote:
>>>>>>> As far as i understand, the cinergyT2 driver is a bit unusual, e.g.
>>>>>>> dvb_register_frontend is never called (hence no dtv_* log messages).
>>>>>>> I don't know if there is others drivers like this, but this has to
>>>>>>> be investigated cause rewritting all drivers for S2API could be a
>>>>>>> bit of work :)
>>>>>>>
>>>>>>> P.S.
>>>>>>> I think there is an alternate driver for cinergyT2 actually in
>>>>>>> developement but idon't remember where it's located neither its
>>>>>>> state.
>>>>>> Good to know. (I also saw your followup email). I have zero
>>>>>> experience with the cinergyT2 but the old api should still be working
>>>>>> reliably. I plan to investigate this, sounds like a bug! :)
>>>>> Holger was of the opinion that having the demux in dvb-core
>>>>> was stupid for devices which have no hw demux, so he
>>>>> programmed around dvb-core. His plan was to add a
>>>>> mmap-dma-buffers kind of API to the frontend device,
>>>>> but it never got implemented.
>>>>>
>>>>> Anyway, it's bad if one driver is different than all the others.
>>>> Hmm, I didn't realize this, good to know.
>>>>
>>>> Now it's peaked my interest, I'll have to look at the code.
>>>>
>>>> The existing API should still work at a bare minimum, if it's not - it
>>>> needs to.
>>> So I looked the the cinergyT2 code, that's a complete eye-opener. It has
>>> it's own ioctl handler, outside of dvb-core.
>>>
>>> It's a good news / bad news thing.
>>>
>>> The good news is that this driver will not be effected by the S2API
>>> changes, so nothing can break.
>>>
>>> The bad news is that this driver will not be effected by the S2API
>>> changes, so it doesn't get the benefit.
>>>
>>> Regardless of S2API or multiproto, I see no reason why we shouldn't
>>> bring this driver back into dvb-core.
>>>
>>> I don't have a device to test, but here's a patch (0% tested, with bugs
>>> probably) that converts the module back to a regular dvb-core compatible
>>> device, so the S2API would work with this. If anyone wants to test this,
>>> and finds bugs - I won't get back to this driver for a couple of weeks -
>>> so your patches would be welcome. :)
>>>
>>> Frankly, is S2API is selected for merge and we have enough users of the
>>> current non-dvb-core driver, I'll probably re-write it from the spec.
>>>
>>> So much to do, so little time.
>>>
>>> - Steve
>> Steve,
>>
>> as you expected, it's abit buggy and crashes at load ;)
>> i've searched for the alternative cinergyT2 driver.
>> it's available at: http://linuxtv.org/hg/~tmerle/cinergyT2/
>>
>> haven't tried it yet but will do (at least several people seems to have it
>> working).
>
> Have it working, not as good as Holger' one (often fails to lock) but it
> works, with both old and new api.
> So, one problem less :)
>
Good to know Christophe, thanks.
- Steve
_______________________________________________
linux-dvb mailing list
linux-dvb@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb
^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: [linux-dvb] S2API - Status - Thu Sep 11th
2008-09-15 2:14 ` Christophe Thommeret
2008-09-15 3:17 ` Steven Toth
@ 2008-09-15 11:43 ` Johannes Stezenbach
2008-09-16 2:58 ` Christophe Thommeret
1 sibling, 1 reply; 45+ messages in thread
From: Johannes Stezenbach @ 2008-09-15 11:43 UTC (permalink / raw)
To: Christophe Thommeret; +Cc: Steven Toth, linux-dvb
On Mon, Sep 15, 2008, Christophe Thommeret wrote:
> Le Sunday 14 September 2008 20:04:06 Christophe Thommeret, vous avez écrit :
> >
> > as you expected, it's abit buggy and crashes at load ;)
> > i've searched for the alternative cinergyT2 driver.
> > it's available at: http://linuxtv.org/hg/~tmerle/cinergyT2/
> >
> > haven't tried it yet but will do (at least several people seems to have it
> > working).
>
> Have it working, not as good as Holger' one (often fails to lock) but it
> works, with both old and new api.
Looking at the code, cinergyt2_fe_get_tune_settings() should
probably set step_size = max_drift = 0 to defeat
dvb_frontend_swzigzag_autotune().
c.f. mt352_get_tune_settings()
HTH,
Johannes
_______________________________________________
linux-dvb mailing list
linux-dvb@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb
^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: [linux-dvb] S2API - Status - Thu Sep 11th
2008-09-15 3:17 ` Steven Toth
@ 2008-09-15 17:08 ` Igor M. Liplianin
2008-09-15 20:02 ` Gregoire Favre
[not found] ` <48CE9E22.9060405@hauppauge.com>
0 siblings, 2 replies; 45+ messages in thread
From: Igor M. Liplianin @ 2008-09-15 17:08 UTC (permalink / raw)
To: linux-dvb; +Cc: Steven Toth
В сообщении от 15 September 2008 06:17:02 Steven Toth написал(а):
> Christophe Thommeret wrote:
> > Le Sunday 14 September 2008 20:04:06 Christophe Thommeret, vous avez
Иcrit :
> >> Le Sunday 14 September 2008 18:47:00 Steven Toth, vous avez Иcrit :
> >>> Steven Toth wrote:
> >>>> Johannes Stezenbach wrote:
> >>>>> On Fri, Sep 12, 2008, Steven Toth wrote:
> >>>>>> Christophe Thommeret wrote:
> >>>>>>> As far as i understand, the cinergyT2 driver is a bit unusual,
> >>>>>>> e.g. dvb_register_frontend is never called (hence no dtv_* log
> >>>>>>> messages). I don't know if there is others drivers like this, but
> >>>>>>> this has to be investigated cause rewritting all drivers for S2API
> >>>>>>> could be a bit of work :)
> >>>>>>>
> >>>>>>> P.S.
> >>>>>>> I think there is an alternate driver for cinergyT2 actually in
> >>>>>>> developement but idon't remember where it's located neither its
> >>>>>>> state.
> >>>>>>
> >>>>>> Good to know. (I also saw your followup email). I have zero
> >>>>>> experience with the cinergyT2 but the old api should still be
> >>>>>> working reliably. I plan to investigate this, sounds like a bug! :)
> >>>>>
> >>>>> Holger was of the opinion that having the demux in dvb-core
> >>>>> was stupid for devices which have no hw demux, so he
> >>>>> programmed around dvb-core. His plan was to add a
> >>>>> mmap-dma-buffers kind of API to the frontend device,
> >>>>> but it never got implemented.
> >>>>>
> >>>>> Anyway, it's bad if one driver is different than all the others.
> >>>>
> >>>> Hmm, I didn't realize this, good to know.
> >>>>
> >>>> Now it's peaked my interest, I'll have to look at the code.
> >>>>
> >>>> The existing API should still work at a bare minimum, if it's not - it
> >>>> needs to.
> >>>
> >>> So I looked the the cinergyT2 code, that's a complete eye-opener. It
> >>> has it's own ioctl handler, outside of dvb-core.
> >>>
> >>> It's a good news / bad news thing.
> >>>
> >>> The good news is that this driver will not be effected by the S2API
> >>> changes, so nothing can break.
> >>>
> >>> The bad news is that this driver will not be effected by the S2API
> >>> changes, so it doesn't get the benefit.
> >>>
> >>> Regardless of S2API or multiproto, I see no reason why we shouldn't
> >>> bring this driver back into dvb-core.
> >>>
> >>> I don't have a device to test, but here's a patch (0% tested, with bugs
> >>> probably) that converts the module back to a regular dvb-core
> >>> compatible device, so the S2API would work with this. If anyone wants
> >>> to test this, and finds bugs - I won't get back to this driver for a
> >>> couple of weeks - so your patches would be welcome. :)
> >>>
> >>> Frankly, is S2API is selected for merge and we have enough users of the
> >>> current non-dvb-core driver, I'll probably re-write it from the spec.
> >>>
> >>> So much to do, so little time.
> >>>
> >>> - Steve
> >>
> >> Steve,
> >>
> >> as you expected, it's abit buggy and crashes at load ;)
> >> i've searched for the alternative cinergyT2 driver.
> >> it's available at: http://linuxtv.org/hg/~tmerle/cinergyT2/
> >>
> >> haven't tried it yet but will do (at least several people seems to have
> >> it working).
> >
> > Have it working, not as good as Holger' one (often fails to lock) but it
> > works, with both old and new api.
> > So, one problem less :)
>
> Good to know Christophe, thanks.
>
> - Steve
>
>
> _______________________________________________
> linux-dvb mailing list
> linux-dvb@linuxtv.org
> http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb
I am working on stv0288 and si2107/08/09/10 frontends
and stb6000 silicon tuner to bring the code in S2 tree.
This is a lot of work with checkpatch.pl !
Though drivers already works.
Igor M. Liplianin
_______________________________________________
linux-dvb mailing list
linux-dvb@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb
^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: [linux-dvb] S2API - Status - Thu Sep 11th
2008-09-15 17:08 ` Igor M. Liplianin
@ 2008-09-15 20:02 ` Gregoire Favre
2008-09-15 20:14 ` Igor M. Liplianin
[not found] ` <48CE9E22.9060405@hauppauge.com>
1 sibling, 1 reply; 45+ messages in thread
From: Gregoire Favre @ 2008-09-15 20:02 UTC (permalink / raw)
To: Igor M. Liplianin; +Cc: Steven Toth, linux-dvb
Hello,
today I checked my twelve diseqc/lnb possibily I have (3 sat, hi/low,
v/h) and my HVR-4000 got lock on all with szap-s2 from Igor M. Liplianin
with the S2 API :-)
--
Grégoire FAVRE http://gregoire.favre.googlepages.com http://www.gnupg.org
http://picasaweb.google.com/Gregoire.Favre
_______________________________________________
linux-dvb mailing list
linux-dvb@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb
^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: [linux-dvb] S2API - Status - Thu Sep 11th
2008-09-15 20:02 ` Gregoire Favre
@ 2008-09-15 20:14 ` Igor M. Liplianin
0 siblings, 0 replies; 45+ messages in thread
From: Igor M. Liplianin @ 2008-09-15 20:14 UTC (permalink / raw)
To: Gregoire Favre; +Cc: Steven Toth, linux-dvb
В сообщении от 15 September 2008 23:02:48 Gregoire Favre написал(а):
> Hello,
>
> today I checked my twelve diseqc/lnb possibily I have (3 sat, hi/low,
> v/h) and my HVR-4000 got lock on all with szap-s2 from Igor M. Liplianin
> with the S2 API :-)
Great!
It is like holiday for me.
--
Igor M. Liplianin
_______________________________________________
linux-dvb mailing list
linux-dvb@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb
^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: [linux-dvb] S2API - Status - Thu Sep 11th
2008-09-15 11:43 ` [linux-dvb] S2API - Status - Thu Sep 11th Johannes Stezenbach
@ 2008-09-16 2:58 ` Christophe Thommeret
2008-09-16 21:24 ` Johannes Stezenbach
0 siblings, 1 reply; 45+ messages in thread
From: Christophe Thommeret @ 2008-09-16 2:58 UTC (permalink / raw)
To: Johannes Stezenbach; +Cc: linux-dvb
Le Monday 15 September 2008 13:43:00 Johannes Stezenbach, vous avez écrit :
> On Mon, Sep 15, 2008, Christophe Thommeret wrote:
> > Le Sunday 14 September 2008 20:04:06 Christophe Thommeret, vous avez
écrit :
> > > as you expected, it's abit buggy and crashes at load ;)
> > > i've searched for the alternative cinergyT2 driver.
> > > it's available at: http://linuxtv.org/hg/~tmerle/cinergyT2/
> > >
> > > haven't tried it yet but will do (at least several people seems to have
> > > it working).
> >
> > Have it working, not as good as Holger' one (often fails to lock) but it
> > works, with both old and new api.
>
> Looking at the code, cinergyt2_fe_get_tune_settings() should
> probably set step_size = max_drift = 0 to defeat
> dvb_frontend_swzigzag_autotune().
> c.f. mt352_get_tune_settings()
Thanx for the hint, unfortunately it doesn't help.
In fact, if i set a larger timeout (time after which kaffeine gives up and
report tuning failure), say 5000ms, it always locks.
The average lock time is about 2000ms, but sometimes it goes up to 4000 and
sometimes it's only 200, randomly for all freqs.
If you have any idea, you are welcome :)
--
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] 45+ messages in thread
* Re: [linux-dvb] S2API - Status - Thu Sep 11th
2008-09-16 2:58 ` Christophe Thommeret
@ 2008-09-16 21:24 ` Johannes Stezenbach
0 siblings, 0 replies; 45+ messages in thread
From: Johannes Stezenbach @ 2008-09-16 21:24 UTC (permalink / raw)
To: Christophe Thommeret; +Cc: linux-dvb
On Tue, Sep 16, 2008 at 04:58:49AM +0200, Christophe Thommeret wrote:
> Le Monday 15 September 2008 13:43:00 Johannes Stezenbach, vous avez écrit :
> > On Mon, Sep 15, 2008, Christophe Thommeret wrote:
> > > Le Sunday 14 September 2008 20:04:06 Christophe Thommeret, vous avez écrit :
> > > > as you expected, it's abit buggy and crashes at load ;)
> > > > i've searched for the alternative cinergyT2 driver.
> > > > it's available at: http://linuxtv.org/hg/~tmerle/cinergyT2/
> > > >
> > > > haven't tried it yet but will do (at least several people seems to have
> > > > it working).
> > >
> > > Have it working, not as good as Holger' one (often fails to lock) but it
> > > works, with both old and new api.
> >
> > Looking at the code, cinergyt2_fe_get_tune_settings() should
> > probably set step_size = max_drift = 0 to defeat
> > dvb_frontend_swzigzag_autotune().
> > c.f. mt352_get_tune_settings()
>
> Thanx for the hint, unfortunately it doesn't help.
> In fact, if i set a larger timeout (time after which kaffeine gives up and
> report tuning failure), say 5000ms, it always locks.
> The average lock time is about 2000ms, but sometimes it goes up to 4000 and
> sometimes it's only 200, randomly for all freqs.
> If you have any idea, you are welcome :)
Not really and I can't test myself since I don't have any hw.
Holger's cinergyT2 driver sets the FE once (on FE_SET_FRONTEND),
and then queries regularly (every 333ms or CONFIG_DVB_CINERGYT2_QUERY_INTERVAL)
for the status. It NEVER retries the tuning like dvb_frontend_swzigzag_autotune()
might do, and the step_size = max_drift = 0 is supposed to prevent
that, but maybe dvb_frontend_swzigzag_autotune() logic is broken?
A printk in the new cinergyT2 driver should tell.
BTW, the cinergyT2 firmware is Open Source, you can find it in
http://linuxtv.org/cgi-bin/viewcvs.cgi/dvb-hw/dvbusb-fx2/termini/
if you are interested. But there is no magic in the firmware,
it just writes mt352 regs on FE_SET_FRONTEND and reads the
status reg for FE_READ_STATUS. That's all.
Johannes
_______________________________________________
linux-dvb mailing list
linux-dvb@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb
^ permalink raw reply [flat|nested] 45+ messages in thread
* [linux-dvb] [PATCH] S2API - Silicon Labs si2109/2110 demodulator support.
[not found] ` <48CE9E22.9060405@hauppauge.com>
@ 2008-09-16 21:37 ` Igor M. Liplianin
2008-09-17 22:27 ` [linux-dvb] [PATCH] S2API - Add support for USB card modification with si2109/2110 demodulator Igor M. Liplianin
` (2 more replies)
0 siblings, 3 replies; 45+ messages in thread
From: Igor M. Liplianin @ 2008-09-16 21:37 UTC (permalink / raw)
To: Steven Toth; +Cc: linux-dvb@linuxtv.org
[-- Attachment #1: Type: text/plain, Size: 214 bytes --]
Hi Steve,
Send you patch for Silicon Laboratories si2109/2110 demodulator support.
https://www.silabs.com/products/audiovideo/satellitestb/Pages/default.aspx
It is S2API compliant, as of september, 16-th
Igor
[-- Attachment #2: 8885.patch --]
[-- Type: text/x-diff, Size: 28901 bytes --]
# HG changeset patch
# User Igor M. Liplianin <liplianin@me.by>
# Date 1221600071 -10800
# Node ID 0ae7bbdb302efb54ca12a35858699fb36e5d4e58
# Parent 94bd2599004fcd040f41130e95aebd6f9ce1248b
Add support for Silicon Laboratories SI2109/2110 demodulators.
From: Igor M. Liplianin <liplianin@me.by>
Add support for Silicon Laboratories SI2109/2110 demodulator
and cards with it, such as DvbWorld PCI2002.
Signed-off-by: Igor M. Liplianin <liplianin@me.by>
diff -r 94bd2599004f -r 0ae7bbdb302e linux/drivers/media/dvb/dm1105/Kconfig
--- a/linux/drivers/media/dvb/dm1105/Kconfig Sun Sep 14 13:43:53 2008 +0300
+++ b/linux/drivers/media/dvb/dm1105/Kconfig Wed Sep 17 00:21:11 2008 +0300
@@ -4,6 +4,7 @@
select DVB_PLL if !DVB_FE_CUSTOMISE
select DVB_STV0299 if !DVB_FE_CUSTOMISE
select DVB_CX24116 if !DVB_FE_CUSTOMISE
+ select DVB_SI21XX if !DVB_FE_CUSTOMISE
help
Support for cards based on the SDMC DM1105 PCI chip like
DvbWorld 2002
diff -r 94bd2599004f -r 0ae7bbdb302e linux/drivers/media/dvb/dm1105/dm1105.c
--- a/linux/drivers/media/dvb/dm1105/dm1105.c Sun Sep 14 13:43:53 2008 +0300
+++ b/linux/drivers/media/dvb/dm1105/dm1105.c Wed Sep 17 00:21:11 2008 +0300
@@ -40,8 +40,8 @@
#include "stv0299.h"
/*#include "stv0288.h"
- *#include "si21xx.h"
*#include "stb6000.h"*/
+#include "si21xx.h"
#include "cx24116.h"
#include "z0194a.h"
@@ -608,12 +608,12 @@
.min_delay_ms = 100,
};
+#endif /* keep */
static struct si21xx_config serit_config = {
.demod_address = 0x68,
.min_delay_ms = 100,
};
-#endif /* keep */
static struct cx24116_config serit_sp2633_config = {
.demod_address = 0x55,
@@ -647,7 +647,7 @@
&dm1105dvb->i2c_adap);
}
}
-
+#endif /* keep */
if (!dm1105dvb->fe) {
dm1105dvb->fe = dvb_attach(
si21xx_attach, &serit_config,
@@ -656,7 +656,6 @@
dm1105dvb->fe->ops.set_voltage =
dm1105dvb_set_voltage;
}
-#endif /* keep */
break;
case PCI_DEVICE_ID_DW2004:
dm1105dvb->fe = dvb_attach(
diff -r 94bd2599004f -r 0ae7bbdb302e linux/drivers/media/dvb/frontends/Kconfig
--- a/linux/drivers/media/dvb/frontends/Kconfig Sun Sep 14 13:43:53 2008 +0300
+++ b/linux/drivers/media/dvb/frontends/Kconfig Wed Sep 17 00:21:11 2008 +0300
@@ -98,6 +98,13 @@
default m if DVB_FE_CUSTOMISE
help
A DVB-S/S2 tuner module. Say Y when you want to support this frontend.
+
+config DVB_SI21XX
+ tristate "Silicon Labs SI21XX based"
+ depends on DVB_CORE && I2C
+ default m if DVB_FE_CUSTOMISE
+ help
+ A DVB-S tuner module. Say Y when you want to support this frontend.
comment "DVB-T (terrestrial) frontends"
depends on DVB_CORE
diff -r 94bd2599004f -r 0ae7bbdb302e linux/drivers/media/dvb/frontends/Makefile
--- a/linux/drivers/media/dvb/frontends/Makefile Sun Sep 14 13:43:53 2008 +0300
+++ b/linux/drivers/media/dvb/frontends/Makefile Wed Sep 17 00:21:11 2008 +0300
@@ -50,3 +50,4 @@
obj-$(CONFIG_DVB_S5H1411) += s5h1411.o
obj-$(CONFIG_DVB_LGS8GL5) += lgs8gl5.o
obj-$(CONFIG_DVB_CX24116) += cx24116.o
+obj-$(CONFIG_DVB_SI21XX) += si21xx.o
diff -r 94bd2599004f -r 0ae7bbdb302e linux/drivers/media/dvb/frontends/si21xx.c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/linux/drivers/media/dvb/frontends/si21xx.c Wed Sep 17 00:21:11 2008 +0300
@@ -0,0 +1,1049 @@
+/* DVB compliant Linux driver for the DVB-S si2109/2110 demodulator
+*
+* Copyright (C) 2008 Igor M. Liplianin (liplianin@me.by)
+*
+* This program is free software; you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation; either version 2 of the License, or
+* (at your option) any later version.
+*
+*/
+#include <linux/version.h>
+#include <linux/init.h>
+#include <linux/kernel.h>
+#include <linux/module.h>
+#include <linux/string.h>
+#include <linux/slab.h>
+#include <linux/jiffies.h>
+#include <asm/div64.h>
+
+#include "dvb_frontend.h"
+#include "si21xx.h"
+
+#define REVISION_REG 0x00
+#define SYSTEM_MODE_REG 0x01
+#define TS_CTRL_REG_1 0x02
+#define TS_CTRL_REG_2 0x03
+#define PIN_CTRL_REG_1 0x04
+#define PIN_CTRL_REG_2 0x05
+#define LOCK_STATUS_REG_1 0x0f
+#define LOCK_STATUS_REG_2 0x10
+#define ACQ_STATUS_REG 0x11
+#define ACQ_CTRL_REG_1 0x13
+#define ACQ_CTRL_REG_2 0x14
+#define PLL_DIVISOR_REG 0x15
+#define COARSE_TUNE_REG 0x16
+#define FINE_TUNE_REG_L 0x17
+#define FINE_TUNE_REG_H 0x18
+
+#define ANALOG_AGC_POWER_LEVEL_REG 0x28
+#define CFO_ESTIMATOR_CTRL_REG_1 0x29
+#define CFO_ESTIMATOR_CTRL_REG_2 0x2a
+#define CFO_ESTIMATOR_CTRL_REG_3 0x2b
+
+#define SYM_RATE_ESTIMATE_REG_L 0x31
+#define SYM_RATE_ESTIMATE_REG_M 0x32
+#define SYM_RATE_ESTIMATE_REG_H 0x33
+
+#define CFO_ESTIMATOR_OFFSET_REG_L 0x36
+#define CFO_ESTIMATOR_OFFSET_REG_H 0x37
+#define CFO_ERROR_REG_L 0x38
+#define CFO_ERROR_REG_H 0x39
+#define SYM_RATE_ESTIMATOR_CTRL_REG 0x3a
+
+#define SYM_RATE_REG_L 0x3f
+#define SYM_RATE_REG_M 0x40
+#define SYM_RATE_REG_H 0x41
+#define SYM_RATE_ESTIMATOR_MAXIMUM_REG 0x42
+#define SYM_RATE_ESTIMATOR_MINIMUM_REG 0x43
+
+#define C_N_ESTIMATOR_CTRL_REG 0x7c
+#define C_N_ESTIMATOR_THRSHLD_REG 0x7d
+#define C_N_ESTIMATOR_LEVEL_REG_L 0x7e
+#define C_N_ESTIMATOR_LEVEL_REG_H 0x7f
+
+#define BLIND_SCAN_CTRL_REG 0x80
+
+#define LSA_CTRL_REG_1 0x8D
+#define SPCTRM_TILT_CORR_THRSHLD_REG 0x8f
+#define ONE_DB_BNDWDTH_THRSHLD_REG 0x90
+#define TWO_DB_BNDWDTH_THRSHLD_REG 0x91
+#define THREE_DB_BNDWDTH_THRSHLD_REG 0x92
+#define INBAND_POWER_THRSHLD_REG 0x93
+#define REF_NOISE_LVL_MRGN_THRSHLD_REG 0x94
+
+#define VIT_SRCH_CTRL_REG_1 0xa0
+#define VIT_SRCH_CTRL_REG_2 0xa1
+#define VIT_SRCH_CTRL_REG_3 0xa2
+#define VIT_SRCH_STATUS_REG 0xa3
+#define VITERBI_BER_COUNT_REG_L 0xab
+#define REED_SOLOMON_CTRL_REG 0xb0
+#define REED_SOLOMON_ERROR_COUNT_REG_L 0xb1
+#define PRBS_CTRL_REG 0xb5
+
+#define LNB_CTRL_REG_1 0xc0
+#define LNB_CTRL_REG_2 0xc1
+#define LNB_CTRL_REG_3 0xc2
+#define LNB_CTRL_REG_4 0xc3
+#define LNB_CTRL_STATUS_REG 0xc4
+#define LNB_FIFO_REGS_0 0xc5
+#define LNB_FIFO_REGS_1 0xc6
+#define LNB_FIFO_REGS_2 0xc7
+#define LNB_FIFO_REGS_3 0xc8
+#define LNB_FIFO_REGS_4 0xc9
+#define LNB_FIFO_REGS_5 0xca
+#define LNB_SUPPLY_CTRL_REG_1 0xcb
+#define LNB_SUPPLY_CTRL_REG_2 0xcc
+#define LNB_SUPPLY_CTRL_REG_3 0xcd
+#define LNB_SUPPLY_CTRL_REG_4 0xce
+#define LNB_SUPPLY_STATUS_REG 0xcf
+
+#define FALSE 0
+#define TRUE 1
+#define FAIL -1
+#define PASS 0
+
+#define ALLOWABLE_FS_COUNT 10
+#define STATUS_BER 0
+#define STATUS_UCBLOCKS 1
+
+static int debug;
+#define dprintk(args...) \
+ do { \
+ if (debug) \
+ printk(KERN_DEBUG "si21xx: " args); \
+ } while (0)
+
+enum {
+ ACTIVE_HIGH,
+ ACTIVE_LOW
+};
+enum {
+ BYTE_WIDE,
+ BIT_WIDE
+};
+enum {
+ CLK_GAPPED_MODE,
+ CLK_CONTINUOUS_MODE
+};
+enum {
+ RISING_EDGE,
+ FALLING_EDGE
+};
+enum {
+ MSB_FIRST,
+ LSB_FIRST
+};
+enum {
+ SERIAL,
+ PARALLEL
+};
+
+struct si21xx_state {
+ struct i2c_adapter *i2c;
+ const struct si21xx_config *config;
+ struct dvb_frontend frontend;
+ u8 initialised:1;
+ int errmode;
+ int fs; /*Sampling rate of the ADC in MHz*/
+};
+
+/* register default initialization */
+static u8 serit_sp1511lhb_inittab[] = {
+ 0x01, 0x28, /* set i2c_inc_disable */
+ 0x20, 0x03,
+ 0x27, 0x20,
+ 0xe0, 0x45,
+ 0xe1, 0x08,
+ 0xfe, 0x01,
+ 0x01, 0x28,
+ 0x89, 0x09,
+ 0x04, 0x80,
+ 0x05, 0x01,
+ 0x06, 0x00,
+ 0x20, 0x03,
+ 0x24, 0x88,
+ 0x29, 0x09,
+ 0x2a, 0x0f,
+ 0x2c, 0x10,
+ 0x2d, 0x19,
+ 0x2e, 0x08,
+ 0x2f, 0x10,
+ 0x30, 0x19,
+ 0x34, 0x20,
+ 0x35, 0x03,
+ 0x45, 0x02,
+ 0x46, 0x45,
+ 0x47, 0xd0,
+ 0x48, 0x00,
+ 0x49, 0x40,
+ 0x4a, 0x03,
+ 0x4c, 0xfd,
+ 0x4f, 0x2e,
+ 0x50, 0x2e,
+ 0x51, 0x10,
+ 0x52, 0x10,
+ 0x56, 0x92,
+ 0x59, 0x00,
+ 0x5a, 0x2d,
+ 0x5b, 0x33,
+ 0x5c, 0x1f,
+ 0x5f, 0x76,
+ 0x62, 0xc0,
+ 0x63, 0xc0,
+ 0x64, 0xf3,
+ 0x65, 0xf3,
+ 0x79, 0x40,
+ 0x6a, 0x40,
+ 0x6b, 0x0a,
+ 0x6c, 0x80,
+ 0x6d, 0x27,
+ 0x71, 0x06,
+ 0x75, 0x60,
+ 0x78, 0x00,
+ 0x79, 0xb5,
+ 0x7c, 0x05,
+ 0x7d, 0x1a,
+ 0x87, 0x55,
+ 0x88, 0x72,
+ 0x8f, 0x08,
+ 0x90, 0xe0,
+ 0x94, 0x40,
+ 0xa0, 0x3f,
+ 0xa1, 0xc0,
+ 0xa4, 0xcc,
+ 0xa5, 0x66,
+ 0xa6, 0x66,
+ 0xa7, 0x7b,
+ 0xa8, 0x7b,
+ 0xa9, 0x7b,
+ 0xaa, 0x9a,
+ 0xed, 0x04,
+ 0xad, 0x00,
+ 0xae, 0x03,
+ 0xcc, 0xab,
+ 0x01, 0x08,
+ 0xff, 0xff
+};
+
+/* low level read/writes */
+static int si21_writeregs(struct si21xx_state *state, u8 reg1,
+ u8 *data, int len)
+{
+ int ret;
+ u8 buf[60];/* = { reg1, data };*/
+ struct i2c_msg msg = {
+ .addr = state->config->demod_address,
+ .flags = 0,
+ .buf = buf,
+ .len = len + 1
+ };
+
+ msg.buf[0] = reg1;
+ memcpy(msg.buf + 1, data, len);
+
+ ret = i2c_transfer(state->i2c, &msg, 1);
+
+ if (ret != 1)
+ dprintk("%s: writereg error (reg1 == 0x%02x, data == 0x%02x, "
+ "ret == %i)\n", __func__, reg1, data[0], ret);
+
+ return (ret != 1) ? -EREMOTEIO : 0;
+}
+
+static int si21_writereg(struct si21xx_state *state, u8 reg, u8 data)
+{
+ int ret;
+ u8 buf[] = { reg, data };
+ struct i2c_msg msg = {
+ .addr = state->config->demod_address,
+ .flags = 0,
+ .buf = buf,
+ .len = 2
+ };
+
+ ret = i2c_transfer(state->i2c, &msg, 1);
+
+ if (ret != 1)
+ dprintk("%s: writereg error (reg == 0x%02x, data == 0x%02x, "
+ "ret == %i)\n", __func__, reg, data, ret);
+
+ return (ret != 1) ? -EREMOTEIO : 0;
+}
+
+static int si21_write(struct dvb_frontend *fe, u8 *buf, int len)
+{
+ struct si21xx_state *state = fe->demodulator_priv;
+
+ if (len != 2)
+ return -EINVAL;
+
+ return si21_writereg(state, buf[0], buf[1]);
+}
+
+static u8 si21_readreg(struct si21xx_state *state, u8 reg)
+{
+ int ret;
+ u8 b0[] = { reg };
+ u8 b1[] = { 0 };
+ struct i2c_msg msg[] = {
+ {
+ .addr = state->config->demod_address,
+ .flags = 0,
+ .buf = b0,
+ .len = 1
+ }, {
+ .addr = state->config->demod_address,
+ .flags = I2C_M_RD,
+ .buf = b1,
+ .len = 1
+ }
+ };
+
+ ret = i2c_transfer(state->i2c, msg, 2);
+
+ if (ret != 2)
+ dprintk("%s: readreg error (reg == 0x%02x, ret == %i)\n",
+ __func__, reg, ret);
+
+ return b1[0];
+}
+
+static int si21_readregs(struct si21xx_state *state, u8 reg1, u8 *b, u8 len)
+{
+ int ret;
+ struct i2c_msg msg[] = {
+ {
+ .addr = state->config->demod_address,
+ .flags = 0,
+ .buf = ®1,
+ .len = 1
+ }, {
+ .addr = state->config->demod_address,
+ .flags = I2C_M_RD,
+ .buf = b,
+ .len = len
+ }
+ };
+
+ ret = i2c_transfer(state->i2c, msg, 2);
+
+ if (ret != 2)
+ dprintk("%s: readreg error (ret == %i)\n", __func__, ret);
+
+ return ret == 2 ? 0 : -1;
+}
+#if 0
+static int si21xx_wait_diseqc_fifo(struct si21xx_state *state, int timeout)
+{
+ unsigned long start = jiffies;
+
+ dprintk("%s\n", __func__);
+
+ while (((si21_readreg(state, 0xc4) >> 7) & 1) == 0) {
+ if (jiffies - start > timeout) {
+ dprintk("%s: timeout!!\n", __func__);
+ return -ETIMEDOUT;
+ }
+ msleep(10);
+ };
+
+ return 0;
+}
+#endif
+
+static int si21xx_wait_diseqc_idle(struct si21xx_state *state, int timeout)
+{
+ unsigned long start = jiffies;
+
+ dprintk("%s\n", __func__);
+
+ while ((si21_readreg(state, LNB_CTRL_REG_1) & 0x8) == 8) {
+ if (jiffies - start > timeout) {
+ dprintk("%s: timeout!!\n", __func__);
+ return -ETIMEDOUT;
+ }
+ msleep(10);
+ };
+
+ return 0;
+}
+
+static int si21xx_set_symbolrate(struct dvb_frontend *fe, u32 srate)
+{
+ struct si21xx_state *state = fe->demodulator_priv;
+ u32 sym_rate, data_rate;
+ int i;
+ u8 sym_rate_bytes[3];
+
+ dprintk("%s : srate = %i\n", __func__ , srate);
+
+ if ((srate < 1000000) || (srate > 45000000))
+ return -EINVAL;
+
+ data_rate = srate;
+ sym_rate = 0;
+
+ for (i = 0; i < 4; ++i) {
+ sym_rate /= 100;
+ sym_rate = sym_rate + ((data_rate % 100) * 0x800000) /
+ state->fs;
+ data_rate /= 100;
+ }
+ for (i = 0; i < 3; ++i)
+ sym_rate_bytes[i] = (u8)((sym_rate >> (i * 8)) & 0xff);
+
+ si21_writeregs(state, SYM_RATE_REG_L, sym_rate_bytes, 0x03);
+
+ return 0;
+}
+
+static int si21xx_send_diseqc_msg(struct dvb_frontend *fe,
+ struct dvb_diseqc_master_cmd *m)
+{
+ struct si21xx_state *state = fe->demodulator_priv;
+#if 0
+ u8 val;
+ int i;
+
+ if (si21xx_wait_diseqc_idle(state, 100) < 0)
+ return -ETIMEDOUT;
+
+ val = si21_readreg(state, 0x08);
+ /* DiSEqC mode */
+ if (si21_writereg(state, 0x08, (val & ~0x7) | 0x6))
+ return -EREMOTEIO;
+
+ for (i = 0; i < m->msg_len; i++) {
+ if (si21xx_wait_diseqc_fifo(state, 100) < 0)
+ return -ETIMEDOUT;
+
+ if (si21_writereg(state, 0x09, m->msg[i]))
+ return -EREMOTEIO;
+ }
+
+ if (si21xx_wait_diseqc_idle(state, 100) < 0)
+ return -ETIMEDOUT;
+
+ return 0;
+ }
+
+int si21xx_set_lnb_msg(state, lnb_cmd)
+{
+#endif
+ u8 lnb_status;
+ u8 LNB_CTRL_1;
+ int status;
+
+ dprintk("%s\n", __func__);
+
+ status = PASS;
+ LNB_CTRL_1 = 0;
+
+ status |= si21_readregs(state, LNB_CTRL_STATUS_REG, &lnb_status, 0x01);
+ status |= si21_readregs(state, LNB_CTRL_REG_1, &lnb_status, 0x01);
+
+ /*fill the FIFO*/
+ status |= si21_writeregs(state, LNB_FIFO_REGS_0, m->msg, m->msg_len);
+
+ LNB_CTRL_1 = (lnb_status & 0x70);
+#if 0
+ LNB_CTRL_1 |= voltage << 6; /*voltage select*/
+ LNB_CTRL_1 |= tone << 5; /*continuous tone selection*/
+ LNB_CTRL_1 |= burst << 4; /*tone burst selection*/
+ LNB_CTRL_1 |= mmsg << 3; /*more messages indicator*/
+#endif
+ LNB_CTRL_1 |= m->msg_len;
+
+ LNB_CTRL_1 |= 0x80; /* begin LNB signaling */
+
+ status |= si21_writeregs(state, LNB_CTRL_REG_1, &LNB_CTRL_1, 0x01);
+
+ return status;
+}
+
+static int si21xx_send_diseqc_burst(struct dvb_frontend *fe,
+ fe_sec_mini_cmd_t burst)
+{
+ struct si21xx_state *state = fe->demodulator_priv;
+ u8 val;
+
+ dprintk("%s\n", __func__);
+
+ if (si21xx_wait_diseqc_idle(state, 100) < 0)
+ return -ETIMEDOUT;
+
+ val = (0x80 | si21_readreg(state, 0xc1));
+#if 0
+ /* burst mode */
+ if (si21_writereg(state, LNB_CTRL_REG_1, (val & ~0x10))
+ return -EREMOTEIO;
+#endif
+ if (si21_writereg(state, LNB_CTRL_REG_1,
+ burst == SEC_MINI_A ? (val & ~0x10) : (val | 0x10)))
+ return -EREMOTEIO;
+
+ if (si21xx_wait_diseqc_idle(state, 100) < 0)
+ return -ETIMEDOUT;
+
+ if (si21_writereg(state, LNB_CTRL_REG_1, val))
+ return -EREMOTEIO;
+
+ return 0;
+}
+/* 30.06.2008 */
+static int si21xx_set_tone(struct dvb_frontend *fe, fe_sec_tone_mode_t tone)
+{
+ struct si21xx_state *state = fe->demodulator_priv;
+ u8 val;
+
+ dprintk("%s\n", __func__);
+#if 0
+ if (si21xx_wait_diseqc_idle(state, 100) < 0)
+ return -ETIMEDOUT;
+#endif
+ val = (0x80 | si21_readreg(state, LNB_CTRL_REG_1));
+
+ switch (tone) {
+ case SEC_TONE_ON:
+ return si21_writereg(state, LNB_CTRL_REG_1, val | 0x20);
+
+ case SEC_TONE_OFF:
+ return si21_writereg(state, LNB_CTRL_REG_1, (val & ~0x20));
+
+ default:
+ return -EINVAL;
+ }
+}
+
+static int si21xx_set_voltage(struct dvb_frontend *fe, fe_sec_voltage_t volt)
+{
+ struct si21xx_state *state = fe->demodulator_priv;
+
+ u8 val;
+ dprintk("%s: %s\n", __func__,
+ volt == SEC_VOLTAGE_13 ? "SEC_VOLTAGE_13" :
+ volt == SEC_VOLTAGE_18 ? "SEC_VOLTAGE_18" : "??");
+
+
+ val = (0x80 | si21_readreg(state, LNB_CTRL_REG_1));
+
+ switch (volt) {
+ case SEC_VOLTAGE_18:
+ return si21_writereg(state, LNB_CTRL_REG_1, val | 0x40);
+ break;
+ case SEC_VOLTAGE_13:
+ return si21_writereg(state, LNB_CTRL_REG_1, (val & ~0x40));
+ break;
+ default:
+ return -EINVAL;
+ };
+}
+
+static int si21xx_init(struct dvb_frontend *fe)
+{
+ struct si21xx_state *state = fe->demodulator_priv;
+ int i;
+ int status = 0;
+ u8 reg1;
+ u8 val;
+ u8 reg2[2];
+
+ dprintk("%s\n", __func__);
+
+ for (i = 0; ; i += 2) {
+ reg1 = serit_sp1511lhb_inittab[i];
+ val = serit_sp1511lhb_inittab[i+1];
+ if (reg1 == 0xff && val == 0xff)
+ break;
+ si21_writeregs(state, reg1, &val, 1);
+ }
+
+ /*DVB QPSK SYSTEM MODE REG*/
+ reg1 = 0x08;
+ si21_writeregs(state, SYSTEM_MODE_REG, ®1, 0x01);
+
+ /*transport stream config*/
+ /*
+ mode = PARALLEL;
+ sdata_form = LSB_FIRST;
+ clk_edge = FALLING_EDGE;
+ clk_mode = CLK_GAPPED_MODE;
+ strt_len = BYTE_WIDE;
+ sync_pol = ACTIVE_HIGH;
+ val_pol = ACTIVE_HIGH;
+ err_pol = ACTIVE_HIGH;
+ sclk_rate = 0x00;
+ parity = 0x00 ;
+ data_delay = 0x00;
+ clk_delay = 0x00;
+ pclk_smooth = 0x00;
+ */
+ reg2[0] =
+ PARALLEL + (LSB_FIRST << 1)
+ + (FALLING_EDGE << 2) + (CLK_GAPPED_MODE << 3)
+ + (BYTE_WIDE << 4) + (ACTIVE_HIGH << 5)
+ + (ACTIVE_HIGH << 6) + (ACTIVE_HIGH << 7);
+
+ reg2[1] = 0;
+ /* sclk_rate + (parity << 2)
+ + (data_delay << 3) + (clk_delay << 4)
+ + (pclk_smooth << 5);
+ */
+ status |= si21_writeregs(state, TS_CTRL_REG_1, reg2, 0x02);
+ if (status != 0)
+ dprintk(" %s : TS Set Error\n", __func__);
+
+#if 0
+ lnb_cmd.tone = ON; /* 22khz continuous */
+ lnb_cmd.mmsg = OFF; /* diseqc more message */
+ /* diseqc command */
+ lnb_cmd.msg[6] = { "0xE0", "0x10", "0x38", "0xF0" };
+ lnb_cmd.msg_len = OFF; /* diseqc command length */
+ lnb_cmd.burst = OFF; /* tone burst a,b */
+ lnb_cmd.volt = OFF; /* 13v 18v select */
+
+ status |= si21xx_set_lnb_msg(state, lnb_cmd);
+ if (status != PASS)
+ dprintk("%s LNB Set Error\n", __func__);
+#endif
+ return 0;
+
+}
+
+static int si21_read_status(struct dvb_frontend *fe, fe_status_t *status)
+{
+ struct si21xx_state *state = fe->demodulator_priv;
+ u8 regs_read[2];
+ u8 reg_read;
+ u8 i;
+ u8 lock;
+ u8 signal = si21_readreg(state, ANALOG_AGC_POWER_LEVEL_REG);
+
+ si21_readregs(state, LOCK_STATUS_REG_1, regs_read, 0x02);
+ reg_read = 0;
+
+ for (i = 0; i < 7; ++i)
+ reg_read |= ((regs_read[0] >> i) & 0x01) << (6 - i);
+
+ lock = ((reg_read & 0x7f) | (regs_read[1] & 0x80));
+
+ dprintk("%s : FE_READ_STATUS : VSTATUS: 0x%02x\n", __func__, lock);
+ *status = 0;
+
+ if (signal > 10)
+ *status |= FE_HAS_SIGNAL;
+
+ if (lock & 0x2)
+ *status |= FE_HAS_CARRIER;
+
+ if (lock & 0x20)
+ *status |= FE_HAS_VITERBI;
+
+ if (lock & 0x40)
+ *status |= FE_HAS_SYNC;
+
+ if ((lock & 0x7b) == 0x7b)
+ *status |= FE_HAS_LOCK;
+
+ return 0;
+}
+
+static int si21_read_signal_strength(struct dvb_frontend *fe, u16 *strength)
+{
+ struct si21xx_state *state = fe->demodulator_priv;
+
+ /*status = si21_readreg(state, ANALOG_AGC_POWER_LEVEL_REG,
+ (u8*)agclevel, 0x01);*/
+
+ u16 signal = (3 * si21_readreg(state, 0x27) *
+ si21_readreg(state, 0x28));
+
+ dprintk("%s : AGCPWR: 0x%02x%02x, signal=0x%04x\n", __func__,
+ si21_readreg(state, 0x27),
+ si21_readreg(state, 0x28), (int) signal);
+
+ signal <<= 4;
+ *strength = signal;
+
+ return 0;
+}
+
+static int si21_read_ber(struct dvb_frontend *fe, u32 *ber)
+{
+ struct si21xx_state *state = fe->demodulator_priv;
+
+ dprintk("%s\n", __func__);
+
+ if (state->errmode != STATUS_BER)
+ return 0;
+
+ *ber = (si21_readreg(state, 0x1d) << 8) |
+ si21_readreg(state, 0x1e);
+
+ return 0;
+}
+
+static int si21_read_snr(struct dvb_frontend *fe, u16 *snr)
+{
+ struct si21xx_state *state = fe->demodulator_priv;
+
+ s32 xsnr = 0xffff - ((si21_readreg(state, 0x24) << 8) |
+ si21_readreg(state, 0x25));
+ xsnr = 3 * (xsnr - 0xa100);
+ *snr = (xsnr > 0xffff) ? 0xffff : (xsnr < 0) ? 0 : xsnr;
+
+ dprintk("%s\n", __func__);
+
+ return 0;
+}
+
+static int si21_read_ucblocks(struct dvb_frontend *fe, u32 *ucblocks)
+{
+ struct si21xx_state *state = fe->demodulator_priv;
+
+ dprintk("%s\n", __func__);
+
+ if (state->errmode != STATUS_UCBLOCKS)
+ *ucblocks = 0;
+ else
+ *ucblocks = (si21_readreg(state, 0x1d) << 8) |
+ si21_readreg(state, 0x1e);
+
+ return 0;
+}
+
+/* initiates a channel acquisition sequence
+ using the specified symbol rate and code rate */
+static int si21xx_setacquire(struct dvb_frontend *fe, int symbrate,
+ fe_code_rate_t crate)
+{
+
+ struct si21xx_state *state = fe->demodulator_priv;
+ u8 coderates[] = {
+ 0x0, 0x01, 0x02, 0x04, 0x00,
+ 0x8, 0x10, 0x20, 0x00, 0x3f
+ };
+
+ u8 coderate_ptr;
+ int status;
+ u8 start_acq = 0x80;
+ u8 reg, regs[3];
+
+ dprintk("%s\n", __func__);
+
+ status = PASS;
+ coderate_ptr = coderates[crate];
+
+ si21xx_set_symbolrate(fe, symbrate);
+
+ /* write code rates to use in the Viterbi search */
+ status |= si21_writeregs(state,
+ VIT_SRCH_CTRL_REG_1,
+ &coderate_ptr, 0x01);
+
+ /* clear acq_start bit */
+ status |= si21_readregs(state, ACQ_CTRL_REG_2, ®, 0x01);
+ reg &= ~start_acq;
+ status |= si21_writeregs(state, ACQ_CTRL_REG_2, ®, 0x01);
+
+ /* use new Carrier Frequency Offset Estimator (QuickLock) */
+ regs[0] = 0xCB;
+ regs[1] = 0x40;
+ regs[2] = 0xCB;
+
+ status |= si21_writeregs(state,
+ TWO_DB_BNDWDTH_THRSHLD_REG,
+ ®s[0], 0x03);
+ reg = 0x56;
+ status |= si21_writeregs(state,
+ LSA_CTRL_REG_1, ®, 1);
+ reg = 0x05;
+ status |= si21_writeregs(state,
+ BLIND_SCAN_CTRL_REG, ®, 1);
+ /* start automatic acq */
+ status |= si21_writeregs(state,
+ ACQ_CTRL_REG_2, &start_acq, 0x01);
+
+ return status;
+}
+
+static int si21xx_set_property(struct dvb_frontend *fe, struct dtv_property *p)
+{
+ dprintk("%s(..)\n", __func__);
+ return 0;
+}
+
+static int si21xx_get_property(struct dvb_frontend *fe, struct dtv_property *p)
+{
+ dprintk("%s(..)\n", __func__);
+ return 0;
+}
+
+static int si21xx_set_frontend(struct dvb_frontend *fe,
+ struct dvb_frontend_parameters *dfp)
+{
+ struct si21xx_state *state = fe->demodulator_priv;
+ struct dtv_frontend_properties *c = &fe->dtv_property_cache;
+
+ /* freq Channel carrier frequency in KHz (i.e. 1550000 KHz)
+ datarate Channel symbol rate in Sps (i.e. 22500000 Sps)*/
+
+ /* in MHz */
+ unsigned char coarse_tune_freq;
+ int fine_tune_freq;
+ unsigned char sample_rate = 0;
+ /* boolean */
+ unsigned int inband_interferer_ind;
+
+ /* INTERMEDIATE VALUES */
+ int icoarse_tune_freq; /* MHz */
+ int ifine_tune_freq; /* MHz */
+ unsigned int band_high;
+ unsigned int band_low;
+ unsigned int x1;
+ unsigned int x2;
+ int i;
+ unsigned int inband_interferer_div2[ALLOWABLE_FS_COUNT] = {
+ FALSE, FALSE, FALSE, FALSE, FALSE,
+ FALSE, FALSE, FALSE, FALSE, FALSE
+ };
+ unsigned int inband_interferer_div4[ALLOWABLE_FS_COUNT] = {
+ FALSE, FALSE, FALSE, FALSE, FALSE,
+ FALSE, FALSE, FALSE, FALSE, FALSE
+ };
+
+ int status;
+
+ /* allowable sample rates for ADC in MHz */
+ int afs[ALLOWABLE_FS_COUNT] = { 200, 192, 193, 194, 195,
+ 196, 204, 205, 206, 207
+ };
+ /* in MHz */
+ int if_limit_high;
+ int if_limit_low;
+ int lnb_lo;
+ int lnb_uncertanity;
+
+ int rf_freq;
+ int data_rate;
+ unsigned char regs[4];
+
+ dprintk("%s : FE_SET_FRONTEND\n", __func__);
+
+ if (c->delivery_system != SYS_DVBS) {
+ dprintk("%s: unsupported delivery system selected (%d)\n",
+ __func__, c->delivery_system);
+ return -EOPNOTSUPP;
+ }
+
+ for (i = 0; i < ALLOWABLE_FS_COUNT; ++i)
+ inband_interferer_div2[i] = inband_interferer_div4[i] = FALSE;
+
+ if_limit_high = -700000;
+ if_limit_low = -100000;
+ /* in MHz */
+ lnb_lo = 0;
+ lnb_uncertanity = 0;
+
+ rf_freq = 10 * c->frequency ;
+ data_rate = c->symbol_rate / 100;
+
+ status = PASS;
+
+ band_low = (rf_freq - lnb_lo) - ((lnb_uncertanity * 200)
+ + (data_rate * 135)) / 200;
+
+ band_high = (rf_freq - lnb_lo) + ((lnb_uncertanity * 200)
+ + (data_rate * 135)) / 200;
+
+
+ icoarse_tune_freq = 100000 *
+ (((rf_freq - lnb_lo) -
+ (if_limit_low + if_limit_high) / 2)
+ / 100000);
+
+ ifine_tune_freq = (rf_freq - lnb_lo) - icoarse_tune_freq ;
+
+ for (i = 0; i < ALLOWABLE_FS_COUNT; ++i) {
+ x1 = ((rf_freq - lnb_lo) / (afs[i] * 2500)) *
+ (afs[i] * 2500) + afs[i] * 2500;
+
+ x2 = ((rf_freq - lnb_lo) / (afs[i] * 2500)) *
+ (afs[i] * 2500);
+
+ if (((band_low < x1) && (x1 < band_high)) ||
+ ((band_low < x2) && (x2 < band_high)))
+ inband_interferer_div4[i] = TRUE;
+
+ }
+
+ for (i = 0; i < ALLOWABLE_FS_COUNT; ++i) {
+ x1 = ((rf_freq - lnb_lo) / (afs[i] * 5000)) *
+ (afs[i] * 5000) + afs[i] * 5000;
+
+ x2 = ((rf_freq - lnb_lo) / (afs[i] * 5000)) *
+ (afs[i] * 5000);
+
+ if (((band_low < x1) && (x1 < band_high)) ||
+ ((band_low < x2) && (x2 < band_high)))
+ inband_interferer_div2[i] = TRUE;
+ }
+
+ inband_interferer_ind = TRUE;
+ for (i = 0; i < ALLOWABLE_FS_COUNT; ++i)
+ inband_interferer_ind &= inband_interferer_div2[i] |
+ inband_interferer_div4[i];
+
+ if (inband_interferer_ind) {
+ for (i = 0; i < ALLOWABLE_FS_COUNT; ++i) {
+ if (inband_interferer_div2[i] == FALSE) {
+ sample_rate = (u8) afs[i];
+ break;
+ }
+ }
+ } else {
+ for (i = 0; i < ALLOWABLE_FS_COUNT; ++i) {
+ if ((inband_interferer_div2[i] |
+ inband_interferer_div4[i]) == FALSE) {
+ sample_rate = (u8) afs[i];
+ break;
+ }
+ }
+
+ }
+
+ if (sample_rate > 207 || sample_rate < 192)
+ sample_rate = 200;
+
+ fine_tune_freq = ((0x4000 * (ifine_tune_freq / 10)) /
+ ((sample_rate) * 1000));
+
+ coarse_tune_freq = (u8)(icoarse_tune_freq / 100000);
+
+ regs[0] = sample_rate;
+ regs[1] = coarse_tune_freq;
+ regs[2] = fine_tune_freq & 0xFF;
+ regs[3] = fine_tune_freq >> 8 & 0xFF;
+
+ status |= si21_writeregs(state, PLL_DIVISOR_REG, ®s[0], 0x04);
+
+ state->fs = sample_rate;/*ADC MHz*/
+ si21xx_setacquire(fe, c->symbol_rate, c->fec_inner);
+
+ return 0;
+}
+
+static int si21xx_sleep(struct dvb_frontend *fe)
+{
+ struct si21xx_state *state = fe->demodulator_priv;
+ u8 regdata;
+
+ dprintk("%s\n", __func__);
+
+ si21_readregs(state, SYSTEM_MODE_REG, ®data, 0x01);
+ regdata |= 1 << 6;
+ si21_writeregs(state, SYSTEM_MODE_REG, ®data, 0x01);
+ state->initialised = 0;
+
+ return 0;
+}
+
+static void si21xx_release(struct dvb_frontend *fe)
+{
+ struct si21xx_state *state = fe->demodulator_priv;
+
+ dprintk("%s\n", __func__);
+
+ kfree(state);
+}
+
+static struct dvb_frontend_ops si21xx_ops = {
+
+ .info = {
+ .name = "SL SI21XX DVB-S",
+ .type = FE_QPSK,
+ .frequency_min = 950000,
+ .frequency_max = 2150000,
+ .frequency_stepsize = 125, /* kHz for QPSK frontends */
+ .frequency_tolerance = 0,
+ .symbol_rate_min = 1000000,
+ .symbol_rate_max = 45000000,
+ .symbol_rate_tolerance = 500, /* ppm */
+ .caps = FE_CAN_FEC_1_2 | FE_CAN_FEC_2_3 | FE_CAN_FEC_3_4 |
+ FE_CAN_FEC_5_6 | FE_CAN_FEC_7_8 |
+ FE_CAN_QPSK |
+ FE_CAN_FEC_AUTO
+ },
+
+ .release = si21xx_release,
+ .init = si21xx_init,
+ .sleep = si21xx_sleep,
+ .write = si21_write,
+ .read_status = si21_read_status,
+ .read_ber = si21_read_ber,
+ .read_signal_strength = si21_read_signal_strength,
+ .read_snr = si21_read_snr,
+ .read_ucblocks = si21_read_ucblocks,
+ .diseqc_send_master_cmd = si21xx_send_diseqc_msg,
+ .diseqc_send_burst = si21xx_send_diseqc_burst,
+ .set_tone = si21xx_set_tone,
+ .set_voltage = si21xx_set_voltage,
+
+ .set_property = si21xx_set_property,
+ .get_property = si21xx_get_property,
+ .set_frontend = si21xx_set_frontend,
+};
+
+struct dvb_frontend *si21xx_attach(const struct si21xx_config *config,
+ struct i2c_adapter *i2c)
+{
+ struct si21xx_state *state = NULL;
+ int id;
+
+ dprintk("%s\n", __func__);
+
+ /* allocate memory for the internal state */
+ state = kmalloc(sizeof(struct si21xx_state), GFP_KERNEL);
+ if (state == NULL)
+ goto error;
+
+ /* setup the state */
+ state->config = config;
+ state->i2c = i2c;
+ state->initialised = 0;
+ state->errmode = STATUS_BER;
+
+ /* check if the demod is there */
+ id = si21_readreg(state, SYSTEM_MODE_REG);
+ si21_writereg(state, SYSTEM_MODE_REG, id | 0x40); /* standby off */
+ msleep(200);
+ id = si21_readreg(state, 0x00);
+
+ /* register 0x00 contains:
+ 0x34 for SI2107
+ 0x24 for SI2108
+ 0x14 for SI2109
+ 0x04 for SI2110
+ */
+ if (id != 0x04 && id != 0x14)
+ goto error;
+
+ /* create dvb_frontend */
+ memcpy(&state->frontend.ops, &si21xx_ops,
+ sizeof(struct dvb_frontend_ops));
+ state->frontend.demodulator_priv = state;
+ return &state->frontend;
+
+error:
+ kfree(state);
+ return NULL;
+}
+EXPORT_SYMBOL(si21xx_attach);
+
+module_param(debug, int, 0644);
+MODULE_PARM_DESC(debug, "Turn on/off frontend debugging (default:off).");
+
+MODULE_DESCRIPTION("SL SI21XX DVB Demodulator driver");
+MODULE_AUTHOR("Igor M. Liplianin");
+MODULE_LICENSE("GPL");
diff -r 94bd2599004f -r 0ae7bbdb302e linux/drivers/media/dvb/frontends/si21xx.h
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/linux/drivers/media/dvb/frontends/si21xx.h Wed Sep 17 00:21:11 2008 +0300
@@ -0,0 +1,37 @@
+#ifndef SI21XX_H
+#define SI21XX_H
+
+#include <linux/dvb/frontend.h>
+#include "dvb_frontend.h"
+
+struct si21xx_config {
+ /* the demodulator's i2c address */
+ u8 demod_address;
+
+ /* minimum delay before retuning */
+ int min_delay_ms;
+};
+
+#if defined(CONFIG_DVB_SI21XX) || \
+ (defined(CONFIG_DVB_SI21XX_MODULE) && defined(MODULE))
+extern struct dvb_frontend *si21xx_attach(const struct si21xx_config *config,
+ struct i2c_adapter *i2c);
+#else
+static inline struct dvb_frontend *si21xx_attach(
+ const struct si21xx_config *config, struct i2c_adapter *i2c)
+{
+ printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__);
+ return NULL;
+}
+#endif
+
+static inline int si21xx_writeregister(struct dvb_frontend *fe, u8 reg, u8 val)
+{
+ int r = 0;
+ u8 buf[] = {reg, val};
+ if (fe->ops.write)
+ r = fe->ops.write(fe, buf, 2);
+ return r;
+}
+
+#endif
[-- 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] 45+ messages in thread
* Re: [linux-dvb] [PATCH] S2API - Add support for USB card modification with si2109/2110 demodulator.
2008-09-16 21:37 ` [linux-dvb] [PATCH] S2API - Silicon Labs si2109/2110 demodulator support Igor M. Liplianin
@ 2008-09-17 22:27 ` Igor M. Liplianin
2008-09-22 4:09 ` Steven Toth
2008-09-22 4:07 ` [linux-dvb] [PATCH] S2API - Silicon Labs si2109/2110 demodulator support Steven Toth
2008-09-23 19:01 ` [linux-dvb] [PATCH] S2API - ST stv0288 " Igor M. Liplianin
2 siblings, 1 reply; 45+ messages in thread
From: Igor M. Liplianin @ 2008-09-17 22:27 UTC (permalink / raw)
To: linux-dvb; +Cc: Steven Toth
[-- Attachment #1: Type: text/plain, Size: 455 bytes --]
В сообщении от 17 September 2008 00:37:59 Igor M. Liplianin написал(а):
> Hi Steve,
>
> Send you patch for Silicon Laboratories si2109/2110 demodulator support.
>
> https://www.silabs.com/products/audiovideo/satellitestb/Pages/default.aspx
>
> It is S2API compliant, as of september, 16-th
>
> Igor
Add support for USB card modification with si2109/2110 demodulator.
It is DvbWorld 2102 and TeVii s600 modification with Serit tuner.
Igor
[-- Attachment #2: 8886.patch --]
[-- Type: text/x-diff, Size: 15713 bytes --]
# HG changeset patch
# User Igor M. Liplianin <liplianin@me.by>
# Date 1221689959 -10800
# Node ID c34ef754e8e02a557b444f3a891d0293e12c2cf3
# Parent 4784f1dc5ad010b2a4c3938e1f732f9b40cca626
Add support for USB card modification with SI2109/2110 demodulator.
From: Igor M. Liplianin <liplianin@me.by>
Add support for USB card modification with SI2109/2110 demodulator.
Signed-off-by: Igor M. Liplianin <liplianin@me.by>
diff -r 4784f1dc5ad0 -r c34ef754e8e0 linux/drivers/media/dvb/dvb-usb/dw2102.c
--- a/linux/drivers/media/dvb/dvb-usb/dw2102.c Tue Sep 16 23:02:20 2008 +0300
+++ b/linux/drivers/media/dvb/dvb-usb/dw2102.c Thu Sep 18 01:19:19 2008 +0300
@@ -11,6 +11,7 @@
*/
#include <linux/version.h>
#include "dw2102.h"
+#include "si21xx.h"
#include "stv0299.h"
#include "z0194a.h"
#include "cx24116.h"
@@ -23,8 +24,8 @@
#define USB_PID_DW2104 0x2104
#endif
-#define DW2102_READ_MSG 0
-#define DW2102_WRITE_MSG 1
+#define DW210X_READ_MSG 0
+#define DW210X_WRITE_MSG 1
#define REG_1F_SYMBOLRATE_BYTE0 0x1f
#define REG_20_SYMBOLRATE_BYTE1 0x20
@@ -33,10 +34,10 @@
#define DW2102_VOLTAGE_CTRL (0x1800)
#define DW2102_RC_QUERY (0x1a00)
-struct dw2102_state {
+struct dw210x_state {
u32 last_key_pressed;
};
-struct dw2102_rc_keys {
+struct dw210x_rc_keys {
u32 keycode;
u32 event;
};
@@ -48,28 +49,27 @@
DVB_DEFINE_MOD_OPT_ADAPTER_NR(adapter_nr);
-static int dw2102_op_rw(struct usb_device *dev, u8 request, u16 value,
+static int dw210x_op_rw(struct usb_device *dev, u8 request, u16 value,
u16 index, u8 * data, u16 len, int flags)
{
int ret;
u8 u8buf[len];
- unsigned int pipe = (flags == DW2102_READ_MSG) ?
+ unsigned int pipe = (flags == DW210X_READ_MSG) ?
usb_rcvctrlpipe(dev, 0) : usb_sndctrlpipe(dev, 0);
- u8 request_type = (flags == DW2102_READ_MSG) ? USB_DIR_IN : USB_DIR_OUT;
+ u8 request_type = (flags == DW210X_READ_MSG) ? USB_DIR_IN : USB_DIR_OUT;
- if (flags == DW2102_WRITE_MSG)
+ if (flags == DW210X_WRITE_MSG)
memcpy(u8buf, data, len);
ret = usb_control_msg(dev, pipe, request, request_type | USB_TYPE_VENDOR,
value, index , u8buf, len, 2000);
- if (flags == DW2102_READ_MSG)
+ if (flags == DW210X_READ_MSG)
memcpy(data, u8buf, len);
return ret;
}
/* I2C */
-
static int dw2102_i2c_transfer(struct i2c_adapter *adap, struct i2c_msg msg[],
int num)
{
@@ -89,10 +89,9 @@
value = msg[0].buf[0];/* register */
for (i = 0; i < msg[1].len; i++) {
value = value + i;
- ret = dw2102_op_rw(d->udev, 0xb5, value, 0,
- buf6, 2, DW2102_READ_MSG);
+ ret = dw210x_op_rw(d->udev, 0xb5, value, 0,
+ buf6, 2, DW210X_READ_MSG);
msg[1].buf[i] = buf6[0];
-
}
break;
case 1:
@@ -102,8 +101,8 @@
buf6[0] = 0x2a;
buf6[1] = msg[0].buf[0];
buf6[2] = msg[0].buf[1];
- ret = dw2102_op_rw(d->udev, 0xb2, 0, 0,
- buf6, 3, DW2102_WRITE_MSG);
+ ret = dw210x_op_rw(d->udev, 0xb2, 0, 0,
+ buf6, 3, DW210X_WRITE_MSG);
break;
case 0x60:
if (msg[0].flags == 0) {
@@ -115,29 +114,85 @@
buf6[4] = msg[0].buf[1];
buf6[5] = msg[0].buf[2];
buf6[6] = msg[0].buf[3];
- ret = dw2102_op_rw(d->udev, 0xb2, 0, 0,
- buf6, 7, DW2102_WRITE_MSG);
+ ret = dw210x_op_rw(d->udev, 0xb2, 0, 0,
+ buf6, 7, DW210X_WRITE_MSG);
} else {
/* read from tuner */
- ret = dw2102_op_rw(d->udev, 0xb5, 0,0,
- buf6, 1, DW2102_READ_MSG);
+ ret = dw210x_op_rw(d->udev, 0xb5, 0, 0,
+ buf6, 1, DW210X_READ_MSG);
msg[0].buf[0] = buf6[0];
}
break;
case (DW2102_RC_QUERY):
- ret = dw2102_op_rw(d->udev, 0xb8, 0, 0,
- buf6, 2, DW2102_READ_MSG);
+ ret = dw210x_op_rw(d->udev, 0xb8, 0, 0,
+ buf6, 2, DW210X_READ_MSG);
msg[0].buf[0] = buf6[0];
msg[0].buf[1] = buf6[1];
break;
case (DW2102_VOLTAGE_CTRL):
buf6[0] = 0x30;
buf6[1] = msg[0].buf[0];
- ret = dw2102_op_rw(d->udev, 0xb2, 0, 0,
- buf6, 2, DW2102_WRITE_MSG);
+ ret = dw210x_op_rw(d->udev, 0xb2, 0, 0,
+ buf6, 2, DW210X_WRITE_MSG);
break;
}
+ break;
+ }
+
+ mutex_unlock(&d->i2c_mutex);
+ return num;
+}
+
+static int dw2102_serit_i2c_transfer(struct i2c_adapter *adap,
+ struct i2c_msg msg[], int num)
+{
+ struct dvb_usb_device *d = i2c_get_adapdata(adap);
+ int ret = 0;
+ u8 buf6[] = {0, 0, 0, 0, 0, 0, 0};
+
+ if (!d)
+ return -ENODEV;
+ if (mutex_lock_interruptible(&d->i2c_mutex) < 0)
+ return -EAGAIN;
+
+ switch (num) {
+ case 2:
+ /* read si2109 register by number */
+ buf6[0] = 0xd0;
+ buf6[1] = msg[0].len;
+ buf6[2] = msg[0].buf[0];
+ ret = dw210x_op_rw(d->udev, 0xc2, 0, 0,
+ buf6, msg[0].len + 2, DW210X_WRITE_MSG);
+ /* read si2109 register */
+ ret = dw210x_op_rw(d->udev, 0xc3, 0xd0, 0,
+ buf6, msg[1].len + 2, DW210X_READ_MSG);
+ memcpy(msg[1].buf, buf6 + 2, msg[1].len);
+
+ break;
+ case 1:
+ switch (msg[0].addr) {
+ case 0x68:
+ /* write to si2109 register */
+ buf6[0] = 0xd0;
+ buf6[1] = msg[0].len;
+ memcpy(buf6 + 2, msg[0].buf, msg[0].len);
+ ret = dw210x_op_rw(d->udev, 0xc2, 0, 0, buf6,
+ msg[0].len + 2, DW210X_WRITE_MSG);
+ break;
+ case(DW2102_RC_QUERY):
+ ret = dw210x_op_rw(d->udev, 0xb8, 0, 0,
+ buf6, 2, DW210X_READ_MSG);
+ msg[0].buf[0] = buf6[0];
+ msg[0].buf[1] = buf6[1];
+ break;
+ case(DW2102_VOLTAGE_CTRL):
+ buf6[0] = 0x30;
+ buf6[1] = msg[0].buf[0];
+ ret = dw210x_op_rw(d->udev, 0xb2, 0, 0,
+ buf6, 2, DW210X_WRITE_MSG);
+ break;
+ }
break;
}
@@ -164,11 +219,11 @@
obuf[0] = 0xaa;
obuf[1] = msg[0].len;
obuf[2] = msg[0].buf[0];
- ret = dw2102_op_rw(d->udev, 0xc2, 0, 0,
- obuf, msg[0].len + 2, DW2102_WRITE_MSG);
+ ret = dw210x_op_rw(d->udev, 0xc2, 0, 0,
+ obuf, msg[0].len + 2, DW210X_WRITE_MSG);
/* second read registers */
- ret = dw2102_op_rw(d->udev, 0xc3, 0xab , 0,
- ibuf, msg[1].len + 2, DW2102_READ_MSG);
+ ret = dw210x_op_rw(d->udev, 0xc3, 0xab , 0,
+ ibuf, msg[1].len + 2, DW210X_READ_MSG);
memcpy(msg[1].buf, ibuf + 2, msg[1].len);
break;
@@ -187,8 +242,8 @@
i = 1;
do {
memcpy(obuf + 3, msg[0].buf + i, (len > 16 ? 16 : len));
- ret = dw2102_op_rw(d->udev, 0xc2, 0, 0,
- obuf, (len > 16 ? 16 : len) + 3, DW2102_WRITE_MSG);
+ ret = dw210x_op_rw(d->udev, 0xc2, 0, 0,
+ obuf, (len > 16 ? 16 : len) + 3, DW210X_WRITE_MSG);
i += 16;
len -= 16;
} while (len > 0);
@@ -198,15 +253,15 @@
obuf[0] = 0xaa;
obuf[1] = msg[0].len;
memcpy(obuf + 2, msg[0].buf, msg[0].len);
- ret = dw2102_op_rw(d->udev, 0xc2, 0, 0,
- obuf, msg[0].len + 2, DW2102_WRITE_MSG);
+ ret = dw210x_op_rw(d->udev, 0xc2, 0, 0,
+ obuf, msg[0].len + 2, DW210X_WRITE_MSG);
}
break;
}
case(DW2102_RC_QUERY): {
u8 ibuf[2];
- ret = dw2102_op_rw(d->udev, 0xb8, 0, 0,
- ibuf, 2, DW2102_READ_MSG);
+ ret = dw210x_op_rw(d->udev, 0xb8, 0, 0,
+ ibuf, 2, DW210X_READ_MSG);
memcpy(msg[0].buf, ibuf , 2);
break;
}
@@ -214,8 +269,8 @@
u8 obuf[2];
obuf[0] = 0x30;
obuf[1] = msg[0].buf[0];
- ret = dw2102_op_rw(d->udev, 0xb2, 0, 0,
- obuf, 2, DW2102_WRITE_MSG);
+ ret = dw210x_op_rw(d->udev, 0xb2, 0, 0,
+ obuf, 2, DW210X_WRITE_MSG);
break;
}
}
@@ -227,29 +282,34 @@
return num;
}
-static u32 dw2102_i2c_func(struct i2c_adapter *adapter)
+static u32 dw210x_i2c_func(struct i2c_adapter *adapter)
{
return I2C_FUNC_I2C;
}
static struct i2c_algorithm dw2102_i2c_algo = {
.master_xfer = dw2102_i2c_transfer,
- .functionality = dw2102_i2c_func,
+ .functionality = dw210x_i2c_func,
+};
+
+static struct i2c_algorithm dw2102_serit_i2c_algo = {
+ .master_xfer = dw2102_serit_i2c_transfer,
+ .functionality = dw210x_i2c_func,
};
static struct i2c_algorithm dw2104_i2c_algo = {
.master_xfer = dw2104_i2c_transfer,
- .functionality = dw2102_i2c_func,
+ .functionality = dw210x_i2c_func,
};
-static int dw2102_read_mac_address(struct dvb_usb_device *d, u8 mac[6])
+static int dw210x_read_mac_address(struct dvb_usb_device *d, u8 mac[6])
{
int i;
u8 ibuf[] = {0, 0};
u8 eeprom[256], eepromline[16];
for (i = 0; i < 256; i++) {
- if (dw2102_op_rw(d->udev, 0xb6, 0xa0 , i, ibuf, 2, DW2102_READ_MSG) < 0) {
+ if (dw210x_op_rw(d->udev, 0xb6, 0xa0 , i, ibuf, 2, DW210X_READ_MSG) < 0) {
err("read eeprom failed.");
return -1;
} else {
@@ -265,7 +325,7 @@
return 0;
};
-static int dw2102_set_voltage(struct dvb_frontend *fe, fe_sec_voltage_t voltage)
+static int dw210x_set_voltage(struct dvb_frontend *fe, fe_sec_voltage_t voltage)
{
static u8 command_13v[1] = {0x00};
static u8 command_18v[1] = {0x01};
@@ -287,25 +347,46 @@
.mpg_clk_pos_pol = 0x01,
};
+static struct si21xx_config serit_sp1511lhb_config = {
+ .demod_address = 0x68,
+ .min_delay_ms = 100,
+
+};
+
static int dw2104_frontend_attach(struct dvb_usb_adapter *d)
{
if ((d->fe = dvb_attach(cx24116_attach, &dw2104_config,
&d->dev->i2c_adap)) != NULL) {
- d->fe->ops.set_voltage = dw2102_set_voltage;
+ d->fe->ops.set_voltage = dw210x_set_voltage;
info("Attached cx24116!\n");
return 0;
}
return -EIO;
}
+static struct dvb_usb_device_properties dw2102_properties;
+
static int dw2102_frontend_attach(struct dvb_usb_adapter *d)
{
- d->fe = dvb_attach(stv0299_attach, &sharp_z0194a_config,
- &d->dev->i2c_adap);
- if (d->fe != NULL) {
- d->fe->ops.set_voltage = dw2102_set_voltage;
- info("Attached stv0299!\n");
- return 0;
+ if (dw2102_properties.i2c_algo == &dw2102_serit_i2c_algo) {
+ /*dw2102_properties.adapter->tuner_attach = NULL;*/
+ d->fe = dvb_attach(si21xx_attach, &serit_sp1511lhb_config,
+ &d->dev->i2c_adap);
+ if (d->fe != NULL) {
+ d->fe->ops.set_voltage = dw210x_set_voltage;
+ info("Attached si21xx!\n");
+ return 0;
+ }
+ }
+ if (dw2102_properties.i2c_algo == &dw2102_i2c_algo) {
+ /*dw2102_properties.adapter->tuner_attach = dw2102_tuner_attach;*/
+ d->fe = dvb_attach(stv0299_attach, &sharp_z0194a_config,
+ &d->dev->i2c_adap);
+ if (d->fe != NULL) {
+ d->fe->ops.set_voltage = dw210x_set_voltage;
+ info("Attached stv0299!\n");
+ return 0;
+ }
}
return -EIO;
}
@@ -317,7 +398,7 @@
return 0;
}
-static struct dvb_usb_rc_key dw2102_rc_keys[] = {
+static struct dvb_usb_rc_key dw210x_rc_keys[] = {
{ 0xf8, 0x0a, KEY_Q }, /*power*/
{ 0xf8, 0x0c, KEY_M }, /*mute*/
{ 0xf8, 0x11, KEY_1 },
@@ -356,7 +437,7 @@
static int dw2102_rc_query(struct dvb_usb_device *d, u32 *event, int *state)
{
- struct dw2102_state *st = d->priv;
+ struct dw210x_state *st = d->priv;
u8 key[2];
struct i2c_msg msg[] = {
{.addr = DW2102_RC_QUERY, .flags = I2C_M_RD, .buf = key,
@@ -366,12 +447,12 @@
*state = REMOTE_NO_KEY_PRESSED;
if (dw2102_i2c_transfer(&d->i2c_adap, msg, 1) == 1) {
- for (i = 0; i < ARRAY_SIZE(dw2102_rc_keys); i++) {
- if (dw2102_rc_keys[i].data == msg[0].buf[0]) {
+ for (i = 0; i < ARRAY_SIZE(dw210x_rc_keys); i++) {
+ if (dw210x_rc_keys[i].data == msg[0].buf[0]) {
*state = REMOTE_KEY_PRESSED;
- *event = dw2102_rc_keys[i].event;
+ *event = dw210x_rc_keys[i].event;
st->last_key_pressed =
- dw2102_rc_keys[i].event;
+ dw210x_rc_keys[i].event;
break;
}
st->last_key_pressed = 0;
@@ -418,15 +499,15 @@
p = kmalloc(fw->size, GFP_KERNEL);
reset = 1;
/*stop the CPU*/
- dw2102_op_rw(dev, 0xa0, 0x7f92, 0, &reset, 1, DW2102_WRITE_MSG);
- dw2102_op_rw(dev, 0xa0, 0xe600, 0, &reset, 1, DW2102_WRITE_MSG);
+ dw210x_op_rw(dev, 0xa0, 0x7f92, 0, &reset, 1, DW210X_WRITE_MSG);
+ dw210x_op_rw(dev, 0xa0, 0xe600, 0, &reset, 1, DW210X_WRITE_MSG);
if (p != NULL) {
memcpy(p, fw->data, fw->size);
for (i = 0; i < fw->size; i += 0x40) {
b = (u8 *) p + i;
- if (dw2102_op_rw(dev, 0xa0, i, 0, b , 0x40,
- DW2102_WRITE_MSG) != 0x40) {
+ if (dw210x_op_rw(dev, 0xa0, i, 0, b , 0x40,
+ DW210X_WRITE_MSG) != 0x40) {
err("error while transferring firmware");
ret = -EINVAL;
break;
@@ -434,13 +515,13 @@
}
/* restart the CPU */
reset = 0;
- if (ret || dw2102_op_rw(dev, 0xa0, 0x7f92, 0, &reset, 1,
- DW2102_WRITE_MSG) != 1) {
+ if (ret || dw210x_op_rw(dev, 0xa0, 0x7f92, 0, &reset, 1,
+ DW210X_WRITE_MSG) != 1) {
err("could not restart the USB controller CPU.");
ret = -EINVAL;
}
- if (ret || dw2102_op_rw(dev, 0xa0, 0xe600, 0, &reset, 1,
- DW2102_WRITE_MSG) != 1) {
+ if (ret || dw210x_op_rw(dev, 0xa0, 0xe600, 0, &reset, 1,
+ DW210X_WRITE_MSG) != 1) {
err("could not restart the USB controller CPU.");
ret = -EINVAL;
}
@@ -449,27 +530,32 @@
case USB_PID_DW2104:
case 0xd650:
reset = 1;
- dw2102_op_rw(dev, 0xc4, 0x0000, 0, &reset, 1,
- DW2102_WRITE_MSG);
+ dw210x_op_rw(dev, 0xc4, 0x0000, 0, &reset, 1,
+ DW210X_WRITE_MSG);
reset = 0;
- dw2102_op_rw(dev, 0xbf, 0x0040, 0, &reset, 0,
- DW2102_WRITE_MSG);
+ dw210x_op_rw(dev, 0xbf, 0x0040, 0, &reset, 0,
+ DW210X_WRITE_MSG);
break;
case USB_PID_DW2102:
- dw2102_op_rw(dev, 0xbf, 0x0040, 0, &reset, 0,
- DW2102_WRITE_MSG);
- dw2102_op_rw(dev, 0xb9, 0x0000, 0, &reset16[0], 2,
- DW2102_READ_MSG);
+ dw210x_op_rw(dev, 0xbf, 0x0040, 0, &reset, 0,
+ DW210X_WRITE_MSG);
+ dw210x_op_rw(dev, 0xb9, 0x0000, 0, &reset16[0], 2,
+ DW210X_READ_MSG);
+ /* check STV0299 frontend */
+ dw210x_op_rw(dev, 0xb5, 0, 0, &reset16[0], 2,
+ DW210X_READ_MSG);
+ if (reset16[0] == 0xa1)
+ dw2102_properties.i2c_algo = &dw2102_i2c_algo;
break;
case 0x2101:
- dw2102_op_rw(dev, 0xbc, 0x0030, 0, &reset16[0], 2,
- DW2102_READ_MSG);
- dw2102_op_rw(dev, 0xba, 0x0000, 0, &reset16[0], 7,
- DW2102_READ_MSG);
- dw2102_op_rw(dev, 0xba, 0x0000, 0, &reset16[0], 7,
- DW2102_READ_MSG);
- dw2102_op_rw(dev, 0xb9, 0x0000, 0, &reset16[0], 2,
- DW2102_READ_MSG);
+ dw210x_op_rw(dev, 0xbc, 0x0030, 0, &reset16[0], 2,
+ DW210X_READ_MSG);
+ dw210x_op_rw(dev, 0xba, 0x0000, 0, &reset16[0], 7,
+ DW210X_READ_MSG);
+ dw210x_op_rw(dev, 0xba, 0x0000, 0, &reset16[0], 7,
+ DW210X_READ_MSG);
+ dw210x_op_rw(dev, 0xb9, 0x0000, 0, &reset16[0], 2,
+ DW210X_READ_MSG);
break;
}
msleep(100);
@@ -482,12 +568,12 @@
.caps = DVB_USB_IS_AN_I2C_ADAPTER,
.usb_ctrl = DEVICE_SPECIFIC,
.firmware = "dvb-usb-dw2102.fw",
- .size_of_priv = sizeof(struct dw2102_state),
+ .size_of_priv = sizeof(struct dw210x_state),
.no_reconnect = 1,
- .i2c_algo = &dw2102_i2c_algo,
- .rc_key_map = dw2102_rc_keys,
- .rc_key_map_size = ARRAY_SIZE(dw2102_rc_keys),
+ .i2c_algo = &dw2102_serit_i2c_algo,
+ .rc_key_map = dw210x_rc_keys,
+ .rc_key_map_size = ARRAY_SIZE(dw210x_rc_keys),
.rc_interval = 150,
.rc_query = dw2102_rc_query,
@@ -495,7 +581,7 @@
/* parameter for the MPEG2-data transfer */
.num_adapters = 1,
.download_firmware = dw2102_load_firmware,
- .read_mac_address = dw2102_read_mac_address,
+ .read_mac_address = dw210x_read_mac_address,
.adapter = {
{
.frontend_attach = dw2102_frontend_attach,
@@ -530,12 +616,12 @@
.caps = DVB_USB_IS_AN_I2C_ADAPTER,
.usb_ctrl = DEVICE_SPECIFIC,
.firmware = "dvb-usb-dw2104.fw",
- .size_of_priv = sizeof(struct dw2102_state),
+ .size_of_priv = sizeof(struct dw210x_state),
.no_reconnect = 1,
.i2c_algo = &dw2104_i2c_algo,
- .rc_key_map = dw2102_rc_keys,
- .rc_key_map_size = ARRAY_SIZE(dw2102_rc_keys),
+ .rc_key_map = dw210x_rc_keys,
+ .rc_key_map_size = ARRAY_SIZE(dw210x_rc_keys),
.rc_interval = 150,
.rc_query = dw2102_rc_query,
@@ -543,7 +629,7 @@
/* parameter for the MPEG2-data transfer */
.num_adapters = 1,
.download_firmware = dw2102_load_firmware,
- .read_mac_address = dw2102_read_mac_address,
+ .read_mac_address = dw210x_read_mac_address,
.adapter = {
{
.frontend_attach = dw2104_frontend_attach,
[-- 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] 45+ messages in thread
* Re: [linux-dvb] [PATCH] S2API - Silicon Labs si2109/2110 demodulator support.
2008-09-16 21:37 ` [linux-dvb] [PATCH] S2API - Silicon Labs si2109/2110 demodulator support Igor M. Liplianin
2008-09-17 22:27 ` [linux-dvb] [PATCH] S2API - Add support for USB card modification with si2109/2110 demodulator Igor M. Liplianin
@ 2008-09-22 4:07 ` Steven Toth
2008-09-23 19:01 ` [linux-dvb] [PATCH] S2API - ST stv0288 " Igor M. Liplianin
2 siblings, 0 replies; 45+ messages in thread
From: Steven Toth @ 2008-09-22 4:07 UTC (permalink / raw)
To: Igor M. Liplianin; +Cc: Steven Toth, linux-dvb@linuxtv.org
Igor M. Liplianin wrote:
> Hi Steve,
>
> Send you patch for Silicon Laboratories si2109/2110 demodulator support.
>
> https://www.silabs.com/products/audiovideo/satellitestb/Pages/default.aspx
>
> It is S2API compliant, as of september, 16-th
>
> Igor
>
Merged, thanks.
- Steve
_______________________________________________
linux-dvb mailing list
linux-dvb@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb
^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: [linux-dvb] [PATCH] S2API - Add support for USB card modification with si2109/2110 demodulator.
2008-09-17 22:27 ` [linux-dvb] [PATCH] S2API - Add support for USB card modification with si2109/2110 demodulator Igor M. Liplianin
@ 2008-09-22 4:09 ` Steven Toth
0 siblings, 0 replies; 45+ messages in thread
From: Steven Toth @ 2008-09-22 4:09 UTC (permalink / raw)
To: Igor M. Liplianin; +Cc: Steven Toth, linux-dvb
Igor M. Liplianin wrote:
> В сообщении от 17 September 2008 00:37:59 Igor M. Liplianin написал(а):
>> Hi Steve,
>>
>> Send you patch for Silicon Laboratories si2109/2110 demodulator support.
>>
>> https://www.silabs.com/products/audiovideo/satellitestb/Pages/default.aspx
>>
>> It is S2API compliant, as of september, 16-th
>>
>> Igor
>
> Add support for USB card modification with si2109/2110 demodulator.
> It is DvbWorld 2102 and TeVii s600 modification with Serit tuner.
Merged, thanks.
- Steve
_______________________________________________
linux-dvb mailing list
linux-dvb@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb
^ permalink raw reply [flat|nested] 45+ messages in thread
* [linux-dvb] [PATCH] S2API - ST stv0288 demodulator support.
2008-09-16 21:37 ` [linux-dvb] [PATCH] S2API - Silicon Labs si2109/2110 demodulator support Igor M. Liplianin
2008-09-17 22:27 ` [linux-dvb] [PATCH] S2API - Add support for USB card modification with si2109/2110 demodulator Igor M. Liplianin
2008-09-22 4:07 ` [linux-dvb] [PATCH] S2API - Silicon Labs si2109/2110 demodulator support Steven Toth
@ 2008-09-23 19:01 ` Igor M. Liplianin
2008-09-23 19:04 ` Igor M. Liplianin
2008-09-25 2:30 ` [linux-dvb] [PATCH] S2API - Kconfig dependency fixes for cards with stv0288 and si21xx Igor M. Liplianin
2 siblings, 2 replies; 45+ messages in thread
From: Igor M. Liplianin @ 2008-09-23 19:01 UTC (permalink / raw)
To: linux-dvb; +Cc: Steven Toth, Georg Acher
Hi,
Send patch for ST stv0288 demodulator support.
Also stb6000 tuner, DvbWorld DW2002 PCI modification with Earda tuner, TeVii
s420 PCI cards.
It is S2API compliant ( single frontend )
If somebody have any objections, let me know
Igor
_______________________________________________
linux-dvb mailing list
linux-dvb@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb
^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: [linux-dvb] [PATCH] S2API - ST stv0288 demodulator support.
2008-09-23 19:01 ` [linux-dvb] [PATCH] S2API - ST stv0288 " Igor M. Liplianin
@ 2008-09-23 19:04 ` Igor M. Liplianin
2008-09-23 19:09 ` Steven Toth
2008-09-24 1:38 ` Steven Toth
2008-09-25 2:30 ` [linux-dvb] [PATCH] S2API - Kconfig dependency fixes for cards with stv0288 and si21xx Igor M. Liplianin
1 sibling, 2 replies; 45+ messages in thread
From: Igor M. Liplianin @ 2008-09-23 19:04 UTC (permalink / raw)
To: linux-dvb; +Cc: Steven Toth, Georg Acher
[-- Attachment #1: Type: text/plain, Size: 552 bytes --]
В сообщении от 23 September 2008 22:01:06 Igor M. Liplianin написал(а):
> Hi,
>
> Send patch for ST stv0288 demodulator support.
> Also stb6000 tuner, DvbWorld DW2002 PCI modification with Earda tuner,
> TeVii s420 PCI cards.
> It is S2API compliant ( single frontend )
> If somebody have any objections, let me know
>
> Igor
>
> _______________________________________________
> linux-dvb mailing list
> linux-dvb@linuxtv.org
> http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb
Forget attachment
Need more sleep :-)
Igor
[-- Attachment #2: 8894.patch --]
[-- Type: text/x-diff, Size: 33521 bytes --]
# HG changeset patch
# User Igor M. Liplianin <liplianin@me.by>
# Date 1222195437 -10800
# Node ID ed6ca1a375d437fc57c29decf0a00199795a3e1e
# Parent 368768bafa198a07f8ad0c5ee0368f4e58dbf9ba
Add support for ST STV0288 demodulator and cards with it.
From: Georg Acher <acher@baycom.de>
From: Igor M. Liplianin <liplianin@me.by>
Add support for ST STV0288 demodulator and cards with it,
such as TeVii S420.
Signed-off by: Georg Acher <acher@baycom.de>
Signed-off-by: Igor M. Liplianin <liplianin@me.by>
diff -r 368768bafa19 -r ed6ca1a375d4 linux/drivers/media/dvb/dm1105/dm1105.c
--- a/linux/drivers/media/dvb/dm1105/dm1105.c Mon Sep 22 00:48:13 2008 -0400
+++ b/linux/drivers/media/dvb/dm1105/dm1105.c Tue Sep 23 21:43:57 2008 +0300
@@ -39,8 +39,8 @@
#include "dvb-pll.h"
#include "stv0299.h"
-/*#include "stv0288.h"
- *#include "stb6000.h"*/
+#include "stv0288.h"
+#include "stb6000.h"
#include "si21xx.h"
#include "cx24116.h"
#include "z0194a.h"
@@ -602,13 +602,12 @@
dm1105dvb_dma_unmap(dm1105dvb);
}
-#if 0 /* keep */
+
static struct stv0288_config earda_config = {
.demod_address = 0x68,
.min_delay_ms = 100,
};
-#endif /* keep */
static struct si21xx_config serit_config = {
.demod_address = 0x68,
.min_delay_ms = 100,
@@ -635,7 +634,7 @@
dvb_attach(dvb_pll_attach, dm1105dvb->fe, 0x60,
&dm1105dvb->i2c_adap, DVB_PLL_OPERA1);
}
-#if 0 /* keep */
+
if (!dm1105dvb->fe) {
dm1105dvb->fe = dvb_attach(
stv0288_attach, &earda_config,
@@ -647,7 +646,7 @@
&dm1105dvb->i2c_adap);
}
}
-#endif /* keep */
+
if (!dm1105dvb->fe) {
dm1105dvb->fe = dvb_attach(
si21xx_attach, &serit_config,
diff -r 368768bafa19 -r ed6ca1a375d4 linux/drivers/media/dvb/frontends/Kconfig
--- a/linux/drivers/media/dvb/frontends/Kconfig Mon Sep 22 00:48:13 2008 -0400
+++ b/linux/drivers/media/dvb/frontends/Kconfig Tue Sep 23 21:43:57 2008 +0300
@@ -42,6 +42,20 @@
default m if DVB_FE_CUSTOMISE
help
A DVB-S tuner module. Say Y when you want to support this frontend.
+
+config DVB_STV0288
+ tristate "ST STV0288 based"
+ depends on DVB_CORE && I2C
+ default m if DVB_FE_CUSTOMISE
+ help
+ A DVB-S tuner module. Say Y when you want to support this frontend.
+
+config DVB_STB6000
+ tristate "ST STB6000 silicon tuner"
+ depends on DVB_CORE && I2C
+ default m if DVB_FE_CUSTOMISE
+ help
+ A DVB-S silicon tuner module. Say Y when you want to support this tuner.
config DVB_STV0299
tristate "ST STV0299 based"
diff -r 368768bafa19 -r ed6ca1a375d4 linux/drivers/media/dvb/frontends/Makefile
--- a/linux/drivers/media/dvb/frontends/Makefile Mon Sep 22 00:48:13 2008 -0400
+++ b/linux/drivers/media/dvb/frontends/Makefile Tue Sep 23 21:43:57 2008 +0300
@@ -51,3 +51,5 @@
obj-$(CONFIG_DVB_LGS8GL5) += lgs8gl5.o
obj-$(CONFIG_DVB_CX24116) += cx24116.o
obj-$(CONFIG_DVB_SI21XX) += si21xx.o
+obj-$(CONFIG_DVB_STV0299) += stv0288.o
+obj-$(CONFIG_DVB_STB6000) += stb6000.o
diff -r 368768bafa19 -r ed6ca1a375d4 linux/drivers/media/dvb/frontends/stb6000.c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/linux/drivers/media/dvb/frontends/stb6000.c Tue Sep 23 21:43:57 2008 +0300
@@ -0,0 +1,255 @@
+ /*
+ Driver for ST STB6000 DVBS Silicon tuner
+
+ Copyright (C) 2008 Igor M. Liplianin (liplianin@me.by)
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+ */
+
+#include <linux/module.h>
+#include "compat.h"
+#include <linux/dvb/frontend.h>
+#include <asm/types.h>
+
+#include "stb6000.h"
+
+static int debug;
+#define dprintk(args...) \
+ do { \
+ if (debug) \
+ printk(KERN_DEBUG "stb6000: " args); \
+ } while (0)
+
+struct stb6000_priv {
+ /* i2c details */
+ int i2c_address;
+ struct i2c_adapter *i2c;
+ u32 frequency;
+};
+
+static int stb6000_release(struct dvb_frontend *fe)
+{
+ kfree(fe->tuner_priv);
+ fe->tuner_priv = NULL;
+ return 0;
+}
+
+static int stb6000_sleep(struct dvb_frontend *fe)
+{
+ struct stb6000_priv *priv = fe->tuner_priv;
+ int ret;
+ u8 buf[] = { 10, 0 };
+ struct i2c_msg msg = {
+ .addr = priv->i2c_address,
+ .flags = 0,
+ .buf = buf,
+ .len = 2
+ };
+
+ dprintk("%s:\n", __func__);
+
+ if (fe->ops.i2c_gate_ctrl)
+ fe->ops.i2c_gate_ctrl(fe, 1);
+
+ ret = i2c_transfer(priv->i2c, &msg, 1);
+ if (ret != 1)
+ dprintk("%s: i2c error\n", __func__);
+
+ if (fe->ops.i2c_gate_ctrl)
+ fe->ops.i2c_gate_ctrl(fe, 0);
+
+ return (ret == 1) ? 0 : ret;
+}
+
+static int stb6000_set_params(struct dvb_frontend *fe,
+ struct dvb_frontend_parameters *params)
+{
+ struct stb6000_priv *priv = fe->tuner_priv;
+ unsigned int n, m;
+ int ret;
+ u32 freq_mhz;
+ int bandwidth;
+ u8 buf[12];
+ struct i2c_msg msg = {
+ .addr = priv->i2c_address,
+ .flags = 0,
+ .buf = buf,
+ .len = 12
+ };
+
+ dprintk("%s:\n", __func__);
+
+ freq_mhz = params->frequency / 1000;
+ bandwidth = params->u.qpsk.symbol_rate / 1000000;
+
+ if (bandwidth > 31)
+ bandwidth = 31;
+
+ if ((freq_mhz > 949) && (freq_mhz < 2151)) {
+ buf[0] = 0x01;
+ buf[1] = 0xac;
+ if (freq_mhz < 1950)
+ buf[1] = 0xaa;
+ if (freq_mhz < 1800)
+ buf[1] = 0xa8;
+ if (freq_mhz < 1650)
+ buf[1] = 0xa6;
+ if (freq_mhz < 1530)
+ buf[1] = 0xa5;
+ if (freq_mhz < 1470)
+ buf[1] = 0xa4;
+ if (freq_mhz < 1370)
+ buf[1] = 0xa2;
+ if (freq_mhz < 1300)
+ buf[1] = 0xa1;
+ if (freq_mhz < 1200)
+ buf[1] = 0xa0;
+ if (freq_mhz < 1075)
+ buf[1] = 0xbc;
+ if (freq_mhz < 1000)
+ buf[1] = 0xba;
+ if (freq_mhz < 1075) {
+ n = freq_mhz / 8; /* vco=lo*4 */
+ m = 2;
+ } else {
+ n = freq_mhz / 16; /* vco=lo*2 */
+ m = 1;
+ }
+ buf[2] = n >> 1;
+ buf[3] = (unsigned char)(((n & 1) << 7) |
+ (m * freq_mhz - n * 16) | 0x60);
+ buf[4] = 0x04;
+ buf[5] = 0x0e;
+
+ buf[6] = (unsigned char)(bandwidth);
+
+ buf[7] = 0xd8;
+ buf[8] = 0xd0;
+ buf[9] = 0x50;
+ buf[10] = 0xeb;
+ buf[11] = 0x4f;
+
+ if (fe->ops.i2c_gate_ctrl)
+ fe->ops.i2c_gate_ctrl(fe, 1);
+
+ ret = i2c_transfer(priv->i2c, &msg, 1);
+ if (ret != 1)
+ dprintk("%s: i2c error\n", __func__);
+
+ udelay(10);
+ if (fe->ops.i2c_gate_ctrl)
+ fe->ops.i2c_gate_ctrl(fe, 0);
+
+ buf[0] = 0x07;
+ buf[1] = 0xdf;
+ buf[2] = 0xd0;
+ buf[3] = 0x50;
+ buf[4] = 0xfb;
+ msg.len = 5;
+
+ if (fe->ops.i2c_gate_ctrl)
+ fe->ops.i2c_gate_ctrl(fe, 1);
+
+ ret = i2c_transfer(priv->i2c, &msg, 1);
+ if (ret != 1)
+ dprintk("%s: i2c error\n", __func__);
+
+ udelay(10);
+ if (fe->ops.i2c_gate_ctrl)
+ fe->ops.i2c_gate_ctrl(fe, 0);
+
+ priv->frequency = freq_mhz * 1000;
+
+ return (ret == 1) ? 0 : ret;
+ }
+ return -1;
+}
+
+static int stb6000_get_frequency(struct dvb_frontend *fe, u32 *frequency)
+{
+ struct stb6000_priv *priv = fe->tuner_priv;
+ *frequency = priv->frequency;
+ return 0;
+}
+
+static struct dvb_tuner_ops stb6000_tuner_ops = {
+ .info = {
+ .name = "ST STB6000",
+ .frequency_min = 950000,
+ .frequency_max = 2150000
+ },
+ .release = stb6000_release,
+ .sleep = stb6000_sleep,
+ .set_params = stb6000_set_params,
+ .get_frequency = stb6000_get_frequency,
+};
+
+struct dvb_frontend *stb6000_attach(struct dvb_frontend *fe, int addr,
+ struct i2c_adapter *i2c)
+{
+ struct stb6000_priv *priv = NULL;
+ u8 b1[] = { 0, 0 };
+ struct i2c_msg msg[2] = {
+ {
+ .addr = addr,
+ .flags = 0,
+ .buf = NULL,
+ .len = 0
+ }, {
+ .addr = addr,
+ .flags = I2C_M_RD,
+ .buf = b1,
+ .len = 2
+ }
+ };
+ int ret;
+
+ dprintk("%s:\n", __func__);
+
+ if (fe->ops.i2c_gate_ctrl)
+ fe->ops.i2c_gate_ctrl(fe, 1);
+
+ /* is some i2c device here ? */
+ ret = i2c_transfer(i2c, msg, 2);
+ if (fe->ops.i2c_gate_ctrl)
+ fe->ops.i2c_gate_ctrl(fe, 0);
+
+ if (ret != 2)
+ return NULL;
+
+ priv = kzalloc(sizeof(struct stb6000_priv), GFP_KERNEL);
+ if (priv == NULL)
+ return NULL;
+
+ priv->i2c_address = addr;
+ priv->i2c = i2c;
+
+ memcpy(&fe->ops.tuner_ops, &stb6000_tuner_ops,
+ sizeof(struct dvb_tuner_ops));
+
+ fe->tuner_priv = priv;
+
+ return fe;
+}
+EXPORT_SYMBOL(stb6000_attach);
+
+module_param(debug, int, 0644);
+MODULE_PARM_DESC(debug, "Turn on/off frontend debugging (default:off).");
+
+MODULE_DESCRIPTION("DVB STB6000 driver");
+MODULE_AUTHOR("Igor M. Liplianin <liplianin@me.by>");
+MODULE_LICENSE("GPL");
diff -r 368768bafa19 -r ed6ca1a375d4 linux/drivers/media/dvb/frontends/stb6000.h
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/linux/drivers/media/dvb/frontends/stb6000.h Tue Sep 23 21:43:57 2008 +0300
@@ -0,0 +1,51 @@
+ /*
+ Driver for ST stb6000 DVBS Silicon tuner
+
+ Copyright (C) 2008 Igor M. Liplianin (liplianin@me.by)
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+ */
+
+#ifndef __DVB_STB6000_H__
+#define __DVB_STB6000_H__
+
+#include <linux/i2c.h>
+#include "dvb_frontend.h"
+
+/**
+ * Attach a stb6000 tuner to the supplied frontend structure.
+ *
+ * @param fe Frontend to attach to.
+ * @param addr i2c address of the tuner.
+ * @param i2c i2c adapter to use.
+ * @return FE pointer on success, NULL on failure.
+ */
+#if defined(CONFIG_DVB_STB6000) || (defined(CONFIG_DVB_STB6000_MODULE) \
+ && defined(MODULE))
+extern struct dvb_frontend *stb6000_attach(struct dvb_frontend *fe, int addr,
+ struct i2c_adapter *i2c);
+#else
+static inline struct dvb_frontend *stb6000_attach(struct dvb_frontend *fe,
+ int addr,
+ struct i2c_adapter *i2c)
+{
+ printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__);
+ return NULL;
+}
+#endif /* CONFIG_DVB_STB6000 */
+
+#endif /* __DVB_STB6000_H__ */
diff -r 368768bafa19 -r ed6ca1a375d4 linux/drivers/media/dvb/frontends/stv0288.c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/linux/drivers/media/dvb/frontends/stv0288.c Tue Sep 23 21:43:57 2008 +0300
@@ -0,0 +1,606 @@
+/*
+ Driver for ST STV0288 demodulator
+ Copyright (C) 2006 Georg Acher, BayCom GmbH, acher (at) baycom (dot) de
+ for Reel Multimedia
+ Copyright (C) 2008 TurboSight.com, Bob Liu <bob@turbosight.com>
+ Copyright (C) 2008 Igor M. Liplianin <liplianin@me.by>
+ Removed stb6000 specific tuner code and revised some
+ procedures.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+*/
+
+#include <linux/init.h>
+#include <linux/kernel.h>
+#include <linux/module.h>
+#include <linux/string.h>
+#include <linux/slab.h>
+#include <linux/jiffies.h>
+#include <asm/div64.h>
+
+#include "dvb_frontend.h"
+#include "stv0288.h"
+
+struct stv0288_state {
+ struct i2c_adapter *i2c;
+ const struct stv0288_config *config;
+ struct dvb_frontend frontend;
+
+ u8 initialised:1;
+ u32 tuner_frequency;
+ u32 symbol_rate;
+ fe_code_rate_t fec_inner;
+ int errmode;
+};
+
+#define STATUS_BER 0
+#define STATUS_UCBLOCKS 1
+
+static int debug;
+static int debug_legacy_dish_switch;
+#define dprintk(args...) \
+ do { \
+ if (debug) \
+ printk(KERN_DEBUG "stv0288: " args); \
+ } while (0)
+
+
+static int stv0288_writeregI(struct stv0288_state *state, u8 reg, u8 data)
+{
+ int ret;
+ u8 buf[] = { reg, data };
+ struct i2c_msg msg = {
+ .addr = state->config->demod_address,
+ .flags = 0,
+ .buf = buf,
+ .len = 2
+ };
+
+ ret = i2c_transfer(state->i2c, &msg, 1);
+
+ if (ret != 1)
+ dprintk("%s: writereg error (reg == 0x%02x, val == 0x%02x, "
+ "ret == %i)\n", __func__, reg, data, ret);
+
+ return (ret != 1) ? -EREMOTEIO : 0;
+}
+
+static int stv0288_write(struct dvb_frontend *fe, u8 *buf, int len)
+{
+ struct stv0288_state *state = fe->demodulator_priv;
+
+ if (len != 2)
+ return -EINVAL;
+
+ return stv0288_writeregI(state, buf[0], buf[1]);
+}
+
+static u8 stv0288_readreg(struct stv0288_state *state, u8 reg)
+{
+ int ret;
+ u8 b0[] = { reg };
+ u8 b1[] = { 0 };
+ struct i2c_msg msg[] = {
+ {
+ .addr = state->config->demod_address,
+ .flags = 0,
+ .buf = b0,
+ .len = 1
+ }, {
+ .addr = state->config->demod_address,
+ .flags = I2C_M_RD,
+ .buf = b1,
+ .len = 1
+ }
+ };
+
+ ret = i2c_transfer(state->i2c, msg, 2);
+
+ if (ret != 2)
+ dprintk("%s: readreg error (reg == 0x%02x, ret == %i)\n",
+ __func__, reg, ret);
+
+ return b1[0];
+}
+
+static int stv0288_set_symbolrate(struct dvb_frontend *fe, u32 srate)
+{
+ struct stv0288_state *state = fe->demodulator_priv;
+ unsigned int temp;
+ unsigned char b[3];
+
+ if ((srate < 1000000) || (srate > 45000000))
+ return -EINVAL;
+
+ temp = (unsigned int)srate / 1000;
+
+ temp = temp * 32768;
+ temp = temp / 25;
+ temp = temp / 125;
+ b[0] = (unsigned char)((temp >> 12) & 0xff);
+ b[1] = (unsigned char)((temp >> 4) & 0xff);
+ b[2] = (unsigned char)((temp << 4) & 0xf0);
+ stv0288_writeregI(state, 0x28, 0x80); /* SFRH */
+ stv0288_writeregI(state, 0x29, 0); /* SFRM */
+ stv0288_writeregI(state, 0x2a, 0); /* SFRL */
+
+ stv0288_writeregI(state, 0x28, b[0]);
+ stv0288_writeregI(state, 0x29, b[1]);
+ stv0288_writeregI(state, 0x2a, b[2]);
+ dprintk("stv0288: stv0288_set_symbolrate\n");
+
+ return 0;
+}
+
+static int stv0288_send_diseqc_msg(struct dvb_frontend *fe,
+ struct dvb_diseqc_master_cmd *m)
+{
+ struct stv0288_state *state = fe->demodulator_priv;
+
+ int i;
+
+ dprintk("%s\n", __func__);
+
+ stv0288_writeregI(state, 0x09, 0);
+ msleep(30);
+ stv0288_writeregI(state, 0x05, 0x16);
+
+ for (i = 0; i < m->msg_len; i++) {
+ if (stv0288_writeregI(state, 0x06, m->msg[i]))
+ return -EREMOTEIO;
+ msleep(12);
+ }
+
+ return 0;
+}
+
+static int stv0288_send_diseqc_burst(struct dvb_frontend *fe,
+ fe_sec_mini_cmd_t burst)
+{
+ struct stv0288_state *state = fe->demodulator_priv;
+
+ dprintk("%s\n", __func__);
+
+ if (stv0288_writeregI(state, 0x05, 0x16))/* burst mode */
+ return -EREMOTEIO;
+
+ if (stv0288_writeregI(state, 0x06, burst == SEC_MINI_A ? 0x00 : 0xff))
+ return -EREMOTEIO;
+
+ if (stv0288_writeregI(state, 0x06, 0x12))
+ return -EREMOTEIO;
+
+ return 0;
+}
+
+static int stv0288_set_tone(struct dvb_frontend *fe, fe_sec_tone_mode_t tone)
+{
+ struct stv0288_state *state = fe->demodulator_priv;
+
+ switch (tone) {
+ case SEC_TONE_ON:
+ if (stv0288_writeregI(state, 0x05, 0x10))/* burst mode */
+ return -EREMOTEIO;
+ return stv0288_writeregI(state, 0x06, 0xff);
+
+ case SEC_TONE_OFF:
+ if (stv0288_writeregI(state, 0x05, 0x13))/* burst mode */
+ return -EREMOTEIO;
+ return stv0288_writeregI(state, 0x06, 0x00);
+
+ default:
+ return -EINVAL;
+ }
+}
+
+static u8 stv0288_inittab[] = {
+ 0x01, 0x15,
+ 0x02, 0x20,
+ 0x09, 0x0,
+ 0x0a, 0x4,
+ 0x0b, 0x0,
+ 0x0c, 0x0,
+ 0x0d, 0x0,
+ 0x0e, 0xd4,
+ 0x0f, 0x30,
+ 0x11, 0x80,
+ 0x12, 0x03,
+ 0x13, 0x48,
+ 0x14, 0x84,
+ 0x15, 0x45,
+ 0x16, 0xb7,
+ 0x17, 0x9c,
+ 0x18, 0x0,
+ 0x19, 0xa6,
+ 0x1a, 0x88,
+ 0x1b, 0x8f,
+ 0x1c, 0xf0,
+ 0x20, 0x0b,
+ 0x21, 0x54,
+ 0x22, 0x0,
+ 0x23, 0x0,
+ 0x2b, 0xff,
+ 0x2c, 0xf7,
+ 0x30, 0x0,
+ 0x31, 0x1e,
+ 0x32, 0x14,
+ 0x33, 0x0f,
+ 0x34, 0x09,
+ 0x35, 0x0c,
+ 0x36, 0x05,
+ 0x37, 0x2f,
+ 0x38, 0x16,
+ 0x39, 0xbe,
+ 0x3a, 0x0,
+ 0x3b, 0x13,
+ 0x3c, 0x11,
+ 0x3d, 0x30,
+ 0x40, 0x63,
+ 0x41, 0x04,
+ 0x42, 0x60,
+ 0x43, 0x00,
+ 0x44, 0x00,
+ 0x45, 0x00,
+ 0x46, 0x00,
+ 0x47, 0x00,
+ 0x4a, 0x00,
+ 0x50, 0x10,
+ 0x51, 0x38,
+ 0x52, 0x21,
+ 0x58, 0x54,
+ 0x59, 0x86,
+ 0x5a, 0x0,
+ 0x5b, 0x9b,
+ 0x5c, 0x08,
+ 0x5d, 0x7f,
+ 0x5e, 0x0,
+ 0x5f, 0xff,
+ 0x70, 0x0,
+ 0x71, 0x0,
+ 0x72, 0x0,
+ 0x74, 0x0,
+ 0x75, 0x0,
+ 0x76, 0x0,
+ 0x81, 0x0,
+ 0x82, 0x3f,
+ 0x83, 0x3f,
+ 0x84, 0x0,
+ 0x85, 0x0,
+ 0x88, 0x0,
+ 0x89, 0x0,
+ 0x8a, 0x0,
+ 0x8b, 0x0,
+ 0x8c, 0x0,
+ 0x90, 0x0,
+ 0x91, 0x0,
+ 0x92, 0x0,
+ 0x93, 0x0,
+ 0x94, 0x1c,
+ 0x97, 0x0,
+ 0xa0, 0x48,
+ 0xa1, 0x0,
+ 0xb0, 0xb8,
+ 0xb1, 0x3a,
+ 0xb2, 0x10,
+ 0xb3, 0x82,
+ 0xb4, 0x80,
+ 0xb5, 0x82,
+ 0xb6, 0x82,
+ 0xb7, 0x82,
+ 0xb8, 0x20,
+ 0xb9, 0x0,
+ 0xf0, 0x0,
+ 0xf1, 0x0,
+ 0xf2, 0xc0,
+ 0x51, 0x36,
+ 0x52, 0x09,
+ 0x53, 0x94,
+ 0x54, 0x62,
+ 0x55, 0x29,
+ 0x56, 0x64,
+ 0x57, 0x2b,
+ 0xff, 0xff,
+};
+
+static int stv0288_set_voltage(struct dvb_frontend *fe, fe_sec_voltage_t volt)
+{
+ dprintk("%s: %s\n", __func__,
+ volt == SEC_VOLTAGE_13 ? "SEC_VOLTAGE_13" :
+ volt == SEC_VOLTAGE_18 ? "SEC_VOLTAGE_18" : "??");
+
+ return 0;
+}
+
+static int stv0288_init(struct dvb_frontend *fe)
+{
+ struct stv0288_state *state = fe->demodulator_priv;
+ int i;
+
+ dprintk("stv0288: init chip\n");
+ stv0288_writeregI(state, 0x41, 0x04);
+ msleep(50);
+
+ for (i = 0; !(stv0288_inittab[i] == 0xff &&
+ stv0288_inittab[i + 1] == 0xff); i += 2)
+ stv0288_writeregI(state, stv0288_inittab[i],
+ stv0288_inittab[i + 1]);
+
+ return 0;
+}
+
+static int stv0288_read_status(struct dvb_frontend *fe, fe_status_t *status)
+{
+ struct stv0288_state *state = fe->demodulator_priv;
+
+ u8 sync = stv0288_readreg(state, 0x24);
+ if (sync == 255)
+ sync = 0;
+
+ dprintk("%s : FE_READ_STATUS : VSTATUS: 0x%02x\n", __func__, sync);
+
+ *status = 0;
+
+ if ((sync & 0x08) == 0x08) {
+ *status |= FE_HAS_LOCK;
+ dprintk("stv0288 has locked\n");
+ }
+
+ return 0;
+}
+
+static int stv0288_read_ber(struct dvb_frontend *fe, u32 *ber)
+{
+ struct stv0288_state *state = fe->demodulator_priv;
+
+ if (state->errmode != STATUS_BER)
+ return 0;
+ *ber = (stv0288_readreg(state, 0x26) << 8) |
+ stv0288_readreg(state, 0x27);
+ dprintk("stv0288_read_ber %d\n", *ber);
+
+ return 0;
+}
+
+
+static int stv0288_read_signal_strength(struct dvb_frontend *fe, u16 *strength)
+{
+ struct stv0288_state *state = fe->demodulator_priv;
+
+ s32 signal = 0xffff - ((stv0288_readreg(state, 0x10) << 8));
+
+
+ signal = signal * 5 / 4;
+ *strength = (signal > 0xffff) ? 0xffff : (signal < 0) ? 0 : signal;
+ dprintk("stv0288_read_signal_strength %d\n", *strength);
+
+ return 0;
+}
+static int stv0288_sleep(struct dvb_frontend *fe)
+{
+ struct stv0288_state *state = fe->demodulator_priv;
+
+ stv0288_writeregI(state, 0x41, 0x84);
+ state->initialised = 0;
+
+ return 0;
+}
+static int stv0288_read_snr(struct dvb_frontend *fe, u16 *snr)
+{
+ struct stv0288_state *state = fe->demodulator_priv;
+
+ s32 xsnr = 0xffff - ((stv0288_readreg(state, 0x2d) << 8)
+ | stv0288_readreg(state, 0x2e));
+ xsnr = 3 * (xsnr - 0xa100);
+ *snr = (xsnr > 0xffff) ? 0xffff : (xsnr < 0) ? 0 : xsnr;
+ dprintk("stv0288_read_snr %d\n", *snr);
+
+ return 0;
+}
+
+static int stv0288_read_ucblocks(struct dvb_frontend *fe, u32 *ucblocks)
+{
+ struct stv0288_state *state = fe->demodulator_priv;
+
+ if (state->errmode != STATUS_BER)
+ return 0;
+ *ucblocks = (stv0288_readreg(state, 0x26) << 8) |
+ stv0288_readreg(state, 0x27);
+ dprintk("stv0288_read_ber %d\n", *ucblocks);
+
+ return 0;
+}
+
+static int stv0288_set_property(struct dvb_frontend *fe, struct dtv_property *p)
+{
+ dprintk("%s(..)\n", __func__);
+ return 0;
+}
+
+static int stv0288_get_property(struct dvb_frontend *fe, struct dtv_property *p)
+{
+ dprintk("%s(..)\n", __func__);
+ return 0;
+}
+
+static int stv0288_set_frontend(struct dvb_frontend *fe,
+ struct dvb_frontend_parameters *dfp)
+{
+ struct stv0288_state *state = fe->demodulator_priv;
+ struct dtv_frontend_properties *c = &fe->dtv_property_cache;
+
+ char tm;
+ unsigned char tda[3];
+
+ dprintk("%s : FE_SET_FRONTEND\n", __func__);
+
+ if (c->delivery_system != SYS_DVBS) {
+ dprintk("%s: unsupported delivery "
+ "system selected (%d)\n",
+ __func__, c->delivery_system);
+ return -EOPNOTSUPP;
+ }
+
+ if (state->config->set_ts_params)
+ state->config->set_ts_params(fe, 0);
+
+ /* only frequency & symbol_rate are used for tuner*/
+ dfp->frequency = c->frequency;
+ dfp->u.qpsk.symbol_rate = c->symbol_rate;
+ if (fe->ops.tuner_ops.set_params) {
+ fe->ops.tuner_ops.set_params(fe, dfp);
+ if (fe->ops.i2c_gate_ctrl)
+ fe->ops.i2c_gate_ctrl(fe, 0);
+ }
+
+ udelay(10);
+ stv0288_set_symbolrate(fe, c->symbol_rate);
+ /* Carrier lock control register */
+ stv0288_writeregI(state, 0x15, 0xc5);
+
+ tda[0] = 0x2b; /* CFRM */
+ tda[2] = 0x0; /* CFRL */
+ for (tm = -6; tm < 7;) {
+ /* Viterbi status */
+ if (stv0288_readreg(state, 0x24) & 0x80)
+ break;
+
+ tda[2] += 40;
+ if (tda[2] < 40)
+ tm++;
+ tda[1] = (unsigned char)tm;
+ stv0288_writeregI(state, 0x2b, tda[1]);
+ stv0288_writeregI(state, 0x2c, tda[2]);
+ udelay(30);
+ }
+
+ state->tuner_frequency = c->frequency;
+ state->fec_inner = FEC_AUTO;
+ state->symbol_rate = c->symbol_rate;
+
+ return 0;
+}
+
+static int stv0288_i2c_gate_ctrl(struct dvb_frontend *fe, int enable)
+{
+ struct stv0288_state *state = fe->demodulator_priv;
+
+ if (enable)
+ stv0288_writeregI(state, 0x01, 0xb5);
+ else
+ stv0288_writeregI(state, 0x01, 0x35);
+
+ udelay(1);
+
+ return 0;
+}
+
+static void stv0288_release(struct dvb_frontend *fe)
+{
+ struct stv0288_state *state = fe->demodulator_priv;
+ kfree(state);
+}
+
+static struct dvb_frontend_ops stv0288_ops = {
+
+ .info = {
+ .name = "ST STV0288 DVB-S",
+ .type = FE_QPSK,
+ .frequency_min = 950000,
+ .frequency_max = 2150000,
+ .frequency_stepsize = 1000, /* kHz for QPSK frontends */
+ .frequency_tolerance = 0,
+ .symbol_rate_min = 1000000,
+ .symbol_rate_max = 45000000,
+ .symbol_rate_tolerance = 500, /* ppm */
+ .caps = FE_CAN_FEC_1_2 | FE_CAN_FEC_2_3 | FE_CAN_FEC_3_4 |
+ FE_CAN_FEC_5_6 | FE_CAN_FEC_7_8 |
+ FE_CAN_QPSK |
+ FE_CAN_FEC_AUTO
+ },
+
+ .release = stv0288_release,
+ .init = stv0288_init,
+ .sleep = stv0288_sleep,
+ .write = stv0288_write,
+ .i2c_gate_ctrl = stv0288_i2c_gate_ctrl,
+ .read_status = stv0288_read_status,
+ .read_ber = stv0288_read_ber,
+ .read_signal_strength = stv0288_read_signal_strength,
+ .read_snr = stv0288_read_snr,
+ .read_ucblocks = stv0288_read_ucblocks,
+ .diseqc_send_master_cmd = stv0288_send_diseqc_msg,
+ .diseqc_send_burst = stv0288_send_diseqc_burst,
+ .set_tone = stv0288_set_tone,
+ .set_voltage = stv0288_set_voltage,
+
+ .set_property = stv0288_set_property,
+ .get_property = stv0288_get_property,
+ .set_frontend = stv0288_set_frontend,
+};
+
+struct dvb_frontend *stv0288_attach(const struct stv0288_config *config,
+ struct i2c_adapter *i2c)
+{
+ struct stv0288_state *state = NULL;
+ int id;
+
+ /* allocate memory for the internal state */
+ state = kmalloc(sizeof(struct stv0288_state), GFP_KERNEL);
+ if (state == NULL)
+ goto error;
+
+ /* setup the state */
+ state->config = config;
+ state->i2c = i2c;
+ state->initialised = 0;
+ state->tuner_frequency = 0;
+ state->symbol_rate = 0;
+ state->fec_inner = 0;
+ state->errmode = STATUS_BER;
+
+ stv0288_writeregI(state, 0x41, 0x04);
+ msleep(200);
+ id = stv0288_readreg(state, 0x00);
+ dprintk("stv0288 id %x\n", id);
+
+ /* register 0x00 contains 0x11 for STV0288 */
+ if (id != 0x11)
+ goto error;
+
+ /* create dvb_frontend */
+ memcpy(&state->frontend.ops, &stv0288_ops,
+ sizeof(struct dvb_frontend_ops));
+ state->frontend.demodulator_priv = state;
+ return &state->frontend;
+
+error:
+ kfree(state);
+
+ return NULL;
+}
+EXPORT_SYMBOL(stv0288_attach);
+
+module_param(debug_legacy_dish_switch, int, 0444);
+MODULE_PARM_DESC(debug_legacy_dish_switch,
+ "Enable timing analysis for Dish Network legacy switches");
+
+module_param(debug, int, 0644);
+MODULE_PARM_DESC(debug, "Turn on/off frontend debugging (default:off).");
+
+MODULE_DESCRIPTION("ST STV0288 DVB Demodulator driver");
+MODULE_AUTHOR("Georg Acher, Bob Liu, Igor liplianin");
+MODULE_LICENSE("GPL");
+
diff -r 368768bafa19 -r ed6ca1a375d4 linux/drivers/media/dvb/frontends/stv0288.h
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/linux/drivers/media/dvb/frontends/stv0288.h Tue Sep 23 21:43:57 2008 +0300
@@ -0,0 +1,65 @@
+/*
+ Driver for ST STV0288 demodulator
+
+ Copyright (C) 2006 Georg Acher, BayCom GmbH, acher (at) baycom (dot) de
+ for Reel Multimedia
+ Copyright (C) 2008 TurboSight.com, <bob@turbosight.com>
+ Copyright (C) 2008 Igor M. Liplianin <liplianin@me.by>
+ Removed stb6000 specific tuner code and revised some
+ procedures.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+*/
+
+#ifndef STV0288_H
+#define STV0288_H
+
+#include <linux/dvb/frontend.h>
+#include "dvb_frontend.h"
+
+struct stv0288_config {
+ /* the demodulator's i2c address */
+ u8 demod_address;
+
+ /* minimum delay before retuning */
+ int min_delay_ms;
+
+ int (*set_ts_params)(struct dvb_frontend *fe, int is_punctured);
+};
+
+#if defined(CONFIG_DVB_STV0288) || (defined(CONFIG_DVB_STV0288_MODULE) && \
+ defined(MODULE))
+extern struct dvb_frontend *stv0288_attach(const struct stv0288_config *config,
+ struct i2c_adapter *i2c);
+#else
+static inline struct dvb_frontend *stv0288_attach(const struct stv0288_config *config,
+ struct i2c_adapter *i2c)
+{
+ printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__);
+ return NULL;
+}
+#endif /* CONFIG_DVB_STV0288 */
+
+static inline int stv0288_writereg(struct dvb_frontend *fe, u8 reg, u8 val)
+{
+ int r = 0;
+ u8 buf[] = { reg, val };
+ if (fe->ops.write)
+ r = fe->ops.write(fe, buf, 2);
+ return r;
+}
+
+#endif /* STV0288_H */
diff -r 368768bafa19 -r ed6ca1a375d4 linux/drivers/media/dvb/frontends/stv0299.c
--- a/linux/drivers/media/dvb/frontends/stv0299.c Mon Sep 22 00:48:13 2008 -0400
+++ b/linux/drivers/media/dvb/frontends/stv0299.c Tue Sep 23 21:43:57 2008 +0300
@@ -559,6 +559,8 @@
int invval = 0;
dprintk ("%s : FE_SET_FRONTEND\n", __func__);
+ if (state->config->set_ts_params)
+ state->config->set_ts_params(fe, 0);
// set the inversion
if (p->inversion == INVERSION_OFF) invval = 0;
diff -r 368768bafa19 -r ed6ca1a375d4 linux/drivers/media/dvb/frontends/stv0299.h
--- a/linux/drivers/media/dvb/frontends/stv0299.h Mon Sep 22 00:48:13 2008 -0400
+++ b/linux/drivers/media/dvb/frontends/stv0299.h Tue Sep 23 21:43:57 2008 +0300
@@ -89,15 +89,18 @@
int min_delay_ms;
/* Set the symbol rate */
- int (*set_symbol_rate)(struct dvb_frontend* fe, u32 srate, u32 ratio);
+ int (*set_symbol_rate)(struct dvb_frontend *fe, u32 srate, u32 ratio);
+
+ /* Set device param to start dma */
+ int (*set_ts_params)(struct dvb_frontend *fe, int is_punctured);
};
#if defined(CONFIG_DVB_STV0299) || (defined(CONFIG_DVB_STV0299_MODULE) && defined(MODULE))
-extern struct dvb_frontend* stv0299_attach(const struct stv0299_config* config,
- struct i2c_adapter* i2c);
+extern struct dvb_frontend *stv0299_attach(const struct stv0299_config *config,
+ struct i2c_adapter *i2c);
#else
-static inline struct dvb_frontend* stv0299_attach(const struct stv0299_config* config,
- struct i2c_adapter* i2c)
+static inline struct dvb_frontend *stv0299_attach(const struct stv0299_config *config,
+ struct i2c_adapter *i2c)
{
printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__);
return NULL;
diff -r 368768bafa19 -r ed6ca1a375d4 linux/drivers/media/video/cx88/Kconfig
--- a/linux/drivers/media/video/cx88/Kconfig Mon Sep 22 00:48:13 2008 -0400
+++ b/linux/drivers/media/video/cx88/Kconfig Tue Sep 23 21:43:57 2008 +0300
@@ -59,6 +59,9 @@
select MEDIA_TUNER_SIMPLE if !DVB_FE_CUSTOMISE
select DVB_S5H1411 if !DVB_FE_CUSTOMISE
select DVB_CX24116 if !DVB_FE_CUSTOMISE
+ select DVB_STV0299 if !DVB_FE_CUSTOMISE
+ select DVB_STV0288 if !DVB_FE_CUSTOMISE
+ select DVB_STB6000 if !DVB_FE_CUSTOMISE
---help---
This adds support for DVB/ATSC cards based on the
Conexant 2388x chip.
diff -r 368768bafa19 -r ed6ca1a375d4 linux/drivers/media/video/cx88/cx88-cards.c
--- a/linux/drivers/media/video/cx88/cx88-cards.c Mon Sep 22 00:48:13 2008 -0400
+++ b/linux/drivers/media/video/cx88/cx88-cards.c Tue Sep 23 21:43:57 2008 +0300
@@ -1769,6 +1769,18 @@
} },
.mpeg = CX88_MPEG_DVB,
},
+ [CX88_BOARD_TEVII_S420] = {
+ .name = "TeVii S420 DVB-S",
+ .tuner_type = UNSET,
+ .radio_type = UNSET,
+ .tuner_addr = ADDR_UNSET,
+ .radio_addr = ADDR_UNSET,
+ .input = {{
+ .type = CX88_VMUX_DVB,
+ .vmux = 0,
+ } },
+ .mpeg = CX88_MPEG_DVB,
+ },
[CX88_BOARD_TEVII_S460] = {
.name = "TeVii S460 DVB-S/S2",
.tuner_type = UNSET,
@@ -2175,7 +2187,11 @@
.subdevice = 0x6906,
.card = CX88_BOARD_HAUPPAUGE_HVR4000LITE,
}, {
- .subvendor = 0xD460,
+ .subvendor = 0xd420,
+ .subdevice = 0x9022,
+ .card = CX88_BOARD_TEVII_S420,
+ }, {
+ .subvendor = 0xd460,
.subdevice = 0x9022,
.card = CX88_BOARD_TEVII_S460,
}, {
@@ -2767,6 +2783,7 @@
cx88_call_i2c_clients(core, TUNER_SET_CONFIG, &tea5767_cfg);
break;
}
+ case CX88_BOARD_TEVII_S420:
case CX88_BOARD_TEVII_S460:
cx_write(MO_SRST_IO, 0);
msleep(100);
diff -r 368768bafa19 -r ed6ca1a375d4 linux/drivers/media/video/cx88/cx88-dvb.c
--- a/linux/drivers/media/video/cx88/cx88-dvb.c Mon Sep 22 00:48:13 2008 -0400
+++ b/linux/drivers/media/video/cx88/cx88-dvb.c Tue Sep 23 21:43:57 2008 +0300
@@ -49,6 +49,10 @@
#include "tuner-simple.h"
#include "tda9887.h"
#include "s5h1411.h"
+#include "stv0299.h"
+#include "z0194a.h"
+#include "stv0288.h"
+#include "stb6000.h"
#include "cx24116.h"
MODULE_DESCRIPTION("driver for cx2388x based DVB cards");
@@ -586,6 +590,25 @@
.reset_device = cx24116_reset_device,
};
+static struct stv0299_config tevii_tuner_sharp_config = {
+ .demod_address = 0x68,
+ .inittab = sharp_z0194a__inittab,
+ .mclk = 88000000UL,
+ .invert = 1,
+ .skip_reinit = 0,
+ .lock_output = 1,
+ .volt13_op0_op1 = STV0299_VOLT13_OP1,
+ .min_delay_ms = 100,
+ .set_symbol_rate = sharp_z0194a__set_symbol_rate,
+ .set_ts_params = cx24116_set_ts_param,
+};
+
+static struct stv0288_config tevii_tuner_earda_config = {
+ .demod_address = 0x68,
+ .min_delay_ms = 100,
+ .set_ts_params = cx24116_set_ts_param,
+};
+
static int dvb_register(struct cx8802_dev *dev)
{
struct cx88_core *core = dev->core;
@@ -964,6 +987,31 @@
0x08, ISL6421_DCL, 0x00);
}
break;
+ case CX88_BOARD_TEVII_S420:
+ dev->dvb.frontend = dvb_attach(stv0299_attach,
+ &tevii_tuner_sharp_config,
+ &core->i2c_adap);
+ if (dev->dvb.frontend != NULL) {
+ if (!dvb_attach(dvb_pll_attach, dev->dvb.frontend, 0x60,
+ &core->i2c_adap, DVB_PLL_OPERA1))
+ goto frontend_detach;
+ core->prev_set_voltage = dev->dvb.frontend->ops.set_voltage;
+ dev->dvb.frontend->ops.set_voltage = tevii_dvbs_set_voltage;
+
+ } else {
+ dev->dvb.frontend = dvb_attach(stv0288_attach,
+ &tevii_tuner_earda_config,
+ &core->i2c_adap);
+ if (dev->dvb.frontend != NULL) {
+ if (!dvb_attach(stb6000_attach, dev->dvb.frontend, 0x61,
+ &core->i2c_adap))
+ goto frontend_detach;
+ core->prev_set_voltage = dev->dvb.frontend->ops.set_voltage;
+ dev->dvb.frontend->ops.set_voltage = tevii_dvbs_set_voltage;
+
+ }
+ }
+ break;
case CX88_BOARD_TEVII_S460:
dev->dvb.frontend = dvb_attach(cx24116_attach,
&tevii_s460_config,
diff -r 368768bafa19 -r ed6ca1a375d4 linux/drivers/media/video/cx88/cx88.h
--- a/linux/drivers/media/video/cx88/cx88.h Mon Sep 22 00:48:13 2008 -0400
+++ b/linux/drivers/media/video/cx88/cx88.h Tue Sep 23 21:43:57 2008 +0300
@@ -227,6 +227,7 @@
#define CX88_BOARD_TEVII_S460 70
#define CX88_BOARD_OMICOM_SS4_PCI 71
#define CX88_BOARD_TBS_8920 72
+#define CX88_BOARD_TEVII_S420 73
enum cx88_itype {
CX88_VMUX_COMPOSITE1 = 1,
[-- 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] 45+ messages in thread
* Re: [linux-dvb] [PATCH] S2API - ST stv0288 demodulator support.
2008-09-23 19:04 ` Igor M. Liplianin
@ 2008-09-23 19:09 ` Steven Toth
2008-09-24 1:38 ` Steven Toth
1 sibling, 0 replies; 45+ messages in thread
From: Steven Toth @ 2008-09-23 19:09 UTC (permalink / raw)
To: Igor M. Liplianin; +Cc: Georg Acher, Steven Toth, linux-dvb
Igor M. Liplianin wrote:
> В сообщении от 23 September 2008 22:01:06 Igor M. Liplianin написал(а):
>> Hi,
>>
>> Send patch for ST stv0288 demodulator support.
>> Also stb6000 tuner, DvbWorld DW2002 PCI modification with Earda tuner,
>> TeVii s420 PCI cards.
>> It is S2API compliant ( single frontend )
>> If somebody have any objections, let me know
>>
>> Igor
>>
>> _______________________________________________
>> linux-dvb mailing list
>> linux-dvb@linuxtv.org
>> http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb
>
> Forget attachment
> Need more sleep :-)
Thanks Igor, I'll look at this tonight.
Regards,
Steve
_______________________________________________
linux-dvb mailing list
linux-dvb@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb
^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: [linux-dvb] [PATCH] S2API - ST stv0288 demodulator support.
2008-09-23 19:04 ` Igor M. Liplianin
2008-09-23 19:09 ` Steven Toth
@ 2008-09-24 1:38 ` Steven Toth
1 sibling, 0 replies; 45+ messages in thread
From: Steven Toth @ 2008-09-24 1:38 UTC (permalink / raw)
To: Igor M. Liplianin; +Cc: Georg Acher, Steven Toth, linux-dvb
Igor M. Liplianin wrote:
> В сообщении от 23 September 2008 22:01:06 Igor M. Liplianin написал(а):
>> Hi,
>>
>> Send patch for ST stv0288 demodulator support.
>> Also stb6000 tuner, DvbWorld DW2002 PCI modification with Earda tuner,
>> TeVii s420 PCI cards.
>> It is S2API compliant ( single frontend )
>> If somebody have any objections, let me know
>>
>> Igor
>>
>> _______________________________________________
>> linux-dvb mailing list
>> linux-dvb@linuxtv.org
>> http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb
>
> Forget attachment
> Need more sleep :-)
Merged, thanks.
- Steve
_______________________________________________
linux-dvb mailing list
linux-dvb@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb
^ permalink raw reply [flat|nested] 45+ messages in thread
* [linux-dvb] [PATCH] S2API - Kconfig dependency fixes for cards with stv0288 and si21xx.
2008-09-23 19:01 ` [linux-dvb] [PATCH] S2API - ST stv0288 " Igor M. Liplianin
2008-09-23 19:04 ` Igor M. Liplianin
@ 2008-09-25 2:30 ` Igor M. Liplianin
1 sibling, 0 replies; 45+ messages in thread
From: Igor M. Liplianin @ 2008-09-25 2:30 UTC (permalink / raw)
To: linux-dvb, Steven Toth, Steven Toth, Patrick Boettcher
[-- Attachment #1: Type: text/plain, Size: 120 bytes --]
Hi,
Patches for Kconfig dependencies for cards with stv0288 and si21xx.
Thanks to Patrick for paying attention.
Igor
[-- Attachment #2: 8897.patch --]
[-- Type: text/x-diff, Size: 948 bytes --]
# HG changeset patch
# User Igor M. Liplianin <liplianin@me.by>
# Date 1222307333 -10800
# Node ID 8de73c0adc5dee549fd7f9d34f80a2ee40ae347e
# Parent 70b18ec9535dc884fb0e9ff9456aa4f79df14921
Kconfig correction for USB card modification with SI2109/2110 demodulator.
From: Igor M. Liplianin <liplianin@me.by>
Kconfig correction for USB card modification with SI2109/2110 demodulator.
Signed-off-by: Igor M. Liplianin <liplianin@me.by>
diff -r 70b18ec9535d -r 8de73c0adc5d linux/drivers/media/dvb/dvb-usb/Kconfig
--- a/linux/drivers/media/dvb/dvb-usb/Kconfig Tue Sep 23 21:43:57 2008 +0300
+++ b/linux/drivers/media/dvb/dvb-usb/Kconfig Thu Sep 25 04:48:53 2008 +0300
@@ -252,6 +252,7 @@
select DVB_PLL if !DVB_FE_CUSTOMISE
select DVB_STV0299 if !DVB_FE_CUSTOMISE
select DVB_CX24116 if !DVB_FE_CUSTOMISE
+ select DVB_SI21XX if !DVB_FE_CUSTOMISE
help
Say Y here to support the DvbWorld DVB-S/S2 USB2.0 receivers
and the TeVii S650.
[-- Attachment #3: 8898.patch --]
[-- Type: text/x-diff, Size: 958 bytes --]
# HG changeset patch
# User Igor M. Liplianin <liplianin@me.by>
# Date 1222309107 -10800
# Node ID 5a8329f6c66c8c9a8852245f473ca577a92c602f
# Parent 8de73c0adc5dee549fd7f9d34f80a2ee40ae347e
Kconfig dependency fix for DW2002 card with ST STV0288 demodulator.
From: Igor M. Liplianin <liplianin@me.by>
Kconfig dependency fix for DW2002 card with ST STV0288 demodulator.
Signed-off-by: Igor M. Liplianin <liplianin@me.by>
diff -r 8de73c0adc5d -r 5a8329f6c66c linux/drivers/media/dvb/dm1105/Kconfig
--- a/linux/drivers/media/dvb/dm1105/Kconfig Thu Sep 25 04:48:53 2008 +0300
+++ b/linux/drivers/media/dvb/dm1105/Kconfig Thu Sep 25 05:18:27 2008 +0300
@@ -3,6 +3,8 @@
depends on DVB_CORE && PCI && I2C
select DVB_PLL if !DVB_FE_CUSTOMISE
select DVB_STV0299 if !DVB_FE_CUSTOMISE
+ select DVB_STV0288 if !DVB_FE_CUSTOMISE
+ select DVB_STB6000 if !DVB_FE_CUSTOMISE
select DVB_CX24116 if !DVB_FE_CUSTOMISE
select DVB_SI21XX if !DVB_FE_CUSTOMISE
help
[-- Attachment #4: 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] 45+ messages in thread
end of thread, other threads:[~2008-09-25 2:30 UTC | newest]
Thread overview: 45+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-09-12 5:51 [linux-dvb] S2API - Status - Thu Sep 11th Steven Toth
2008-09-12 6:26 ` Christophe Thommeret
2008-09-12 13:18 ` Steven Toth
2008-09-12 13:29 ` Christophe Thommeret
2008-09-12 13:31 ` Christophe Thommeret
2008-09-12 14:08 ` Steven Toth
2008-09-12 15:27 ` Johannes Stezenbach
2008-09-12 16:17 ` Steven Toth
2008-09-14 16:47 ` Steven Toth
2008-09-14 18:04 ` Christophe Thommeret
2008-09-15 2:14 ` Christophe Thommeret
2008-09-15 3:17 ` Steven Toth
2008-09-15 17:08 ` Igor M. Liplianin
2008-09-15 20:02 ` Gregoire Favre
2008-09-15 20:14 ` Igor M. Liplianin
[not found] ` <48CE9E22.9060405@hauppauge.com>
2008-09-16 21:37 ` [linux-dvb] [PATCH] S2API - Silicon Labs si2109/2110 demodulator support Igor M. Liplianin
2008-09-17 22:27 ` [linux-dvb] [PATCH] S2API - Add support for USB card modification with si2109/2110 demodulator Igor M. Liplianin
2008-09-22 4:09 ` Steven Toth
2008-09-22 4:07 ` [linux-dvb] [PATCH] S2API - Silicon Labs si2109/2110 demodulator support Steven Toth
2008-09-23 19:01 ` [linux-dvb] [PATCH] S2API - ST stv0288 " Igor M. Liplianin
2008-09-23 19:04 ` Igor M. Liplianin
2008-09-23 19:09 ` Steven Toth
2008-09-24 1:38 ` Steven Toth
2008-09-25 2:30 ` [linux-dvb] [PATCH] S2API - Kconfig dependency fixes for cards with stv0288 and si21xx Igor M. Liplianin
2008-09-15 11:43 ` [linux-dvb] S2API - Status - Thu Sep 11th Johannes Stezenbach
2008-09-16 2:58 ` Christophe Thommeret
2008-09-16 21:24 ` Johannes Stezenbach
[not found] ` <48CC12BF.7050803@hauppauge.com>
2008-09-14 14:46 ` Christophe Thommeret
2008-09-14 14:56 ` Christophe Thommeret
2008-09-14 16:49 ` Steven Toth
2008-09-14 15:01 ` Steven Toth
2008-09-14 15:27 ` Christophe Thommeret
2008-09-12 8:00 ` [linux-dvb] Siano ISDB [was: Re: S2API - Status - Thu Sep 11th] barry bouwsma
2008-09-12 8:24 ` [linux-dvb] Siano ISDB barry bouwsma
2008-09-12 11:47 ` Uri Shkolnik
[not found] ` <48CA6BBB.5010802@hauppauge.com>
2008-09-12 13:33 ` [linux-dvb] Siano ISDB [was: Re: S2API - Status - Thu Sep 11th] barry bouwsma
2008-09-12 14:13 ` Steven Toth
2008-09-12 14:38 ` barry bouwsma
2008-09-12 18:01 ` Michael Krufky
2008-09-12 9:17 ` [linux-dvb] S2API - Status - Thu Sep 11th Patrick Boettcher
2008-09-12 14:04 ` Steven Toth
2008-09-13 20:02 ` Steven Toth
2008-09-14 12:36 ` Hans Werner
2008-09-14 14:40 ` Steven Toth
2008-09-12 11:09 ` Hans Werner
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox