if (solo_enc->desc_count <= 1)
return 0;
- return solo_p2m_dma_desc(solo_dev, solo_enc->desc_items, solo_enc->desc_dma,
- solo_enc->desc_count - 1);
+ return solo_p2m_dma_desc(solo_dev, solo_enc->desc_items,
+ solo_enc->desc_dma, solo_enc->desc_count - 1);
}
/* Extract values from VOP header - VE_STATUSxx */
return -EIO;
/* If this is a key frame, add extra header */
- vb->v4l2_buf.flags &= ~(V4L2_BUF_FLAG_KEYFRAME | V4L2_BUF_FLAG_PFRAME | V4L2_BUF_FLAG_BFRAME);
+ vb->v4l2_buf.flags &= ~(V4L2_BUF_FLAG_KEYFRAME | V4L2_BUF_FLAG_PFRAME |
+ V4L2_BUF_FLAG_BFRAME);
if (!vop_type(vh)) {
skip = solo_enc->vop_len;
vb->v4l2_buf.flags |= V4L2_BUF_FLAG_KEYFRAME;
- vb2_set_plane_payload(vb, 0, vop_mpeg_size(vh) + solo_enc->vop_len);
+ vb2_set_plane_payload(vb, 0, vop_mpeg_size(vh) +
+ solo_enc->vop_len);
} else {
vb->v4l2_buf.flags |= V4L2_BUF_FLAG_PFRAME;
vb2_set_plane_payload(vb, 0, vop_mpeg_size(vh));
}
/* Now get the actual mpeg payload */
- frame_off = (vop_mpeg_offset(vh) - SOLO_MP4E_EXT_ADDR(solo_dev) + sizeof(*vh))
- % SOLO_MP4E_EXT_SIZE(solo_dev);
+ frame_off = (vop_mpeg_offset(vh) - SOLO_MP4E_EXT_ADDR(solo_dev) +
+ sizeof(*vh)) % SOLO_MP4E_EXT_SIZE(solo_dev);
frame_size = (vop_mpeg_size(vh) + skip + (DMA_ALIGN - 1))
& ~(DMA_ALIGN - 1);
spin_unlock_irqrestore(&solo_enc->av_lock, flags);
goto unlock;
}
- vb = list_first_entry(&solo_enc->vidq_active, struct solo_vb2_buf, list);
+ vb = list_first_entry(&solo_enc->vidq_active, struct solo_vb2_buf,
+ list);
list_del(&vb->list);
spin_unlock_irqrestore(&solo_enc->av_lock, flags);
enc_buf.vh = solo_dev->vh_buf;
/* Sanity check */
- if (vop_mpeg_offset(enc_buf.vh) != SOLO_MP4E_EXT_ADDR(solo_dev) + off)
+ if (vop_mpeg_offset(enc_buf.vh) !=
+ SOLO_MP4E_EXT_ADDR(solo_dev) + off)
continue;
if (solo_motion_detected(solo_enc))
return 0;
}
-static int solo_enc_queue_setup(struct vb2_queue *q, const struct v4l2_format *fmt,
- unsigned int *num_buffers, unsigned int *num_planes,
- unsigned int sizes[], void *alloc_ctxs[])
+static int solo_enc_queue_setup(struct vb2_queue *q,
+ const struct v4l2_format *fmt,
+ unsigned int *num_buffers,
+ unsigned int *num_planes, unsigned int sizes[],
+ void *alloc_ctxs[])
{
sizes[0] = FRAME_BUF_SIZE;
*num_planes = 1;
solo_enc->motion_thresh = ctrl->val;
if (!solo_enc->motion_global || !solo_enc->motion_enabled)
return 0;
- return solo_set_motion_threshold(solo_dev, solo_enc->ch, ctrl->val);
+ return solo_set_motion_threshold(solo_dev, solo_enc->ch,
+ ctrl->val);
case V4L2_CID_MOTION_MODE:
solo_enc->motion_global = ctrl->val == 1;
solo_enc->motion_enabled = ctrl->val > 0;
if (ctrl->val) {
if (solo_enc->motion_global)
- solo_set_motion_threshold(solo_dev, solo_enc->ch,
- solo_enc->motion_thresh);
+ solo_set_motion_threshold(solo_dev,
+ solo_enc->ch, solo_enc->motion_thresh);
else
solo_set_motion_block(solo_dev, solo_enc->ch,
&solo_enc->motion_thresholds);
solo_enc->desc_nelts = 32;
solo_enc->desc_items = pci_alloc_consistent(solo_dev->pdev,
sizeof(struct solo_p2m_desc) *
- solo_enc->desc_nelts, &solo_enc->desc_dma);
+ solo_enc->desc_nelts,
+ &solo_enc->desc_dma);
ret = -ENOMEM;
if (solo_enc->desc_items == NULL)
goto hdl_free;