Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c15000b4 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
* 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6:
  [media] msp3400: fill in v4l2_tuner based on vt->type field
  [media] tuner-core.c: don't change type field in g_tuner or g_frequency
  [media] cx18/ivtv: fix g_tuner support
  [media] tuner-core: power up tuner when called with s_power(1)
  [media] v4l2-ioctl.c: check for valid tuner type in S_HW_FREQ_SEEK
  [media] tuner-core: simplify the standard fixup
  [media] tuner-core/v4l2-subdev: document that the type field has to be filled in
  [media] v4l2-subdev.h: remove unused s_mode tuner op
  [media] feature-removal-schedule: change in how radio device nodes are handled
  [media] bttv: fix s_tuner for radio
  [media] pvrusb2: fix g/s_tuner support
  [media] v4l2-ioctl.c: prefill tuner type for g_frequency and g/s_tuner
  [media] tuner-core: fix tuner_resume: use t->mode instead of t->type
  [media] tuner-core: fix s_std and s_tuner
parents 9ddf7f50 ddc6ff31
Loading
Loading
Loading
Loading
+22 −0
Original line number Diff line number Diff line
@@ -583,3 +583,25 @@ Why: Superseded by the UVCIOC_CTRL_QUERY ioctl.
Who:	Laurent Pinchart <laurent.pinchart@ideasonboard.com>

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

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
Why:	Just opening a V4L device should not change the state of the hardware
	like that. It's very unexpected and against the V4L spec. Instead, you
	switch to radio mode by calling VIDIOC_S_FREQUENCY. This is the second
	and last step of the move to consistent handling of tv and radio tuners.
Who:	Hans Verkuil <hans.verkuil@cisco.com>

----------------------------
+1 −1
Original line number Diff line number Diff line
@@ -3474,7 +3474,7 @@ static int radio_s_tuner(struct file *file, void *priv,
	if (0 != t->index)
		return -EINVAL;

	bttv_call_all(btv, tuner, g_tuner, t);
	bttv_call_all(btv, tuner, s_tuner, t);
	return 0;
}

+2 −6
Original line number Diff line number Diff line
@@ -695,14 +695,10 @@ static int cx18_g_tuner(struct file *file, void *fh, struct v4l2_tuner *vt)

	cx18_call_all(cx, tuner, g_tuner, vt);

	if (test_bit(CX18_F_I_RADIO_USER, &cx->i_flags)) {
	if (vt->type == V4L2_TUNER_RADIO)
		strlcpy(vt->name, "cx18 Radio Tuner", sizeof(vt->name));
		vt->type = V4L2_TUNER_RADIO;
	} else {
	else
		strlcpy(vt->name, "cx18 TV Tuner", sizeof(vt->name));
		vt->type = V4L2_TUNER_ANALOG_TV;
	}

	return 0;
}

+2 −6
Original line number Diff line number Diff line
@@ -1184,14 +1184,10 @@ static int ivtv_g_tuner(struct file *file, void *fh, struct v4l2_tuner *vt)

	ivtv_call_all(itv, tuner, g_tuner, vt);

	if (test_bit(IVTV_F_I_RADIO_USER, &itv->i_flags)) {
	if (vt->type == V4L2_TUNER_RADIO)
		strlcpy(vt->name, "ivtv Radio Tuner", sizeof(vt->name));
		vt->type = V4L2_TUNER_RADIO;
	} else {
	else
		strlcpy(vt->name, "ivtv TV Tuner", sizeof(vt->name));
		vt->type = V4L2_TUNER_ANALOG_TV;
	}

	return 0;
}

+7 −5
Original line number Diff line number Diff line
@@ -480,12 +480,14 @@ static int msp_g_tuner(struct v4l2_subdev *sd, struct v4l2_tuner *vt)
	struct msp_state *state = to_state(sd);
	struct i2c_client *client = v4l2_get_subdevdata(sd);

	if (state->radio)
	if (vt->type != V4L2_TUNER_ANALOG_TV)
		return 0;
	if (!state->radio) {
		if (state->opmode == OPMODE_AUTOSELECT)
			msp_detect_stereo(client);
	vt->audmode    = state->audmode;
		vt->rxsubchans = state->rxsubchans;
	}
	vt->audmode = state->audmode;
	vt->capability |= V4L2_TUNER_CAP_STEREO |
		V4L2_TUNER_CAP_LANG1 | V4L2_TUNER_CAP_LANG2;
	return 0;
Loading