mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net.git/
synced 2026-05-02 18:15:03 -04:00
media: drivers: use video device pipeline start/stop
Convert the media drivers to use video device based pipeline start/stop where possible. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
This commit is contained in:
committed by
Mauro Carvalho Chehab
parent
340eba477f
commit
12cecbf915
@@ -241,13 +241,12 @@ static void vimc_capture_return_all_buffers(struct vimc_capture_device *vcapture
|
||||
static int vimc_capture_start_streaming(struct vb2_queue *vq, unsigned int count)
|
||||
{
|
||||
struct vimc_capture_device *vcapture = vb2_get_drv_priv(vq);
|
||||
struct media_entity *entity = &vcapture->vdev.entity;
|
||||
int ret;
|
||||
|
||||
vcapture->sequence = 0;
|
||||
|
||||
/* Start the media pipeline */
|
||||
ret = media_pipeline_start(entity, &vcapture->stream.pipe);
|
||||
ret = video_device_pipeline_start(&vcapture->vdev, &vcapture->stream.pipe);
|
||||
if (ret) {
|
||||
vimc_capture_return_all_buffers(vcapture, VB2_BUF_STATE_QUEUED);
|
||||
return ret;
|
||||
@@ -255,7 +254,7 @@ static int vimc_capture_start_streaming(struct vb2_queue *vq, unsigned int count
|
||||
|
||||
ret = vimc_streamer_s_stream(&vcapture->stream, &vcapture->ved, 1);
|
||||
if (ret) {
|
||||
media_pipeline_stop(entity);
|
||||
video_device_pipeline_stop(&vcapture->vdev);
|
||||
vimc_capture_return_all_buffers(vcapture, VB2_BUF_STATE_QUEUED);
|
||||
return ret;
|
||||
}
|
||||
@@ -274,7 +273,7 @@ static void vimc_capture_stop_streaming(struct vb2_queue *vq)
|
||||
vimc_streamer_s_stream(&vcapture->stream, &vcapture->ved, 0);
|
||||
|
||||
/* Stop the media pipeline */
|
||||
media_pipeline_stop(&vcapture->vdev.entity);
|
||||
video_device_pipeline_stop(&vcapture->vdev);
|
||||
|
||||
/* Release all active buffers */
|
||||
vimc_capture_return_all_buffers(vcapture, VB2_BUF_STATE_ERROR);
|
||||
|
||||
Reference in New Issue
Block a user