2 * Based on omap-alsa-tsc2101.h
4 * Alsa Driver for Siemens SX1.
5 * Copyright (C) 2006 Vladimir Ananiev (vovan888 at gmail com)
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.
13 #ifndef OMAP_ALSA_SX1_H_
14 #define OMAP_ALSA_SX1_H_
16 #include <linux/types.h>
18 #define NUMBER_SAMPLE_RATES_SUPPORTED 9
21 * AUDIO related MACROS
23 #ifndef DEFAULT_BITPERSAMPLE
24 #define DEFAULT_BITPERSAMPLE 16
27 #define DEFAULT_SAMPLE_RATE 44100
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 */
37 /* Send IPC message to sound server */
38 extern int cn_sx1snd_send(unsigned int cmd, unsigned int arg1, unsigned int arg2);
39 /* cmd for IPC_GROUP_DAC */
40 #define DAC_VOLUME_UPDATE 0
41 #define DAC_SETAUDIODEVICE 1
42 #define DAC_OPEN_RING 2
43 #define DAC_OPEN_DEFAULT 3
45 #define DAC_FMRADIO_OPEN 5
46 #define DAC_FMRADIO_CLOSE 6
47 #define DAC_PLAYTONE 7
48 /* cmd for IPC_GROUP_PCM */
49 #define PCM_PLAY (0+8)
50 #define PCM_RECORD (1+8)
51 #define PCM_CLOSE (2+8)
53 /* for DAC_SETAUDIODEVICE */
54 #define SX1_DEVICE_SPEAKER 0
55 #define SX1_DEVICE_HEADPHONE 4
56 #define SX1_DEVICE_PHONE 3
57 /* frequencies for MdaDacOpenDefaultL, MdaDacOpenRingL */