Re: [PULL] http://linuxtv.org/hg/~tap/v4l-dvb

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 10 Feb 2009, Mauro Carvalho Chehab wrote:
> > On Mon, 9 Feb 2009, Mauro Carvalho Chehab wrote:
> > > On Thu, 5 Feb 2009 10:57:21 -0800 (PST)
> > > Trent Piepho <xyzzy@xxxxxxxxxxxxx> wrote:
> > > > 01/03: cx88: Fix MPEG kconfig dependencies
> > > > http://linuxtv.org/hg/~tap/v4l-dvb?cmd=changeset;node=2e05fd69e6b6
> > >
> > > Hmm... This patch converts a depends on into a select. This is not nice, since
> > > select is known to not be properly handled by kernel build system. Also, the
> > > kbuild maintainer recommended us to use select only for options that doesn't
> > > have any dependency.
> > > This is reflected on Kbuild docs:
> > >
> > > Note: select should be used with care. select will force a symbol to a value
> > > without visiting the dependencies. By abusing select you are able to select a
> > > symbol FOO even if FOO depends on BAR that is not set. In general use select
> >
> > I'm aware of the problem with select.  One way to deal with is to have
> > whatever is selecting FOO also depend on BAR.  In this case CX88_MPEG only
> > has one dependency, VIDEO_CX88.  Both CX88_BLACKBIRD and CX88_DVB already
> > depend on VIDEO_CX88 so there is no problem.  Since CX88_MPEG is a hidden
> > option and it's highly unlikely it will gain a dependency that
> > CX88_BLACKBIRD and CX88_DVB do not also also have, I think this use of
> > select is not so bad.
>
> I took some time during this kernel cycle trying to fix mpeg dependencies. One
> issue that I had to deal with is that some possible configurations with CX88,
> CX88_BLACKBIRD and CX88_DVB causes breakages (weird configs like having one as
> M and others as Y). Those weird configurations don't have any practical usage,
> but causes lot of headaches at the Kconfig logic.

Both of the methods I've show will work 100% correctly with any combination
of Y, M, and so on.

> I suspect that the current way compiles fine in-kernel, but maybe the

I don't think it will.  It's going to set MPEG to 'y' when CX88_VIDEO is
'm' because the default line will override the dependency.  Trying to avoid
select by using "default X if ..." lines has the same problem as select:
dependencies are ignored.  It's worse than select since it's more complex
and fails on various odd cases like one 'y' and one 'm'.

> > It would look something like this:
> >
> > config VIDEO_CX88_MPEG
> > 	tristate "MPEG and digital TV interface"
> > 	depends on VIDEO_CX88
> > 	help
> > 	  Support for the "MPEG port" on Conexant CX2388x chips, which shows up
> > 	  as function 2 of the PCI device.  This is used by DVB/ATSC digital TV
> > 	  cards as well as cards with the Conexant "Blackbird" CX23416 MPEG
> > 	  encoder.
> >
> > config VIDEO_CX88_MPEG
>   I'm assuming CX88_DVB here.
> > 	tristate "DVB/ATSC Support for cx2388x based TV cards"
> > 	depends on VIDEO_CX88_MPEG
> > 	...
> >
> > config VIDEO_CX88_BLACKBIRD
> > 	tristate "Blackbird MPEG encoder support (cx2388x + cx23416)"
> > 	depends on VIDEO_CX88_MPEG
> > 	...
> >
> > Would that be better?  No select, but there is another option for the user to
> > pick when configuring their cards.
>
> I almost used a similar logic like above (just replacing tristate by boolean on
> CX88_DVB and CX88_BLACKBIRD to avoid the weird and unpractical kconfigs).
> I agree that adding more questions to the poor end-user is evil. So, I decided
> for a hidden var for CX88_MPEG, than adding a meaningless option (on the user
> POV), on the latest CX88 Kbuild changeset.

Is the latest CX88 kbuild changeset different than what's in Hg now?  I
think my patch with select is the best way.  There is no reason that MPEG
would depend on something that DVB and BLACKBIRD don't, so there is no
problem with select.  There is also no problem with MPEG getting selected
from many places throughout the kernel which might not have the right
dependencies, since nothing besides DVB and BLACKBIRD are going to select
it.
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux