]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blob - sound/arm/omap/omap-alsa-tsc2101.h
[PATCH] ARM: OMAP: Alsa modularisations and support for tsc2101 3/3 (round 2)
[linux-2.6-omap-h63xx.git] / sound / arm / omap / omap-alsa-tsc2101.h
1 /*
2  * arch/arc/mach-omap1/omap-alsa-tsc2101.h
3  * 
4  * Alsa Driver for TSC2101 codec for OMAP platform boards.
5  *
6  * Based on former omap-aic23.h and tsc2101 OSS drivers.
7  * Copyright (C) 2004 Texas Instruments, Inc.
8  *      Written by Nishanth Menon and Sriram Kannan
9  *
10  * Copyright (C) 2006 Instituto Nokia de Tecnologia - INdT - Manaus Brazil
11  *          Alsa modularization by Daniel Petrini (d.pensator@gmail.com)
12  * 
13  * Copyright (C) 2006 Mika Laitio <lamikr@cc.jyu.fi>
14  *
15  * This program is free software; you can redistribute it and/or modify it
16  * under the terms of the GNU General Public License as published by the
17  * Free Software Foundation; either version 2 of the License, or (at your
18  * option) any later version.
19  */
20
21 #ifndef OMAP_ALSA_TSC2101_H_
22 #define OMAP_ALSA_TSC2101_H_
23
24 #include <linux/types.h>
25
26 /* Define to set the tsc as the master w.r.t McBSP */
27 #define TSC_MASTER
28
29 #define NUMBER_SAMPLE_RATES_SUPPORTED   16
30
31 /*
32  * AUDIO related MACROS
33  */
34 #ifndef DEFAULT_BITPERSAMPLE
35 #define DEFAULT_BITPERSAMPLE            16
36 #endif
37
38 #define DEFAULT_SAMPLE_RATE             44100
39 #define CODEC_CLOCK                     12000000
40 #define AUDIO_MCBSP                     OMAP_MCBSP1
41
42 #define PAGE2_AUDIO_CODEC_REGISTERS     (2)
43
44 struct tsc2101_samplerate_reg_info {
45         u16 sample_rate;
46         u8 divisor;
47         u8 fs_44kHz;    /* if 0 48 khz, if 1 44.1 khz fsref */
48 };
49
50 /*
51  * Defines codec specific functions pointers that can be used from the 
52  * common omap-alse base driver for all omap codecs. (tsc2101 and aic23)
53  */
54 inline void tsc2101_configure(void);
55 void tsc2101_set_samplerate(long rate);
56 void tsc2101_clock_setup(void);
57 int tsc2101_clock_on(void);
58 int tsc2101_clock_off(void);
59 int tsc2101_get_default_samplerate(void);
60
61 #endif /*OMAP_ALSA_TSC2101_H_*/