2 * sound/arm/omap/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 or EAC */
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
40 /* FIXME codec clock rate is board-specific */
41 #define CODEC_CLOCK 12000000
43 #define PAGE2_AUDIO_CODEC_REGISTERS (2)
45 struct mcbsp_dev_info {
46 struct platform_device *mcbsp_dev;
47 struct spi_device *tsc2101_dev;
50 struct tsc2101_samplerate_reg_info {
53 u8 fs_44kHz; /* if 0 48 khz, if 1 44.1 khz fsref */
57 * Defines codec specific function pointers that can be used from the
58 * common omap-alse base driver for all omap codecs. (tsc2101 and aic23)
60 inline void tsc2101_configure(void);
61 void tsc2101_set_samplerate(long rate);
62 void tsc2101_clock_setup(void);
63 int tsc2101_clock_on(void);
64 int tsc2101_clock_off(void);
65 int tsc2101_get_default_samplerate(void);
67 #endif /*OMAP_ALSA_TSC2101_H_*/