Skip to content

Commit cc069e1

Browse files
6by9pelwell
authored andcommitted
staging: vc04_services: codec: Fix component enable/disable
start_streaming enabled the VPU component if ctx->component_enabled was not set. stop_streaming disabled the VPU component if both ports were disabled. It didn't clear ctx->component_enabled. If seeking, this meant that the component never got re-enabled, and buffers never got processed afterwards. Signed-off-by: Dave Stevenson <[email protected]>
1 parent cac8c90 commit cc069e1

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

drivers/staging/vc04_services/bcm2835-codec/bcm2835-v4l2-codec.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2377,13 +2377,15 @@ static void bcm2835_codec_stop_streaming(struct vb2_queue *q)
23772377

23782378

23792379
/* If both ports disabled, then disable the component */
2380-
if (!ctx->component->input[0].enabled &&
2380+
if (ctx->component_enabled &&
2381+
!ctx->component->input[0].enabled &&
23812382
!ctx->component->output[0].enabled) {
23822383
ret = vchiq_mmal_component_disable(dev->instance,
23832384
ctx->component);
23842385
if (ret)
23852386
v4l2_err(&ctx->dev->v4l2_dev, "%s: Failed enabling component, ret %d\n",
23862387
__func__, ret);
2388+
ctx->component_enabled = false;
23872389
}
23882390

23892391
if (V4L2_TYPE_IS_OUTPUT(q->type))

0 commit comments

Comments
 (0)