All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
To: unlisted-recipients:; (no To-header on input)@casper.infradead.org
Cc: "Mauro Carvalho Chehab" <mchehab@osg.samsung.com>,
	"Linux Media Mailing List" <linux-media@vger.kernel.org>,
	"Mauro Carvalho Chehab" <mchehab@infradead.org>,
	"Michael Krufky" <mkrufky@linuxtv.org>,
	"Hans Verkuil" <hans.verkuil@cisco.com>,
	"Rafael Lourenço de Lima Chehab" <chehabrafael@gmail.com>,
	"Javier Martinez Canillas" <javier@osg.samsung.com>,
	"Sakari Ailus" <sakari.ailus@linux.intel.com>,
	"Arnd Bergmann" <arnd@arndb.de>,
	"Olli Salonen" <olli.salonen@iki.fi>,
	"Alexey Khoroshilov" <khoroshilov@ispras.ru>,
	"Tommi Rantala" <tt.rantala@gmail.com>,
	"Matthias Schwarzott" <zzam@gentoo.org>,
	"Laurent Pinchart" <laurent.pinchart@ideasonboard.com>,
	"Lad, Prabhakar" <prabhakar.csengg@gmail.com>,
	"Krzysztof Kozlowski" <k.kozlowski@samsung.com>
Subject: [PATCH 03/13] [media] tuner.h: rename TUNER_PAD_IF_OUTPUT to TUNER_PAD_OUTPUT
Date: Fri, 29 Jan 2016 10:10:53 -0200	[thread overview]
Message-ID: <1ffe1264ce5399fba30a953602be896b0bcd7f5a.1454067262.git.mchehab@osg.samsung.com> (raw)
In-Reply-To: <cover.1454067262.git.mchehab@osg.samsung.com>
In-Reply-To: <cover.1454067262.git.mchehab@osg.samsung.com>

The output of a tuner is not only IF frequencies. They may also
output audio on some of its pins. So, rename the PAD name to
make it clearer and add a proper documentation about that at
tuner.h.

No functional changes.

Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
---
 drivers/media/dvb-core/dvbdev.c           |  2 +-
 drivers/media/usb/au0828/au0828-core.c    |  2 +-
 drivers/media/usb/cx231xx/cx231xx-cards.c |  2 +-
 drivers/media/usb/dvb-usb-v2/mxl111sf.c   |  2 +-
 drivers/media/v4l2-core/tuner-core.c      |  2 +-
 include/media/tuner.h                     | 21 ++++++++++++++++++---
 6 files changed, 23 insertions(+), 8 deletions(-)

diff --git a/drivers/media/dvb-core/dvbdev.c b/drivers/media/dvb-core/dvbdev.c
index 560450a0b32a..a7de62ebc415 100644
--- a/drivers/media/dvb-core/dvbdev.c
+++ b/drivers/media/dvb-core/dvbdev.c
@@ -661,7 +661,7 @@ int dvb_create_media_graph(struct dvb_adapter *adap,
 	if (ntuner && ndemod) {
 		ret = media_create_pad_links(mdev,
 					     MEDIA_ENT_F_TUNER,
-					     tuner, TUNER_PAD_IF_OUTPUT,
+					     tuner, TUNER_PAD_OUTPUT,
 					     MEDIA_ENT_F_DTV_DEMOD,
 					     demod, 0, MEDIA_LNK_FL_ENABLED,
 					     false);
diff --git a/drivers/media/usb/au0828/au0828-core.c b/drivers/media/usb/au0828/au0828-core.c
index 9e29e70a78d7..df2bc3f732b6 100644
--- a/drivers/media/usb/au0828/au0828-core.c
+++ b/drivers/media/usb/au0828/au0828-core.c
@@ -276,7 +276,7 @@ static int au0828_create_media_graph(struct au0828_dev *dev)
 		return -EINVAL;
 
 	if (tuner) {
-		ret = media_create_pad_link(tuner, TUNER_PAD_IF_OUTPUT,
+		ret = media_create_pad_link(tuner, TUNER_PAD_OUTPUT,
 					    decoder, 0,
 					    MEDIA_LNK_FL_ENABLED);
 		if (ret)
diff --git a/drivers/media/usb/cx231xx/cx231xx-cards.c b/drivers/media/usb/cx231xx/cx231xx-cards.c
index 620b83d03f75..54e43fe13e6d 100644
--- a/drivers/media/usb/cx231xx/cx231xx-cards.c
+++ b/drivers/media/usb/cx231xx/cx231xx-cards.c
@@ -1259,7 +1259,7 @@ static int cx231xx_create_media_graph(struct cx231xx *dev)
 		return 0;
 
 	if (tuner) {
-		ret = media_create_pad_link(tuner, TUNER_PAD_IF_OUTPUT, decoder, 0,
+		ret = media_create_pad_link(tuner, TUNER_PAD_OUTPUT, decoder, 0,
 					    MEDIA_LNK_FL_ENABLED);
 		if (ret < 0)
 			return ret;
diff --git a/drivers/media/usb/dvb-usb-v2/mxl111sf.c b/drivers/media/usb/dvb-usb-v2/mxl111sf.c
index b669deccc34c..e7978e4e40ea 100644
--- a/drivers/media/usb/dvb-usb-v2/mxl111sf.c
+++ b/drivers/media/usb/dvb-usb-v2/mxl111sf.c
@@ -888,7 +888,7 @@ static int mxl111sf_attach_tuner(struct dvb_usb_adapter *adap)
 	state->tuner.function = MEDIA_ENT_F_TUNER;
 	state->tuner.name = "mxl111sf tuner";
 	state->tuner_pads[TUNER_PAD_RF_INPUT].flags = MEDIA_PAD_FL_SINK;
-	state->tuner_pads[TUNER_PAD_IF_OUTPUT].flags = MEDIA_PAD_FL_SOURCE;
+	state->tuner_pads[TUNER_PAD_OUTPUT].flags = MEDIA_PAD_FL_SOURCE;
 
 	ret = media_entity_pads_init(&state->tuner,
 				     TUNER_NUM_PADS, state->tuner_pads);
diff --git a/drivers/media/v4l2-core/tuner-core.c b/drivers/media/v4l2-core/tuner-core.c
index 76496fd282aa..a1f858b34187 100644
--- a/drivers/media/v4l2-core/tuner-core.c
+++ b/drivers/media/v4l2-core/tuner-core.c
@@ -697,7 +697,7 @@ static int tuner_probe(struct i2c_client *client,
 register_client:
 #if defined(CONFIG_MEDIA_CONTROLLER)
 	t->pad[TUNER_PAD_RF_INPUT].flags = MEDIA_PAD_FL_SINK;
-	t->pad[TUNER_PAD_IF_OUTPUT].flags = MEDIA_PAD_FL_SOURCE;
+	t->pad[TUNER_PAD_OUTPUT].flags = MEDIA_PAD_FL_SOURCE;
 	t->sd.entity.function = MEDIA_ENT_F_TUNER;
 	t->sd.entity.name = t->name;
 
diff --git a/include/media/tuner.h b/include/media/tuner.h
index e5321fda5489..c5994fe865a0 100644
--- a/include/media/tuner.h
+++ b/include/media/tuner.h
@@ -21,11 +21,26 @@
 
 #include <linux/videodev2.h>
 
-/* Tuner PADs */
-/* FIXME: is this the right place for it? */
+/**
+ * enum tuner_pad_index - tuner pad index
+ *
+ * @TUNER_PAD_RF_INPUT:	Radiofrequency (RF) sink pad, usually linked to a
+ *			RF connector entity.
+ * @TUNER_PAD_OUTPUT:	Tuner output pad. This is actually more complex than
+ *			a single pad output, as, in addition to luminance and
+ *			chrominance IF a tuner may have internally an
+ *			audio decoder (like xc3028) or it may produce an audio
+ *			IF that will be used by an audio decoder like msp34xx.
+ *			It may also have an IF-PLL demodulator on it, like
+ *			tuners with tda9887. Yet, currently, we don't need to
+ *			represent all the dirty details, as this is transparent
+ *			for the V4L2 API usage. So, let's represent all kinds
+ *			of different outputs as a single source pad.
+ * @TUNER_NUM_PADS:	Number of pads of the tuner.
+ */
 enum tuner_pad_index {
 	TUNER_PAD_RF_INPUT,
-	TUNER_PAD_IF_OUTPUT,
+	TUNER_PAD_OUTPUT,
 	TUNER_NUM_PADS
 };
 
-- 
2.5.0



  parent reply	other threads:[~2016-01-29 12:12 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-29 12:10 [PATCH 00/13] Add media controller support to em28xx driver Mauro Carvalho Chehab
2016-01-29 12:10 ` [PATCH 01/13] [media] em28xx: remove unused input types Mauro Carvalho Chehab
2016-01-29 12:10 ` [PATCH 02/13] [media] xc2028: avoid use after free Mauro Carvalho Chehab
2016-01-29 12:10 ` Mauro Carvalho Chehab [this message]
2016-01-29 12:10 ` [PATCH 04/13] [media] v4l2-mc.h: move tuner PAD definitions to this new header Mauro Carvalho Chehab
2016-01-29 12:10 ` [PATCH 05/13] [media] v4l2-mc.h: Split audio from baseband output Mauro Carvalho Chehab
2016-01-29 12:10 ` [PATCH 06/13] [media] media.h: add support for IF-PLL video/sound decoder Mauro Carvalho Chehab
2016-01-29 12:10   ` Mauro Carvalho Chehab
2016-01-29 12:10 ` [PATCH 07/13] [media] v4l2-mc.h Add pads for audio and video IF-PLL decoders Mauro Carvalho Chehab
2016-01-29 12:10 ` [PATCH 08/13] [media] v4l2-mc: add analog TV demodulator pad index macros Mauro Carvalho Chehab
2016-01-29 12:10 ` [PATCH 09/13] [media] tvp5150: create the expected number of pads Mauro Carvalho Chehab
2016-01-29 18:21   ` Javier Martinez Canillas
2016-01-29 12:11 ` [PATCH 10/13] [media] msp3400: initialize MC data Mauro Carvalho Chehab
2016-01-29 12:11 ` [PATCH 11/13] [media] tvp5150: identify it as a MEDIA_ENT_F_ATV_DECODER Mauro Carvalho Chehab
2016-01-29 18:22   ` Javier Martinez Canillas
2016-01-29 12:11 ` [PATCH 12/13] [media] saa7115: initialize demod type and add the needed pads Mauro Carvalho Chehab
2016-01-29 12:11 ` [PATCH 13/13] [media] em28xx: add media controller support Mauro Carvalho Chehab
2016-01-29 17:13   ` [PATCH v2 13/13]] " Mauro Carvalho Chehab
2016-01-29 12:37 ` [PATCH 00/13] Add media controller support to em28xx driver Mauro Carvalho Chehab
2016-01-29 17:21   ` 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=1ffe1264ce5399fba30a953602be896b0bcd7f5a.1454067262.git.mchehab@osg.samsung.com \
    --to=mchehab@osg.samsung.com \
    --cc=arnd@arndb.de \
    --cc=chehabrafael@gmail.com \
    --cc=hans.verkuil@cisco.com \
    --cc=javier@osg.samsung.com \
    --cc=k.kozlowski@samsung.com \
    --cc=khoroshilov@ispras.ru \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@infradead.org \
    --cc=mkrufky@linuxtv.org \
    --cc=olli.salonen@iki.fi \
    --cc=prabhakar.csengg@gmail.com \
    --cc=sakari.ailus@linux.intel.com \
    --cc=tt.rantala@gmail.com \
    --cc=zzam@gentoo.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 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.