diff options
author | Krzysztof Helt <krzysztof.h1@wp.pl> | 2008-07-31 15:05:44 -0400 |
---|---|---|
committer | Jaroslav Kysela <perex@perex.cz> | 2008-08-06 09:39:51 -0400 |
commit | ece11c9b6db5b96179df8eb9cdc54c78953a4c0f (patch) | |
tree | 21c5ebf03d9750fc1c4a4551f84031e969e422b8 /include/sound | |
parent | 241b3ee70d2d69e88d5c144ce938b1887cd6d3fc (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')
-rw-r--r-- | include/sound/ad1848.h | 32 | ||||
-rw-r--r-- | include/sound/wss.h | 6 |
2 files changed, 6 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 | |||
190 | int snd_ad1848_add_ctl_elem(struct snd_wss *chip, | 158 | int 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 | ||
diff --git a/include/sound/wss.h b/include/sound/wss.h index 1e0dc77f0d25..2cc1f1462d8e 100644 --- a/include/sound/wss.h +++ b/include/sound/wss.h | |||
@@ -55,6 +55,12 @@ | |||
55 | #define WSS_HW_CS4237B 0x0402 /* CS4237B - SRS 3D */ | 55 | #define WSS_HW_CS4237B 0x0402 /* CS4237B - SRS 3D */ |
56 | #define WSS_HW_CS4238B 0x0403 /* CS4238B - QSOUND 3D */ | 56 | #define WSS_HW_CS4238B 0x0403 /* CS4238B - QSOUND 3D */ |
57 | #define WSS_HW_CS4239 0x0404 /* CS4239 - Crystal Clear (tm) stereo enhancement */ | 57 | #define WSS_HW_CS4239 0x0404 /* CS4239 - Crystal Clear (tm) stereo enhancement */ |
58 | #define WSS_HW_AD1848_MASK 0x0800 /* AD1848 serie (half duplex) */ | ||
59 | #define WSS_HW_AD1847 0x0801 /* AD1847 chip */ | ||
60 | #define WSS_HW_AD1848 0x0802 /* AD1848 chip */ | ||
61 | #define WSS_HW_CS4248 0x0803 /* CS4248 chip */ | ||
62 | #define WSS_HW_CMI8330 0x0804 /* CMI8330 chip */ | ||
63 | #define WSS_HW_THINKPAD 0x0805 /* Thinkpad 360/750/755 */ | ||
58 | /* compatible, but clones */ | 64 | /* compatible, but clones */ |
59 | #define WSS_HW_INTERWAVE 0x1000 /* InterWave chip */ | 65 | #define WSS_HW_INTERWAVE 0x1000 /* InterWave chip */ |
60 | #define WSS_HW_OPL3SA2 0x1101 /* OPL3-SA2 chip, similar to cs4231 */ | 66 | #define WSS_HW_OPL3SA2 0x1101 /* OPL3-SA2 chip, similar to cs4231 */ |