drivers/media/pci/cx18/cx23418.h

Source file repositories/reference/linux-study-clean/drivers/media/pci/cx18/cx23418.h

File Facts

System
Linux kernel
Corpus path
drivers/media/pci/cx18/cx23418.h
Extension
.h
Size
17170 bytes
Lines
479
Domain
Driver Families
Bucket
drivers/media
Inferred role
Driver Families: implementation source
Status
source implementation candidate

Why This File Exists

Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.

Dependency Surface

Detected Declarations

Annotated Snippet

#ifndef CX23418_H
#define CX23418_H

#include <media/drv-intf/cx2341x.h>

#define MGR_CMD_MASK				0x40000000
/* The MSB of the command code indicates that this is the completion of a
   command */
#define MGR_CMD_MASK_ACK			(MGR_CMD_MASK | 0x80000000)

/* Description: This command creates a new instance of a certain task
   IN[0]  - Task ID. This is one of the XPU_CMD_MASK_YYY where XPU is
	    the processor on which the task YYY will be created
   OUT[0] - Task handle. This handle is passed along with commands to
	    dispatch to the right instance of the task
   ReturnCode - One of the ERR_SYS_... */
#define CX18_CREATE_TASK			(MGR_CMD_MASK | 0x0001)

/* Description: This command destroys an instance of a task
   IN[0] - Task handle. Hanlde of the task to destroy
   ReturnCode - One of the ERR_SYS_... */
#define CX18_DESTROY_TASK			(MGR_CMD_MASK | 0x0002)

/* All commands for CPU have the following mask set */
#define CPU_CMD_MASK				0x20000000
#define CPU_CMD_MASK_DEBUG			(CPU_CMD_MASK | 0x00000000)
#define CPU_CMD_MASK_ACK			(CPU_CMD_MASK | 0x80000000)
#define CPU_CMD_MASK_CAPTURE			(CPU_CMD_MASK | 0x00020000)
#define CPU_CMD_MASK_TS				(CPU_CMD_MASK | 0x00040000)

#define EPU_CMD_MASK				0x02000000
#define EPU_CMD_MASK_DEBUG			(EPU_CMD_MASK | 0x000000)
#define EPU_CMD_MASK_DE				(EPU_CMD_MASK | 0x040000)

#define APU_CMD_MASK				0x10000000
#define APU_CMD_MASK_ACK			(APU_CMD_MASK | 0x80000000)

#define CX18_APU_ENCODING_METHOD_MPEG		(0 << 28)
#define CX18_APU_ENCODING_METHOD_AC3		(1 << 28)

/* Description: Command APU to start audio
   IN[0] - audio parameters (same as CX18_CPU_SET_AUDIO_PARAMETERS?)
   IN[1] - caller buffer address, or 0
   ReturnCode - ??? */
#define CX18_APU_START				(APU_CMD_MASK | 0x01)

/* Description: Command APU to stop audio
   IN[0] - encoding method to stop
   ReturnCode - ??? */
#define CX18_APU_STOP				(APU_CMD_MASK | 0x02)

/* Description: Command APU to reset the AI
   ReturnCode - ??? */
#define CX18_APU_RESETAI			(APU_CMD_MASK | 0x05)

/* Description: This command indicates that a Memory Descriptor List has been
   filled with the requested channel type
   IN[0] - Task handle. Handle of the task
   IN[1] - Offset of the MDL_ACK from the beginning of the local DDR.
   IN[2] - Number of CNXT_MDL_ACK structures in the array pointed to by IN[1]
   ReturnCode - One of the ERR_DE_... */
#define CX18_EPU_DMA_DONE			(EPU_CMD_MASK_DE | 0x0001)

/* Something interesting happened
   IN[0] - A value to log
   IN[1] - An offset of a string in the MiniMe memory;
	   0/zero/NULL means "I have nothing to say" */
#define CX18_EPU_DEBUG				(EPU_CMD_MASK_DEBUG | 0x0003)

/* Reads memory/registers (32-bit)
   IN[0] - Address
   OUT[1] - Value */
#define CX18_CPU_DEBUG_PEEK32			(CPU_CMD_MASK_DEBUG | 0x0003)

/* Description: This command starts streaming with the set channel type
   IN[0] - Task handle. Handle of the task to start
   ReturnCode - One of the ERR_CAPTURE_... */
#define CX18_CPU_CAPTURE_START			(CPU_CMD_MASK_CAPTURE | 0x0002)

/* Description: This command stops streaming with the set channel type
   IN[0] - Task handle. Handle of the task to stop
   IN[1] - 0 = stop at end of GOP, 1 = stop at end of frame (MPEG only)
   ReturnCode - One of the ERR_CAPTURE_... */
#define CX18_CPU_CAPTURE_STOP			(CPU_CMD_MASK_CAPTURE | 0x0003)

/* Description: This command pauses streaming with the set channel type
   IN[0] - Task handle. Handle of the task to pause
   ReturnCode - One of the ERR_CAPTURE_... */
#define CX18_CPU_CAPTURE_PAUSE			(CPU_CMD_MASK_CAPTURE | 0x0007)

Annotation

Implementation Notes