Logo Search packages:      
Sourcecode: linux-fsl-imx51 version File versions  Download package

static int mxc_v4l2out_streamoff ( vout_data *  vout  )  [static]

Shut down the voutera

Parameters:
vout structure vout_data *
Returns:
status 0 Success

Definition at line 494 of file mx27_v4l2_output.c.

References fb_gwinfo::enabled, mx2_gw_set(), mx2fb_unregister_client(), mxc_free_buffers(), and pp_enable().

Referenced by mxc_v4l2out_close(), and mxc_v4l2out_do_ioctl().

{
      int i, retval = 0;
      unsigned long lock_flag = 0;

      if (!vout)
            return -EINVAL;

      if (vout->state == STATE_STREAM_OFF) {
            return 0;
      }

      spin_lock_irqsave(&g_lock, lock_flag);

      del_timer(&vout->output_timer);
      pp_enable(0);           /* Disable PP */

      if (vout->state == STATE_STREAM_ON) {
            vout->state = STATE_STREAM_STOPPING;
      }

      spin_unlock_irqrestore(&g_lock, lock_flag);

      vout->ready_q.head = vout->ready_q.tail = 0;
      vout->done_q.head = vout->done_q.tail = 0;
      for (i = 0; i < vout->buffer_cnt; i++) {
            vout->v4l2_bufs[i].flags = 0;
            vout->v4l2_bufs[i].timestamp.tv_sec = 0;
            vout->v4l2_bufs[i].timestamp.tv_usec = 0;
      }

      vout->state = STATE_STREAM_OFF;

      if (vout->v4l2_fb.flags == V4L2_FBUF_FLAG_OVERLAY) {
            struct fb_gwinfo gwinfo;

            /* Disable graphic window */
            gwinfo.enabled = 0;
            mx2_gw_set(&gwinfo);
      }
#ifdef CONFIG_VIDEO_MXC_OUTPUT_FBSYNC
      g_output_fb = -1;
      g_fb_enabled = 0;
      g_pp_ready = 0;
      fb_unregister_client(&fb_event_notifier);
      mx2fb_unregister_client(&mx2fb_event_notifier);
#endif

      mxc_free_buffers(vout->display_bufs, vout->display_bufs_vaddr,
                   2, vout->display_buf_size);

      return retval;
}


Generated by  Doxygen 1.6.0   Back to index