[02/12] dvbsky: use si2168 config option ts_clock_gapped

Message ID 1429823471-21835-2-git-send-email-olli.salonen@iki.fi (mailing list archive)
State Superseded, archived
Headers

Commit Message

Olli Salonen April 23, 2015, 9:11 p.m. UTC
  Change the dvbsky driver to support gapped clock instead of the current
hack.

Signed-off-by: Olli Salonen <olli.salonen@iki.fi>
---
 drivers/media/usb/dvb-usb-v2/dvbsky.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
  

Comments

Tycho Lürsen April 24, 2015, 6:31 a.m. UTC | #1
Hi Olli,
in saa716x_budget.c I've also got (for TBS6285)

     si2168_config.i2c_adapter = &i2cadapter;
     si2168_config.fe = &adapter->fe;
     si2168_config.ts_mode = SI2168_TS_SERIAL;
     memset(&info, 0, sizeof(struct i2c_board_info));

Should I just add it like this?

     si2168_config.ts_mode = SI2168_TS_SERIAL;
     si2168_config.ts_clock_gapped = true;
     memset(&info, 0, sizeof(struct i2c_board_info));

Kind regards,
Tycho.

Op 23-04-15 om 23:11 schreef Olli Salonen:
> Change the dvbsky driver to support gapped clock instead of the current
> hack.
>
> Signed-off-by: Olli Salonen <olli.salonen@iki.fi>
> ---
>   drivers/media/usb/dvb-usb-v2/dvbsky.c | 3 ++-
>   1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/media/usb/dvb-usb-v2/dvbsky.c b/drivers/media/usb/dvb-usb-v2/dvbsky.c
> index cdf59bc..0f73b1d 100644
> --- a/drivers/media/usb/dvb-usb-v2/dvbsky.c
> +++ b/drivers/media/usb/dvb-usb-v2/dvbsky.c
> @@ -615,7 +615,8 @@ static int dvbsky_t330_attach(struct dvb_usb_adapter *adap)
>   	memset(&si2168_config, 0, sizeof(si2168_config));
>   	si2168_config.i2c_adapter = &i2c_adapter;
>   	si2168_config.fe = &adap->fe[0];
> -	si2168_config.ts_mode = SI2168_TS_PARALLEL | 0x40;
> +	si2168_config.ts_mode = SI2168_TS_PARALLEL;
> +	si2168_config.ts_clock_gapped = true;
>   	memset(&info, 0, sizeof(struct i2c_board_info));
>   	strlcpy(info.type, "si2168", I2C_NAME_SIZE);
>   	info.addr = 0x64;

--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
  
Tycho Lürsen April 24, 2015, 6:57 a.m. UTC | #2
One more question:

cx23885-dvb.c (and maybe others) contains a couple of instances of

si2168_config.ts_mode = SI2168_TS_PARALLEL;
and
si2168_config.ts_mode = SI2168_TS_SERIAL;

But you don't patch them with

si2168_config.ts_clock_gapped = true;

Is this intentional?

Kind regards,
Tycho

Op 23-04-15 om 23:11 schreef Olli Salonen:
> Change the dvbsky driver to support gapped clock instead of the current
> hack.
>
> Signed-off-by: Olli Salonen <olli.salonen@iki.fi>
> ---
>   drivers/media/usb/dvb-usb-v2/dvbsky.c | 3 ++-
>   1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/media/usb/dvb-usb-v2/dvbsky.c b/drivers/media/usb/dvb-usb-v2/dvbsky.c
> index cdf59bc..0f73b1d 100644
> --- a/drivers/media/usb/dvb-usb-v2/dvbsky.c
> +++ b/drivers/media/usb/dvb-usb-v2/dvbsky.c
> @@ -615,7 +615,8 @@ static int dvbsky_t330_attach(struct dvb_usb_adapter *adap)
>   	memset(&si2168_config, 0, sizeof(si2168_config));
>   	si2168_config.i2c_adapter = &i2c_adapter;
>   	si2168_config.fe = &adap->fe[0];
> -	si2168_config.ts_mode = SI2168_TS_PARALLEL | 0x40;
> +	si2168_config.ts_mode = SI2168_TS_PARALLEL;
> +	si2168_config.ts_clock_gapped = true;
>   	memset(&info, 0, sizeof(struct i2c_board_info));
>   	strlcpy(info.type, "si2168", I2C_NAME_SIZE);
>   	info.addr = 0x64;

--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
  
Olli Salonen April 24, 2015, 7:03 a.m. UTC | #3
Hi Tycho,

Yes, so far the only device that I know should use gapped clock is the
DVBSky T330 a.k.a. TechnoTrend CT2-4400.

I've also seen that the Hauppauge HVR-2205 Windows driver enables this
option, but it seems to me that that board works ok also without this.

Cheers,
-olli

On 24 April 2015 at 09:01, Olli Salonen <olli.salonen@iki.fi> wrote:
> Hi Tycho,
>
> Yes, so far the only device that I know should use gapped clock is the
> DVBSky T330 a.k.a. TechnoTrend CT2-4400.
>
> I've also seen that the Hauppauge HVR-2205 Windows driver enables this
> option, but it seems to me that that board works ok also without this.
>
> Cheers,
> -olli
>
> On 24 April 2015 at 08:57, Tycho Lürsen <tycholursen@gmail.com> wrote:
>>
>> One more question:
>>
>> cx23885-dvb.c (and maybe others) contains a couple of instances of
>>
>> si2168_config.ts_mode = SI2168_TS_PARALLEL;
>> and
>> si2168_config.ts_mode = SI2168_TS_SERIAL;
>>
>> But you don't patch them with
>>
>> si2168_config.ts_clock_gapped = true;
>>
>> Is this intentional?
>>
>> Kind regards,
>> Tycho
>>
>> Op 23-04-15 om 23:11 schreef Olli Salonen:
>>>
>>> Change the dvbsky driver to support gapped clock instead of the current
>>> hack.
>>>
>>> Signed-off-by: Olli Salonen <olli.salonen@iki.fi>
>>> ---
>>>   drivers/media/usb/dvb-usb-v2/dvbsky.c | 3 ++-
>>>   1 file changed, 2 insertions(+), 1 deletion(-)
>>>
>>> diff --git a/drivers/media/usb/dvb-usb-v2/dvbsky.c
>>> b/drivers/media/usb/dvb-usb-v2/dvbsky.c
>>> index cdf59bc..0f73b1d 100644
>>> --- a/drivers/media/usb/dvb-usb-v2/dvbsky.c
>>> +++ b/drivers/media/usb/dvb-usb-v2/dvbsky.c
>>> @@ -615,7 +615,8 @@ static int dvbsky_t330_attach(struct dvb_usb_adapter
>>> *adap)
>>>         memset(&si2168_config, 0, sizeof(si2168_config));
>>>         si2168_config.i2c_adapter = &i2c_adapter;
>>>         si2168_config.fe = &adap->fe[0];
>>> -       si2168_config.ts_mode = SI2168_TS_PARALLEL | 0x40;
>>> +       si2168_config.ts_mode = SI2168_TS_PARALLEL;
>>> +       si2168_config.ts_clock_gapped = true;
>>>         memset(&info, 0, sizeof(struct i2c_board_info));
>>>         strlcpy(info.type, "si2168", I2C_NAME_SIZE);
>>>         info.addr = 0x64;
>>
>>
>
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
  
Steven Toth April 24, 2015, 1:16 p.m. UTC | #4
> I've also seen that the Hauppauge HVR-2205 Windows driver enables this
> option, but it seems to me that that board works ok also without this.

Olli, I found out why this is, I thought you'd appreciate the comment....

Apparently the issue only occurs with DVB streams faster than
approximately 50Mbps, which standard DVB-T/T2, ATSC and QAM-B never
are.

The issue apparently, is with some QAM-A (DVB-C) streams in
Europe..... This explains why I've never seen it. That's being said, I
do plan to add the gapped clock patch to the SAA7164 shortly - for
safety.
  
Tycho Lürsen April 24, 2015, 2:01 p.m. UTC | #5
Hi Steven, Olli,
Steven, thanks for your comment

So maybe this should also go into cx23885?
I'm in Europe and only have DVB-C

I'll add it to my saa716x driver as well

Op 24-04-15 om 15:16 schreef Steven Toth:
>> I've also seen that the Hauppauge HVR-2205 Windows driver enables this
>> option, but it seems to me that that board works ok also without this.
> Olli, I found out why this is, I thought you'd appreciate the comment....
>
> Apparently the issue only occurs with DVB streams faster than
> approximately 50Mbps, which standard DVB-T/T2, ATSC and QAM-B never
> are.
>
> The issue apparently, is with some QAM-A (DVB-C) streams in
> Europe..... This explains why I've never seen it. That's being said, I
> do plan to add the gapped clock patch to the SAA7164 shortly - for
> safety.
>

--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
  
Steven Toth April 24, 2015, 2:10 p.m. UTC | #6
> Steven, thanks for your comment

You are very welcome.

>
> So maybe this should also go into cx23885?
> I'm in Europe and only have DVB-C

My understanding is that it applies to all USB/PCIe bridges.
  
Olli Salonen April 27, 2015, 11:51 a.m. UTC | #7
Thank you Steven,

That's helpful to know. I've been bumping into some issues with
another Si2168-based device and certain DVB-C streams. Will try to see
if this could help in that case...

Cheers,
-olli

On 24 April 2015 at 15:16, Steven Toth <stoth@kernellabs.com> wrote:
>> I've also seen that the Hauppauge HVR-2205 Windows driver enables this
>> option, but it seems to me that that board works ok also without this.
>
> Olli, I found out why this is, I thought you'd appreciate the comment....
>
> Apparently the issue only occurs with DVB streams faster than
> approximately 50Mbps, which standard DVB-T/T2, ATSC and QAM-B never
> are.
>
> The issue apparently, is with some QAM-A (DVB-C) streams in
> Europe..... This explains why I've never seen it. That's being said, I
> do plan to add the gapped clock patch to the SAA7164 shortly - for
> safety.
>
> --
> Steven Toth - Kernel Labs
> http://www.kernellabs.com
> --
> To unsubscribe from this list: send the line "unsubscribe linux-media" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
  

Patch

diff --git a/drivers/media/usb/dvb-usb-v2/dvbsky.c b/drivers/media/usb/dvb-usb-v2/dvbsky.c
index cdf59bc..0f73b1d 100644
--- a/drivers/media/usb/dvb-usb-v2/dvbsky.c
+++ b/drivers/media/usb/dvb-usb-v2/dvbsky.c
@@ -615,7 +615,8 @@  static int dvbsky_t330_attach(struct dvb_usb_adapter *adap)
 	memset(&si2168_config, 0, sizeof(si2168_config));
 	si2168_config.i2c_adapter = &i2c_adapter;
 	si2168_config.fe = &adap->fe[0];
-	si2168_config.ts_mode = SI2168_TS_PARALLEL | 0x40;
+	si2168_config.ts_mode = SI2168_TS_PARALLEL;
+	si2168_config.ts_clock_gapped = true;
 	memset(&info, 0, sizeof(struct i2c_board_info));
 	strlcpy(info.type, "si2168", I2C_NAME_SIZE);
 	info.addr = 0x64;