⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 omap-audio-dma-intfc.h

📁 Linux Kernel 2.6.9 for OMAP1710
💻 H
字号:
/*   * linux/sound/oss/omap-audio-dma-intfc.h * * Common audio DMA handling for the OMAP processors * * Copyright (C) 2004 Texas Instruments, Inc. * * Copyright (C) 2000, 2001 Nicolas Pitre <nico@cam.org> * * 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. * * History: * * 2004/08/12  Nishanth Menon - Modified to integrate Audio requirements on 1610,1710 *               and 2420 platforms. */#ifndef __OMAP_AUDIO_DMA_INTFC_H#define __OMAP_AUDIO_DMA_INTFC_H/************************** INCLUDES *************************************//* Requires omap-audio.h */#include "omap-audio.h"/************************** GLOBAL MACROS *************************************//* Provide the Macro interfaces common across platforms */#if CONFIG_ARCH_OMAP16XX#define DMA_REQUEST(e,s, cb)   {e=omap_request_sound_dma(s->dma_dev, s->id, s, &s->lch);}#define DMA_FREE(s)		       omap_free_sound_dma(&s->lch)#define DMA_CLEAR(s)		   omap_clear_sound_dma(s)#elif defined CONFIG_ARCH_OMAP24XX/* number of channels for linking */#define NUM_AUDIO_DMA_LCH       2#define DMA_REQUEST(e,s, cb)   {int ch_alloc;e=omap_request_dma_chain (s->dma_dev, s->id, NUM_AUDIO_DMA_LCH, cb, s, &ch_alloc,&s->dma_chain);}#define DMA_FREE(s)            omap_free_dma_chain(s->dma_chain);#define DMA_CLEAR(s)           omap_clear_dma_chain(s->dma_chain);#else#error "Un Supported Configuration"#endif				/* End of Provide the Macro interfaces common across platforms *//************************** GLOBAL DATA STRUCTURES *********************************/typedef void (*dma_callback_t) (int lch, u16 ch_status, void *data);/************************** GLOBAL FUNCTIONS ***************************************/dma_callback_t audio_get_dma_callback(void);int audio_setup_buf(audio_stream_t * s);int audio_process_dma(audio_stream_t * s);void audio_prime_rx(audio_state_t * state);int audio_set_fragments(audio_stream_t * s, int val);int audio_sync(struct file *file);void audio_stop_dma(audio_stream_t * s);u_int audio_get_dma_pos(audio_stream_t * s);void audio_reset(audio_stream_t * s);void audio_discard_buf(audio_stream_t * s);/**************** ARCH SPECIFIC FUNCIONS *******************************************/#if CONFIG_ARCH_OMAP16XXvoid omap_clear_sound_dma(audio_stream_t * s);int omap_request_sound_dma(int device_id, const char *device_name, void *data,			   int **channels);int omap_free_sound_dma(int **channels);#endif				/* End of #if CONFIG_ARCH_OMAP16XX */#endif				/* #ifndef __OMAP_AUDIO_DMA_INTFC_H */

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -