public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
From: Jean Delvare <khali@linux-fr.org>
To: Devin Heitmueller <dheitmueller@kernellabs.com>
Cc: Mauro Carvalho Chehab <mchehab@infradead.org>,
	Manu Abraham <abraham.manu@gmail.com>,
	LMML <linux-media@vger.kernel.org>
Subject: Re: Details about DVB frontend API
Date: Tue, 17 Nov 2009 22:48:54 +0100	[thread overview]
Message-ID: <20091117224854.38069ea7@hyperion.delvare> (raw)
In-Reply-To: <829197380911171155j36ba858ejfca9e4c36689ab62@mail.gmail.com>

On Tue, 17 Nov 2009 14:55:51 -0500, Devin Heitmueller wrote:
> On Tue, Nov 17, 2009 at 2:46 PM, Mauro Carvalho Chehab
> <mchehab@infradead.org> wrote:
> > I don't like the idea of creating structs grouping those parameters. While for
> > certain devices this may mean a more direct approach, for others, this may
> > not make sense, due to the way their API's were implemented (for example,
> > devices with firmware may need several calls to get all those info).
> 
> There is some value in providing grouping the results in a single
> request - in many cases the data is based off of the same internal
> registers, and Manu's proposed approach allows for a more "atomic"
> response.  The fact that we currently do the status, SNR, strength,
> and UNC/BER in separate calls is one reason that people sometimes see
> inconsistent results in the output of tools like zap.  As an example,
> they can see lines in the zap output where the lock is lost but SNR
> appears fine.
> 
> In the case where the driver servicing the query needs to do three
> calls, it could be slightly more expensive, but only if we believe
> that it is commonplace to ask for a subset of the stats.

For what it's worth, we have solved this problem in hwmon driver the
following way: we cache related values (read from the same register or
set of registers) for ~1 second. When user-space requests the
information, if the cache is fresh it is used, otherwise the cache is
first refreshed. That way we ensure that data returned to nearby
user-space calls are taken from the same original register value. One
advantage is that we thus did not have to map the API to the hardware
register constraints and thus have the guarantee that all hardware
designs fit.

I don't know if a similar logic would help for DVB.

-- 
Jean Delvare

  reply	other threads:[~2009-11-17 21:48 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-22 19:13 Details about DVB frontend API Jean Delvare
2009-10-22 19:27 ` Devin Heitmueller
2009-10-22 19:38   ` VDR User
2009-10-23 12:47   ` Jean Delvare
2009-10-22 20:10 ` Mauro Carvalho Chehab
2009-10-22 20:29   ` Manu Abraham
2009-10-23  0:12     ` Markus Rechberger
2009-10-23  1:00       ` Manu Abraham
2009-10-23 19:02     ` VDR User
2009-10-23 23:34       ` Markus Rechberger
2009-11-17 19:46     ` Mauro Carvalho Chehab
2009-11-17 19:55       ` Devin Heitmueller
2009-11-17 21:48         ` Jean Delvare [this message]
2009-11-17 22:53         ` Mauro Carvalho Chehab
2009-11-18  9:32           ` Devin Heitmueller
2009-11-18 14:04             ` Mauro Carvalho Chehab
2009-11-18 15:17               ` Devin Heitmueller
2009-11-18 15:35                 ` Michael Krufky
2009-11-18 15:35               ` Devin Heitmueller
2009-11-20  9:29       ` Manu Abraham
2009-11-20 11:37         ` Julian Scheel
2009-11-20 16:08           ` Manu Abraham
2009-11-20 23:40             ` Julian Scheel
2009-12-04 20:02               ` VDR User
2009-12-04 20:59                 ` Michael Krufky
2009-12-05 17:30                   ` Mauro Carvalho Chehab
2009-12-05 17:42                     ` Michael Krufky
2009-12-05 19:29                       ` Mauro Carvalho Chehab
2009-12-07 21:00                   ` Mauro Carvalho Chehab
2009-12-07 21:23                     ` Mauro Carvalho Chehab
2009-10-23 12:53   ` Jean Delvare
2009-10-23  5:11 ` Mike Booth
2009-10-23 15:47 ` Jean Delvare
2009-10-23 16:45   ` Michael Krufky
2009-10-24 16:31 ` David T. L. Wong
  -- strict thread matches above, loose matches on Subject: below --
2009-10-22 22:18 Hans Verkuil
2009-10-23  2:17 ` Steven Toth

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=20091117224854.38069ea7@hyperion.delvare \
    --to=khali@linux-fr.org \
    --cc=abraham.manu@gmail.com \
    --cc=dheitmueller@kernellabs.com \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@infradead.org \
    /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