blob: 59578718d096211d8644fd5e8040d99e9e31a74f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
|
/*
* Copyright (C) ST-Ericsson SA 2010
*
* Author: Ola Lilja ola.o.lilja@stericsson.com,
* Roger Nilsson roger.xr.nilsson@stericsson.com
* for ST-Ericsson.
*
* License terms:
*
* This program 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.
*/
#ifndef U8500_PCM_H
#define U8500_PCM_H
#include <mach/msp.h>
#define NMDK_BUFFER_SIZE (64*1024)
#define U8500_PLATFORM_MIN_RATE_PLAYBACK 48000
#define U8500_PLATFORM_MAX_RATE_PLAYBACK 48000
#define U8500_PLATFORM_MIN_RATE_CAPTURE 48000
#define U8500_PLATFORM_MAX_RATE_CAPTURE 48000
#define U8500_PLATFORM_MAX_NO_OF_RATES 1
#define NUMBER_OUTPUT_DEVICE 5
#define NUMBER_INPUT_DEVICE 10
#define NO_OF_STREAMS 2
enum alsa_state {
ALSA_STATE_PAUSED,
ALSA_STATE_RUNNING
};
extern struct snd_soc_platform u8500_soc_platform;
typedef struct {
int stream_id; /* stream identifier */
int active; /* we are using this stream for transfer now */
int period; /* current transfer period */
int periods; /* current count of periods registerd in the DMA engine */
enum alsa_state state;
unsigned int old_offset;
struct semaphore alsa_sem;
struct completion alsa_com;
} u8500_pcm_stream_t;
struct u8500_pcm_private_t {
u8500_pcm_stream_t streams[2];
};
irqreturn_t u8500_pcm_dma_eot_handler(void *data, int irq);
#endif
|