aureon.c 25.3 KB
Newer Older
Jaroslav Kysela's avatar
Jaroslav Kysela committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40
/*
 *   ALSA driver for ICEnsemble VT1724 (Envy24HT)
 *
 *   Lowlevel functions for Terratec Aureon cards
 *
 *	Copyright (c) 2003 Takashi Iwai <tiwai@suse.de>
 *
 *   This program is free software; you can redistribute it and/or modify
 *   it under the terms of the GNU General Public License as published by
 *   the Free Software Foundation; either version 2 of the License, or
 *   (at your option) any later version.
 *
 *   This program is distributed in the hope that it will be useful,
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *   GNU General Public License for more details.
 *
 *   You should have received a copy of the GNU General Public License
 *   along with this program; if not, write to the Free Software
 *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
 *
 *
 * NOTES:
 *
 * - we reuse the akm4xxx_t record for storing the wm8770 codec data.
 *   both wm and akm codecs are pretty similar, so we can integrate
 *   both controls in the future, once if wm codecs are reused in
 *   many boards.
 *
 * - writing over SPI is implemented but reading is not yet.
 *   the SPDIF-in channel status, etc. can be read from CS chip.
 *
 * - DAC digital volumes are not implemented in the mixer.
 *   if they show better response than DAC analog volumes, we can use them
 *   instead.
 *
 * - Aureon boards are equipped with AC97 codec, too.  it's used to do
 *   the analog mixing but not easily controllable (it's not connected
 *   directly from envy24ht chip).  so let's leave it as it is.
 *
41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59
 *
 *   Lowlevel functions for AudioTrak Prodigy 7.1 (and possibly 192) cards
 *      Copyright (c) 2003 Dimitromanolakis Apostolos <apostol@cs.utoronto.ca>
 *
 *   version 0.82: Stable / not all features work yet (no communication with AC97 secondary)
 *       added 64x/128x oversampling switch (should be 64x only for 96khz)
 *       fixed some recording labels (still need to check the rest)
 *       recording is working probably thanks to correct wm8770 initialization
 *
 *   version 0.5: Initial release:
 *           working: analog output, mixer, headphone amplifier switch
 *       not working: prety much everything else, at least i could verify that
 *                    we have no digital output, no capture, pretty bad clicks and poops
 *                    on mixer switch and other coll stuff.
 *
 * - Prodigy boards are equipped with AC97 STAC9744 chip , too.  it's used to do
 *   the analog mixing but not easily controllable (it's not connected
 *   directly from envy24ht chip).  so let's leave it as it is.
 *
Jaroslav Kysela's avatar
Jaroslav Kysela committed
60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77
 */      

#include <sound/driver.h>
#include <asm/io.h>
#include <linux/delay.h>
#include <linux/interrupt.h>
#include <linux/init.h>
#include <linux/slab.h>
#include <sound/core.h>

#include "ice1712.h"
#include "envy24ht.h"
#include "aureon.h"

/* WM8770 registers */
#define WM_DAC_ATTEN		0x00	/* DAC1-8 analog attenuation */
#define WM_DAC_MASTER_ATTEN	0x08	/* DAC master analog attenuation */
#define WM_DAC_DIG_ATTEN	0x09	/* DAC1-8 digital attenuation */
Jaroslav Kysela's avatar
Jaroslav Kysela committed
78
#define WM_DAC_DIG_MASTER_ATTEN	0x11	/* DAC master digital attenuation */
Jaroslav Kysela's avatar
Jaroslav Kysela committed
79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98
#define WM_PHASE_SWAP		0x12	/* DAC phase */
#define WM_DAC_CTRL1		0x13	/* DAC control bits */
#define WM_MUTE			0x14	/* mute controls */
#define WM_DAC_CTRL2		0x15	/* de-emphasis and zefo-flag */
#define WM_INT_CTRL		0x16	/* interface control */
#define WM_MASTER		0x17	/* master clock and mode */
#define WM_POWERDOWN		0x18	/* power-down controls */
#define WM_ADC_GAIN		0x19	/* ADC gain L(19)/R(1a) */
#define WM_ADC_MUX		0x1b	/* input MUX */
#define WM_OUT_MUX1		0x1c	/* output MUX */
#define WM_OUT_MUX2		0x1e	/* output MUX */
#define WM_RESET		0x1f	/* software reset */


/*
 * write data in the SPI mode
 */
static void aureon_spi_write(ice1712_t *ice, unsigned int cs, unsigned int data, int bits)
{
	unsigned int tmp;
99
	unsigned int cscs;
Jaroslav Kysela's avatar
Jaroslav Kysela committed
100 101 102 103
	int i;

	tmp = snd_ice1712_gpio_read(ice);

104 105 106 107 108
	if (ice->eeprom.subvendor == VT1724_SUBDEVICE_PRODIGY71)
		cscs = PRODIGY_CS8415_CS;
	else
		cscs = AUREON_CS8415_CS;

Jaroslav Kysela's avatar
Jaroslav Kysela committed
109
	snd_ice1712_gpio_set_mask(ice, ~(AUREON_WM_RW|AUREON_WM_DATA|AUREON_WM_CLK|
110
					 AUREON_WM_CS|cscs));
Jaroslav Kysela's avatar
Jaroslav Kysela committed
111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150
	tmp |= AUREON_WM_RW;
	tmp &= ~cs;
	snd_ice1712_gpio_write(ice, tmp);
	udelay(1);

	for (i = bits - 1; i >= 0; i--) {
		tmp &= ~AUREON_WM_CLK;
		snd_ice1712_gpio_write(ice, tmp);
		udelay(1);
		if (data & (1 << i))
			tmp |= AUREON_WM_DATA;
		else
			tmp &= ~AUREON_WM_DATA;
		snd_ice1712_gpio_write(ice, tmp);
		udelay(1);
		tmp |= AUREON_WM_CLK;
		snd_ice1712_gpio_write(ice, tmp);
		udelay(1);
	}

	tmp &= ~AUREON_WM_CLK;
	tmp |= cs;
	snd_ice1712_gpio_write(ice, tmp);
	udelay(1);
	tmp |= AUREON_WM_CLK;
	snd_ice1712_gpio_write(ice, tmp);
	udelay(1);
}
     

/*
 * get the current register value of WM codec
 */
static unsigned short wm_get(ice1712_t *ice, int reg)
{
	reg <<= 1;
	return ((unsigned short)ice->akm[0].images[reg] << 8) |
		ice->akm[0].images[reg + 1];
}

Jaroslav Kysela's avatar
Jaroslav Kysela committed
151 152 153 154 155 156 157 158
/*
 * set the register value of WM codec
 */
static void wm_put_nocache(ice1712_t *ice, int reg, unsigned short val)
{
	aureon_spi_write(ice, AUREON_WM_CS, (reg << 9) | (val & 0x1ff), 16);
}

Jaroslav Kysela's avatar
Jaroslav Kysela committed
159 160 161 162 163
/*
 * set the register value of WM codec and remember it
 */
static void wm_put(ice1712_t *ice, int reg, unsigned short val)
{
Jaroslav Kysela's avatar
Jaroslav Kysela committed
164
	wm_put_nocache(ice, reg, val);
Jaroslav Kysela's avatar
Jaroslav Kysela committed
165 166 167 168 169
	reg <<= 1;
	ice->akm[0].images[reg] = val >> 8;
	ice->akm[0].images[reg + 1] = val;
}

170 171
/*
 */
Jaroslav Kysela's avatar
Jaroslav Kysela committed
172
static int aureon_mono_bool_info(snd_kcontrol_t *k, snd_ctl_elem_info_t *uinfo)
173 174 175 176 177 178 179 180
{
	uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN;
	uinfo->count = 1;
	uinfo->value.integer.min = 0;
	uinfo->value.integer.max = 1;
	return 0;
}

Jaroslav Kysela's avatar
Jaroslav Kysela committed
181 182 183 184 185
/*
 * DAC mute control
 */
#define wm_dac_mute_info	aureon_mono_bool_info

186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214
static int wm_dac_mute_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol)
{
	ice1712_t *ice = snd_kcontrol_chip(kcontrol);
	unsigned short val;

	down(&ice->gpio_mutex);
	val = wm_get(ice, snd_ctl_get_ioffidx(kcontrol, &ucontrol->id)+WM_MUTE);
	ucontrol->value.integer.value[0] = ~val>>4 & 0x1;
	up(&ice->gpio_mutex);
	return 0;
}

static int wm_dac_mute_put(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
{
	ice1712_t *ice = snd_kcontrol_chip(kcontrol);
	unsigned short new, old;
	int change;

	snd_ice1712_save_gpio_status(ice);
	old = wm_get(ice, snd_ctl_get_ioffidx(kcontrol, &ucontrol->id)+WM_MUTE);
	new = (~ucontrol->value.integer.value[0]<<4&0x10) | (old&~0x10);
	change = (new != old);
	if (change)
		wm_put(ice, snd_ctl_get_ioffidx(kcontrol, &ucontrol->id)+WM_MUTE, new);
	snd_ice1712_restore_gpio_status(ice);

	return change;
}

Jaroslav Kysela's avatar
Jaroslav Kysela committed
215 216 217 218 219
/*
 * DAC volume attenuation mixer control
 */
static int wm_dac_vol_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinfo)
{
Jaroslav Kysela's avatar
Jaroslav Kysela committed
220
	int voices = kcontrol->private_value >> 8;
Jaroslav Kysela's avatar
Jaroslav Kysela committed
221
	uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER;
Jaroslav Kysela's avatar
Jaroslav Kysela committed
222 223
	uinfo->count = voices;
	uinfo->value.integer.min = 0;		/* mute (-101dB) */
Jaroslav Kysela's avatar
Jaroslav Kysela committed
224 225 226 227 228 229 230
	uinfo->value.integer.max = 101;		/* 0dB */
	return 0;
}

static int wm_dac_vol_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol)
{
	ice1712_t *ice = snd_kcontrol_chip(kcontrol);
Jaroslav Kysela's avatar
Jaroslav Kysela committed
231
	int i, idx, ofs, voices;
Jaroslav Kysela's avatar
Jaroslav Kysela committed
232 233
	unsigned short vol;

Jaroslav Kysela's avatar
Jaroslav Kysela committed
234 235
	voices = kcontrol->private_value >> 8;
	ofs = kcontrol->private_value & 0xff;
Jaroslav Kysela's avatar
Jaroslav Kysela committed
236
	down(&ice->gpio_mutex);
Jaroslav Kysela's avatar
Jaroslav Kysela committed
237 238 239 240 241 242 243 244
	for (i = 0; i < voices; i++) {
		idx  = WM_DAC_ATTEN + ofs + i;
		vol = wm_get(ice, idx) & 0x7f;
		if (vol <= 0x1a)
			ucontrol->value.integer.value[i] = 0;
		else
			ucontrol->value.integer.value[i] = vol - 0x1a;
	}
Jaroslav Kysela's avatar
Jaroslav Kysela committed
245 246 247 248 249 250 251
	up(&ice->gpio_mutex);
	return 0;
}

static int wm_dac_vol_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol)
{
	ice1712_t *ice = snd_kcontrol_chip(kcontrol);
Jaroslav Kysela's avatar
Jaroslav Kysela committed
252
	int i, idx, ofs, voices;
Jaroslav Kysela's avatar
Jaroslav Kysela committed
253
	unsigned short ovol, nvol;
Jaroslav Kysela's avatar
Jaroslav Kysela committed
254
	int change = 0;
Jaroslav Kysela's avatar
Jaroslav Kysela committed
255

Jaroslav Kysela's avatar
Jaroslav Kysela committed
256 257
	voices = kcontrol->private_value >> 8;
	ofs = kcontrol->private_value & 0xff;
Jaroslav Kysela's avatar
Jaroslav Kysela committed
258
	snd_ice1712_save_gpio_status(ice);
Jaroslav Kysela's avatar
Jaroslav Kysela committed
259
	for (i = 0; i < voices; i++) {
Jaroslav Kysela's avatar
Jaroslav Kysela committed
260 261 262 263 264 265
		idx  = WM_DAC_ATTEN + ofs + i;
		nvol = ucontrol->value.integer.value[i] + 0x1a;
		ovol = wm_get(ice, idx) & 0x7f;
		if (ovol != nvol) {
			if (nvol <= 0x1a && ovol <= 0x1a)
				continue;
Jaroslav Kysela's avatar
Jaroslav Kysela committed
266 267
			wm_put(ice, idx, nvol | 0x80); /* zero-detect, prelatch */
			wm_put_nocache(ice, idx, nvol | 0x180); /* update */
Jaroslav Kysela's avatar
Jaroslav Kysela committed
268
			change = 1;
Jaroslav Kysela's avatar
Jaroslav Kysela committed
269
		}
Jaroslav Kysela's avatar
Jaroslav Kysela committed
270 271 272 273 274
	}
	snd_ice1712_restore_gpio_status(ice);
	return change;
}

Jaroslav Kysela's avatar
Jaroslav Kysela committed
275
/* digital master volume */
Jaroslav Kysela's avatar
Jaroslav Kysela committed
276 277 278
#define MASTER_0dB 0xff
#define MASTER_RES 128	/* -64dB */
#define MASTER_MIN (MASTER_0dB - MASTER_RES)
Jaroslav Kysela's avatar
Jaroslav Kysela committed
279 280 281 282
static int wm_master_vol_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinfo)
{
	uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER;
	uinfo->count = 1;
Jaroslav Kysela's avatar
Jaroslav Kysela committed
283 284
	uinfo->value.integer.min = 0;		/* mute (-64dB) */
	uinfo->value.integer.max = MASTER_RES;	/* 0dB */
Jaroslav Kysela's avatar
Jaroslav Kysela committed
285 286 287 288 289 290
	return 0;
}

static int wm_master_vol_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol)
{
	ice1712_t *ice = snd_kcontrol_chip(kcontrol);
Jaroslav Kysela's avatar
Jaroslav Kysela committed
291
	unsigned short val;
Jaroslav Kysela's avatar
Jaroslav Kysela committed
292 293

	down(&ice->gpio_mutex);
Jaroslav Kysela's avatar
Jaroslav Kysela committed
294 295 296
	val = wm_get(ice, WM_DAC_DIG_MASTER_ATTEN) & 0xff;
	val = val > MASTER_MIN ? (val - MASTER_MIN) : 0;
	ucontrol->value.integer.value[0] = val;
Jaroslav Kysela's avatar
Jaroslav Kysela committed
297 298 299 300 301 302 303 304 305 306 307
	up(&ice->gpio_mutex);
	return 0;
}

static int wm_master_vol_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol)
{
	ice1712_t *ice = snd_kcontrol_chip(kcontrol);
	unsigned short ovol, nvol;
	int change = 0;

	snd_ice1712_save_gpio_status(ice);
Jaroslav Kysela's avatar
Jaroslav Kysela committed
308 309
	nvol = ucontrol->value.integer.value[0];
	nvol = (nvol ? (nvol + MASTER_MIN) : 0) & 0xff;
Jaroslav Kysela's avatar
Jaroslav Kysela committed
310 311 312 313 314 315 316 317 318 319
	ovol = wm_get(ice, WM_DAC_DIG_MASTER_ATTEN) & 0xff;
	if (ovol != nvol) {
		wm_put(ice, WM_DAC_DIG_MASTER_ATTEN, nvol); /* prelatch */
		wm_put_nocache(ice, WM_DAC_DIG_MASTER_ATTEN, nvol | 0x100); /* update */
		change = 1;
	}
	snd_ice1712_restore_gpio_status(ice);
	return change;
}

320 321 322
/*
 * ADC mute control
 */
Jaroslav Kysela's avatar
Jaroslav Kysela committed
323
static int wm_adc_mute_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinfo)
324 325
{
	uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN;
Jaroslav Kysela's avatar
Jaroslav Kysela committed
326
	uinfo->count = 2;
327 328 329 330 331 332 333 334 335
	uinfo->value.integer.min = 0;
	uinfo->value.integer.max = 1;
	return 0;
}

static int wm_adc_mute_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol)
{
	ice1712_t *ice = snd_kcontrol_chip(kcontrol);
	unsigned short val;
Jaroslav Kysela's avatar
Jaroslav Kysela committed
336
	int i;
337 338

	down(&ice->gpio_mutex);
Jaroslav Kysela's avatar
Jaroslav Kysela committed
339 340 341 342
	for (i = 0; i < 2; i++) {
		val = wm_get(ice, WM_ADC_GAIN + i);
		ucontrol->value.integer.value[i] = ~val>>5 & 0x1;
	}
343 344 345 346 347 348 349 350
	up(&ice->gpio_mutex);
	return 0;
}

static int wm_adc_mute_put(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
{
	ice1712_t *ice = snd_kcontrol_chip(kcontrol);
	unsigned short new, old;
Jaroslav Kysela's avatar
Jaroslav Kysela committed
351
	int i, change = 0;
352 353

	snd_ice1712_save_gpio_status(ice);
Jaroslav Kysela's avatar
Jaroslav Kysela committed
354 355 356 357 358 359 360 361
	for (i = 0; i < 2; i++) {
		old = wm_get(ice, WM_ADC_GAIN + i);
		new = (~ucontrol->value.integer.value[i]<<5&0x20) | (old&~0x20);
		if (new != old) {
			wm_put(ice, snd_ctl_get_ioffidx(kcontrol, &ucontrol->id)+WM_ADC_GAIN, new);
			change = 1;
		}
	}
362 363 364 365 366
	snd_ice1712_restore_gpio_status(ice);

	return change;
}

Jaroslav Kysela's avatar
Jaroslav Kysela committed
367 368 369 370 371 372
/*
 * ADC gain mixer control
 */
static int wm_adc_vol_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinfo)
{
	uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER;
Jaroslav Kysela's avatar
Jaroslav Kysela committed
373
	uinfo->count = 2;
Jaroslav Kysela's avatar
Jaroslav Kysela committed
374 375 376 377 378 379 380 381
	uinfo->value.integer.min = 0;		/* -12dB */
	uinfo->value.integer.max = 0x1f;	/* 19dB */
	return 0;
}

static int wm_adc_vol_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol)
{
	ice1712_t *ice = snd_kcontrol_chip(kcontrol);
Jaroslav Kysela's avatar
Jaroslav Kysela committed
382
	int i, idx;
Jaroslav Kysela's avatar
Jaroslav Kysela committed
383 384 385
	unsigned short vol;

	down(&ice->gpio_mutex);
Jaroslav Kysela's avatar
Jaroslav Kysela committed
386 387 388 389 390
	for (i = 0; i < 2; i++) {
		idx = WM_ADC_GAIN + i;
		vol = wm_get(ice, idx) & 0x1f;
		ucontrol->value.integer.value[i] = vol;
	}
Jaroslav Kysela's avatar
Jaroslav Kysela committed
391 392 393 394 395 396 397
	up(&ice->gpio_mutex);
	return 0;
}

static int wm_adc_vol_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol)
{
	ice1712_t *ice = snd_kcontrol_chip(kcontrol);
Jaroslav Kysela's avatar
Jaroslav Kysela committed
398
	int i, idx;
Jaroslav Kysela's avatar
Jaroslav Kysela committed
399
	unsigned short ovol, nvol;
Jaroslav Kysela's avatar
Jaroslav Kysela committed
400
	int change = 0;
Jaroslav Kysela's avatar
Jaroslav Kysela committed
401 402

	snd_ice1712_save_gpio_status(ice);
Jaroslav Kysela's avatar
Jaroslav Kysela committed
403 404 405 406 407 408 409 410 411
	for (i = 0; i < 2; i++) {
		idx  = WM_ADC_GAIN + i;
		nvol = ucontrol->value.integer.value[i];
		ovol = wm_get(ice, idx);
		if ((ovol & 0x1f) != nvol) {
			wm_put(ice, idx, nvol | (ovol & ~0x1f));
			change = 1;
		}
	}
Jaroslav Kysela's avatar
Jaroslav Kysela committed
412 413 414 415 416 417 418 419 420 421
	snd_ice1712_restore_gpio_status(ice);
	return change;
}

/*
 * ADC input mux mixer control
 */
static int wm_adc_mux_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinfo)
{
	static char *texts[] = {
422 423 424 425 426
		"CD",		//AIN1
		"Aux",		//AIN2
		"Line",		//AIN3
		"Mic",		//AIN4
		"AC97"		//AIN5
Jaroslav Kysela's avatar
Jaroslav Kysela committed
427 428
	};
	uinfo->type = SNDRV_CTL_ELEM_TYPE_ENUMERATED;
Jaroslav Kysela's avatar
Jaroslav Kysela committed
429
	uinfo->count = 2;
430
	uinfo->value.enumerated.items = 5;
Jaroslav Kysela's avatar
Jaroslav Kysela committed
431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467
	if (uinfo->value.enumerated.item >= uinfo->value.enumerated.items)
		uinfo->value.enumerated.item = uinfo->value.enumerated.items - 1;
	strcpy(uinfo->value.enumerated.name, texts[uinfo->value.enumerated.item]);
	return 0;
}

static int wm_adc_mux_get(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t *ucontrol)
{
	ice1712_t *ice = snd_kcontrol_chip(kcontrol);
	unsigned short val;

	down(&ice->gpio_mutex);
	val = wm_get(ice, WM_ADC_MUX);
	ucontrol->value.integer.value[0] = val & 7;
	ucontrol->value.integer.value[1] = (val >> 4) & 7;
	up(&ice->gpio_mutex);
	return 0;
}

static int wm_adc_mux_put(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t *ucontrol)
{
	ice1712_t *ice = snd_kcontrol_chip(kcontrol);
	unsigned short oval, nval;
	int change;

	snd_ice1712_save_gpio_status(ice);
	oval = wm_get(ice, WM_ADC_MUX);
	nval = oval & ~0x77;
	nval |= ucontrol->value.integer.value[0] & 7;
	nval |= (ucontrol->value.integer.value[1] & 7) << 4;
	change = (oval != nval);
	if (change)
		wm_put(ice, WM_ADC_MUX, nval);
	snd_ice1712_restore_gpio_status(ice);
	return 0;
}

468
/*
469
 * Headphone Amplifier
470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493
 */
static int aureon_set_headphone_amp(ice1712_t *ice, int enable)
{
	unsigned int tmp, tmp2;

	tmp2 = tmp = snd_ice1712_gpio_read(ice);
	if (enable)
		tmp |= AUREON_HP_SEL;
	else
		tmp &= ~ AUREON_HP_SEL;
	if (tmp != tmp2) {
		snd_ice1712_gpio_write(ice, tmp);
		return 1;
	}
	return 0;
}

static int aureon_get_headphone_amp(ice1712_t *ice)
{
	unsigned int tmp = snd_ice1712_gpio_read(ice);

	return ( tmp & AUREON_HP_SEL )!= 0;
}

Jaroslav Kysela's avatar
Jaroslav Kysela committed
494
#define aureon_hpamp_info	aureon_mono_bool_info
495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511

static int aureon_hpamp_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol)
{
	ice1712_t *ice = snd_kcontrol_chip(kcontrol);

	ucontrol->value.integer.value[0] = aureon_get_headphone_amp(ice);
	return 0;
}


static int aureon_hpamp_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol)
{
	ice1712_t *ice = snd_kcontrol_chip(kcontrol);

	return aureon_set_headphone_amp(ice,ucontrol->value.integer.value[0]);
}

512 513 514
/*
 * Deemphasis
 */
Jaroslav Kysela's avatar
Jaroslav Kysela committed
515 516 517

#define aureon_deemp_info	aureon_mono_bool_info

518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584
static int aureon_deemp_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol)
{
	ice1712_t *ice = snd_kcontrol_chip(kcontrol);
	ucontrol->value.integer.value[0] = (wm_get(ice, WM_DAC_CTRL2) & 0xf) == 0xf;
	return 0;
}

static int aureon_deemp_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol)
{
	ice1712_t *ice = snd_kcontrol_chip(kcontrol);
	int temp, temp2;
	temp2 = temp = wm_get(ice, WM_DAC_CTRL2);
	if (ucontrol->value.integer.value[0])
		temp |= 0xf;
	else
		temp &= ~0xf;
	if (temp != temp2) {
		wm_put(ice, WM_DAC_CTRL2, temp);
		return 1;
	}
	return 0;
}

/*
 * ADC Oversampling
 */
static int aureon_oversampling_info(snd_kcontrol_t *k, snd_ctl_elem_info_t *uinfo)
{
	static char *texts[2] = { "128x", "64x"	};

	uinfo->type = SNDRV_CTL_ELEM_TYPE_ENUMERATED;
	uinfo->count = 1;
	uinfo->value.enumerated.items = 2;

	if (uinfo->value.enumerated.item >= uinfo->value.enumerated.items)
		uinfo->value.enumerated.item = uinfo->value.enumerated.items - 1;
	strcpy(uinfo->value.enumerated.name, texts[uinfo->value.enumerated.item]);

        return 0;
}

static int aureon_oversampling_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol)
{
	ice1712_t *ice = snd_kcontrol_chip(kcontrol);
	ucontrol->value.enumerated.item[0] = (wm_get(ice, WM_MASTER) & 0x8) == 0x8;
	return 0;
}

static int aureon_oversampling_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol)
{
	int temp, temp2;
	ice1712_t *ice = snd_kcontrol_chip(kcontrol);

	temp2 = temp = wm_get(ice, WM_MASTER);

	if (ucontrol->value.enumerated.item[0])
		temp |= 0x8;
	else
		temp &= ~0x8;

	if (temp != temp2) {
		wm_put(ice, WM_MASTER, temp);
		return 1;
	}
	return 0;
}

Jaroslav Kysela's avatar
Jaroslav Kysela committed
585 586 587 588
/*
 * mixers
 */

Jaroslav Kysela's avatar
Jaroslav Kysela committed
589
static snd_kcontrol_new_t aureon_dac_controls[] __devinitdata = {
590 591
	{
		.iface = SNDRV_CTL_ELEM_IFACE_MIXER,
Jaroslav Kysela's avatar
Jaroslav Kysela committed
592 593 594 595 596
		.name = "Front Playback Volume",
		.info = wm_dac_vol_info,
		.get = wm_dac_vol_get,
		.put = wm_dac_vol_put,
		.private_value = (2 << 8) | 0
597
	},
Jaroslav Kysela's avatar
Jaroslav Kysela committed
598 599
	{
		.iface = SNDRV_CTL_ELEM_IFACE_MIXER,
Jaroslav Kysela's avatar
Jaroslav Kysela committed
600
		.name = "Rear Playback Volume",
Jaroslav Kysela's avatar
Jaroslav Kysela committed
601 602 603
		.info = wm_dac_vol_info,
		.get = wm_dac_vol_get,
		.put = wm_dac_vol_put,
Jaroslav Kysela's avatar
Jaroslav Kysela committed
604
		.private_value = (2 << 8) | 2
Jaroslav Kysela's avatar
Jaroslav Kysela committed
605
	},
606 607
	{
		.iface = SNDRV_CTL_ELEM_IFACE_MIXER,
Jaroslav Kysela's avatar
Jaroslav Kysela committed
608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649
		.name = "Center Playback Volume",
		.info = wm_dac_vol_info,
		.get = wm_dac_vol_get,
		.put = wm_dac_vol_put,
		.private_value = (1 << 8) | 4
	},
	{
		.iface = SNDRV_CTL_ELEM_IFACE_MIXER,
		.name = "LFE Playback Volume",
		.info = wm_dac_vol_info,
		.get = wm_dac_vol_get,
		.put = wm_dac_vol_put,
		.private_value = (1 << 8) | 5
	},
	{
		.iface = SNDRV_CTL_ELEM_IFACE_MIXER,
		.name = "Side Playback Volume",
		.info = wm_dac_vol_info,
		.get = wm_dac_vol_get,
		.put = wm_dac_vol_put,
		.private_value = (2 << 8) | 6
	}
};

static snd_kcontrol_new_t wm_controls[] __devinitdata = {
 	{
 		.iface = SNDRV_CTL_ELEM_IFACE_MIXER,
		.name = "Master Playback Switch",
		.info = wm_dac_mute_info,
		.get = wm_dac_mute_get,
		.put = wm_dac_mute_put,
 	},
 	{
 		.iface = SNDRV_CTL_ELEM_IFACE_MIXER,
		.name = "Master Playback Volume",
		.info = wm_master_vol_info,
		.get = wm_master_vol_get,
		.put = wm_master_vol_put,
 	},
	{
		.iface = SNDRV_CTL_ELEM_IFACE_MIXER,
		.name = "Capture Switch",
650 651 652 653 654
		.info = wm_adc_mute_info,
		.get = wm_adc_mute_get,
		.put = wm_adc_mute_put,

	},
Jaroslav Kysela's avatar
Jaroslav Kysela committed
655 656
	{
		.iface = SNDRV_CTL_ELEM_IFACE_MIXER,
Jaroslav Kysela's avatar
Jaroslav Kysela committed
657
		.name = "Capture Volume",
Jaroslav Kysela's avatar
Jaroslav Kysela committed
658 659 660 661 662 663
		.info = wm_adc_vol_info,
		.get = wm_adc_vol_get,
		.put = wm_adc_vol_put,
	},
	{
		.iface = SNDRV_CTL_ELEM_IFACE_MIXER,
Jaroslav Kysela's avatar
Jaroslav Kysela committed
664
		.name = "Capture Source",
Jaroslav Kysela's avatar
Jaroslav Kysela committed
665 666 667 668
		.info = wm_adc_mux_info,
		.get = wm_adc_mux_get,
		.put = wm_adc_mux_put,
	},
669 670 671
	{
		.iface = SNDRV_CTL_ELEM_IFACE_MIXER,
		.name = "Headphone Amplifier Switch",
Jaroslav Kysela's avatar
Jaroslav Kysela committed
672
		.info = aureon_hpamp_info,
673 674 675
		.get = aureon_hpamp_get,
		.put = aureon_hpamp_put
	},
676 677 678
	{
		.iface = SNDRV_CTL_ELEM_IFACE_MIXER,
		.name = "DAC Deemphasis Switch",
Jaroslav Kysela's avatar
Jaroslav Kysela committed
679
		.info = aureon_deemp_info,
680 681 682 683 684 685 686 687 688 689
		.get = aureon_deemp_get,
		.put = aureon_deemp_put
	},
	{
		.iface = SNDRV_CTL_ELEM_IFACE_MIXER,
		.name = "ADC Oversampling",
		.info = aureon_oversampling_info,
		.get = aureon_oversampling_get,
		.put = aureon_oversampling_put
	},
Jaroslav Kysela's avatar
Jaroslav Kysela committed
690 691 692 693 694
};


static int __devinit aureon_add_controls(ice1712_t *ice)
{
Jaroslav Kysela's avatar
Jaroslav Kysela committed
695
	unsigned int i, counts;
Jaroslav Kysela's avatar
Jaroslav Kysela committed
696 697
	int err;

Jaroslav Kysela's avatar
Jaroslav Kysela committed
698
	counts = ARRAY_SIZE(aureon_dac_controls);
Jaroslav Kysela's avatar
Jaroslav Kysela committed
699
	if (ice->eeprom.subvendor == VT1724_SUBDEVICE_AUREON51_SKY)
Jaroslav Kysela's avatar
Jaroslav Kysela committed
700 701 702 703 704 705
		counts--; /* no side */
	for (i = 0; i < counts; i++) {
		err = snd_ctl_add(ice->card, snd_ctl_new1(&aureon_dac_controls[i], ice));
		if (err < 0)
			return err;
	}
Jaroslav Kysela's avatar
Jaroslav Kysela committed
706 707 708 709 710 711 712 713 714 715 716 717 718 719 720

	for (i = 0; i < ARRAY_SIZE(wm_controls); i++) {
		err = snd_ctl_add(ice->card, snd_ctl_new1(&wm_controls[i], ice));
		if (err < 0)
			return err;
	}
	return 0;
}


/*
 * initialize the chip
 */
static int __devinit aureon_init(ice1712_t *ice)
{
721
	static unsigned short wm_inits_aureon[] = {
722 723 724 725 726 727 728
		/* These come first to reduce init pop noise */
		0x1b, 0x000,		/* ADC Mux */
		0x1c, 0x009,		/* Out Mux1 */
		0x1d, 0x009,		/* Out Mux2 */

		0x18, 0x000,		/* All power-up */

Jaroslav Kysela's avatar
Jaroslav Kysela committed
729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754
		0x16, 0x122,		/* I2S, normal polarity, 24bit */
		0x17, 0x022,		/* 256fs, slave mode */
		0x00, 0,		/* DAC1 analog mute */
		0x01, 0,		/* DAC2 analog mute */
		0x02, 0,		/* DAC3 analog mute */
		0x03, 0,		/* DAC4 analog mute */
		0x04, 0,		/* DAC5 analog mute */
		0x05, 0,		/* DAC6 analog mute */
		0x06, 0,		/* DAC7 analog mute */
		0x07, 0,		/* DAC8 analog mute */
		0x08, 0x100,		/* master analog mute */
		0x09, 0xff,		/* DAC1 digital full */
		0x0a, 0xff,		/* DAC2 digital full */
		0x0b, 0xff,		/* DAC3 digital full */
		0x0c, 0xff,		/* DAC4 digital full */
		0x0d, 0xff,		/* DAC5 digital full */
		0x0e, 0xff,		/* DAC6 digital full */
		0x0f, 0xff,		/* DAC7 digital full */
		0x10, 0xff,		/* DAC8 digital full */
		0x11, 0x1ff,		/* master digital full */
		0x12, 0x000,		/* phase normal */
		0x13, 0x090,		/* unmute DAC L/R */
		0x14, 0x000,		/* all unmute */
		0x15, 0x000,		/* no deemphasis, no ZFLG */
		0x19, 0x000,		/* -12dB ADC/L */
		0x1a, 0x000,		/* -12dB ADC/R */
755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797
		(unsigned short)-1
	};
	static unsigned short wm_inits_prodigy[] = {

		/* These come first to reduce init pop noise */
		0x1b, 0x000,		/* ADC Mux */
		0x1c, 0x009,		/* Out Mux1 */
		0x1d, 0x009,		/* Out Mux2 */

		0x18, 0x000,		/* All power-up */

		0x16, 0x022,		/* I2S, normal polarity, 24bit, high-pass on */
		0x17, 0x006,		/* 128fs, slave mode */

		0x00, 0,		/* DAC1 analog mute */
		0x01, 0,		/* DAC2 analog mute */
		0x02, 0,		/* DAC3 analog mute */
		0x03, 0,		/* DAC4 analog mute */
		0x04, 0,		/* DAC5 analog mute */
		0x05, 0,		/* DAC6 analog mute */
		0x06, 0,		/* DAC7 analog mute */
		0x07, 0,		/* DAC8 analog mute */
		0x08, 0x100,		/* master analog mute */

		0x09, 0x7f,		/* DAC1 digital full */
		0x0a, 0x7f,		/* DAC2 digital full */
		0x0b, 0x7f,		/* DAC3 digital full */
		0x0c, 0x7f,		/* DAC4 digital full */
		0x0d, 0x7f,		/* DAC5 digital full */
		0x0e, 0x7f,		/* DAC6 digital full */
		0x0f, 0x7f,		/* DAC7 digital full */
		0x10, 0x7f,		/* DAC8 digital full */
		0x11, 0x1FF,		/* master digital full */

		0x12, 0x000,		/* phase normal */
		0x13, 0x090,		/* unmute DAC L/R */
		0x14, 0x000,		/* all unmute */
		0x15, 0x000,		/* no deemphasis, no ZFLG */

		0x19, 0x000,		/* -12dB ADC/L */
		0x1a, 0x000,		/* -12dB ADC/R */
		(unsigned short)-1

Jaroslav Kysela's avatar
Jaroslav Kysela committed
798 799 800 801 802 803
	};
	static unsigned short cs_inits[] = {
		0x0441, /* RUN */
		0x0100, /* no mute */
		0x0200, /* */
		0x0600, /* slave, 24bit */
804
		(unsigned short)-1
Jaroslav Kysela's avatar
Jaroslav Kysela committed
805 806
	};
	unsigned int tmp;
807 808
	unsigned short *p;
	unsigned int cscs;
Jaroslav Kysela's avatar
Jaroslav Kysela committed
809

810
	if (ice->eeprom.subvendor == VT1724_SUBDEVICE_AUREON51_SKY) {
Jaroslav Kysela's avatar
Jaroslav Kysela committed
811
		ice->num_total_dacs = 6;
Jaroslav Kysela's avatar
Jaroslav Kysela committed
812
		ice->num_total_adcs = 2;
813
	} else {
814
		/* aureon 7.1 and prodigy 7.1 */
Jaroslav Kysela's avatar
Jaroslav Kysela committed
815
		ice->num_total_dacs = 8;
Jaroslav Kysela's avatar
Jaroslav Kysela committed
816
		ice->num_total_adcs = 2;
817
	}
Jaroslav Kysela's avatar
Jaroslav Kysela committed
818 819

	/* to remeber the register values */
Jaroslav Kysela's avatar
Jaroslav Kysela committed
820
	ice->akm = kcalloc(1, sizeof(akm4xxx_t), GFP_KERNEL);
Jaroslav Kysela's avatar
Jaroslav Kysela committed
821 822 823 824
	if (! ice->akm)
		return -ENOMEM;
	ice->akm_codecs = 1;

825 826 827 828 829
	if (ice->eeprom.subvendor == VT1724_SUBDEVICE_PRODIGY71)
		cscs = PRODIGY_CS8415_CS;
	else
		cscs = AUREON_CS8415_CS;

Jaroslav Kysela's avatar
Jaroslav Kysela committed
830 831 832 833
	snd_ice1712_gpio_set_dir(ice, 0xbfffff); /* fix this for the time being */

	/* reset the wm codec as the SPI mode */
	snd_ice1712_save_gpio_status(ice);
834 835
	snd_ice1712_gpio_set_mask(ice, ~(AUREON_WM_RESET|AUREON_WM_CS|
					 cscs|AUREON_HP_SEL));
Jaroslav Kysela's avatar
Jaroslav Kysela committed
836 837 838 839
	tmp = snd_ice1712_gpio_read(ice);
	tmp &= ~AUREON_WM_RESET;
	snd_ice1712_gpio_write(ice, tmp);
	udelay(1);
840
	tmp |= AUREON_WM_CS | cscs;
Jaroslav Kysela's avatar
Jaroslav Kysela committed
841 842 843 844 845 846 847
	snd_ice1712_gpio_write(ice, tmp);
	udelay(1);
	tmp |= AUREON_WM_RESET;
	snd_ice1712_gpio_write(ice, tmp);
	udelay(1);

	/* initialize WM8770 codec */
848 849 850 851 852 853
	if (ice->eeprom.subvendor == VT1724_SUBDEVICE_PRODIGY71)
		p = wm_inits_prodigy;
	else
		p = wm_inits_aureon;
	for (; *p != (unsigned short)-1; p += 2)
		wm_put(ice, p[0], p[1]);
Jaroslav Kysela's avatar
Jaroslav Kysela committed
854 855

	/* initialize CS8415A codec */
856 857 858 859 860
	for (p = cs_inits; *p != (unsigned short)-1; p++)
		aureon_spi_write(ice, cscs,
				 *p | 0x200000, 24);

	aureon_set_headphone_amp(ice, 1);
Jaroslav Kysela's avatar
Jaroslav Kysela committed
861 862 863 864 865 866 867 868

	snd_ice1712_restore_gpio_status(ice);

	return 0;
}


/*
Jaroslav Kysela's avatar
Jaroslav Kysela committed
869
 * Aureon boards don't provide the EEPROM data except for the vendor IDs.
Jaroslav Kysela's avatar
Jaroslav Kysela committed
870 871 872 873
 * hence the driver needs to sets up it properly.
 */

static unsigned char aureon51_eeprom[] __devinitdata = {
Jaroslav Kysela's avatar
Jaroslav Kysela committed
874
	0x0a,	/* SYSCONF: clock 512, spdif-in/ADC, 3DACs */
Jaroslav Kysela's avatar
Jaroslav Kysela committed
875 876
	0x80,	/* ACLINK: I2S */
	0xf8,	/* I2S: vol, 96k, 24bit, 192k */
Jaroslav Kysela's avatar
Jaroslav Kysela committed
877
	0xc3,	/* SPDIF: out-en, out-int, spdif-in */
Jaroslav Kysela's avatar
Jaroslav Kysela committed
878 879 880 881 882 883 884 885 886 887 888 889
	0xff,	/* GPIO_DIR */
	0xff,	/* GPIO_DIR1 */
	0xbf,	/* GPIO_DIR2 */
	0xff,	/* GPIO_MASK */
	0xff,	/* GPIO_MASK1 */
	0xff,	/* GPIO_MASK2 */
	0x00,	/* GPIO_STATE */
	0x00,	/* GPIO_STATE1 */
	0x00,	/* GPIO_STATE2 */
};

static unsigned char aureon71_eeprom[] __devinitdata = {
Jaroslav Kysela's avatar
Jaroslav Kysela committed
890
	0x0b,	/* SYSCONF: clock 512, spdif-in/ADC, 4DACs */
891 892 893 894 895 896 897 898 899 900 901 902 903 904 905
	0x80,	/* ACLINK: I2S */
	0xf8,	/* I2S: vol, 96k, 24bit, 192k */
	0xc3,	/* SPDIF: out-en, out-int, spdif-in */
	0xff,	/* GPIO_DIR */
	0xff,	/* GPIO_DIR1 */
	0xbf,	/* GPIO_DIR2 */
	0x00,	/* GPIO_MASK */
	0x00,	/* GPIO_MASK1 */
	0x00,	/* GPIO_MASK2 */
	0x00,	/* GPIO_STATE */
	0x00,	/* GPIO_STATE1 */
	0x00,	/* GPIO_STATE2 */
};

static unsigned char prodigy71_eeprom[] __devinitdata = {
Jaroslav Kysela's avatar
Jaroslav Kysela committed
906
	0x0b,	/* SYSCONF: clock 512, spdif-in/ADC, 4DACs */
Jaroslav Kysela's avatar
Jaroslav Kysela committed
907 908
	0x80,	/* ACLINK: I2S */
	0xf8,	/* I2S: vol, 96k, 24bit, 192k */
Jaroslav Kysela's avatar
Jaroslav Kysela committed
909
	0xc3,	/* SPDIF: out-en, out-int, spdif-in */
Jaroslav Kysela's avatar
Jaroslav Kysela committed
910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925
	0xff,	/* GPIO_DIR */
	0xff,	/* GPIO_DIR1 */
	0xbf,	/* GPIO_DIR2 */
	0x00,	/* GPIO_MASK */
	0x00,	/* GPIO_MASK1 */
	0x00,	/* GPIO_MASK2 */
	0x00,	/* GPIO_STATE */
	0x00,	/* GPIO_STATE1 */
	0x00,	/* GPIO_STATE2 */
};

/* entry point */
struct snd_ice1712_card_info snd_vt1724_aureon_cards[] __devinitdata = {
	{
		.subvendor = VT1724_SUBDEVICE_AUREON51_SKY,
		.name = "Terratec Aureon 5.1-Sky",
926
		.model = "aureon51",
Jaroslav Kysela's avatar
Jaroslav Kysela committed
927 928 929 930
		.chip_init = aureon_init,
		.build_controls = aureon_add_controls,
		.eeprom_size = sizeof(aureon51_eeprom),
		.eeprom_data = aureon51_eeprom,
Jaroslav Kysela's avatar
Jaroslav Kysela committed
931
		.driver = "Aureon51",
Jaroslav Kysela's avatar
Jaroslav Kysela committed
932 933 934 935
	},
	{
		.subvendor = VT1724_SUBDEVICE_AUREON71_SPACE,
		.name = "Terratec Aureon 7.1-Space",
936
		.model = "aureon71",
Jaroslav Kysela's avatar
Jaroslav Kysela committed
937 938 939 940
		.chip_init = aureon_init,
		.build_controls = aureon_add_controls,
		.eeprom_size = sizeof(aureon71_eeprom),
		.eeprom_data = aureon71_eeprom,
Jaroslav Kysela's avatar
Jaroslav Kysela committed
941
		.driver = "Aureon71",
Jaroslav Kysela's avatar
Jaroslav Kysela committed
942
	},
943 944 945
 	{
 		.subvendor = VT1724_SUBDEVICE_AUREON71_UNIVERSE,
 		.name = "Terratec Aureon 7.1-Universe",
946
		/* model not needed - identical with 7.1-Space */
947 948 949 950
 		.chip_init = aureon_init,
 		.build_controls = aureon_add_controls,
 		.eeprom_size = sizeof(aureon71_eeprom),
 		.eeprom_data = aureon71_eeprom,
Jaroslav Kysela's avatar
Jaroslav Kysela committed
951
		.driver = "Aureon71",
952
	},
953 954 955 956 957 958 959 960
	{
		.subvendor = VT1724_SUBDEVICE_PRODIGY71,
		.name = "Audiotrak Prodigy 7.1",
		.model = "prodigy71",
		.chip_init = aureon_init,
		.build_controls = aureon_add_controls,
		.eeprom_size = sizeof(prodigy71_eeprom),
		.eeprom_data = prodigy71_eeprom,
Jaroslav Kysela's avatar
Jaroslav Kysela committed
961
		.driver = "Prodigy71", /* should be identical with Aureon71 */
962
	},
Jaroslav Kysela's avatar
Jaroslav Kysela committed
963 964
	{ } /* terminator */
};