]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blob - sound/arm/omap/omap-alsa-sx1.h
9e11e0abfa2ba266c72534e892fafa547dfa56fc
[linux-2.6-omap-h63xx.git] / sound / arm / omap / omap-alsa-sx1.h
1 /*
2  * Based on omap-alsa-tsc2101.h
3  *
4  * Alsa Driver for Siemens SX1.
5  * Copyright (C) 2006 Vladimir Ananiev (vovan888 at gmail com)
6  *
7  * This program is free software; you can redistribute it and/or modify it
8  * under the terms of the GNU General Public License as published by the
9  * Free Software Foundation; either version 2 of the License, or (at your
10  * option) any later version.
11  */
12
13 #ifndef OMAP_ALSA_SX1_H_
14 #define OMAP_ALSA_SX1_H_
15
16 #include <linux/types.h>
17
18 #define NUMBER_SAMPLE_RATES_SUPPORTED   9
19
20 /*
21  * AUDIO related MACROS
22  */
23 #ifndef DEFAULT_BITPERSAMPLE
24 #define DEFAULT_BITPERSAMPLE            16
25 #endif
26
27 #define DEFAULT_SAMPLE_RATE             44100
28 /* fw15: 18356000 */
29 #define CODEC_CLOCK                     18359000
30 /* McBSP for playing music */
31 #define AUDIO_MCBSP                     OMAP_MCBSP1
32 /* McBSP for record/play audio from phone and mic */
33 #define AUDIO_MCBSP_PCM                 OMAP_MCBSP2
34 /* gpio pin for enable/disable clock */
35 #define OSC_EN                          2
36
37 /* Send IPC message to sound server */
38 extern int cn_sx1snd_send(unsigned int cmd, unsigned int arg1,
39                                 unsigned int arg2);
40 /* cmd for IPC_GROUP_DAC */
41 #define DAC_VOLUME_UPDATE               0
42 #define DAC_SETAUDIODEVICE              1
43 #define DAC_OPEN_RING                   2
44 #define DAC_OPEN_DEFAULT                3
45 #define DAC_CLOSE                       4
46 #define DAC_FMRADIO_OPEN                5
47 #define DAC_FMRADIO_CLOSE               6
48 #define DAC_PLAYTONE                    7
49 /* cmd for IPC_GROUP_PCM */
50 #define PCM_PLAY                        (0+8)
51 #define PCM_RECORD                      (1+8)
52 #define PCM_CLOSE                       (2+8)
53
54 /* for DAC_SETAUDIODEVICE */
55 #define SX1_DEVICE_SPEAKER              0
56 #define SX1_DEVICE_HEADPHONE            4
57 #define SX1_DEVICE_PHONE                3
58 /* frequencies for MdaDacOpenDefaultL,  MdaDacOpenRingL */
59 #define FRQ_8000        0
60 #define FRQ_11025               1
61 #define FRQ_12000               2
62 #define FRQ_16000               3
63 #define FRQ_22050               4
64 #define FRQ_24000               5
65 #define FRQ_32000               6
66 #define FRQ_44100               7
67 #define FRQ_48000               8
68
69 #endif