Steve Sakoman | cc17557 | 2008-10-30 21:35:26 -0700 | [diff] [blame] | 1 | /* |
| 2 | * ALSA SoC TWL4030 codec driver |
| 3 | * |
| 4 | * Author: Steve Sakoman <steve@sakoman.com> |
| 5 | * |
| 6 | * This program is free software; you can redistribute it and/or |
| 7 | * modify it under the terms of the GNU General Public License |
| 8 | * version 2 as published by the Free Software Foundation. |
| 9 | * |
| 10 | * This program is distributed in the hope that it will be useful, but |
| 11 | * WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 13 | * General Public License for more details. |
| 14 | * |
| 15 | * You should have received a copy of the GNU General Public License |
| 16 | * along with this program; if not, write to the Free Software |
| 17 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA |
| 18 | * 02110-1301 USA |
| 19 | * |
| 20 | */ |
| 21 | |
| 22 | #ifndef __TWL4030_AUDIO_H__ |
| 23 | #define __TWL4030_AUDIO_H__ |
| 24 | |
Peter Ujfalusi | 1f0f9b6 | 2009-10-22 13:26:47 +0300 | [diff] [blame] | 25 | /* Register descriptions are here */ |
| 26 | #include <linux/mfd/twl4030-codec.h> |
| 27 | |
| 28 | /* Sgadow register used by the audio driver */ |
Peter Ujfalusi | f3b5d30 | 2009-05-25 11:12:12 +0300 | [diff] [blame] | 29 | #define TWL4030_REG_SW_SHADOW 0x4A |
Peter Ujfalusi | f3b5d30 | 2009-05-25 11:12:12 +0300 | [diff] [blame] | 30 | #define TWL4030_CACHEREGNUM (TWL4030_REG_SW_SHADOW + 1) |
Steve Sakoman | cc17557 | 2008-10-30 21:35:26 -0700 | [diff] [blame] | 31 | |
Peter Ujfalusi | f3b5d30 | 2009-05-25 11:12:12 +0300 | [diff] [blame] | 32 | /* TWL4030_REG_SW_SHADOW (0x4A) Fields */ |
| 33 | #define TWL4030_HFL_EN 0x01 |
| 34 | #define TWL4030_HFR_EN 0x02 |
| 35 | |
Joonyoung Shim | 7154b3e | 2009-04-20 19:21:35 +0900 | [diff] [blame] | 36 | #define TWL4030_DAI_HIFI 0 |
| 37 | #define TWL4030_DAI_VOICE 1 |
| 38 | |
| 39 | extern struct snd_soc_dai twl4030_dai[2]; |
Steve Sakoman | cc17557 | 2008-10-30 21:35:26 -0700 | [diff] [blame] | 40 | extern struct snd_soc_codec_device soc_codec_dev_twl4030; |
| 41 | |
Peter Ujfalusi | 9da28c7 | 2009-05-22 10:13:15 +0300 | [diff] [blame] | 42 | struct twl4030_setup_data { |
| 43 | unsigned int ramp_delay_value; |
| 44 | unsigned int sysclk; |
Candelaria Villareal, Jorge | 4e49ffd | 2009-07-01 19:17:43 -0500 | [diff] [blame] | 45 | unsigned int hs_extmute:1; |
| 46 | void (*set_hs_extmute)(int mute); |
Peter Ujfalusi | 9da28c7 | 2009-05-22 10:13:15 +0300 | [diff] [blame] | 47 | }; |
| 48 | |
Steve Sakoman | cc17557 | 2008-10-30 21:35:26 -0700 | [diff] [blame] | 49 | #endif /* End of __TWL4030_AUDIO_H__ */ |
Peter Ujfalusi | 1f0f9b6 | 2009-10-22 13:26:47 +0300 | [diff] [blame] | 50 | |
| 51 | |