Commit d272bc92 authored by Hans Verkuil's avatar Hans Verkuil Committed by Mauro Carvalho Chehab
Browse files

media: rename MEDIA_ENT_F_DTV_DECODER to MEDIA_ENT_F_DV_DECODER



The use of 'DTV' is very confusing since it normally refers to Digital
TV e.g. DVB etc.

Instead use 'DV' (Digital Video), which nicely corresponds to the
DV Timings API used to configure such receivers and transmitters.

We keep an alias to avoid breaking userspace applications.

Since this alias is only available if __KERNEL__ is *not* defined
(i.e. it is only available for userspace, not kernelspace), any
drivers that use it also have to be converted to the new define.
These drivers are adv7604, adv7842 and tda1997x.

Signed-off-by: default avatarHans Verkuil <hansverk@cisco.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+samsung@kernel.org>
parent d2dc644a
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -200,7 +200,7 @@ Types and flags used to represent the media graph elements
         MIPI CSI-2, etc.), and outputs them on its source pad to an output
         MIPI CSI-2, etc.), and outputs them on its source pad to an output
         video bus of another type (eDP, MIPI CSI-2, parallel, etc.).
         video bus of another type (eDP, MIPI CSI-2, parallel, etc.).


    *  -  ``MEDIA_ENT_F_DTV_DECODER``
    *  -  ``MEDIA_ENT_F_DV_DECODER``
       -  Digital video decoder. The basic function of the video decoder is
       -  Digital video decoder. The basic function of the video decoder is
	  to accept digital video from a wide variety of sources
	  to accept digital video from a wide variety of sources
	  and output it in some digital video standard, with appropriate
	  and output it in some digital video standard, with appropriate
+1 −0
Original line number Original line Diff line number Diff line
@@ -3499,6 +3499,7 @@ static int adv76xx_probe(struct i2c_client *client,
	for (i = 0; i < state->source_pad; ++i)
	for (i = 0; i < state->source_pad; ++i)
		state->pads[i].flags = MEDIA_PAD_FL_SINK;
		state->pads[i].flags = MEDIA_PAD_FL_SINK;
	state->pads[state->source_pad].flags = MEDIA_PAD_FL_SOURCE;
	state->pads[state->source_pad].flags = MEDIA_PAD_FL_SOURCE;
	sd->entity.function = MEDIA_ENT_F_DV_DECODER;


	err = media_entity_pads_init(&sd->entity, state->source_pad + 1,
	err = media_entity_pads_init(&sd->entity, state->source_pad + 1,
				state->pads);
				state->pads);
+1 −0
Original line number Original line Diff line number Diff line
@@ -3541,6 +3541,7 @@ static int adv7842_probe(struct i2c_client *client,
	INIT_DELAYED_WORK(&state->delayed_work_enable_hotplug,
	INIT_DELAYED_WORK(&state->delayed_work_enable_hotplug,
			adv7842_delayed_work_enable_hotplug);
			adv7842_delayed_work_enable_hotplug);


	sd->entity.function = MEDIA_ENT_F_DV_DECODER;
	state->pad.flags = MEDIA_PAD_FL_SOURCE;
	state->pad.flags = MEDIA_PAD_FL_SOURCE;
	err = media_entity_pads_init(&sd->entity, 1, &state->pad);
	err = media_entity_pads_init(&sd->entity, 1, &state->pad);
	if (err)
	if (err)
+1 −1
Original line number Original line Diff line number Diff line
@@ -2570,7 +2570,7 @@ static int tda1997x_probe(struct i2c_client *client,
		 id->name, i2c_adapter_id(client->adapter),
		 id->name, i2c_adapter_id(client->adapter),
		 client->addr);
		 client->addr);
	sd->flags |= V4L2_SUBDEV_FL_HAS_DEVNODE | V4L2_SUBDEV_FL_HAS_EVENTS;
	sd->flags |= V4L2_SUBDEV_FL_HAS_DEVNODE | V4L2_SUBDEV_FL_HAS_EVENTS;
	sd->entity.function = MEDIA_ENT_F_DTV_DECODER;
	sd->entity.function = MEDIA_ENT_F_DV_DECODER;
	sd->entity.ops = &tda1997x_media_ops;
	sd->entity.ops = &tda1997x_media_ops;


	/* set allowed mbus modes based on chip, bus-type, and bus-width */
	/* set allowed mbus modes based on chip, bus-type, and bus-width */
+3 −1
Original line number Original line Diff line number Diff line
@@ -93,7 +93,7 @@ struct media_device_info {
 * Video decoder functions
 * Video decoder functions
 */
 */
#define MEDIA_ENT_F_ATV_DECODER			(MEDIA_ENT_F_OLD_SUBDEV_BASE + 4)
#define MEDIA_ENT_F_ATV_DECODER			(MEDIA_ENT_F_OLD_SUBDEV_BASE + 4)
#define MEDIA_ENT_F_DTV_DECODER			(MEDIA_ENT_F_BASE + 0x6001)
#define MEDIA_ENT_F_DV_DECODER			(MEDIA_ENT_F_BASE + 0x6001)


/*
/*
 * Digital TV, analog TV, radio and/or software defined radio tuner functions.
 * Digital TV, analog TV, radio and/or software defined radio tuner functions.
@@ -400,6 +400,8 @@ struct media_v2_topology {
#define MEDIA_ENT_T_V4L2_SUBDEV_DECODER		MEDIA_ENT_F_ATV_DECODER
#define MEDIA_ENT_T_V4L2_SUBDEV_DECODER		MEDIA_ENT_F_ATV_DECODER
#define MEDIA_ENT_T_V4L2_SUBDEV_TUNER		MEDIA_ENT_F_TUNER
#define MEDIA_ENT_T_V4L2_SUBDEV_TUNER		MEDIA_ENT_F_TUNER


#define MEDIA_ENT_F_DTV_DECODER			MEDIA_ENT_F_DV_DECODER

/*
/*
 * There is still no ALSA support in the media controller. These
 * There is still no ALSA support in the media controller. These
 * defines should not have been added and we leave them here only
 * defines should not have been added and we leave them here only