Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1 | /* |
| 2 | * ALSA driver for ICEnsemble ICE1712 (Envy24) |
| 3 | * |
Vedran Miletic | cc67b7f | 2008-09-07 12:00:02 +0200 | [diff] [blame] | 4 | * Lowlevel functions for M-Audio Audiophile 192, Revolution 7.1 and 5.1 |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 5 | * |
| 6 | * Copyright (c) 2003 Takashi Iwai <tiwai@suse.de> |
| 7 | * |
| 8 | * This program is free software; you can redistribute it and/or modify |
| 9 | * it under the terms of the GNU General Public License as published by |
| 10 | * the Free Software Foundation; either version 2 of the License, or |
| 11 | * (at your option) any later version. |
| 12 | * |
| 13 | * This program is distributed in the hope that it will be useful, |
| 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 16 | * GNU General Public License for more details. |
| 17 | * |
| 18 | * You should have received a copy of the GNU General Public License |
| 19 | * along with this program; if not, write to the Free Software |
| 20 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
| 21 | * |
| 22 | */ |
| 23 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 24 | #include <linux/delay.h> |
| 25 | #include <linux/interrupt.h> |
| 26 | #include <linux/init.h> |
| 27 | #include <linux/slab.h> |
| 28 | #include <sound/core.h> |
| 29 | |
| 30 | #include "ice1712.h" |
| 31 | #include "envy24ht.h" |
| 32 | #include "revo.h" |
| 33 | |
Takashi Iwai | 7cda8ba | 2008-01-18 13:36:07 +0100 | [diff] [blame] | 34 | /* a non-standard I2C device for revo51 */ |
| 35 | struct revo51_spec { |
| 36 | struct snd_i2c_device *dev; |
| 37 | struct snd_pt2258 *pt2258; |
Jonas Petersen | c2d3703 | 2013-02-23 23:38:43 +0100 | [diff] [blame] | 38 | struct ak4114 *ak4114; |
Harvey Harrison | 008f359 | 2008-02-29 11:46:32 +0100 | [diff] [blame] | 39 | }; |
Takashi Iwai | 7cda8ba | 2008-01-18 13:36:07 +0100 | [diff] [blame] | 40 | |
Takashi Iwai | ab0c7d7 | 2005-11-17 15:00:18 +0100 | [diff] [blame] | 41 | static void revo_i2s_mclk_changed(struct snd_ice1712 *ice) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 42 | { |
| 43 | /* assert PRST# to converters; MT05 bit 7 */ |
| 44 | outb(inb(ICEMT1724(ice, AC97_CMD)) | 0x80, ICEMT1724(ice, AC97_CMD)); |
| 45 | mdelay(5); |
| 46 | /* deassert PRST# */ |
| 47 | outb(inb(ICEMT1724(ice, AC97_CMD)) & ~0x80, ICEMT1724(ice, AC97_CMD)); |
| 48 | } |
| 49 | |
| 50 | /* |
Vedran Miletic | cc67b7f | 2008-09-07 12:00:02 +0200 | [diff] [blame] | 51 | * change the rate of Envy24HT, AK4355 and AK4381 |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 52 | */ |
Takashi Iwai | ab0c7d7 | 2005-11-17 15:00:18 +0100 | [diff] [blame] | 53 | static void revo_set_rate_val(struct snd_akm4xxx *ak, unsigned int rate) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 54 | { |
| 55 | unsigned char old, tmp, dfs; |
| 56 | int reg, shift; |
| 57 | |
| 58 | if (rate == 0) /* no hint - S/PDIF input is master, simply return */ |
| 59 | return; |
| 60 | |
| 61 | /* adjust DFS on codecs */ |
| 62 | if (rate > 96000) |
| 63 | dfs = 2; |
| 64 | else if (rate > 48000) |
| 65 | dfs = 1; |
| 66 | else |
| 67 | dfs = 0; |
| 68 | |
Takashi Iwai | 59acf76 | 2005-12-05 19:22:34 +0100 | [diff] [blame] | 69 | if (ak->type == SND_AK4355 || ak->type == SND_AK4358) { |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 70 | reg = 2; |
| 71 | shift = 4; |
| 72 | } else { |
| 73 | reg = 1; |
| 74 | shift = 3; |
| 75 | } |
| 76 | tmp = snd_akm4xxx_get(ak, 0, reg); |
| 77 | old = (tmp >> shift) & 0x03; |
| 78 | if (old == dfs) |
| 79 | return; |
| 80 | |
| 81 | /* reset DFS */ |
| 82 | snd_akm4xxx_reset(ak, 1); |
| 83 | tmp = snd_akm4xxx_get(ak, 0, reg); |
| 84 | tmp &= ~(0x03 << shift); |
| 85 | tmp |= dfs << shift; |
Vedran Miletic | cc67b7f | 2008-09-07 12:00:02 +0200 | [diff] [blame] | 86 | /* snd_akm4xxx_write(ak, 0, reg, tmp); */ |
| 87 | snd_akm4xxx_set(ak, 0, reg, tmp); /* value is written in reset(0) */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 88 | snd_akm4xxx_reset(ak, 0); |
| 89 | } |
| 90 | |
| 91 | /* |
Jochen Voss | feaa6a7 | 2006-10-04 18:08:43 +0200 | [diff] [blame] | 92 | * I2C access to the PT2258 volume controller on GPIO 6/7 (Revolution 5.1) |
| 93 | */ |
| 94 | |
| 95 | static void revo_i2c_start(struct snd_i2c_bus *bus) |
| 96 | { |
| 97 | struct snd_ice1712 *ice = bus->private_data; |
| 98 | snd_ice1712_save_gpio_status(ice); |
| 99 | } |
| 100 | |
| 101 | static void revo_i2c_stop(struct snd_i2c_bus *bus) |
| 102 | { |
| 103 | struct snd_ice1712 *ice = bus->private_data; |
| 104 | snd_ice1712_restore_gpio_status(ice); |
| 105 | } |
| 106 | |
| 107 | static void revo_i2c_direction(struct snd_i2c_bus *bus, int clock, int data) |
| 108 | { |
| 109 | struct snd_ice1712 *ice = bus->private_data; |
| 110 | unsigned int mask, val; |
| 111 | |
| 112 | val = 0; |
| 113 | if (clock) |
| 114 | val |= VT1724_REVO_I2C_CLOCK; /* write SCL */ |
| 115 | if (data) |
| 116 | val |= VT1724_REVO_I2C_DATA; /* write SDA */ |
| 117 | mask = VT1724_REVO_I2C_CLOCK | VT1724_REVO_I2C_DATA; |
| 118 | ice->gpio.direction &= ~mask; |
| 119 | ice->gpio.direction |= val; |
| 120 | snd_ice1712_gpio_set_dir(ice, ice->gpio.direction); |
| 121 | snd_ice1712_gpio_set_mask(ice, ~mask); |
| 122 | } |
| 123 | |
| 124 | static void revo_i2c_setlines(struct snd_i2c_bus *bus, int clk, int data) |
| 125 | { |
| 126 | struct snd_ice1712 *ice = bus->private_data; |
| 127 | unsigned int val = 0; |
| 128 | |
| 129 | if (clk) |
| 130 | val |= VT1724_REVO_I2C_CLOCK; |
| 131 | if (data) |
| 132 | val |= VT1724_REVO_I2C_DATA; |
| 133 | snd_ice1712_gpio_write_bits(ice, |
| 134 | VT1724_REVO_I2C_DATA | |
| 135 | VT1724_REVO_I2C_CLOCK, val); |
| 136 | udelay(5); |
| 137 | } |
| 138 | |
| 139 | static int revo_i2c_getdata(struct snd_i2c_bus *bus, int ack) |
| 140 | { |
| 141 | struct snd_ice1712 *ice = bus->private_data; |
| 142 | int bit; |
| 143 | |
| 144 | if (ack) |
| 145 | udelay(5); |
| 146 | bit = snd_ice1712_gpio_read_bits(ice, VT1724_REVO_I2C_DATA) ? 1 : 0; |
| 147 | return bit; |
| 148 | } |
| 149 | |
| 150 | static struct snd_i2c_bit_ops revo51_bit_ops = { |
| 151 | .start = revo_i2c_start, |
| 152 | .stop = revo_i2c_stop, |
| 153 | .direction = revo_i2c_direction, |
| 154 | .setlines = revo_i2c_setlines, |
| 155 | .getdata = revo_i2c_getdata, |
| 156 | }; |
| 157 | |
| 158 | static int revo51_i2c_init(struct snd_ice1712 *ice, |
| 159 | struct snd_pt2258 *pt) |
| 160 | { |
Takashi Iwai | 7cda8ba | 2008-01-18 13:36:07 +0100 | [diff] [blame] | 161 | struct revo51_spec *spec; |
Jochen Voss | feaa6a7 | 2006-10-04 18:08:43 +0200 | [diff] [blame] | 162 | int err; |
| 163 | |
Takashi Iwai | 7cda8ba | 2008-01-18 13:36:07 +0100 | [diff] [blame] | 164 | spec = kzalloc(sizeof(*spec), GFP_KERNEL); |
| 165 | if (!spec) |
| 166 | return -ENOMEM; |
| 167 | ice->spec = spec; |
| 168 | |
Jochen Voss | feaa6a7 | 2006-10-04 18:08:43 +0200 | [diff] [blame] | 169 | /* create the I2C bus */ |
| 170 | err = snd_i2c_bus_create(ice->card, "ICE1724 GPIO6", NULL, &ice->i2c); |
| 171 | if (err < 0) |
| 172 | return err; |
| 173 | |
| 174 | ice->i2c->private_data = ice; |
| 175 | ice->i2c->hw_ops.bit = &revo51_bit_ops; |
| 176 | |
| 177 | /* create the I2C device */ |
Takashi Iwai | 7cda8ba | 2008-01-18 13:36:07 +0100 | [diff] [blame] | 178 | err = snd_i2c_device_create(ice->i2c, "PT2258", 0x40, &spec->dev); |
Jochen Voss | feaa6a7 | 2006-10-04 18:08:43 +0200 | [diff] [blame] | 179 | if (err < 0) |
| 180 | return err; |
| 181 | |
| 182 | pt->card = ice->card; |
| 183 | pt->i2c_bus = ice->i2c; |
Takashi Iwai | 7cda8ba | 2008-01-18 13:36:07 +0100 | [diff] [blame] | 184 | pt->i2c_dev = spec->dev; |
| 185 | spec->pt2258 = pt; |
Jochen Voss | feaa6a7 | 2006-10-04 18:08:43 +0200 | [diff] [blame] | 186 | |
| 187 | snd_pt2258_reset(pt); |
| 188 | |
| 189 | return 0; |
| 190 | } |
| 191 | |
| 192 | /* |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 193 | * initialize the chips on M-Audio Revolution cards |
| 194 | */ |
| 195 | |
Takashi Iwai | 723b2b0 | 2006-08-30 16:49:54 +0200 | [diff] [blame] | 196 | #define AK_DAC(xname,xch) { .name = xname, .num_channels = xch } |
Jani Alinikula | c83c0c4 | 2006-06-27 15:00:55 +0200 | [diff] [blame] | 197 | |
Takashi Iwai | 517400c | 2007-01-29 15:27:56 +0100 | [diff] [blame] | 198 | static const struct snd_akm4xxx_dac_channel revo71_front[] = { |
Pavel Hofman | ea7cfcd | 2007-05-19 17:21:04 +0200 | [diff] [blame] | 199 | { |
| 200 | .name = "PCM Playback Volume", |
| 201 | .num_channels = 2, |
| 202 | /* front channels DAC supports muting */ |
| 203 | .switch_name = "PCM Playback Switch", |
| 204 | }, |
Takashi Iwai | 723b2b0 | 2006-08-30 16:49:54 +0200 | [diff] [blame] | 205 | }; |
Jani Alinikula | c83c0c4 | 2006-06-27 15:00:55 +0200 | [diff] [blame] | 206 | |
Takashi Iwai | 517400c | 2007-01-29 15:27:56 +0100 | [diff] [blame] | 207 | static const struct snd_akm4xxx_dac_channel revo71_surround[] = { |
Takashi Iwai | 723b2b0 | 2006-08-30 16:49:54 +0200 | [diff] [blame] | 208 | AK_DAC("PCM Center Playback Volume", 1), |
| 209 | AK_DAC("PCM LFE Playback Volume", 1), |
| 210 | AK_DAC("PCM Side Playback Volume", 2), |
| 211 | AK_DAC("PCM Rear Playback Volume", 2), |
| 212 | }; |
Jani Alinikula | c83c0c4 | 2006-06-27 15:00:55 +0200 | [diff] [blame] | 213 | |
Takashi Iwai | 517400c | 2007-01-29 15:27:56 +0100 | [diff] [blame] | 214 | static const struct snd_akm4xxx_dac_channel revo51_dac[] = { |
Takashi Iwai | 723b2b0 | 2006-08-30 16:49:54 +0200 | [diff] [blame] | 215 | AK_DAC("PCM Playback Volume", 2), |
| 216 | AK_DAC("PCM Center Playback Volume", 1), |
| 217 | AK_DAC("PCM LFE Playback Volume", 1), |
| 218 | AK_DAC("PCM Rear Playback Volume", 2), |
Alexander Beregalov | 46480b3 | 2008-08-21 08:28:42 +0400 | [diff] [blame] | 219 | AK_DAC("PCM Headphone Volume", 2), |
Takashi Iwai | 723b2b0 | 2006-08-30 16:49:54 +0200 | [diff] [blame] | 220 | }; |
| 221 | |
Jochen Voss | a58e7cb | 2006-10-04 18:04:10 +0200 | [diff] [blame] | 222 | static const char *revo51_adc_input_names[] = { |
| 223 | "Mic", |
| 224 | "Line", |
| 225 | "CD", |
| 226 | NULL |
| 227 | }; |
| 228 | |
Takashi Iwai | 517400c | 2007-01-29 15:27:56 +0100 | [diff] [blame] | 229 | static const struct snd_akm4xxx_adc_channel revo51_adc[] = { |
Takashi Iwai | 723b2b0 | 2006-08-30 16:49:54 +0200 | [diff] [blame] | 230 | { |
| 231 | .name = "PCM Capture Volume", |
Takashi Iwai | 723b2b0 | 2006-08-30 16:49:54 +0200 | [diff] [blame] | 232 | .switch_name = "PCM Capture Switch", |
Jochen Voss | a58e7cb | 2006-10-04 18:04:10 +0200 | [diff] [blame] | 233 | .num_channels = 2, |
| 234 | .input_names = revo51_adc_input_names |
Takashi Iwai | 723b2b0 | 2006-08-30 16:49:54 +0200 | [diff] [blame] | 235 | }, |
| 236 | }; |
Jochen Voss | 96d9e93 | 2006-08-08 21:13:42 +0200 | [diff] [blame] | 237 | |
Bill Pemberton | e23e7a1 | 2012-12-06 12:35:10 -0500 | [diff] [blame] | 238 | static struct snd_akm4xxx akm_revo_front = { |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 239 | .type = SND_AK4381, |
| 240 | .num_dacs = 2, |
| 241 | .ops = { |
| 242 | .set_rate_val = revo_set_rate_val |
Jani Alinikula | c83c0c4 | 2006-06-27 15:00:55 +0200 | [diff] [blame] | 243 | }, |
Takashi Iwai | 723b2b0 | 2006-08-30 16:49:54 +0200 | [diff] [blame] | 244 | .dac_info = revo71_front, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 245 | }; |
| 246 | |
Bill Pemberton | e23e7a1 | 2012-12-06 12:35:10 -0500 | [diff] [blame] | 247 | static struct snd_ak4xxx_private akm_revo_front_priv = { |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 248 | .caddr = 1, |
| 249 | .cif = 0, |
| 250 | .data_mask = VT1724_REVO_CDOUT, |
| 251 | .clk_mask = VT1724_REVO_CCLK, |
| 252 | .cs_mask = VT1724_REVO_CS0 | VT1724_REVO_CS1 | VT1724_REVO_CS2, |
| 253 | .cs_addr = VT1724_REVO_CS0 | VT1724_REVO_CS2, |
| 254 | .cs_none = VT1724_REVO_CS0 | VT1724_REVO_CS1 | VT1724_REVO_CS2, |
| 255 | .add_flags = VT1724_REVO_CCLK, /* high at init */ |
| 256 | .mask_flags = 0, |
| 257 | }; |
| 258 | |
Bill Pemberton | e23e7a1 | 2012-12-06 12:35:10 -0500 | [diff] [blame] | 259 | static struct snd_akm4xxx akm_revo_surround = { |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 260 | .type = SND_AK4355, |
| 261 | .idx_offset = 1, |
| 262 | .num_dacs = 6, |
| 263 | .ops = { |
| 264 | .set_rate_val = revo_set_rate_val |
Jani Alinikula | c83c0c4 | 2006-06-27 15:00:55 +0200 | [diff] [blame] | 265 | }, |
Takashi Iwai | 723b2b0 | 2006-08-30 16:49:54 +0200 | [diff] [blame] | 266 | .dac_info = revo71_surround, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 267 | }; |
| 268 | |
Bill Pemberton | e23e7a1 | 2012-12-06 12:35:10 -0500 | [diff] [blame] | 269 | static struct snd_ak4xxx_private akm_revo_surround_priv = { |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 270 | .caddr = 3, |
| 271 | .cif = 0, |
| 272 | .data_mask = VT1724_REVO_CDOUT, |
| 273 | .clk_mask = VT1724_REVO_CCLK, |
| 274 | .cs_mask = VT1724_REVO_CS0 | VT1724_REVO_CS1 | VT1724_REVO_CS2, |
| 275 | .cs_addr = VT1724_REVO_CS0 | VT1724_REVO_CS1, |
| 276 | .cs_none = VT1724_REVO_CS0 | VT1724_REVO_CS1 | VT1724_REVO_CS2, |
| 277 | .add_flags = VT1724_REVO_CCLK, /* high at init */ |
| 278 | .mask_flags = 0, |
| 279 | }; |
| 280 | |
Bill Pemberton | e23e7a1 | 2012-12-06 12:35:10 -0500 | [diff] [blame] | 281 | static struct snd_akm4xxx akm_revo51 = { |
Takashi Iwai | 59acf76 | 2005-12-05 19:22:34 +0100 | [diff] [blame] | 282 | .type = SND_AK4358, |
Alexander Beregalov | 46480b3 | 2008-08-21 08:28:42 +0400 | [diff] [blame] | 283 | .num_dacs = 8, |
Takashi Iwai | 59acf76 | 2005-12-05 19:22:34 +0100 | [diff] [blame] | 284 | .ops = { |
| 285 | .set_rate_val = revo_set_rate_val |
Jani Alinikula | c83c0c4 | 2006-06-27 15:00:55 +0200 | [diff] [blame] | 286 | }, |
Takashi Iwai | 723b2b0 | 2006-08-30 16:49:54 +0200 | [diff] [blame] | 287 | .dac_info = revo51_dac, |
Takashi Iwai | 59acf76 | 2005-12-05 19:22:34 +0100 | [diff] [blame] | 288 | }; |
| 289 | |
Bill Pemberton | e23e7a1 | 2012-12-06 12:35:10 -0500 | [diff] [blame] | 290 | static struct snd_ak4xxx_private akm_revo51_priv = { |
Takashi Iwai | 59acf76 | 2005-12-05 19:22:34 +0100 | [diff] [blame] | 291 | .caddr = 2, |
| 292 | .cif = 0, |
| 293 | .data_mask = VT1724_REVO_CDOUT, |
| 294 | .clk_mask = VT1724_REVO_CCLK, |
Jochen Voss | feaa6a7 | 2006-10-04 18:08:43 +0200 | [diff] [blame] | 295 | .cs_mask = VT1724_REVO_CS0 | VT1724_REVO_CS1, |
| 296 | .cs_addr = VT1724_REVO_CS1, |
| 297 | .cs_none = VT1724_REVO_CS0 | VT1724_REVO_CS1, |
Jochen Voss | 96d9e93 | 2006-08-08 21:13:42 +0200 | [diff] [blame] | 298 | .add_flags = VT1724_REVO_CCLK, /* high at init */ |
| 299 | .mask_flags = 0, |
| 300 | }; |
| 301 | |
Bill Pemberton | e23e7a1 | 2012-12-06 12:35:10 -0500 | [diff] [blame] | 302 | static struct snd_akm4xxx akm_revo51_adc = { |
Jochen Voss | 96d9e93 | 2006-08-08 21:13:42 +0200 | [diff] [blame] | 303 | .type = SND_AK5365, |
| 304 | .num_adcs = 2, |
Takashi Iwai | 723b2b0 | 2006-08-30 16:49:54 +0200 | [diff] [blame] | 305 | .adc_info = revo51_adc, |
Jochen Voss | 96d9e93 | 2006-08-08 21:13:42 +0200 | [diff] [blame] | 306 | }; |
| 307 | |
Bill Pemberton | e23e7a1 | 2012-12-06 12:35:10 -0500 | [diff] [blame] | 308 | static struct snd_ak4xxx_private akm_revo51_adc_priv = { |
Jochen Voss | 96d9e93 | 2006-08-08 21:13:42 +0200 | [diff] [blame] | 309 | .caddr = 2, |
| 310 | .cif = 0, |
| 311 | .data_mask = VT1724_REVO_CDOUT, |
| 312 | .clk_mask = VT1724_REVO_CCLK, |
Jochen Voss | feaa6a7 | 2006-10-04 18:08:43 +0200 | [diff] [blame] | 313 | .cs_mask = VT1724_REVO_CS0 | VT1724_REVO_CS1, |
| 314 | .cs_addr = VT1724_REVO_CS0, |
| 315 | .cs_none = VT1724_REVO_CS0 | VT1724_REVO_CS1, |
Takashi Iwai | 59acf76 | 2005-12-05 19:22:34 +0100 | [diff] [blame] | 316 | .add_flags = VT1724_REVO_CCLK, /* high at init */ |
| 317 | .mask_flags = 0, |
| 318 | }; |
| 319 | |
Jochen Voss | feaa6a7 | 2006-10-04 18:08:43 +0200 | [diff] [blame] | 320 | static struct snd_pt2258 ptc_revo51_volume; |
| 321 | |
Takashi Iwai | 5625506 | 2006-11-09 16:47:26 +0100 | [diff] [blame] | 322 | /* AK4358 for AP192 DAC, AK5385A for ADC */ |
| 323 | static void ap192_set_rate_val(struct snd_akm4xxx *ak, unsigned int rate) |
| 324 | { |
| 325 | struct snd_ice1712 *ice = ak->private_data[0]; |
Takashi Iwai | a769692 | 2008-02-04 12:36:32 +0100 | [diff] [blame] | 326 | int dfs; |
Takashi Iwai | 5625506 | 2006-11-09 16:47:26 +0100 | [diff] [blame] | 327 | |
| 328 | revo_set_rate_val(ak, rate); |
| 329 | |
Takashi Iwai | a769692 | 2008-02-04 12:36:32 +0100 | [diff] [blame] | 330 | /* reset CKS */ |
Karsten Wiese | 8a87c9c | 2008-04-22 12:53:12 +0200 | [diff] [blame] | 331 | snd_ice1712_gpio_write_bits(ice, 1 << 8, rate > 96000 ? 1 << 8 : 0); |
Takashi Iwai | a769692 | 2008-02-04 12:36:32 +0100 | [diff] [blame] | 332 | /* reset DFS pins of AK5385A for ADC, too */ |
| 333 | if (rate > 96000) |
| 334 | dfs = 2; |
| 335 | else if (rate > 48000) |
| 336 | dfs = 1; |
| 337 | else |
| 338 | dfs = 0; |
| 339 | snd_ice1712_gpio_write_bits(ice, 3 << 9, dfs << 9); |
| 340 | /* reset ADC */ |
| 341 | snd_ice1712_gpio_write_bits(ice, 1 << 11, 0); |
Karsten Wiese | 8a87c9c | 2008-04-22 12:53:12 +0200 | [diff] [blame] | 342 | snd_ice1712_gpio_write_bits(ice, 1 << 11, 1 << 11); |
Takashi Iwai | 5625506 | 2006-11-09 16:47:26 +0100 | [diff] [blame] | 343 | } |
| 344 | |
Takashi Iwai | 517400c | 2007-01-29 15:27:56 +0100 | [diff] [blame] | 345 | static const struct snd_akm4xxx_dac_channel ap192_dac[] = { |
Takashi Iwai | 5625506 | 2006-11-09 16:47:26 +0100 | [diff] [blame] | 346 | AK_DAC("PCM Playback Volume", 2) |
| 347 | }; |
| 348 | |
Bill Pemberton | e23e7a1 | 2012-12-06 12:35:10 -0500 | [diff] [blame] | 349 | static struct snd_akm4xxx akm_ap192 = { |
Takashi Iwai | 5625506 | 2006-11-09 16:47:26 +0100 | [diff] [blame] | 350 | .type = SND_AK4358, |
| 351 | .num_dacs = 2, |
| 352 | .ops = { |
| 353 | .set_rate_val = ap192_set_rate_val |
| 354 | }, |
| 355 | .dac_info = ap192_dac, |
| 356 | }; |
| 357 | |
Bill Pemberton | e23e7a1 | 2012-12-06 12:35:10 -0500 | [diff] [blame] | 358 | static struct snd_ak4xxx_private akm_ap192_priv = { |
Takashi Iwai | 5625506 | 2006-11-09 16:47:26 +0100 | [diff] [blame] | 359 | .caddr = 2, |
| 360 | .cif = 0, |
| 361 | .data_mask = VT1724_REVO_CDOUT, |
| 362 | .clk_mask = VT1724_REVO_CCLK, |
Jonas Petersen | c2d3703 | 2013-02-23 23:38:43 +0100 | [diff] [blame] | 363 | .cs_mask = VT1724_REVO_CS0 | VT1724_REVO_CS3, |
| 364 | .cs_addr = VT1724_REVO_CS3, |
| 365 | .cs_none = VT1724_REVO_CS0 | VT1724_REVO_CS3, |
Takashi Iwai | 5625506 | 2006-11-09 16:47:26 +0100 | [diff] [blame] | 366 | .add_flags = VT1724_REVO_CCLK, /* high at init */ |
| 367 | .mask_flags = 0, |
| 368 | }; |
| 369 | |
Takashi Iwai | 5625506 | 2006-11-09 16:47:26 +0100 | [diff] [blame] | 370 | /* AK4114 support on Audiophile 192 */ |
| 371 | /* CDTO (pin 32) -- GPIO2 pin 52 |
| 372 | * CDTI (pin 33) -- GPIO3 pin 53 (shared with AK4358) |
| 373 | * CCLK (pin 34) -- GPIO1 pin 51 (shared with AK4358) |
| 374 | * CSN (pin 35) -- GPIO7 pin 59 |
| 375 | */ |
Jonas Petersen | c2d3703 | 2013-02-23 23:38:43 +0100 | [diff] [blame] | 376 | #define AK4114_ADDR 0x00 |
Takashi Iwai | 5625506 | 2006-11-09 16:47:26 +0100 | [diff] [blame] | 377 | |
| 378 | static void write_data(struct snd_ice1712 *ice, unsigned int gpio, |
| 379 | unsigned int data, int idx) |
| 380 | { |
| 381 | for (; idx >= 0; idx--) { |
| 382 | /* drop clock */ |
| 383 | gpio &= ~VT1724_REVO_CCLK; |
| 384 | snd_ice1712_gpio_write(ice, gpio); |
| 385 | udelay(1); |
| 386 | /* set data */ |
| 387 | if (data & (1 << idx)) |
| 388 | gpio |= VT1724_REVO_CDOUT; |
| 389 | else |
| 390 | gpio &= ~VT1724_REVO_CDOUT; |
| 391 | snd_ice1712_gpio_write(ice, gpio); |
| 392 | udelay(1); |
| 393 | /* raise clock */ |
| 394 | gpio |= VT1724_REVO_CCLK; |
| 395 | snd_ice1712_gpio_write(ice, gpio); |
| 396 | udelay(1); |
| 397 | } |
| 398 | } |
| 399 | |
| 400 | static unsigned char read_data(struct snd_ice1712 *ice, unsigned int gpio, |
| 401 | int idx) |
| 402 | { |
| 403 | unsigned char data = 0; |
| 404 | |
| 405 | for (; idx >= 0; idx--) { |
| 406 | /* drop clock */ |
| 407 | gpio &= ~VT1724_REVO_CCLK; |
| 408 | snd_ice1712_gpio_write(ice, gpio); |
| 409 | udelay(1); |
| 410 | /* read data */ |
| 411 | if (snd_ice1712_gpio_read(ice) & VT1724_REVO_CDIN) |
| 412 | data |= (1 << idx); |
| 413 | udelay(1); |
| 414 | /* raise clock */ |
| 415 | gpio |= VT1724_REVO_CCLK; |
| 416 | snd_ice1712_gpio_write(ice, gpio); |
| 417 | udelay(1); |
| 418 | } |
| 419 | return data; |
| 420 | } |
| 421 | |
Takashi Iwai | c052f04 | 2007-03-29 12:34:15 +0200 | [diff] [blame] | 422 | static unsigned int ap192_4wire_start(struct snd_ice1712 *ice) |
Takashi Iwai | 5625506 | 2006-11-09 16:47:26 +0100 | [diff] [blame] | 423 | { |
| 424 | unsigned int tmp; |
| 425 | |
| 426 | snd_ice1712_save_gpio_status(ice); |
| 427 | tmp = snd_ice1712_gpio_read(ice); |
| 428 | tmp |= VT1724_REVO_CCLK; /* high at init */ |
| 429 | tmp |= VT1724_REVO_CS0; |
Jonas Petersen | c2d3703 | 2013-02-23 23:38:43 +0100 | [diff] [blame] | 430 | tmp &= ~VT1724_REVO_CS3; |
Takashi Iwai | 5625506 | 2006-11-09 16:47:26 +0100 | [diff] [blame] | 431 | snd_ice1712_gpio_write(ice, tmp); |
| 432 | udelay(1); |
| 433 | return tmp; |
| 434 | } |
| 435 | |
| 436 | static void ap192_4wire_finish(struct snd_ice1712 *ice, unsigned int tmp) |
| 437 | { |
Jonas Petersen | c2d3703 | 2013-02-23 23:38:43 +0100 | [diff] [blame] | 438 | tmp |= VT1724_REVO_CS3; |
Takashi Iwai | 5625506 | 2006-11-09 16:47:26 +0100 | [diff] [blame] | 439 | tmp |= VT1724_REVO_CS0; |
| 440 | snd_ice1712_gpio_write(ice, tmp); |
| 441 | udelay(1); |
| 442 | snd_ice1712_restore_gpio_status(ice); |
| 443 | } |
| 444 | |
| 445 | static void ap192_ak4114_write(void *private_data, unsigned char addr, |
| 446 | unsigned char data) |
| 447 | { |
| 448 | struct snd_ice1712 *ice = private_data; |
| 449 | unsigned int tmp, addrdata; |
| 450 | |
| 451 | tmp = ap192_4wire_start(ice); |
| 452 | addrdata = (AK4114_ADDR << 6) | 0x20 | (addr & 0x1f); |
| 453 | addrdata = (addrdata << 8) | data; |
| 454 | write_data(ice, tmp, addrdata, 15); |
| 455 | ap192_4wire_finish(ice, tmp); |
| 456 | } |
| 457 | |
| 458 | static unsigned char ap192_ak4114_read(void *private_data, unsigned char addr) |
| 459 | { |
| 460 | struct snd_ice1712 *ice = private_data; |
| 461 | unsigned int tmp; |
| 462 | unsigned char data; |
| 463 | |
| 464 | tmp = ap192_4wire_start(ice); |
| 465 | write_data(ice, tmp, (AK4114_ADDR << 6) | (addr & 0x1f), 7); |
| 466 | data = read_data(ice, tmp, 7); |
| 467 | ap192_4wire_finish(ice, tmp); |
| 468 | return data; |
| 469 | } |
| 470 | |
Bill Pemberton | e23e7a1 | 2012-12-06 12:35:10 -0500 | [diff] [blame] | 471 | static int ap192_ak4114_init(struct snd_ice1712 *ice) |
Takashi Iwai | 5625506 | 2006-11-09 16:47:26 +0100 | [diff] [blame] | 472 | { |
Takashi Iwai | 32b47da | 2007-01-29 15:26:36 +0100 | [diff] [blame] | 473 | static const unsigned char ak4114_init_vals[] = { |
Jonas Petersen | c2d3703 | 2013-02-23 23:38:43 +0100 | [diff] [blame] | 474 | AK4114_RST | AK4114_PWN | AK4114_OCKS0, |
Takashi Iwai | 5625506 | 2006-11-09 16:47:26 +0100 | [diff] [blame] | 475 | AK4114_DIF_I24I2S, |
| 476 | AK4114_TX1E, |
Jonas Petersen | c2d3703 | 2013-02-23 23:38:43 +0100 | [diff] [blame] | 477 | AK4114_EFH_1024 | AK4114_DIT | AK4114_IPS(0), |
Takashi Iwai | 5625506 | 2006-11-09 16:47:26 +0100 | [diff] [blame] | 478 | 0, |
| 479 | 0 |
| 480 | }; |
Takashi Iwai | 32b47da | 2007-01-29 15:26:36 +0100 | [diff] [blame] | 481 | static const unsigned char ak4114_init_txcsb[] = { |
Takashi Iwai | 5625506 | 2006-11-09 16:47:26 +0100 | [diff] [blame] | 482 | 0x41, 0x02, 0x2c, 0x00, 0x00 |
| 483 | }; |
Takashi Iwai | 5625506 | 2006-11-09 16:47:26 +0100 | [diff] [blame] | 484 | int err; |
| 485 | |
Jonas Petersen | c2d3703 | 2013-02-23 23:38:43 +0100 | [diff] [blame] | 486 | struct revo51_spec *spec; |
| 487 | spec = kzalloc(sizeof(*spec), GFP_KERNEL); |
| 488 | if (!spec) |
| 489 | return -ENOMEM; |
| 490 | ice->spec = spec; |
| 491 | |
Takashi Iwai | f339eb0 | 2008-02-04 12:34:59 +0100 | [diff] [blame] | 492 | err = snd_ak4114_create(ice->card, |
Takashi Iwai | 5625506 | 2006-11-09 16:47:26 +0100 | [diff] [blame] | 493 | ap192_ak4114_read, |
| 494 | ap192_ak4114_write, |
| 495 | ak4114_init_vals, ak4114_init_txcsb, |
Jonas Petersen | c2d3703 | 2013-02-23 23:38:43 +0100 | [diff] [blame] | 496 | ice, &spec->ak4114); |
Sudip Mukherjee | b8eca77 | 2014-11-14 18:12:21 +0530 | [diff] [blame^] | 497 | if (err < 0) |
| 498 | return err; |
Pavel Hofman | 841b23d | 2008-03-17 08:45:33 +0100 | [diff] [blame] | 499 | /* AK4114 in Revo cannot detect external rate correctly. |
| 500 | * No reason to stop capture stream due to incorrect checks */ |
Jonas Petersen | c2d3703 | 2013-02-23 23:38:43 +0100 | [diff] [blame] | 501 | spec->ak4114->check_flags = AK4114_CHECK_NO_RATE; |
Pavel Hofman | 841b23d | 2008-03-17 08:45:33 +0100 | [diff] [blame] | 502 | |
Sudip Mukherjee | b8eca77 | 2014-11-14 18:12:21 +0530 | [diff] [blame^] | 503 | return 0; |
Takashi Iwai | 5625506 | 2006-11-09 16:47:26 +0100 | [diff] [blame] | 504 | } |
Takashi Iwai | 5625506 | 2006-11-09 16:47:26 +0100 | [diff] [blame] | 505 | |
Bill Pemberton | e23e7a1 | 2012-12-06 12:35:10 -0500 | [diff] [blame] | 506 | static int revo_init(struct snd_ice1712 *ice) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 507 | { |
Takashi Iwai | ab0c7d7 | 2005-11-17 15:00:18 +0100 | [diff] [blame] | 508 | struct snd_akm4xxx *ak; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 509 | int err; |
| 510 | |
| 511 | /* determine I2C, DACs and ADCs */ |
| 512 | switch (ice->eeprom.subvendor) { |
| 513 | case VT1724_SUBDEVICE_REVOLUTION71: |
| 514 | ice->num_total_dacs = 8; |
| 515 | ice->num_total_adcs = 2; |
Takashi Iwai | 59acf76 | 2005-12-05 19:22:34 +0100 | [diff] [blame] | 516 | ice->gpio.i2s_mclk_changed = revo_i2s_mclk_changed; |
| 517 | break; |
| 518 | case VT1724_SUBDEVICE_REVOLUTION51: |
Alexander Beregalov | 46480b3 | 2008-08-21 08:28:42 +0400 | [diff] [blame] | 519 | ice->num_total_dacs = 8; |
Takashi Iwai | 59acf76 | 2005-12-05 19:22:34 +0100 | [diff] [blame] | 520 | ice->num_total_adcs = 2; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 521 | break; |
Takashi Iwai | 5625506 | 2006-11-09 16:47:26 +0100 | [diff] [blame] | 522 | case VT1724_SUBDEVICE_AUDIOPHILE192: |
| 523 | ice->num_total_dacs = 2; |
| 524 | ice->num_total_adcs = 2; |
| 525 | break; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 526 | default: |
| 527 | snd_BUG(); |
| 528 | return -EINVAL; |
| 529 | } |
| 530 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 531 | /* second stage of initialization, analog parts and others */ |
Takashi Iwai | ab0c7d7 | 2005-11-17 15:00:18 +0100 | [diff] [blame] | 532 | ak = ice->akm = kcalloc(2, sizeof(struct snd_akm4xxx), GFP_KERNEL); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 533 | if (! ak) |
| 534 | return -ENOMEM; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 535 | switch (ice->eeprom.subvendor) { |
| 536 | case VT1724_SUBDEVICE_REVOLUTION71: |
Takashi Iwai | 59acf76 | 2005-12-05 19:22:34 +0100 | [diff] [blame] | 537 | ice->akm_codecs = 2; |
Alexander Beregalov | faa09c9 | 2008-08-11 02:09:04 +0400 | [diff] [blame] | 538 | err = snd_ice1712_akm4xxx_init(ak, &akm_revo_front, |
| 539 | &akm_revo_front_priv, ice); |
| 540 | if (err < 0) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 541 | return err; |
Alexander Beregalov | faa09c9 | 2008-08-11 02:09:04 +0400 | [diff] [blame] | 542 | err = snd_ice1712_akm4xxx_init(ak+1, &akm_revo_surround, |
| 543 | &akm_revo_surround_priv, ice); |
| 544 | if (err < 0) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 545 | return err; |
| 546 | /* unmute all codecs */ |
Alexander Beregalov | faa09c9 | 2008-08-11 02:09:04 +0400 | [diff] [blame] | 547 | snd_ice1712_gpio_write_bits(ice, VT1724_REVO_MUTE, |
| 548 | VT1724_REVO_MUTE); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 549 | break; |
Takashi Iwai | 59acf76 | 2005-12-05 19:22:34 +0100 | [diff] [blame] | 550 | case VT1724_SUBDEVICE_REVOLUTION51: |
Jochen Voss | 96d9e93 | 2006-08-08 21:13:42 +0200 | [diff] [blame] | 551 | ice->akm_codecs = 2; |
Jochen Voss | feaa6a7 | 2006-10-04 18:08:43 +0200 | [diff] [blame] | 552 | err = snd_ice1712_akm4xxx_init(ak, &akm_revo51, |
| 553 | &akm_revo51_priv, ice); |
| 554 | if (err < 0) |
Takashi Iwai | 59acf76 | 2005-12-05 19:22:34 +0100 | [diff] [blame] | 555 | return err; |
Jochen Voss | feaa6a7 | 2006-10-04 18:08:43 +0200 | [diff] [blame] | 556 | err = snd_ice1712_akm4xxx_init(ak+1, &akm_revo51_adc, |
Jochen Voss | 96d9e93 | 2006-08-08 21:13:42 +0200 | [diff] [blame] | 557 | &akm_revo51_adc_priv, ice); |
| 558 | if (err < 0) |
| 559 | return err; |
Jochen Voss | feaa6a7 | 2006-10-04 18:08:43 +0200 | [diff] [blame] | 560 | err = revo51_i2c_init(ice, &ptc_revo51_volume); |
| 561 | if (err < 0) |
| 562 | return err; |
| 563 | /* unmute all codecs */ |
| 564 | snd_ice1712_gpio_write_bits(ice, VT1724_REVO_MUTE, |
| 565 | VT1724_REVO_MUTE); |
Takashi Iwai | 59acf76 | 2005-12-05 19:22:34 +0100 | [diff] [blame] | 566 | break; |
Takashi Iwai | 5625506 | 2006-11-09 16:47:26 +0100 | [diff] [blame] | 567 | case VT1724_SUBDEVICE_AUDIOPHILE192: |
| 568 | ice->akm_codecs = 1; |
| 569 | err = snd_ice1712_akm4xxx_init(ak, &akm_ap192, &akm_ap192_priv, |
| 570 | ice); |
| 571 | if (err < 0) |
| 572 | return err; |
Jonas Petersen | c2d3703 | 2013-02-23 23:38:43 +0100 | [diff] [blame] | 573 | err = ap192_ak4114_init(ice); |
| 574 | if (err < 0) |
| 575 | return err; |
Takashi Iwai | 5625506 | 2006-11-09 16:47:26 +0100 | [diff] [blame] | 576 | |
Takashi Iwai | a769692 | 2008-02-04 12:36:32 +0100 | [diff] [blame] | 577 | /* unmute all codecs */ |
| 578 | snd_ice1712_gpio_write_bits(ice, VT1724_REVO_MUTE, |
| 579 | VT1724_REVO_MUTE); |
Takashi Iwai | 5625506 | 2006-11-09 16:47:26 +0100 | [diff] [blame] | 580 | break; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 581 | } |
| 582 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 583 | return 0; |
| 584 | } |
| 585 | |
| 586 | |
Bill Pemberton | e23e7a1 | 2012-12-06 12:35:10 -0500 | [diff] [blame] | 587 | static int revo_add_controls(struct snd_ice1712 *ice) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 588 | { |
Jonas Petersen | c2d3703 | 2013-02-23 23:38:43 +0100 | [diff] [blame] | 589 | struct revo51_spec *spec = ice->spec; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 590 | int err; |
| 591 | |
| 592 | switch (ice->eeprom.subvendor) { |
| 593 | case VT1724_SUBDEVICE_REVOLUTION71: |
Jochen Voss | feaa6a7 | 2006-10-04 18:08:43 +0200 | [diff] [blame] | 594 | err = snd_ice1712_akm4xxx_build_controls(ice); |
| 595 | if (err < 0) |
| 596 | return err; |
| 597 | break; |
Takashi Iwai | 59acf76 | 2005-12-05 19:22:34 +0100 | [diff] [blame] | 598 | case VT1724_SUBDEVICE_REVOLUTION51: |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 599 | err = snd_ice1712_akm4xxx_build_controls(ice); |
| 600 | if (err < 0) |
| 601 | return err; |
Takashi Iwai | 7cda8ba | 2008-01-18 13:36:07 +0100 | [diff] [blame] | 602 | spec = ice->spec; |
| 603 | err = snd_pt2258_build_controls(spec->pt2258); |
Jochen Voss | feaa6a7 | 2006-10-04 18:08:43 +0200 | [diff] [blame] | 604 | if (err < 0) |
| 605 | return err; |
| 606 | break; |
Takashi Iwai | 5625506 | 2006-11-09 16:47:26 +0100 | [diff] [blame] | 607 | case VT1724_SUBDEVICE_AUDIOPHILE192: |
| 608 | err = snd_ice1712_akm4xxx_build_controls(ice); |
| 609 | if (err < 0) |
| 610 | return err; |
Jonas Petersen | c2d3703 | 2013-02-23 23:38:43 +0100 | [diff] [blame] | 611 | /* only capture SPDIF over AK4114 */ |
| 612 | err = snd_ak4114_build(spec->ak4114, NULL, |
| 613 | ice->pcm->streams[SNDRV_PCM_STREAM_CAPTURE].substream); |
Takashi Iwai | 5625506 | 2006-11-09 16:47:26 +0100 | [diff] [blame] | 614 | if (err < 0) |
| 615 | return err; |
Takashi Iwai | 5625506 | 2006-11-09 16:47:26 +0100 | [diff] [blame] | 616 | break; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 617 | } |
| 618 | return 0; |
| 619 | } |
| 620 | |
| 621 | /* entry point */ |
Bill Pemberton | e23e7a1 | 2012-12-06 12:35:10 -0500 | [diff] [blame] | 622 | struct snd_ice1712_card_info snd_vt1724_revo_cards[] = { |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 623 | { |
| 624 | .subvendor = VT1724_SUBDEVICE_REVOLUTION71, |
| 625 | .name = "M Audio Revolution-7.1", |
| 626 | .model = "revo71", |
| 627 | .chip_init = revo_init, |
| 628 | .build_controls = revo_add_controls, |
| 629 | }, |
Takashi Iwai | 59acf76 | 2005-12-05 19:22:34 +0100 | [diff] [blame] | 630 | { |
| 631 | .subvendor = VT1724_SUBDEVICE_REVOLUTION51, |
| 632 | .name = "M Audio Revolution-5.1", |
| 633 | .model = "revo51", |
| 634 | .chip_init = revo_init, |
| 635 | .build_controls = revo_add_controls, |
| 636 | }, |
Takashi Iwai | 5625506 | 2006-11-09 16:47:26 +0100 | [diff] [blame] | 637 | { |
| 638 | .subvendor = VT1724_SUBDEVICE_AUDIOPHILE192, |
| 639 | .name = "M Audio Audiophile192", |
| 640 | .model = "ap192", |
| 641 | .chip_init = revo_init, |
| 642 | .build_controls = revo_add_controls, |
| 643 | }, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 644 | { } /* terminator */ |
| 645 | }; |