public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
From: Hans Verkuil <hverkuil@xs4all.nl>
To: Mauro Carvalho Chehab <mchehab@osg.samsung.com>,
	LMML <linux-media@vger.kernel.org>
Cc: Sakari Ailus <sakari.ailus@iki.fi>,
	Javier Martinez Canillas <javier@osg.samsung.com>,
	Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Subject: Re: [RFC] Representing hardware connections via MC
Date: Fri, 26 Feb 2016 14:23:40 +0100	[thread overview]
Message-ID: <56D051DC.5070900@xs4all.nl> (raw)
In-Reply-To: <20160226091317.5a07c374@recife.lan>

On 02/26/2016 01:13 PM, Mauro Carvalho Chehab wrote:
> We had some discussions on Feb, 12 about how to represent connectors via
> the Media Controller:
> 	https://linuxtv.org/irc/irclogger_log/v4l?date=2016-02-12,Fri&sel=31#l27
> 
> We tried to finish those discussions on the last two weeks, but people
> doesn't seem to be available at the same time for the discussions. So,
> let's proceed with the discussions via e-mail.
> 
> So, I'd like to do such discussions via e-mail, as we need to close
> this question next week.
> 
> QUESTION:
> ========
> 
> How to represent the hardware connection for inputs (and outputs) like:
> 	- Composite TV video;
> 	- stereo analog audio;
> 	- S-Video;
> 	- HDMI
> 
> Problem description:
> ===================
> 
> During the MC summit last year, we decided to add an entity called
> "connector" for such things. So, we added, so far, 3 types of
> connectors:
> 
> #define MEDIA_ENT_F_CONN_RF		(MEDIA_ENT_F_BASE + 10001)
> #define MEDIA_ENT_F_CONN_SVIDEO		(MEDIA_ENT_F_BASE + 10002)
> #define MEDIA_ENT_F_CONN_COMPOSITE	(MEDIA_ENT_F_BASE + 10003)
> 
> However, while implementing it, we saw that the mapping on hardware
> is actually more complex, as one physical connector may have multiple
> signals with can eventually used on a different way.
> 
> One simple example of this is the S-Video connector. It has internally
> two video streams, one for chrominance and another one for luminance.
> 
> It is very common for vendors to ship devices with a S-Video input
> and a "S-Video to RCA" cable.
> 
> At the driver's level, drivers need to know if such cable is
> plugged, as they need to configure a different input setting to
> enable either S-Video or composite decoding.
> 
> So, the V4L2 API usually maps "S-Video" on a different input
> than "Composite over S-Video". This can be seen, for example, at the
> saa7134 driver, who gained recently support for MC.
> 
> Additionally, it is interesting to describe the physical aspects
> of the connector (color, position, label, etc).
> 
> Proposal:
> ========
> 
> It seems that there was an agreement that the physical aspects of
> the connector should be mapped via the upcoming properties API,
> with the properties present only when it is possible to find them
> in the hardware. So, it seems that all such properties should be
> optional.
> 
> However, we didn't finish the meeting, as we ran out of time. Yet,
> I guess the last proposal there fulfills the requirements. So,
> let's focus our discussions on it. So, let me formulate it as a
> proposal
> 
> We should represent the entities based on the inputs. So, for the
> already implemented entities, we'll have, instead:
> 
> #define MEDIA_ENT_F_INPUT_RF		(MEDIA_ENT_F_BASE + 10001)
> #define MEDIA_ENT_F_INPUT_SVIDEO	(MEDIA_ENT_F_BASE + 10002)
> #define MEDIA_ENT_F_INPUT_COMPOSITE	(MEDIA_ENT_F_BASE + 10003)
> 
> The MEDIA_ENT_F_INPUT_RF and MEDIA_ENT_F_INPUT_COMPOSITE will have
> just one sink PAD each, as they carry just one signal. As we're
> describing the logical input, it doesn't matter the physical
> connector type. So, except for re-naming the define, nothing
> changes for them.

What if my device has an SVIDEO output (e.g. ivtv)? 'INPUT' denotes
the direction, and I don't think that's something you want in the
define for the connector entity.

As was discussed on irc we are really talking about signals received
or transmitted by/from a connector. I still prefer F_SIG_ or F_SIGNAL_
or F_CONN_SIG_ or something along those lines.

I'm not sure where F_INPUT came from, certainly not from the irc
discussion.

> Devices with S-Video input will have one MEDIA_ENT_F_INPUT_SVIDEO
> per each different S-Video input. Each one will have two sink pads,
> one for the Y signal and another for the C signal.
> 
> So, a device like Terratec AV350, that has one Composite and one
> S-Video input[1] would be represented as:
> 	https://mchehab.fedorapeople.org/terratec_av350-modified.png
> 
> 
> [1] Physically, it has a SCART connector that could be enabled
> via a physical switch, but logically, the device will still switch
> from S-Video over SCART or composite over SCART.
> 
> More complex devices would be represented like:
> 	https://hverkuil.home.xs4all.nl/adv7604.png
> 	https://hverkuil.home.xs4all.nl/adv7842.png
> 
> NOTE:
> 
> The labels at the PADs currently can't be represented, but the
> idea is adding it as a property via the upcoming properties API.

I think this is a separate discussion. It's not needed for now.
When working on the adv7604/7842 examples I realized that pad names help
understand the topology a lot better, but they are not needed for the actual
functionality.

> 
> Anyone disagree?

I agree except for the naming.

Regards,

	Hans

  parent reply	other threads:[~2016-02-26 13:23 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-26 12:13 [RFC] Representing hardware connections via MC Mauro Carvalho Chehab
2016-02-26 13:13 ` Javier Martinez Canillas
2016-02-26 13:48   ` Mauro Carvalho Chehab
2016-03-02 11:10   ` Laurent Pinchart
2016-02-26 13:23 ` Hans Verkuil [this message]
2016-02-26 13:47   ` Javier Martinez Canillas
2016-02-26 14:05     ` Mauro Carvalho Chehab
2016-02-26 14:00   ` Mauro Carvalho Chehab
2016-02-26 14:07     ` Hans Verkuil
2016-02-26 14:27       ` Mauro Carvalho Chehab
2016-03-02 10:34 ` Laurent Pinchart
2016-03-02 11:13   ` Mauro Carvalho Chehab
2016-03-02 11:16     ` Laurent Pinchart
2016-03-02 11:28       ` Hans Verkuil
2016-03-02 12:08         ` Mauro Carvalho Chehab
2016-03-02 18:33           ` Hans Verkuil
2016-03-02 19:31             ` Mauro Carvalho Chehab
2016-03-02 23:18               ` Laurent Pinchart
2016-03-05 14:53                 ` Mauro Carvalho Chehab
2016-03-02 12:32       ` Mauro Carvalho Chehab
2016-03-02 23:23         ` Laurent Pinchart
2016-03-02 14:16 ` Sakari Ailus
2016-03-02 15:40   ` Mauro Carvalho Chehab
2016-03-02 16:04     ` Mauro Carvalho Chehab
2016-03-02 16:24       ` Javier Martinez Canillas
2016-03-02 17:32       ` Shuah Khan
2016-03-02 18:30       ` Hans Verkuil
2016-03-02 22:58     ` Laurent Pinchart
2016-03-03  7:54       ` Hans Verkuil
2016-03-03 10:10         ` Laurent Pinchart
2016-03-05 15:00           ` Mauro Carvalho Chehab
2016-03-03 12:48       ` Mauro Carvalho Chehab
2016-03-05 14:18       ` 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=56D051DC.5070900@xs4all.nl \
    --to=hverkuil@xs4all.nl \
    --cc=javier@osg.samsung.com \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@osg.samsung.com \
    --cc=sakari.ailus@iki.fi \
    /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