2 * arch/arc/mach-omap1/omap-alsa-tsc2101.h
4 * Alsa Driver for TSC2101 codec for OMAP platform boards.
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
10 * Copyright (C) 2006 Instituto Nokia de Tecnologia - INdT - Manaus Brazil
11 * Alsa modularization by Daniel Petrini (d.pensator@gmail.com)
13 * Copyright (C) 2006 Mika Laitio <lamikr@cc.jyu.fi>
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.
21 #ifndef OMAP_ALSA_TSC2101_H_
22 #define OMAP_ALSA_TSC2101_H_
24 #include <linux/types.h>
26 /* Define to set the tsc as the master w.r.t McBSP */
29 #define NUMBER_SAMPLE_RATES_SUPPORTED 16
32 * AUDIO related MACROS
34 #ifndef DEFAULT_BITPERSAMPLE
35 #define DEFAULT_BITPERSAMPLE 16
38 #define DEFAULT_SAMPLE_RATE 44100
39 #define CODEC_CLOCK 12000000
40 #define AUDIO_MCBSP OMAP_MCBSP1
42 #define PAGE2_AUDIO_CODEC_REGISTERS (2)
44 struct tsc2101_samplerate_reg_info {
47 u8 fs_44kHz; /* if 0 48 khz, if 1 44.1 khz fsref */
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)
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);
61 #endif /*OMAP_ALSA_TSC2101_H_*/