You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
V4L/DVB (11370): v4l2-subdev: move s_std from tuner to core.
s_std didn't belong in the tuner ops. Stricly speaking it should be part of the video ops, but it is used by audio and tuner devices as well, so it is more efficient to make it part of the core ops. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
This commit is contained in:
committed by
Mauro Carvalho Chehab
parent
cc26b076cf
commit
f41737ece4
@@ -1100,7 +1100,7 @@ static int vidioc_s_std(struct file *file, void *priv, v4l2_std_id * norm)
|
||||
have to make the au0828 bridge adjust the size of its capture
|
||||
buffer, which is currently hardcoded at 720x480 */
|
||||
|
||||
v4l2_device_call_all(&dev->v4l2_dev, 0, tuner, s_std, *norm);
|
||||
v4l2_device_call_all(&dev->v4l2_dev, 0, core, s_std, *norm);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -444,9 +444,6 @@ static const struct v4l2_subdev_core_ops bt819_core_ops = {
|
||||
.g_ctrl = bt819_g_ctrl,
|
||||
.s_ctrl = bt819_s_ctrl,
|
||||
.queryctrl = bt819_queryctrl,
|
||||
};
|
||||
|
||||
static const struct v4l2_subdev_tuner_ops bt819_tuner_ops = {
|
||||
.s_std = bt819_s_std,
|
||||
};
|
||||
|
||||
@@ -459,7 +456,6 @@ static const struct v4l2_subdev_video_ops bt819_video_ops = {
|
||||
|
||||
static const struct v4l2_subdev_ops bt819_ops = {
|
||||
.core = &bt819_core_ops,
|
||||
.tuner = &bt819_tuner_ops,
|
||||
.video = &bt819_video_ops,
|
||||
};
|
||||
|
||||
|
||||
@@ -1329,7 +1329,7 @@ set_tvnorm(struct bttv *btv, unsigned int norm)
|
||||
break;
|
||||
}
|
||||
id = tvnorm->v4l2_id;
|
||||
bttv_call_all(btv, tuner, s_std, id);
|
||||
bttv_call_all(btv, core, s_std, id);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -1189,6 +1189,7 @@ static const struct v4l2_subdev_core_ops cx18_av_general_ops = {
|
||||
.queryctrl = cx18_av_queryctrl,
|
||||
.g_ctrl = cx18_av_g_ctrl,
|
||||
.s_ctrl = cx18_av_s_ctrl,
|
||||
.s_std = cx18_av_s_std,
|
||||
#ifdef CONFIG_VIDEO_ADV_DEBUG
|
||||
.g_register = cx18_av_g_register,
|
||||
.s_register = cx18_av_s_register,
|
||||
@@ -1200,7 +1201,6 @@ static const struct v4l2_subdev_tuner_ops cx18_av_tuner_ops = {
|
||||
.s_frequency = cx18_av_s_frequency,
|
||||
.g_tuner = cx18_av_g_tuner,
|
||||
.s_tuner = cx18_av_s_tuner,
|
||||
.s_std = cx18_av_s_std,
|
||||
};
|
||||
|
||||
static const struct v4l2_subdev_audio_ops cx18_av_audio_ops = {
|
||||
|
||||
@@ -608,7 +608,7 @@ int cx18_v4l2_close(struct file *filp)
|
||||
/* Mark that the radio is no longer in use */
|
||||
clear_bit(CX18_F_I_RADIO_USER, &cx->i_flags);
|
||||
/* Switch tuner to TV */
|
||||
cx18_call_all(cx, tuner, s_std, cx->std);
|
||||
cx18_call_all(cx, core, s_std, cx->std);
|
||||
/* Select correct audio input (i.e. TV tuner or Line in) */
|
||||
cx18_audio_set_io(cx);
|
||||
if (atomic_read(&cx->ana_capturing) > 0) {
|
||||
|
||||
@@ -180,10 +180,10 @@ static int gpiomux_s_audio_routing(struct v4l2_subdev *sd,
|
||||
|
||||
static const struct v4l2_subdev_core_ops gpiomux_core_ops = {
|
||||
.log_status = gpiomux_log_status,
|
||||
.s_std = gpiomux_s_std,
|
||||
};
|
||||
|
||||
static const struct v4l2_subdev_tuner_ops gpiomux_tuner_ops = {
|
||||
.s_std = gpiomux_s_std,
|
||||
.s_radio = gpiomux_s_radio,
|
||||
};
|
||||
|
||||
|
||||
@@ -705,7 +705,7 @@ int cx18_s_std(struct file *file, void *fh, v4l2_std_id *std)
|
||||
(unsigned long long) cx->std);
|
||||
|
||||
/* Tuner */
|
||||
cx18_call_all(cx, tuner, s_std, cx->std);
|
||||
cx18_call_all(cx, core, s_std, cx->std);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -1089,7 +1089,7 @@ static int vidioc_s_std(struct file *file, void *priv, v4l2_std_id *norm)
|
||||
dev->height = f.fmt.pix.height;
|
||||
get_scale(dev, dev->width, dev->height, &dev->hscale, &dev->vscale);
|
||||
|
||||
call_all(dev, tuner, s_std, dev->norm);
|
||||
call_all(dev, core, s_std, dev->norm);
|
||||
|
||||
mutex_unlock(&dev->lock);
|
||||
|
||||
|
||||
@@ -299,7 +299,7 @@ static int cx23885_set_tvnorm(struct cx23885_dev *dev, v4l2_std_id norm)
|
||||
|
||||
dev->tvnorm = norm;
|
||||
|
||||
call_all(dev, tuner, s_std, norm);
|
||||
call_all(dev, core, s_std, norm);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -1472,6 +1472,7 @@ static const struct v4l2_subdev_core_ops cx25840_core_ops = {
|
||||
.g_ctrl = cx25840_g_ctrl,
|
||||
.s_ctrl = cx25840_s_ctrl,
|
||||
.queryctrl = cx25840_queryctrl,
|
||||
.s_std = cx25840_s_std,
|
||||
.reset = cx25840_reset,
|
||||
.load_fw = cx25840_load_fw,
|
||||
#ifdef CONFIG_VIDEO_ADV_DEBUG
|
||||
@@ -1482,7 +1483,6 @@ static const struct v4l2_subdev_core_ops cx25840_core_ops = {
|
||||
|
||||
static const struct v4l2_subdev_tuner_ops cx25840_tuner_ops = {
|
||||
.s_frequency = cx25840_s_frequency,
|
||||
.s_std = cx25840_s_std,
|
||||
.s_radio = cx25840_s_radio,
|
||||
.g_tuner = cx25840_g_tuner,
|
||||
.s_tuner = cx25840_s_tuner,
|
||||
|
||||
@@ -991,7 +991,7 @@ int cx88_set_tvnorm(struct cx88_core *core, v4l2_std_id norm)
|
||||
set_tvaudio(core);
|
||||
|
||||
// tell i2c chips
|
||||
call_all(core, tuner, s_std, norm);
|
||||
call_all(core, core, s_std, norm);
|
||||
|
||||
// done
|
||||
return 0;
|
||||
|
||||
@@ -829,7 +829,7 @@ static int vidioc_s_std(struct file *file, void *priv, v4l2_std_id *norm)
|
||||
get_scale(dev, dev->width, dev->height, &dev->hscale, &dev->vscale);
|
||||
|
||||
em28xx_resolution_set(dev);
|
||||
v4l2_device_call_all(&dev->v4l2_dev, 0, tuner, s_std, dev->norm);
|
||||
v4l2_device_call_all(&dev->v4l2_dev, 0, core, s_std, dev->norm);
|
||||
|
||||
mutex_unlock(&dev->lock);
|
||||
return 0;
|
||||
|
||||
@@ -857,7 +857,7 @@ int ivtv_v4l2_close(struct file *filp)
|
||||
/* Mark that the radio is no longer in use */
|
||||
clear_bit(IVTV_F_I_RADIO_USER, &itv->i_flags);
|
||||
/* Switch tuner to TV */
|
||||
ivtv_call_all(itv, tuner, s_std, itv->std);
|
||||
ivtv_call_all(itv, core, s_std, itv->std);
|
||||
/* Select correct audio input (i.e. TV tuner or Line in) */
|
||||
ivtv_audio_set_io(itv);
|
||||
if (itv->hw_flags & IVTV_HW_SAA711X)
|
||||
|
||||
@@ -342,10 +342,10 @@ static const struct v4l2_subdev_core_ops subdev_core_ops = {
|
||||
.g_ctrl = subdev_g_ctrl,
|
||||
.s_ctrl = subdev_s_ctrl,
|
||||
.queryctrl = subdev_queryctrl,
|
||||
.s_std = subdev_s_std,
|
||||
};
|
||||
|
||||
static const struct v4l2_subdev_tuner_ops subdev_tuner_ops = {
|
||||
.s_std = subdev_s_std,
|
||||
.s_radio = subdev_s_radio,
|
||||
.g_tuner = subdev_g_tuner,
|
||||
.s_tuner = subdev_s_tuner,
|
||||
|
||||
@@ -1121,7 +1121,7 @@ int ivtv_s_std(struct file *file, void *fh, v4l2_std_id *std)
|
||||
IVTV_DEBUG_INFO("Switching standard to %llx.\n", (unsigned long long)itv->std);
|
||||
|
||||
/* Tuner */
|
||||
ivtv_call_all(itv, tuner, s_std, itv->std);
|
||||
ivtv_call_all(itv, core, s_std, itv->std);
|
||||
|
||||
if (itv->v4l2_cap & V4L2_CAP_VIDEO_OUTPUT) {
|
||||
/* set display standard */
|
||||
|
||||
@@ -648,9 +648,6 @@ static int ks0127_g_chip_ident(struct v4l2_subdev *sd, struct v4l2_dbg_chip_iden
|
||||
|
||||
static const struct v4l2_subdev_core_ops ks0127_core_ops = {
|
||||
.g_chip_ident = ks0127_g_chip_ident,
|
||||
};
|
||||
|
||||
static const struct v4l2_subdev_tuner_ops ks0127_tuner_ops = {
|
||||
.s_std = ks0127_s_std,
|
||||
};
|
||||
|
||||
@@ -663,7 +660,6 @@ static const struct v4l2_subdev_video_ops ks0127_video_ops = {
|
||||
|
||||
static const struct v4l2_subdev_ops ks0127_ops = {
|
||||
.core = &ks0127_core_ops,
|
||||
.tuner = &ks0127_tuner_ops,
|
||||
.video = &ks0127_video_ops,
|
||||
};
|
||||
|
||||
|
||||
@@ -700,6 +700,7 @@ static const struct v4l2_subdev_core_ops msp_core_ops = {
|
||||
.g_ctrl = msp_g_ctrl,
|
||||
.s_ctrl = msp_s_ctrl,
|
||||
.queryctrl = msp_queryctrl,
|
||||
.s_std = msp_s_std,
|
||||
};
|
||||
|
||||
static const struct v4l2_subdev_tuner_ops msp_tuner_ops = {
|
||||
@@ -707,7 +708,6 @@ static const struct v4l2_subdev_tuner_ops msp_tuner_ops = {
|
||||
.g_tuner = msp_g_tuner,
|
||||
.s_tuner = msp_s_tuner,
|
||||
.s_radio = msp_s_radio,
|
||||
.s_std = msp_s_std,
|
||||
};
|
||||
|
||||
static const struct v4l2_subdev_audio_ops msp_audio_ops = {
|
||||
|
||||
@@ -266,7 +266,7 @@ static int mxb_init_done(struct saa7146_dev* dev)
|
||||
int i = 0, err = 0;
|
||||
|
||||
/* select video mode in saa7111a */
|
||||
saa7111a_call(mxb, tuner, s_std, std);
|
||||
saa7111a_call(mxb, core, s_std, std);
|
||||
|
||||
/* select tuner-output on saa7111a */
|
||||
i = 0;
|
||||
@@ -286,7 +286,7 @@ static int mxb_init_done(struct saa7146_dev* dev)
|
||||
tuner_call(mxb, tuner, s_frequency, &mxb->cur_freq);
|
||||
|
||||
/* set a default video standard */
|
||||
tuner_call(mxb, tuner, s_std, std);
|
||||
tuner_call(mxb, core, s_std, std);
|
||||
|
||||
/* mute audio on tea6420s */
|
||||
tea6420_1_call(mxb, audio, s_routing, &TEA6420_line[6][0]);
|
||||
@@ -788,7 +788,7 @@ static int std_callback(struct saa7146_dev *dev, struct saa7146_standard *standa
|
||||
saa7146_write(dev, GPIO_CTRL, 0x00404050);
|
||||
/* unset the 7111 gpio register -- I don't know what this does exactly */
|
||||
saa7111a_call(mxb, core, s_gpio, 0);
|
||||
tuner_call(mxb, tuner, s_std, std);
|
||||
tuner_call(mxb, core, s_std, std);
|
||||
} else {
|
||||
v4l2_std_id std = V4L2_STD_PAL_BG;
|
||||
|
||||
@@ -797,7 +797,7 @@ static int std_callback(struct saa7146_dev *dev, struct saa7146_standard *standa
|
||||
saa7146_write(dev, GPIO_CTRL, 0x00404050);
|
||||
/* set the 7111 gpio register -- I don't know what this does exactly */
|
||||
saa7111a_call(mxb, core, s_gpio, 1);
|
||||
tuner_call(mxb, tuner, s_std, std);
|
||||
tuner_call(mxb, core, s_std, std);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -2944,7 +2944,7 @@ static void pvr2_subdev_update(struct pvr2_hdw *hdw)
|
||||
v4l2_std_id vs;
|
||||
vs = hdw->std_mask_cur;
|
||||
v4l2_device_call_all(&hdw->v4l2_dev, 0,
|
||||
tuner, s_std, vs);
|
||||
core, s_std, vs);
|
||||
}
|
||||
hdw->tuner_signal_stale = !0;
|
||||
hdw->cropcap_stale = !0;
|
||||
|
||||
@@ -414,9 +414,6 @@ static const struct v4l2_subdev_core_ops saa7110_core_ops = {
|
||||
.g_ctrl = saa7110_g_ctrl,
|
||||
.s_ctrl = saa7110_s_ctrl,
|
||||
.queryctrl = saa7110_queryctrl,
|
||||
};
|
||||
|
||||
static const struct v4l2_subdev_tuner_ops saa7110_tuner_ops = {
|
||||
.s_std = saa7110_s_std,
|
||||
};
|
||||
|
||||
@@ -429,7 +426,6 @@ static const struct v4l2_subdev_video_ops saa7110_video_ops = {
|
||||
|
||||
static const struct v4l2_subdev_ops saa7110_ops = {
|
||||
.core = &saa7110_core_ops,
|
||||
.tuner = &saa7110_tuner_ops,
|
||||
.video = &saa7110_video_ops,
|
||||
};
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user