Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 138395
b: refs/heads/master
c: 5eb35fd
h: refs/heads/master
i:
  138393: 527f4ab
  138391: 3667adb
v: v3
  • Loading branch information
Hans Verkuil authored and Mauro Carvalho Chehab committed Mar 30, 2009
1 parent caa16d1 commit 4fd89db
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 130 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: bccfa449ae5bd4cc5b52160d25fbdb1fe8a27932
refs/heads/master: 5eb35fd06397e42b49ff4d37587fa1bfbd136014
129 changes: 0 additions & 129 deletions trunk/drivers/media/video/tuner-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -800,132 +800,6 @@ static int tuner_s_standby(struct v4l2_subdev *sd, u32 standby)
return 0;
}

#ifdef CONFIG_VIDEO_ALLOW_V4L1
static long tuner_ioctl(struct v4l2_subdev *sd, unsigned int cmd, void *arg)
{
struct tuner *t = to_tuner(sd);
struct i2c_client *client = v4l2_get_subdevdata(sd);
struct analog_demod_ops *analog_ops = &t->fe.ops.analog_ops;
struct dvb_tuner_ops *fe_tuner_ops = &t->fe.ops.tuner_ops;

switch (cmd) {
case VIDIOCSAUDIO:
if (check_mode(t, "VIDIOCSAUDIO") == -EINVAL)
return 0;
if (check_v4l2(t) == -EINVAL)
return 0;

/* Should be implemented, since bttv calls it */
tuner_dbg("VIDIOCSAUDIO not implemented.\n");
break;
case VIDIOCSCHAN:
{
static const v4l2_std_id map[] = {
[VIDEO_MODE_PAL] = V4L2_STD_PAL,
[VIDEO_MODE_NTSC] = V4L2_STD_NTSC_M,
[VIDEO_MODE_SECAM] = V4L2_STD_SECAM,
[4 /* bttv */ ] = V4L2_STD_PAL_M,
[5 /* bttv */ ] = V4L2_STD_PAL_N,
[6 /* bttv */ ] = V4L2_STD_NTSC_M_JP,
};
struct video_channel *vc = arg;

if (check_v4l2(t) == -EINVAL)
return 0;

if (set_mode(client,t,V4L2_TUNER_ANALOG_TV, "VIDIOCSCHAN")==-EINVAL)
return 0;

if (vc->norm < ARRAY_SIZE(map))
t->std = map[vc->norm];
tuner_fixup_std(t);
if (t->tv_freq)
set_tv_freq(client, t->tv_freq);
return 0;
}
case VIDIOCSFREQ:
{
unsigned long *v = arg;

if (check_mode(t, "VIDIOCSFREQ") == -EINVAL)
return 0;
if (check_v4l2(t) == -EINVAL)
return 0;

set_freq(client, *v);
return 0;
}
case VIDIOCGTUNER:
{
struct video_tuner *vt = arg;

if (check_mode(t, "VIDIOCGTUNER") == -EINVAL)
return 0;
if (check_v4l2(t) == -EINVAL)
return 0;

if (V4L2_TUNER_RADIO == t->mode) {
if (fe_tuner_ops->get_status) {
u32 tuner_status;

fe_tuner_ops->get_status(&t->fe, &tuner_status);
if (tuner_status & TUNER_STATUS_STEREO)
vt->flags |= VIDEO_TUNER_STEREO_ON;
else
vt->flags &= ~VIDEO_TUNER_STEREO_ON;
} else {
if (analog_ops->is_stereo) {
if (analog_ops->is_stereo(&t->fe))
vt->flags |=
VIDEO_TUNER_STEREO_ON;
else
vt->flags &=
~VIDEO_TUNER_STEREO_ON;
}
}
if (analog_ops->has_signal)
vt->signal =
analog_ops->has_signal(&t->fe);

vt->flags |= VIDEO_TUNER_LOW; /* Allow freqs at 62.5 Hz */

vt->rangelow = radio_range[0] * 16000;
vt->rangehigh = radio_range[1] * 16000;

} else {
vt->rangelow = tv_range[0] * 16;
vt->rangehigh = tv_range[1] * 16;
}

return 0;
}
case VIDIOCGAUDIO:
{
struct video_audio *va = arg;

if (check_mode(t, "VIDIOCGAUDIO") == -EINVAL)
return 0;
if (check_v4l2(t) == -EINVAL)
return 0;

if (V4L2_TUNER_RADIO == t->mode) {
if (fe_tuner_ops->get_status) {
u32 tuner_status;

fe_tuner_ops->get_status(&t->fe, &tuner_status);
va->mode = (tuner_status & TUNER_STATUS_STEREO)
? VIDEO_SOUND_STEREO : VIDEO_SOUND_MONO;
} else if (analog_ops->is_stereo)
va->mode = analog_ops->is_stereo(&t->fe)
? VIDEO_SOUND_STEREO : VIDEO_SOUND_MONO;
}
return 0;
}
}
return -ENOIOCTLCMD;
}
#endif

static int tuner_s_config(struct v4l2_subdev *sd, const struct v4l2_priv_tun_config *cfg)
{
struct tuner *t = to_tuner(sd);
Expand Down Expand Up @@ -1111,9 +985,6 @@ static int tuner_resume(struct i2c_client *c)
static const struct v4l2_subdev_core_ops tuner_core_ops = {
.log_status = tuner_log_status,
.s_standby = tuner_s_standby,
#ifdef CONFIG_VIDEO_ALLOW_V4L1
.ioctl = tuner_ioctl,
#endif
};

static const struct v4l2_subdev_tuner_ops tuner_tuner_ops = {
Expand Down

0 comments on commit 4fd89db

Please sign in to comment.