Merge current mainline tree into linux-omap tree
[pandora-kernel.git] / sound / arm / omap / omap-alsa-dma.h
1 /*
2  * linux/sound/arm/omap/omap-alsa-dma.h
3  *
4  * Common audio DMA handling for the OMAP processors
5  *
6  * Copyright (C) 2006 Mika Laitio <lamikr@cc.jyu.fi>
7  *
8  * Copyright (C) 2005 Instituto Nokia de Tecnologia - INdT - Manaus Brazil
9  *
10  * Copyright (C) 2004 Texas Instruments, Inc.
11  *
12  * Copyright (C) 2000, 2001 Nicolas Pitre <nico@cam.org>
13  *
14  * This package is free software; you can redistribute it and/or modify
15  * it under the terms of the GNU General Public License version 2 as
16  * published by the Free Software Foundation.
17  *
18  * THIS PACKAGE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
19  * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
20  * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
21  *
22  * History:
23  *
24  *
25  * 2004/08/12  Nishanth Menon - Modified to integrate Audio requirements on
26  *                              1610, 1710 platforms
27  *
28  * 2005/07/25  INdT Kernel Team - Renamed to omap-alsa-dma.h. Ported to Alsa.
29  */
30
31 #ifndef __OMAP_AUDIO_ALSA_DMA_H
32 #define __OMAP_AUDIO_ALSA_DMA_H
33
34 #include <mach/omap-alsa.h>
35
36 /* Global data structures */
37
38 typedef void (*dma_callback_t) (int lch, u16 ch_status, void *data);
39
40 /* arch specific functions */
41
42 void omap_clear_alsa_sound_dma(struct audio_stream *s);
43
44 int omap_request_alsa_sound_dma(int device_id, const char *device_name,
45                                 void *data, int **channels);
46 int omap_free_alsa_sound_dma(void *data, int **channels);
47
48 int omap_start_alsa_sound_dma(struct audio_stream *s, dma_addr_t dma_ptr,
49                                 u_int dma_size);
50
51 void omap_stop_alsa_sound_dma(struct audio_stream *s);
52
53 #endif