linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Antti Palosaari <crope@iki.fi>
To: "nibble.max" <nibble.max@gmail.com>
Cc: linux-media <linux-media@vger.kernel.org>
Subject: Re: [PATCH 1/4] support for DVBSky dvb-s2 usb: add some config andset_voltage for m88ds3103
Date: Thu, 07 Aug 2014 13:27:16 +0300	[thread overview]
Message-ID: <53E35484.5040606@iki.fi> (raw)
In-Reply-To: <201408071731141714723@gmail.com>

Moikka!

On 08/07/2014 12:31 PM, nibble.max wrote:
>>> @@ -523,6 +508,17 @@ static int m88ds3103_set_frontend(struct dvb_frontend *fe)
>>>    
>>>    	priv->delivery_system = c->delivery_system;
>>>    
>>> +	if (priv->cfg->start_ctrl) {
>>> +		for (len = 0; len < 30 ; len++) {
>>> +			m88ds3103_read_status(fe, &status);
>>> +			if (status & FE_HAS_LOCK) {
>>> +				priv->cfg->start_ctrl(fe);
>>> +				break;
>>> +			}
>>> +			msleep(20);
>>> +		}
>>> +	}
>>> +
>>
>> What is idea of that start_ctrl logic? It looks ugly. Why it is needed?
>> What is wrong with default DVB-core implementation? You should not need
>> to poll demod lock here and then call streaming control callback from
>> USB driver. If you implement .streaming_ctrl() callback to DVB USB
>> driver, it is called automatically for you.
> It is nothing with streaming_ctrl of DVB USB driver.
> It relates with the hardware chip problem.
> The m88ds3103 will not output ts clock when it powers up at the first time.
> It starts to output ts clock as soon as it locks the signal.
> But the slave fifo of Cypress usb chip really need this clock to work.
> If there is no this clock, the salve fifo will stop.
> start_ctrl logic is used to restart the salve fifo when the ts clock is valid.

OK. Then we have to find out some solution... Is there anyone who has a
nice idea how to signal USB interface driver when demod gains a lock?
Sure USB driver could poll read_status() too, but it does not sound good
solution neither.

How about overriding FE .read_status() callback. It is called all the
time by DVB-core when frontend is open. Hook .read_status() to USB
interface driver, then call original .read_status() (implemented by
m88ds3103 driver), and after each call check if status is LOCKED or NOT
LOCKED. When status changes from NOT LOCKED to LOCKED call that board
specific routine which restarts TS FIFO. No change for demod driver
needed at all.

regards
Antto

-- 
http://palosaari.fi/

  reply	other threads:[~2014-08-07 10:27 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-06  4:27 [PATCH 1/4] support for DVBSky dvb-s2 usb: add some config and set_voltage for m88ds3103 nibble.max
2014-08-07  8:18 ` Antti Palosaari
2014-08-07  9:31 ` Re: [PATCH 1/4] support for DVBSky dvb-s2 usb: add some config andset_voltage " nibble.max
2014-08-07 10:27   ` Antti Palosaari [this message]
2014-08-07 13:30   ` Re: [PATCH 1/4] support for DVBSky dvb-s2 usb: add some config andset_voltagefor m88ds3103 nibble.max

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=53E35484.5040606@iki.fi \
    --to=crope@iki.fi \
    --cc=linux-media@vger.kernel.org \
    --cc=nibble.max@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).