Commit f3c3ecec authored by Antti Palosaari's avatar Antti Palosaari Committed by Mauro Carvalho Chehab

[media] v4l2: rename V4L2_TUNER_ADC to V4L2_TUNER_SDR

SDR receiver has ADC (Analog-to-Digital Converter) and SDR transmitter
has DAC (Digital-to-Analog Converter). Originally I though it could
be good idea to have own type for receiver and transmitter, but now I
feel one common type for SDR is enough. So lets rename it.
Signed-off-by: default avatarAntti Palosaari <crope@iki.fi>
Acked-by: default avatarMauro Carvalho Chehab <mchehab@osg.samsung.com>
Signed-off-by: default avatarHans Verkuil <hans.verkuil@cisco.com>
[hans.verkuil@cisco.com: this was added in 4.4, so update 4.2 to 4.4]
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@osg.samsung.com>
parent eda98796
...@@ -2591,6 +2591,18 @@ and &v4l2-mbus-framefmt;. ...@@ -2591,6 +2591,18 @@ and &v4l2-mbus-framefmt;.
</orderedlist> </orderedlist>
</section> </section>
<section>
<title>V4L2 in Linux 4.4</title>
<orderedlist>
<listitem>
<para>Renamed <constant>V4L2_TUNER_ADC</constant> to
<constant>V4L2_TUNER_SDR</constant>. The use of
<constant>V4L2_TUNER_ADC</constant> is deprecated now.
</para>
</listitem>
</orderedlist>
</section>
<section id="other"> <section id="other">
<title>Relation of V4L2 to other Linux multimedia APIs</title> <title>Relation of V4L2 to other Linux multimedia APIs</title>
......
...@@ -44,10 +44,10 @@ frequency. ...@@ -44,10 +44,10 @@ frequency.
</para> </para>
<para> <para>
The <constant>V4L2_TUNER_ADC</constant> tuner type is used for ADC tuners, and The <constant>V4L2_TUNER_SDR</constant> tuner type is used for SDR tuners, and
the <constant>V4L2_TUNER_RF</constant> tuner type is used for RF tuners. The the <constant>V4L2_TUNER_RF</constant> tuner type is used for RF tuners. The
tuner index of the RF tuner (if any) must always follow the ADC tuner index. tuner index of the RF tuner (if any) must always follow the SDR tuner index.
Normally the ADC tuner is #0 and the RF tuner is #1. Normally the SDR tuner is #0 and the RF tuner is #1.
</para> </para>
<para> <para>
......
...@@ -151,6 +151,13 @@ Rubli, Andy Walls, Muralidharan Karicheri, Mauro Carvalho Chehab, ...@@ -151,6 +151,13 @@ Rubli, Andy Walls, Muralidharan Karicheri, Mauro Carvalho Chehab,
structs, ioctls) must be noted in more detail in the history chapter structs, ioctls) must be noted in more detail in the history chapter
(compat.xml), along with the possible impact on existing drivers and (compat.xml), along with the possible impact on existing drivers and
applications. --> applications. -->
<revision>
<revnumber>4.4</revnumber>
<date>2015-05-26</date>
<authorinitials>ap</authorinitials>
<revremark>Renamed V4L2_TUNER_ADC to V4L2_TUNER_SDR.
</revremark>
</revision>
<revision> <revision>
<revnumber>3.21</revnumber> <revnumber>3.21</revnumber>
......
...@@ -1637,7 +1637,7 @@ static int v4l_g_frequency(const struct v4l2_ioctl_ops *ops, ...@@ -1637,7 +1637,7 @@ static int v4l_g_frequency(const struct v4l2_ioctl_ops *ops,
struct v4l2_frequency *p = arg; struct v4l2_frequency *p = arg;
if (vfd->vfl_type == VFL_TYPE_SDR) if (vfd->vfl_type == VFL_TYPE_SDR)
p->type = V4L2_TUNER_ADC; p->type = V4L2_TUNER_SDR;
else else
p->type = (vfd->vfl_type == VFL_TYPE_RADIO) ? p->type = (vfd->vfl_type == VFL_TYPE_RADIO) ?
V4L2_TUNER_RADIO : V4L2_TUNER_ANALOG_TV; V4L2_TUNER_RADIO : V4L2_TUNER_ANALOG_TV;
...@@ -1652,7 +1652,7 @@ static int v4l_s_frequency(const struct v4l2_ioctl_ops *ops, ...@@ -1652,7 +1652,7 @@ static int v4l_s_frequency(const struct v4l2_ioctl_ops *ops,
enum v4l2_tuner_type type; enum v4l2_tuner_type type;
if (vfd->vfl_type == VFL_TYPE_SDR) { if (vfd->vfl_type == VFL_TYPE_SDR) {
if (p->type != V4L2_TUNER_ADC && p->type != V4L2_TUNER_RF) if (p->type != V4L2_TUNER_SDR && p->type != V4L2_TUNER_RF)
return -EINVAL; return -EINVAL;
} else { } else {
type = (vfd->vfl_type == VFL_TYPE_RADIO) ? type = (vfd->vfl_type == VFL_TYPE_RADIO) ?
...@@ -2277,7 +2277,7 @@ static int v4l_enum_freq_bands(const struct v4l2_ioctl_ops *ops, ...@@ -2277,7 +2277,7 @@ static int v4l_enum_freq_bands(const struct v4l2_ioctl_ops *ops,
int err; int err;
if (vfd->vfl_type == VFL_TYPE_SDR) { if (vfd->vfl_type == VFL_TYPE_SDR) {
if (p->type != V4L2_TUNER_ADC && p->type != V4L2_TUNER_RF) if (p->type != V4L2_TUNER_SDR && p->type != V4L2_TUNER_RF)
return -EINVAL; return -EINVAL;
type = p->type; type = p->type;
} else { } else {
......
...@@ -165,10 +165,13 @@ enum v4l2_tuner_type { ...@@ -165,10 +165,13 @@ enum v4l2_tuner_type {
V4L2_TUNER_RADIO = 1, V4L2_TUNER_RADIO = 1,
V4L2_TUNER_ANALOG_TV = 2, V4L2_TUNER_ANALOG_TV = 2,
V4L2_TUNER_DIGITAL_TV = 3, V4L2_TUNER_DIGITAL_TV = 3,
V4L2_TUNER_ADC = 4, V4L2_TUNER_SDR = 4,
V4L2_TUNER_RF = 5, V4L2_TUNER_RF = 5,
}; };
/* Deprecated, do not use */
#define V4L2_TUNER_ADC V4L2_TUNER_SDR
enum v4l2_memory { enum v4l2_memory {
V4L2_MEMORY_MMAP = 1, V4L2_MEMORY_MMAP = 1,
V4L2_MEMORY_USERPTR = 2, V4L2_MEMORY_USERPTR = 2,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment