aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs/ad1836.h
diff options
context:
space:
mode:
Diffstat (limited to 'sound/soc/codecs/ad1836.h')
-rw-r--r--sound/soc/codecs/ad1836.h46
1 files changed, 14 insertions, 32 deletions
diff --git a/sound/soc/codecs/ad1836.h b/sound/soc/codecs/ad1836.h
index 9d6a3f8f8aa..dd7be0dbbc5 100644
--- a/sound/soc/codecs/ad1836.h
+++ b/sound/soc/codecs/ad1836.h
@@ -1,19 +1,10 @@
1/* 1/*
2 * File: sound/soc/codecs/ad1836.h 2 * Audio Codec driver supporting:
3 * Based on: 3 * AD1835A, AD1836, AD1837A, AD1838A, AD1839A
4 * Author: Barry Song <Barry.Song@analog.com>
5 * 4 *
6 * Created: Aug 04, 2009 5 * Copyright 2009-2011 Analog Devices Inc.
7 * Description: definitions for AD1836 registers
8 * 6 *
9 * Modified: 7 * Licensed under the GPL-2 or later.
10 *
11 * Bugs: Enter bugs at http://blackfin.uclinux.org/
12 *
13 * This program is free software; you can redistribute it and/or modify
14 * it under the terms of the GNU General Public License as published by
15 * the Free Software Foundation; either version 2 of the License, or
16 * (at your option) any later version.
17 */ 8 */
18 9
19#ifndef __AD1836_H__ 10#ifndef __AD1836_H__
@@ -21,39 +12,30 @@
21 12
22#define AD1836_DAC_CTRL1 0 13#define AD1836_DAC_CTRL1 0
23#define AD1836_DAC_POWERDOWN 2 14#define AD1836_DAC_POWERDOWN 2
24#define AD1836_DAC_SERFMT_MASK 0xE0 15#define AD1836_DAC_SERFMT_MASK 0xE0
25#define AD1836_DAC_SERFMT_PCK256 (0x4 << 5) 16#define AD1836_DAC_SERFMT_PCK256 (0x4 << 5)
26#define AD1836_DAC_SERFMT_PCK128 (0x5 << 5) 17#define AD1836_DAC_SERFMT_PCK128 (0x5 << 5)
27#define AD1836_DAC_WORD_LEN_MASK 0x18 18#define AD1836_DAC_WORD_LEN_MASK 0x18
28#define AD1836_DAC_WORD_LEN_OFFSET 3 19#define AD1836_DAC_WORD_LEN_OFFSET 3
29 20
30#define AD1836_DAC_CTRL2 1 21#define AD1836_DAC_CTRL2 1
31#define AD1836_DACL1_MUTE 0
32#define AD1836_DACR1_MUTE 1
33#define AD1836_DACL2_MUTE 2
34#define AD1836_DACR2_MUTE 3
35#define AD1836_DACL3_MUTE 4
36#define AD1836_DACR3_MUTE 5
37 22
38#define AD1836_DAC_L1_VOL 2 23/* These macros are one-based. So AD183X_MUTE_LEFT(1) will return the mute bit
39#define AD1836_DAC_R1_VOL 3 24 * for the first ADC/DAC */
40#define AD1836_DAC_L2_VOL 4 25#define AD1836_MUTE_LEFT(x) (((x) * 2) - 2)
41#define AD1836_DAC_R2_VOL 5 26#define AD1836_MUTE_RIGHT(x) (((x) * 2) - 1)
42#define AD1836_DAC_L3_VOL 6 27
43#define AD1836_DAC_R3_VOL 7 28#define AD1836_DAC_L_VOL(x) ((x) * 2)
29#define AD1836_DAC_R_VOL(x) (1 + ((x) * 2))
44 30
45#define AD1836_ADC_CTRL1 12 31#define AD1836_ADC_CTRL1 12
46#define AD1836_ADC_POWERDOWN 7 32#define AD1836_ADC_POWERDOWN 7
47#define AD1836_ADC_HIGHPASS_FILTER 8 33#define AD1836_ADC_HIGHPASS_FILTER 8
48 34
49#define AD1836_ADC_CTRL2 13 35#define AD1836_ADC_CTRL2 13
50#define AD1836_ADCL1_MUTE 0
51#define AD1836_ADCR1_MUTE 1
52#define AD1836_ADCL2_MUTE 2
53#define AD1836_ADCR2_MUTE 3
54#define AD1836_ADC_WORD_LEN_MASK 0x30 36#define AD1836_ADC_WORD_LEN_MASK 0x30
55#define AD1836_ADC_WORD_OFFSET 5 37#define AD1836_ADC_WORD_OFFSET 4
56#define AD1836_ADC_SERFMT_MASK (7 << 6) 38#define AD1836_ADC_SERFMT_MASK (7 << 6)
57#define AD1836_ADC_SERFMT_PCK256 (0x4 << 6) 39#define AD1836_ADC_SERFMT_PCK256 (0x4 << 6)
58#define AD1836_ADC_SERFMT_PCK128 (0x5 << 6) 40#define AD1836_ADC_SERFMT_PCK128 (0x5 << 6)
59#define AD1836_ADC_AUX (0x6 << 6) 41#define AD1836_ADC_AUX (0x6 << 6)