blob: f877b16f19c94d08fe3f6bf71052d576f1cede24 [file] [log] [blame]
Jarkko Nikula2e747962008-04-25 13:55:19 +02001/*
2 * omap-mcbsp.h
3 *
4 * Copyright (C) 2008 Nokia Corporation
5 *
Jarkko Nikula7ec41ee2011-08-11 15:44:57 +03006 * Contact: Jarkko Nikula <jarkko.nikula@bitmer.com>
Peter Ujfalusi56a87422011-05-03 18:14:06 +03007 * Peter Ujfalusi <peter.ujfalusi@ti.com>
Jarkko Nikula2e747962008-04-25 13:55:19 +02008 *
9 * This program is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU General Public License
11 * version 2 as published by the Free Software Foundation.
12 *
13 * This program is distributed in the hope that it will be useful, but
14 * WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
21 * 02110-1301 USA
22 *
23 */
24
25#ifndef __OMAP_I2S_H__
26#define __OMAP_I2S_H__
27
28/* Source clocks for McBSP sample rate generator */
29enum omap_mcbsp_clksrg_clk {
30 OMAP_MCBSP_SYSCLK_CLKS_FCLK, /* Internal FCLK */
31 OMAP_MCBSP_SYSCLK_CLKS_EXT, /* External CLKS pin */
32 OMAP_MCBSP_SYSCLK_CLK, /* Internal ICLK */
33 OMAP_MCBSP_SYSCLK_CLKX_EXT, /* External CLKX pin */
34 OMAP_MCBSP_SYSCLK_CLKR_EXT, /* External CLKR pin */
Jarkko Nikulad2c0bda2009-08-28 15:35:35 +030035 OMAP_MCBSP_CLKR_SRC_CLKR, /* CLKR from CLKR pin */
36 OMAP_MCBSP_CLKR_SRC_CLKX, /* CLKR from CLKX pin */
37 OMAP_MCBSP_FSR_SRC_FSR, /* FSR from FSR pin */
38 OMAP_MCBSP_FSR_SRC_FSX, /* FSR from FSX pin */
Jarkko Nikula2e747962008-04-25 13:55:19 +020039};
40
41/* McBSP dividers */
42enum omap_mcbsp_div {
43 OMAP_MCBSP_CLKGDV, /* Sample rate generator divider */
44};
45
Tony Lindgren59b479e2011-01-27 16:39:40 -080046#if defined(CONFIG_SOC_OMAP2420)
Jarkko Nikula8def4642008-10-09 15:57:22 +030047#define NUM_LINKS 2
48#endif
49#if defined(CONFIG_ARCH_OMAP15XX) || defined(CONFIG_ARCH_OMAP16XX)
50#undef NUM_LINKS
51#define NUM_LINKS 3
52#endif
Jorge Eduardo Candelariad4686c62010-12-20 11:32:47 -060053#if defined(CONFIG_ARCH_OMAP4)
54#undef NUM_LINKS
55#define NUM_LINKS 4
56#endif
Tony Lindgren59b479e2011-01-27 16:39:40 -080057#if defined(CONFIG_ARCH_OMAP3) || defined(CONFIG_SOC_OMAP2430)
Jarkko Nikula8def4642008-10-09 15:57:22 +030058#undef NUM_LINKS
59#define NUM_LINKS 5
60#endif
Jarkko Nikula2e747962008-04-25 13:55:19 +020061
Peter Ujfalusi45656b42012-02-14 18:20:58 +020062int omap_mcbsp_st_add_controls(struct snd_soc_pcm_runtime *rtd);
Ilkka Koskinen83905c12010-02-22 12:21:12 +000063
Jarkko Nikula2e747962008-04-25 13:55:19 +020064#endif