Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 286389
b: refs/heads/master
c: aa07eec
h: refs/heads/master
i:
  286387: c690db2
v: v3
  • Loading branch information
Hans Verkuil authored and Mauro Carvalho Chehab committed Jan 16, 2012
1 parent 7186764 commit 8437bd8
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 15 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: dacd4fa37dbafe209a90d6d5b729d2257df4b734
refs/heads/master: aa07eec5320cf1793062c03b8409e7541ca37c31
7 changes: 5 additions & 2 deletions trunk/Documentation/DocBook/media/v4l/vidioc-g-frequency.xml
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,11 @@ the &v4l2-output; <structfield>modulator</structfield> field and the
<entry>&v4l2-tuner-type;</entry>
<entry><structfield>type</structfield></entry>
<entry>The tuner type. This is the same value as in the
&v4l2-tuner; <structfield>type</structfield> field. The field is not
applicable to modulators, &ie; ignored by drivers.</entry>
&v4l2-tuner; <structfield>type</structfield> field. The type must be set
to <constant>V4L2_TUNER_RADIO</constant> for <filename>/dev/radioX</filename>
device nodes, and to <constant>V4L2_TUNER_ANALOG_TV</constant>
for all others. The field is not applicable to modulators, &ie; ignored
by drivers.</entry>
</row>
<row>
<entry>__u32</entry>
Expand Down
11 changes: 0 additions & 11 deletions trunk/Documentation/feature-removal-schedule.txt
Original file line number Diff line number Diff line change
Expand Up @@ -460,17 +460,6 @@ Who: Jean Delvare <khali@linux-fr.org>

----------------------------

What: For VIDIOC_S_FREQUENCY the type field must match the device node's type.
If not, return -EINVAL.
When: 3.2
Why: It makes no sense to switch the tuner to radio mode by calling
VIDIOC_S_FREQUENCY on a video node, or to switch the tuner to tv mode by
calling VIDIOC_S_FREQUENCY on a radio node. This is the first step of a
move to more consistent handling of tv and radio tuners.
Who: Hans Verkuil <hans.verkuil@cisco.com>

----------------------------

What: Opening a radio device node will no longer automatically switch the
tuner mode from tv to radio.
When: 3.3
Expand Down
8 changes: 7 additions & 1 deletion trunk/drivers/media/video/v4l2-ioctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -1871,16 +1871,22 @@ static long __video_do_ioctl(struct file *file,
case VIDIOC_S_FREQUENCY:
{
struct v4l2_frequency *p = arg;
enum v4l2_tuner_type type;

if (!ops->vidioc_s_frequency)
break;
if (ret_prio) {
ret = ret_prio;
break;
}
type = (vfd->vfl_type == VFL_TYPE_RADIO) ?
V4L2_TUNER_RADIO : V4L2_TUNER_ANALOG_TV;
dbgarg(cmd, "tuner=%d, type=%d, frequency=%d\n",
p->tuner, p->type, p->frequency);
ret = ops->vidioc_s_frequency(file, fh, p);
if (p->type != type)
ret = -EINVAL;
else
ret = ops->vidioc_s_frequency(file, fh, p);
break;
}
case VIDIOC_G_SLICED_VBI_CAP:
Expand Down

0 comments on commit 8437bd8

Please sign in to comment.