All of lore.kernel.org
 help / color / mirror / Atom feed
From: Devin Heitmueller <dheitmueller@kernellabs.com>
To: Ralph Metzler <rjkm@metzlerbros.de>
Cc: Oliver Endriss <o.endriss@gmx.de>,
	linux-media@vger.kernel.org,
	Mauro Carvalho Chehab <mchehab@redhat.com>,
	Michael Krufky <mkrufky@kernellabs.com>
Subject: Re: [PATCH 00/16] New drivers: DRX-K, TDA18271c2, Updates: CXD2099 and ngene
Date: Mon, 11 Jul 2011 13:32:44 -0400	[thread overview]
Message-ID: <CAGoCfiwUtgpCM49WqpTorH-D-VVgkbtoGk++rp3FTsOJQD06rw@mail.gmail.com> (raw)
In-Reply-To: <19995.12215.798514.99100@morden.metzler>

On Mon, Jul 11, 2011 at 1:15 PM, Ralph Metzler <rjkm@metzlerbros.de> wrote:
>  > Generally speaking with other devices the IF is configured for the
>  > tuner depending on the target modulation (there is a tda18271_config
>  > struct passed at attach time containing the IF for various modes).
>  > Then the demod driver is also configured for a particular IF.
>
> You mean the optional "struct tda18271_std_map *std_map;"?
> That would be a possibility. But then you have to handle IF tables for
> all kinds of tuners and demods in the bridge driver.
> Letting the tuner choose the IF and have a way to tell the demod (a simple
> get_if() call) is much easier.

The downside of the approach you've suggested is it prevents the tuner
driver from varying the IF based on the demod it is interacting with.
By having the information defined in the bridge driver, the IF can be
defined by the driver developer based on the attached demod.  Also, in
some cases the IF needs to different because of the PCB layout (rather
than just the chosen modulation or what demod it is attached to),
which there is no way a tuner driver could know that based solely on
what tuner/demod is being used.

In other words, in some cases the optimal IF for a given hardware
design is determined by cycling through the various possible values
with a spectrum analyzer attached, and that is the sort of
optimization that is defined in the bridge driver where it is known
exactly what product is being used.

>  > If there are indeed good reasons, then so be it.  But it feels like we
>  > are working around deficiencies in the core DVB framework that would
>  > apply to all drivers, and it would be good if we could avoid the
>  > maintenance headaches associated with two different drivers for the
>  > same chip.
>
> I know. At the time I was also just porting the DRX-K and only wanted
> to get it working based on the known to work Windows driver
> combination and not wrestle with other problems.
> I guess it whould not be too hard to adapt the old driver now.

I can certainly appreciate this, as I've done this myself at times.
That said though, for upstream inclusion we generally want to clean up
such issues.

> Another problem that keeps showing up in the existing drivers is that
> some tuner/demod combinations let the tuner call gate_ctrl, others
> only call it in the demod.
> This leads to problems when trying to use them in new combinations.
> Either the gate is not opened/closed at all or twice. In the latter
> case this can even lead to lockups if also using locking.

Yeah, this is a bit of a mess.  Whether it's done in the demod or the
tuner is typically dictated by what driver the developer happened to
have copied as skeleton code.  There are certainly merits to both
approaches under certain conditions, but the inconsistency across
drivers is very annoying.

Devin

-- 
Devin J. Heitmueller - Kernel Labs
http://www.kernellabs.com

  reply	other threads:[~2011-07-11 17:32 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-03 16:31 [PATCH 00/16] New drivers: DRX-K, TDA18271c2, Updates: CXD2099 and ngene Oliver Endriss
2011-07-03 16:36 ` [PATCH 01/16] tda18271c2dd: Initial check-in Oliver Endriss
2011-07-03 16:37 ` [PATCH 02/16] tda18271c2dd: Lots of coding-style fixes Oliver Endriss
2011-07-03 16:49 ` [PATCH 05/16] DRX-K: Tons " Oliver Endriss
2011-07-03 16:51 ` [PATCH 06/16] DRX-K, TDA18271c2: Add build support Oliver Endriss
2011-07-03 16:53 ` [PATCH 07/16] get_dvb_firmware: Get DRX-K firmware for Digital Devices DVB-CT cards Oliver Endriss
2011-07-03 16:55 ` [PATCH 08/16] ngene: Support Digital Devices DuoFlex CT Oliver Endriss
2011-07-03 16:56 ` [PATCH 09/16] ngene: Codingstyle fixes Oliver Endriss
2011-07-03 16:57 ` [PATCH 10/16] ngene: Fix return code if no demux was found Oliver Endriss
2011-07-03 16:58 ` [PATCH 11/16] ngene: Fix name of Digital Devices PCIe/miniPCIe Oliver Endriss
2011-07-03 16:59 ` [PATCH 12/16] ngene: Support DuoFlex CT attached to CineS2 and SaTiX-S2 Oliver Endriss
2011-07-03 17:00 ` [PATCH 13/16] cxd2099: Update to latest version Oliver Endriss
2011-07-04 12:17   ` Issa Gorissen
2011-07-03 17:02 ` [PATCH 14/16] cxd2099: Codingstyle fixes Oliver Endriss
2011-07-03 17:03 ` [PATCH 15/16] ngene: Update for latest cxd2099 Oliver Endriss
2011-07-03 17:04 ` [PATCH 16/16] ngene: Strip dummy packets inserted by the driver Oliver Endriss
2011-07-03 17:54 ` [PATCH 04/16] DRX-K: Shrink size of drxk_map.h Oliver Endriss
2011-07-03 17:55 ` [PATCH 03/16] DRX-K: Initial check-in Oliver Endriss
2011-07-04 16:41 ` [PATCH 00/16] New drivers: DRX-K, TDA18271c2, Updates: CXD2099 and ngene Hans von Marwijk
2011-07-07 23:39   ` Oliver Endriss
2011-07-11 11:57 ` Devin Heitmueller
2011-07-11 16:18   ` Ralph Metzler
2011-07-11 16:27     ` Devin Heitmueller
2011-07-11 17:15       ` Ralph Metzler
2011-07-11 17:32         ` Devin Heitmueller [this message]
2011-07-11 17:19       ` Mauro Carvalho Chehab
2011-07-12 18:21     ` Michael Krufky

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=CAGoCfiwUtgpCM49WqpTorH-D-VVgkbtoGk++rp3FTsOJQD06rw@mail.gmail.com \
    --to=dheitmueller@kernellabs.com \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@redhat.com \
    --cc=mkrufky@kernellabs.com \
    --cc=o.endriss@gmx.de \
    --cc=rjkm@metzlerbros.de \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.