diff options
author | Takashi Iwai <tiwai@suse.de> | 2008-02-04 06:34:59 -0500 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2008-04-24 06:00:07 -0400 |
commit | f339eb0f30e6598c1d3f91b01a3e634364fab7a2 (patch) | |
tree | 9bbbf418eccb19bc29ad829e11ed5e5adb1aa3e4 /sound/pci/ice1712 | |
parent | f12462c5224bf992f5ed4d37af4d42622f7d5934 (diff) |
[ALSA] ice1724 - Enable AK4114 support for Audiophile192
Fixed and enabled the support of AK4114 chip on Audiophile192.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/ice1712')
-rw-r--r-- | sound/pci/ice1712/revo.c | 26 |
1 files changed, 8 insertions, 18 deletions
diff --git a/sound/pci/ice1712/revo.c b/sound/pci/ice1712/revo.c index 301bf929acd9..1d3b1ebf9c9b 100644 --- a/sound/pci/ice1712/revo.c +++ b/sound/pci/ice1712/revo.c | |||
@@ -353,28 +353,20 @@ static struct snd_ak4xxx_private akm_ap192_priv __devinitdata = { | |||
353 | .cif = 0, | 353 | .cif = 0, |
354 | .data_mask = VT1724_REVO_CDOUT, | 354 | .data_mask = VT1724_REVO_CDOUT, |
355 | .clk_mask = VT1724_REVO_CCLK, | 355 | .clk_mask = VT1724_REVO_CCLK, |
356 | .cs_mask = VT1724_REVO_CS0 | VT1724_REVO_CS3, | 356 | .cs_mask = VT1724_REVO_CS0 | VT1724_REVO_CS1, |
357 | .cs_addr = VT1724_REVO_CS3, | 357 | .cs_addr = VT1724_REVO_CS1, |
358 | .cs_none = VT1724_REVO_CS0 | VT1724_REVO_CS3, | 358 | .cs_none = VT1724_REVO_CS0 | VT1724_REVO_CS1, |
359 | .add_flags = VT1724_REVO_CCLK, /* high at init */ | 359 | .add_flags = VT1724_REVO_CCLK, /* high at init */ |
360 | .mask_flags = 0, | 360 | .mask_flags = 0, |
361 | }; | 361 | }; |
362 | 362 | ||
363 | #if 0 | ||
364 | /* FIXME: ak4114 makes the sound much lower due to some confliction, | ||
365 | * so let's disable it right now... | ||
366 | */ | ||
367 | #define BUILD_AK4114_AP192 | ||
368 | #endif | ||
369 | |||
370 | #ifdef BUILD_AK4114_AP192 | ||
371 | /* AK4114 support on Audiophile 192 */ | 363 | /* AK4114 support on Audiophile 192 */ |
372 | /* CDTO (pin 32) -- GPIO2 pin 52 | 364 | /* CDTO (pin 32) -- GPIO2 pin 52 |
373 | * CDTI (pin 33) -- GPIO3 pin 53 (shared with AK4358) | 365 | * CDTI (pin 33) -- GPIO3 pin 53 (shared with AK4358) |
374 | * CCLK (pin 34) -- GPIO1 pin 51 (shared with AK4358) | 366 | * CCLK (pin 34) -- GPIO1 pin 51 (shared with AK4358) |
375 | * CSN (pin 35) -- GPIO7 pin 59 | 367 | * CSN (pin 35) -- GPIO7 pin 59 |
376 | */ | 368 | */ |
377 | #define AK4114_ADDR 0x00 | 369 | #define AK4114_ADDR 0x02 |
378 | 370 | ||
379 | static void write_data(struct snd_ice1712 *ice, unsigned int gpio, | 371 | static void write_data(struct snd_ice1712 *ice, unsigned int gpio, |
380 | unsigned int data, int idx) | 372 | unsigned int data, int idx) |
@@ -428,7 +420,7 @@ static unsigned int ap192_4wire_start(struct snd_ice1712 *ice) | |||
428 | tmp = snd_ice1712_gpio_read(ice); | 420 | tmp = snd_ice1712_gpio_read(ice); |
429 | tmp |= VT1724_REVO_CCLK; /* high at init */ | 421 | tmp |= VT1724_REVO_CCLK; /* high at init */ |
430 | tmp |= VT1724_REVO_CS0; | 422 | tmp |= VT1724_REVO_CS0; |
431 | tmp &= ~VT1724_REVO_CS3; | 423 | tmp &= ~VT1724_REVO_CS1; |
432 | snd_ice1712_gpio_write(ice, tmp); | 424 | snd_ice1712_gpio_write(ice, tmp); |
433 | udelay(1); | 425 | udelay(1); |
434 | return tmp; | 426 | return tmp; |
@@ -436,7 +428,7 @@ static unsigned int ap192_4wire_start(struct snd_ice1712 *ice) | |||
436 | 428 | ||
437 | static void ap192_4wire_finish(struct snd_ice1712 *ice, unsigned int tmp) | 429 | static void ap192_4wire_finish(struct snd_ice1712 *ice, unsigned int tmp) |
438 | { | 430 | { |
439 | tmp |= VT1724_REVO_CS3; | 431 | tmp |= VT1724_REVO_CS1; |
440 | tmp |= VT1724_REVO_CS0; | 432 | tmp |= VT1724_REVO_CS0; |
441 | snd_ice1712_gpio_write(ice, tmp); | 433 | snd_ice1712_gpio_write(ice, tmp); |
442 | udelay(1); | 434 | udelay(1); |
@@ -485,13 +477,13 @@ static int __devinit ap192_ak4114_init(struct snd_ice1712 *ice) | |||
485 | struct ak4114 *ak; | 477 | struct ak4114 *ak; |
486 | int err; | 478 | int err; |
487 | 479 | ||
488 | return snd_ak4114_create(ice->card, | 480 | err = snd_ak4114_create(ice->card, |
489 | ap192_ak4114_read, | 481 | ap192_ak4114_read, |
490 | ap192_ak4114_write, | 482 | ap192_ak4114_write, |
491 | ak4114_init_vals, ak4114_init_txcsb, | 483 | ak4114_init_vals, ak4114_init_txcsb, |
492 | ice, &ak); | 484 | ice, &ak); |
485 | return 0; /* error ignored; it's no fatal error */ | ||
493 | } | 486 | } |
494 | #endif /* BUILD_AK4114_AP192 */ | ||
495 | 487 | ||
496 | static int __devinit revo_init(struct snd_ice1712 *ice) | 488 | static int __devinit revo_init(struct snd_ice1712 *ice) |
497 | { | 489 | { |
@@ -588,11 +580,9 @@ static int __devinit revo_add_controls(struct snd_ice1712 *ice) | |||
588 | err = snd_ice1712_akm4xxx_build_controls(ice); | 580 | err = snd_ice1712_akm4xxx_build_controls(ice); |
589 | if (err < 0) | 581 | if (err < 0) |
590 | return err; | 582 | return err; |
591 | #ifdef BUILD_AK4114_AP192 | ||
592 | err = ap192_ak4114_init(ice); | 583 | err = ap192_ak4114_init(ice); |
593 | if (err < 0) | 584 | if (err < 0) |
594 | return err; | 585 | return err; |
595 | #endif | ||
596 | break; | 586 | break; |
597 | } | 587 | } |
598 | return 0; | 588 | return 0; |