2 * linux/sound/arm/omap-alsa-dma.h
4 * Common audio DMA handling for the OMAP processors
6 * Copyright (C) 2005 Instituto Nokia de Tecnologia - INdT - Manaus Brazil
8 * Copyright (C) 2004 Texas Instruments, Inc.
10 * Copyright (C) 2000, 2001 Nicolas Pitre <nico@cam.org>
12 * This package is free software; you can redistribute it and/or modify
13 * it under the terms of the GNU General Public License version 2 as
14 * published by the Free Software Foundation.
16 * THIS PACKAGE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
17 * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
18 * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
23 * 2004/08/12 Nishanth Menon - Modified to integrate Audio requirements on 1610,1710 platforms
25 * 2005/07/25 INdT Kernel Team - Renamed to omap-alsa-dma.h. Ported to Alsa.
28 #ifndef __OMAP_AUDIO_ALSA_DMA_H
29 #define __OMAP_AUDIO_ALSA_DMA_H
31 /************************** INCLUDES *************************************/
33 #include "omap-aic23.h"
35 /************************** GLOBAL MACROS *************************************/
37 /* Provide the Macro interfaces common across platforms */
38 #define DMA_REQUEST(e,s, cb) {e=omap_request_sound_dma(s->dma_dev, s->id, s, &s->lch);}
39 #define DMA_FREE(s) omap_free_sound_dma(s, &s->lch)
40 #define DMA_CLEAR(s) omap_clear_sound_dma(s)
42 /************************** GLOBAL DATA STRUCTURES *********************************/
44 typedef void (*dma_callback_t) (int lch, u16 ch_status, void *data);
46 /**************** ARCH SPECIFIC FUNCIONS *******************************************/
48 void omap_clear_sound_dma(struct audio_stream * s);
50 int omap_request_sound_dma(int device_id, const char *device_name,
51 void *data, int **channels);
52 int omap_free_sound_dma(void *data, int **channels);
54 int omap_start_sound_dma(struct audio_stream *s, dma_addr_t dma_ptr,
57 void omap_audio_stop_dma(struct audio_stream *s);