mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-27 03:10:12 +00:00
![Rene Sapiens](/assets/img/avatar_default.png)
hungarian notation will be removed from the elements inside structures, the next varibles will be renamed: Original: Replacement: hnext next hnode node hprev prev hroot root hstream stream pbuf buf pcb_arg cb_arg pdspheap_list dspheap_list pmsg msg ps_name name pstr_create_phase_fxn str_create_phase_fxn pstr_delete_phase_fxn str_delete_phase_fxn pstr_dev_name str_dev_name pstr_event_name str_event_name pstr_execute_phase_fxn str_execute_phase_fxn pstr_i_alg_name str_i_alg_name udma_chnl_id dma_chnl_id un_bufs_in_strm bufs_in_strm usm_buf_size sm_buf_size Signed-off-by: Rene Sapiens <rene.sapiens@ti.com> Signed-off-by: Armando Uribe <x0095078@ti.com> Signed-off-by: Omar Ramirez Luna <omar.ramirez@ti.com>
63 lines
2.2 KiB
C
63 lines
2.2 KiB
C
/*
|
|
* chnldefs.h
|
|
*
|
|
* DSP-BIOS Bridge driver support functions for TI OMAP processors.
|
|
*
|
|
* System-wide channel objects and constants.
|
|
*
|
|
* Copyright (C) 2005-2006 Texas Instruments, Inc.
|
|
*
|
|
* This package is free software; you can redistribute it and/or modify
|
|
* it under the terms of the GNU General Public License version 2 as
|
|
* published by the Free Software Foundation.
|
|
*
|
|
* THIS PACKAGE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
|
|
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
|
|
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
|
*/
|
|
|
|
#ifndef CHNLDEFS_
|
|
#define CHNLDEFS_
|
|
|
|
/* Channel id option. */
|
|
#define CHNL_PICKFREE (~0UL) /* Let manager pick a free channel. */
|
|
|
|
/* Channel modes */
|
|
#define CHNL_MODETODSP 0 /* Data streaming to the DSP. */
|
|
#define CHNL_MODEFROMDSP 1 /* Data streaming from the DSP. */
|
|
|
|
/* GetIOCompletion flags */
|
|
#define CHNL_IOCINFINITE 0xffffffff /* Wait forever for IO completion. */
|
|
#define CHNL_IOCNOWAIT 0x0 /* Dequeue an IOC, if available. */
|
|
|
|
/* IO Completion Record status: */
|
|
#define CHNL_IOCSTATCOMPLETE 0x0000 /* IO Completed. */
|
|
#define CHNL_IOCSTATCANCEL 0x0002 /* IO was cancelled */
|
|
#define CHNL_IOCSTATTIMEOUT 0x0008 /* Wait for IOC timed out. */
|
|
#define CHNL_IOCSTATEOS 0x8000 /* End Of Stream reached. */
|
|
|
|
/* Macros for checking I/O Completion status: */
|
|
#define CHNL_IS_IO_COMPLETE(ioc) (!(ioc.status & ~CHNL_IOCSTATEOS))
|
|
#define CHNL_IS_IO_CANCELLED(ioc) (ioc.status & CHNL_IOCSTATCANCEL)
|
|
#define CHNL_IS_TIMED_OUT(ioc) (ioc.status & CHNL_IOCSTATTIMEOUT)
|
|
|
|
/* Channel attributes: */
|
|
struct chnl_attr {
|
|
u32 uio_reqs; /* Max # of preallocated I/O requests. */
|
|
void *event_obj; /* User supplied auto-reset event object. */
|
|
char *str_event_name; /* Ptr to name of user event object. */
|
|
void *reserved1; /* Reserved for future use. */
|
|
u32 reserved2; /* Reserved for future use. */
|
|
|
|
};
|
|
|
|
/* I/O completion record: */
|
|
struct chnl_ioc {
|
|
void *buf; /* Buffer to be filled/emptied. */
|
|
u32 byte_size; /* Bytes transferred. */
|
|
u32 buf_size; /* Actual buffer size in bytes */
|
|
u32 status; /* Status of IO completion. */
|
|
u32 arg; /* User argument associated with buf. */
|
|
};
|
|
|
|
#endif /* CHNLDEFS_ */
|