aboutsummaryrefslogtreecommitdiffstats
path: root/include/sound/ad1848.h
diff options
context:
space:
mode:
authorKrzysztof Helt <krzysztof.h1@wp.pl>2008-07-31 15:05:44 -0400
committerJaroslav Kysela <perex@perex.cz>2008-08-06 09:39:51 -0400
commitece11c9b6db5b96179df8eb9cdc54c78953a4c0f (patch)
tree21c5ebf03d9750fc1c4a4551f84031e969e422b8 /include/sound/ad1848.h
parent241b3ee70d2d69e88d5c144ce938b1887cd6d3fc (diff)
ALSA: wss_lib: use wss constants instead of ad1848 ones
Use wss constants for mode. Move ad1848 hardware constants to the wss.h. Move mixer tlv macros into the ad1848_lib.c from the ad1848.h. Drop the MODE_RUNNING spurious IRQ guard on AD1848 as it doesn not seem to be needed. Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl> Reviewed-by: Rene Herman <rene.herman@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Diffstat (limited to 'include/sound/ad1848.h')
-rw-r--r--include/sound/ad1848.h32
1 files changed, 0 insertions, 32 deletions
diff --git a/include/sound/ad1848.h b/include/sound/ad1848.h
index d740e633e81b..a881d5173c64 100644
--- a/include/sound/ad1848.h
+++ b/include/sound/ad1848.h
@@ -106,24 +106,6 @@
106#define AD1848_CALIB_IN_PROGRESS 0x20 /* auto calibrate in progress */ 106#define AD1848_CALIB_IN_PROGRESS 0x20 /* auto calibrate in progress */
107#define AD1848_DMA_REQUEST 0x10 /* DMA request in progress */ 107#define AD1848_DMA_REQUEST 0x10 /* DMA request in progress */
108 108
109/* defines for codec.mode */
110
111#define AD1848_MODE_NONE 0x0000
112#define AD1848_MODE_PLAY 0x0001
113#define AD1848_MODE_CAPTURE 0x0002
114#define AD1848_MODE_TIMER 0x0004
115#define AD1848_MODE_OPEN (AD1848_MODE_PLAY|AD1848_MODE_CAPTURE|AD1848_MODE_TIMER)
116#define AD1848_MODE_RUNNING 0x0010
117
118/* defines for codec.hardware */
119
120#define AD1848_HW_DETECT 0x0000 /* let AD1848 driver detect chip */
121#define AD1848_HW_AD1847 0x0001 /* AD1847 chip */
122#define AD1848_HW_AD1848 0x0002 /* AD1848 chip */
123#define AD1848_HW_CS4248 0x0003 /* CS4248 chip */
124#define AD1848_HW_CMI8330 0x0004 /* CMI8330 chip */
125#define AD1848_HW_THINKPAD 0x0005 /* Thinkpad 360/750/755 */
126
127/* IBM Thinkpad specific stuff */ 109/* IBM Thinkpad specific stuff */
128#define AD1848_THINKPAD_CTL_PORT1 0x15e8 110#define AD1848_THINKPAD_CTL_PORT1 0x15e8
129#define AD1848_THINKPAD_CTL_PORT2 0x15e9 111#define AD1848_THINKPAD_CTL_PORT2 0x15e9
@@ -167,26 +149,12 @@ struct ad1848_mix_elem {
167 .type = AD1848_MIX_SINGLE, \ 149 .type = AD1848_MIX_SINGLE, \
168 .private_value = AD1848_MIXVAL_SINGLE(reg, shift, mask, invert) } 150 .private_value = AD1848_MIXVAL_SINGLE(reg, shift, mask, invert) }
169 151
170#define AD1848_SINGLE_TLV(xname, xindex, reg, shift, mask, invert, xtlv) \
171{ .name = xname, \
172 .index = xindex, \
173 .type = AD1848_MIX_SINGLE, \
174 .private_value = AD1848_MIXVAL_SINGLE(reg, shift, mask, invert), \
175 .tlv = xtlv }
176
177#define AD1848_DOUBLE(xname, xindex, left_reg, right_reg, shift_left, shift_right, mask, invert) \ 152#define AD1848_DOUBLE(xname, xindex, left_reg, right_reg, shift_left, shift_right, mask, invert) \
178{ .name = xname, \ 153{ .name = xname, \
179 .index = xindex, \ 154 .index = xindex, \
180 .type = AD1848_MIX_DOUBLE, \ 155 .type = AD1848_MIX_DOUBLE, \
181 .private_value = AD1848_MIXVAL_DOUBLE(left_reg, right_reg, shift_left, shift_right, mask, invert) } 156 .private_value = AD1848_MIXVAL_DOUBLE(left_reg, right_reg, shift_left, shift_right, mask, invert) }
182 157
183#define AD1848_DOUBLE_TLV(xname, xindex, left_reg, right_reg, shift_left, shift_right, mask, invert, xtlv) \
184{ .name = xname, \
185 .index = xindex, \
186 .type = AD1848_MIX_DOUBLE, \
187 .private_value = AD1848_MIXVAL_DOUBLE(left_reg, right_reg, shift_left, shift_right, mask, invert), \
188 .tlv = xtlv }
189
190int snd_ad1848_add_ctl_elem(struct snd_wss *chip, 158int snd_ad1848_add_ctl_elem(struct snd_wss *chip,
191 const struct ad1848_mix_elem *c); 159 const struct ad1848_mix_elem *c);
192 160