diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-12-08 10:47:46 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-12-08 10:47:46 -0500 |
commit | a421018e8c10e5593a1fee076af72a66c3fe8ca3 (patch) | |
tree | 2854511845d0e07d33726a13eda6de1059a5c9df /sound/soc/codecs/tpa6130a2.h | |
parent | 3ad1f3b35e8309ec93454dbf89beaafcdb5312da (diff) | |
parent | 86e1d57e4f24ca27ce813bdc2afaac4adafcbaf4 (diff) |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6: (294 commits)
S3C64XX: Staticise platform data for PCM devices
ASoC: Rename controls with a / in wm_hubs
snd-fm801: autodetect SF64-PCR (tuner-only) card
ALSA: tea575x-tuner: fix mute
ASoC: au1x: dbdma2: plug memleak in pcm device creation error path
ASoC: au1x: dbdma2: fix oops on soc device removal.
ALSA: hda - Fix memory leaks in the previous patch
ALSA: hda - Add ALC661/259, ALC892/888VD support
ALSA: opti9xx: remove snd_opti9xx fields
ALSA: aaci - Clean up duplicate code
ALSA: usb - Fix mixer map for Hercules Gamesurround Muse Pocket LT
ALSA: hda - Add position_fix quirk for HP dv3
ALSA: hda - Add a pin-fix for FSC Amilo Pi1505
ALSA: hda - Fix Cxt5047 test mode
ASoC: pxa/raumfeld: adopt new snd_soc_dai_set_pll() API
ASoC: sh: fsi: Add runtime PM support
sh: ms7724se: Add runtime PM support for FSI
ALSA: hda - Add a position_fix quirk for MSI Wind U115
ALSA: opti-miro: add PnP detection
ALSA: opti-miro: separate comon probing code
...
Diffstat (limited to 'sound/soc/codecs/tpa6130a2.h')
-rw-r--r-- | sound/soc/codecs/tpa6130a2.h | 61 |
1 files changed, 61 insertions, 0 deletions
diff --git a/sound/soc/codecs/tpa6130a2.h b/sound/soc/codecs/tpa6130a2.h new file mode 100644 index 000000000000..57e867fd86d1 --- /dev/null +++ b/sound/soc/codecs/tpa6130a2.h | |||
@@ -0,0 +1,61 @@ | |||
1 | /* | ||
2 | * ALSA SoC TPA6130A2 amplifier driver | ||
3 | * | ||
4 | * Copyright (C) Nokia Corporation | ||
5 | * | ||
6 | * Author: Peter Ujfalusi <peter.ujfalusi@nokia.com> | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or | ||
9 | * modify it under the terms of the GNU General Public License | ||
10 | * version 2 as published by the Free Software Foundation. | ||
11 | * | ||
12 | * This program is distributed in the hope that it will be useful, but | ||
13 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
15 | * General Public License for more details. | ||
16 | * | ||
17 | * You should have received a copy of the GNU General Public License | ||
18 | * along with this program; if not, write to the Free Software | ||
19 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA | ||
20 | * 02110-1301 USA | ||
21 | * | ||
22 | */ | ||
23 | |||
24 | #ifndef __TPA6130A2_H__ | ||
25 | #define __TPA6130A2_H__ | ||
26 | |||
27 | /* Register addresses */ | ||
28 | #define TPA6130A2_REG_CONTROL 0x01 | ||
29 | #define TPA6130A2_REG_VOL_MUTE 0x02 | ||
30 | #define TPA6130A2_REG_OUT_IMPEDANCE 0x03 | ||
31 | #define TPA6130A2_REG_VERSION 0x04 | ||
32 | |||
33 | #define TPA6130A2_CACHEREGNUM (TPA6130A2_REG_VERSION + 1) | ||
34 | |||
35 | /* Register bits */ | ||
36 | /* TPA6130A2_REG_CONTROL (0x01) */ | ||
37 | #define TPA6130A2_SWS (0x01 << 0) | ||
38 | #define TPA6130A2_TERMAL (0x01 << 1) | ||
39 | #define TPA6130A2_MODE(x) (x << 4) | ||
40 | #define TPA6130A2_MODE_STEREO (0x00) | ||
41 | #define TPA6130A2_MODE_DUAL_MONO (0x01) | ||
42 | #define TPA6130A2_MODE_BRIDGE (0x02) | ||
43 | #define TPA6130A2_MODE_MASK (0x03) | ||
44 | #define TPA6130A2_HP_EN_R (0x01 << 6) | ||
45 | #define TPA6130A2_HP_EN_L (0x01 << 7) | ||
46 | |||
47 | /* TPA6130A2_REG_VOL_MUTE (0x02) */ | ||
48 | #define TPA6130A2_VOLUME(x) ((x & 0x3f) << 0) | ||
49 | #define TPA6130A2_MUTE_R (0x01 << 6) | ||
50 | #define TPA6130A2_MUTE_L (0x01 << 7) | ||
51 | |||
52 | /* TPA6130A2_REG_OUT_IMPEDANCE (0x03) */ | ||
53 | #define TPA6130A2_HIZ_R (0x01 << 0) | ||
54 | #define TPA6130A2_HIZ_L (0x01 << 1) | ||
55 | |||
56 | /* TPA6130A2_REG_VERSION (0x04) */ | ||
57 | #define TPA6130A2_VERSION_MASK (0x0f) | ||
58 | |||
59 | extern int tpa6130a2_add_controls(struct snd_soc_codec *codec); | ||
60 | |||
61 | #endif /* __TPA6130A2_H__ */ | ||