]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
media: vimc: stream: add missing function documentation
authorAndré Almeida <andrealmeid@collabora.com>
Sun, 16 Jun 2019 02:09:58 +0000 (22:09 -0400)
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>
Fri, 21 Jun 2019 21:17:25 +0000 (17:17 -0400)
Add comments at vimc_streamer_s_stream and vimc_streamer_thread, making
the vimc-stream totally documented.

Signed-off-by: André Almeida <andrealmeid@collabora.com>
[hverkuil-cisco@xs4all.nl: fix typo: in a fixed framerate -> at a fixed framerate]
[hverkuil-cisco@xs4all.nl: fix typo: stops the thread -> stop the thread]
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
drivers/media/platform/vimc/vimc-streamer.c

index 236ade38f1da2c90c23e64d9e4be615516d66fe7..3b3f36357a0e675cd904d991f43387105f91735d 100644 (file)
@@ -122,6 +122,14 @@ static int vimc_streamer_pipeline_init(struct vimc_stream *stream,
        return -EINVAL;
 }
 
+/*
+ * vimc_streamer_thread - process frames through the pipeline
+ *
+ * @data:      vimc_stream struct of the current stream
+ *
+ * From the source to the sink, gets a frame from each subdevice and send to
+ * the next one of the pipeline at a fixed framerate.
+ */
 static int vimc_streamer_thread(void *data)
 {
        struct vimc_stream *stream = data;
@@ -149,6 +157,20 @@ static int vimc_streamer_thread(void *data)
        return 0;
 }
 
+/*
+ * vimc_streamer_s_stream - start/stop the streaming on the media pipeline
+ *
+ * @stream:    the pointer to the stream structure of the current stream
+ * @ved:       pointer to the vimc entity of the entity of the stream
+ * @enable:    flag to determine if stream should start/stop
+ *
+ * When starting, check if there is no stream->kthread allocated. This should
+ * indicate that a stream is already running. Then, it initializes
+ * the pipeline, creates and runs a kthread to consume buffers through the
+ * pipeline.
+ * When stopping, analogously check if there is a stream running, stop
+ * the thread and terminates the pipeline.
+ */
 int vimc_streamer_s_stream(struct vimc_stream *stream,
                           struct vimc_ent_device *ved,
                           int enable)