]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blob - sound/arm/omap-alsa-dma.h
2ac7650abe353380f2d75c292153549a3dc416a5
[linux-2.6-omap-h63xx.git] / sound / arm / omap-alsa-dma.h
1 /*  
2  * linux/sound/arm/omap-alsa-dma.h
3  *
4  * Common audio DMA handling for the OMAP processors
5  *
6  * Copyright (C) 2005 Instituto Nokia de Tecnologia - INdT - Manaus Brazil
7  * 
8  * Copyright (C) 2004 Texas Instruments, Inc.
9  *
10  * Copyright (C) 2000, 2001 Nicolas Pitre <nico@cam.org>
11  *
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.
15  *
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.
19  *
20  * History:
21  *
22  * 
23  * 2004/08/12  Nishanth Menon - Modified to integrate Audio requirements on 1610,1710 platforms
24  *
25  * 2005/07/25  INdT Kernel Team - Renamed to omap-alsa-dma.h. Ported to Alsa.
26  */
27
28 #ifndef __OMAP_AUDIO_ALSA_DMA_H
29 #define __OMAP_AUDIO_ALSA_DMA_H
30
31 /************************** INCLUDES *************************************/
32
33 #include "omap-aic23.h"
34
35 /************************** GLOBAL MACROS *************************************/
36
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)
41
42 /************************** GLOBAL DATA STRUCTURES *********************************/
43
44 typedef void (*dma_callback_t) (int lch, u16 ch_status, void *data);
45
46 /**************** ARCH SPECIFIC FUNCIONS *******************************************/
47
48 void omap_clear_sound_dma(struct audio_stream * s);
49
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);
53
54 int omap_start_sound_dma(struct audio_stream *s, dma_addr_t dma_ptr,
55                          u_int dma_size);
56
57 void omap_audio_stop_dma(struct audio_stream *s);
58
59 #endif