public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
From: Mauro Carvalho Chehab <mchehab@infradead.org>
To: javier Martin <javier.martin@vista-silicon.com>
Cc: linux-media@vger.kernel.org, hverkuil@xs4all.nl,
	Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
	Sakari Ailus <sakari.ailus@maxwell.research.nokia.com>
Subject: Re: [PATCH 1/2] media: tvp5150 Fix default input selection.
Date: Thu, 15 Dec 2011 09:51:44 -0200	[thread overview]
Message-ID: <4EE9DF50.20904@infradead.org> (raw)
In-Reply-To: <CACKLOr1DLj_uc-NDQPNjXHcej2isE==d=_wUinXDDfJLgFiPKg@mail.gmail.com>

On 15-12-2011 08:24, javier Martin wrote:
>> Changing this could break em28xx that might be expecting it
>> to be set to composite1. On a quick look, the code there seems to be
>> doing the right thing: during the probe procedure, it explicitly
>> calls s_routing, in order to initialize the device input to the
>> first input type found at the cards structure. So, this patch
>> is likely harmless.
>>
>> Yet, why do you need to change it? Any bridge driver that uses it should
>> be doing the same: at initialization, it should set the input to a
>> value that it is compatible with the way the device is wired, and not
>> to assume a particular arrangement.
> 
> What I'm trying to do with these patches and my previous one related
> to mx2_camera,
> is to be able to use mx2_camera host driver with tvp5150 video decoder.
> 
> I'm not sure how mx2_camera could be aware that the sensor or decoder
> attached to it
> needs s_routing function to be called with a certain parameter without
> making it too board specific.
> The only solution I could think of was assuming that if s_routing
> function was not called at all,
> the enabled input in tvp5150 would be the default COMPOSITE0 as it is
> specified in the datasheet.
> 
> However, If you or anyone suggests a cleaner approach I'm totally
> open. But still, changing default
> value of the selected input in tvp5150 probe function is a bit dirty IMHO.

Board-specific information is needed anyway, if someone wants to use any
driver. It doesn't matter if the pipelines are set via libv4l, via direct
calls or whatever.

On em28xx, the board-specific info is stored in Kernel. It would be possible
to put that info on userspace, but that would require some code at libv4l.

The mx2_camera needs some code to forward calls to S_INPUT/S_ROUTING to
tvp5150, in order to set the pipelines there.

The libv4l plugin also needs to know about that.

Regards,
Mauro

  reply	other threads:[~2011-12-15 11:51 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-15  9:39 [PATCH 1/2] media: tvp5150 Fix default input selection Javier Martin
2011-12-15  9:39 ` [PATCH 2/2] media: tvp5150: Add mbus_fmt callbacks Javier Martin
2011-12-15 10:00   ` Mauro Carvalho Chehab
2011-12-15 10:12     ` javier Martin
2011-12-15 10:12 ` [PATCH 1/2] media: tvp5150 Fix default input selection Mauro Carvalho Chehab
2011-12-15 10:24   ` javier Martin
2011-12-15 11:51     ` Mauro Carvalho Chehab [this message]
2011-12-15 12:01       ` javier Martin
2011-12-15 12:33         ` javier Martin
2011-12-15 16:04           ` Mauro Carvalho Chehab

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=4EE9DF50.20904@infradead.org \
    --to=mchehab@infradead.org \
    --cc=hverkuil@xs4all.nl \
    --cc=javier.martin@vista-silicon.com \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-media@vger.kernel.org \
    --cc=sakari.ailus@maxwell.research.nokia.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