Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Functions
crystalhd_cmds.c File Reference
#include "crystalhd.h"

Go to the source code of this file.

Functions

enum BC_STATUS crystalhd_suspend (struct crystalhd_cmd *ctx, struct crystalhd_ioctl_data *idata)
 
enum BC_STATUS crystalhd_resume (struct crystalhd_cmd *ctx)
 
enum BC_STATUS crystalhd_user_open (struct crystalhd_cmd *ctx, struct crystalhd_user **user_ctx)
 
enum BC_STATUS crystalhd_user_close (struct crystalhd_cmd *ctx, struct crystalhd_user *uc)
 
enum BC_STATUS __devinit crystalhd_setup_cmd_context (struct crystalhd_cmd *ctx, struct crystalhd_adp *adp)
 
enum BC_STATUS __devexit crystalhd_delete_cmd_context (struct crystalhd_cmd *ctx)
 
crystalhd_cmd_proc crystalhd_get_cmd_proc (struct crystalhd_cmd *ctx, uint32_t cmd, struct crystalhd_user *uc)
 
bool crystalhd_cmd_interrupt (struct crystalhd_cmd *ctx)
 

Function Documentation

bool crystalhd_cmd_interrupt ( struct crystalhd_cmd ctx)

crystalhd_cmd_interrupt - ISR entry point : Command layer contextx.

Return: TRUE: If interrupt from bcm70012 device.

ISR entry point from OS layer.

Definition at line 1053 of file crystalhd_cmds.c.

enum BC_STATUS __devexit crystalhd_delete_cmd_context ( struct crystalhd_cmd ctx)

crystalhd_delete_cmd_context - Release Command layer resources. : Command layer contextx.

Return: status

Called at the time of driver un-load.

Definition at line 989 of file crystalhd_cmds.c.

crystalhd_cmd_proc crystalhd_get_cmd_proc ( struct crystalhd_cmd ctx,
uint32_t  cmd,
struct crystalhd_user uc 
)

crystalhd_get_cmd_proc - Cproc table lookup. : Command layer contextx. : IOCTL command code. : User ID context.

Return: command proc function pointer

This function checks the process context, application's mode of operation and returns the function pointer from the cproc table.

Definition at line 1011 of file crystalhd_cmds.c.

enum BC_STATUS crystalhd_resume ( struct crystalhd_cmd ctx)

crystalhd_resume - Resume frame capture. : Command layer contextx.

Return: status

Resume frame capture.

PM_Resume can't resume the playback state back to pre-suspend state because we don't keep video clip related information within driver. To get back to the pre-suspend state App will re-open the device and start a new playback session from the pre-suspend clip position.

Definition at line 860 of file crystalhd_cmds.c.

enum BC_STATUS __devinit crystalhd_setup_cmd_context ( struct crystalhd_cmd ctx,
struct crystalhd_adp adp 
)

crystalhd_setup_cmd_context - Setup Command layer resources. : Command layer contextx. : Adapter context

Return: status

Called at the time of driver load.

Definition at line 954 of file crystalhd_cmds.c.

enum BC_STATUS crystalhd_suspend ( struct crystalhd_cmd ctx,
struct crystalhd_ioctl_data idata 
)

crystalhd_suspend - Power management suspend request. : Command layer context. : Iodata - required for internal use.

Return: status

  1. Set the state to Suspend.
  2. Flush the Rx Buffers it will unmap all the buffers and stop the RxDMA engine.
  3. Cancel The TX Io and Stop Dma Engine.
  4. Put the DDR in to deep sleep.
  5. Stop the hardware putting it in to Reset State.

Current gstreamer frame work does not provide any power management related notification to user mode decoder plug-in. As a work-around we pass on the power mangement notification to our plug-in by completing all outstanding requests with BC_STS_IO_USER_ABORT return code.

Definition at line 801 of file crystalhd_cmds.c.

enum BC_STATUS crystalhd_user_close ( struct crystalhd_cmd ctx,
struct crystalhd_user uc 
)

crystalhd_user_close - Close application handle. : Command layer contextx. : User ID context.

Return: status

Closer application handle and release app specific resources.

Definition at line 919 of file crystalhd_cmds.c.

enum BC_STATUS crystalhd_user_open ( struct crystalhd_cmd ctx,
struct crystalhd_user **  user_ctx 
)

crystalhd_user_open - Create application handle. : Command layer contextx. : User ID context.

Return: status

Creates an application specific UID and allocates application specific resources. HW layer initialization is done for the first open request.

Definition at line 881 of file crystalhd_cmds.c.