diff options
Diffstat (limited to 'sound/pci/ice1712/delta.c')
-rw-r--r-- | sound/pci/ice1712/delta.c | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/sound/pci/ice1712/delta.c b/sound/pci/ice1712/delta.c index efd180b40e56..0ed96c178059 100644 --- a/sound/pci/ice1712/delta.c +++ b/sound/pci/ice1712/delta.c | |||
@@ -1,8 +1,8 @@ | |||
1 | /* | 1 | /* |
2 | * ALSA driver for ICEnsemble ICE1712 (Envy24) | 2 | * ALSA driver for ICEnsemble ICE1712 (Envy24) |
3 | * | 3 | * |
4 | * Lowlevel functions for M-Audio Delta 1010, 44, 66, Dio2496, Audiophile | 4 | * Lowlevel functions for M-Audio Delta 1010, 1010E, 44, 66, 66E, Dio2496, |
5 | * Digigram VX442 | 5 | * Audiophile, Digigram VX442 |
6 | * | 6 | * |
7 | * Copyright (c) 2000 Jaroslav Kysela <perex@perex.cz> | 7 | * Copyright (c) 2000 Jaroslav Kysela <perex@perex.cz> |
8 | * | 8 | * |
@@ -86,6 +86,7 @@ static unsigned char ap_cs8427_codec_select(struct snd_ice1712 *ice) | |||
86 | unsigned char tmp; | 86 | unsigned char tmp; |
87 | tmp = snd_ice1712_read(ice, ICE1712_IREG_GPIO_DATA); | 87 | tmp = snd_ice1712_read(ice, ICE1712_IREG_GPIO_DATA); |
88 | switch (ice->eeprom.subvendor) { | 88 | switch (ice->eeprom.subvendor) { |
89 | case ICE1712_SUBDEVICE_DELTA1010E: | ||
89 | case ICE1712_SUBDEVICE_DELTA1010LT: | 90 | case ICE1712_SUBDEVICE_DELTA1010LT: |
90 | tmp &= ~ICE1712_DELTA_1010LT_CS; | 91 | tmp &= ~ICE1712_DELTA_1010LT_CS; |
91 | tmp |= ICE1712_DELTA_1010LT_CCLK | ICE1712_DELTA_1010LT_CS_CS8427; | 92 | tmp |= ICE1712_DELTA_1010LT_CCLK | ICE1712_DELTA_1010LT_CS_CS8427; |
@@ -109,6 +110,7 @@ static unsigned char ap_cs8427_codec_select(struct snd_ice1712 *ice) | |||
109 | static void ap_cs8427_codec_deassert(struct snd_ice1712 *ice, unsigned char tmp) | 110 | static void ap_cs8427_codec_deassert(struct snd_ice1712 *ice, unsigned char tmp) |
110 | { | 111 | { |
111 | switch (ice->eeprom.subvendor) { | 112 | switch (ice->eeprom.subvendor) { |
113 | case ICE1712_SUBDEVICE_DELTA1010E: | ||
112 | case ICE1712_SUBDEVICE_DELTA1010LT: | 114 | case ICE1712_SUBDEVICE_DELTA1010LT: |
113 | tmp &= ~ICE1712_DELTA_1010LT_CS; | 115 | tmp &= ~ICE1712_DELTA_1010LT_CS; |
114 | tmp |= ICE1712_DELTA_1010LT_CS_NONE; | 116 | tmp |= ICE1712_DELTA_1010LT_CS_NONE; |
@@ -534,6 +536,14 @@ static int __devinit snd_ice1712_delta_init(struct snd_ice1712 *ice) | |||
534 | int err; | 536 | int err; |
535 | struct snd_akm4xxx *ak; | 537 | struct snd_akm4xxx *ak; |
536 | 538 | ||
539 | if (ice->eeprom.subvendor == ICE1712_SUBDEVICE_DELTA1010 && | ||
540 | ice->eeprom.gpiodir == 0x7b) | ||
541 | ice->eeprom.subvendor = ICE1712_SUBDEVICE_DELTA1010E; | ||
542 | |||
543 | if (ice->eeprom.subvendor == ICE1712_SUBDEVICE_DELTA66 && | ||
544 | ice->eeprom.gpiodir == 0xfb) | ||
545 | ice->eeprom.subvendor = ICE1712_SUBDEVICE_DELTA66E; | ||
546 | |||
537 | /* determine I2C, DACs and ADCs */ | 547 | /* determine I2C, DACs and ADCs */ |
538 | switch (ice->eeprom.subvendor) { | 548 | switch (ice->eeprom.subvendor) { |
539 | case ICE1712_SUBDEVICE_AUDIOPHILE: | 549 | case ICE1712_SUBDEVICE_AUDIOPHILE: |
@@ -550,6 +560,7 @@ static int __devinit snd_ice1712_delta_init(struct snd_ice1712 *ice) | |||
550 | ice->num_total_adcs = ice->omni ? 8 : 4; | 560 | ice->num_total_adcs = ice->omni ? 8 : 4; |
551 | break; | 561 | break; |
552 | case ICE1712_SUBDEVICE_DELTA1010: | 562 | case ICE1712_SUBDEVICE_DELTA1010: |
563 | case ICE1712_SUBDEVICE_DELTA1010E: | ||
553 | case ICE1712_SUBDEVICE_DELTA1010LT: | 564 | case ICE1712_SUBDEVICE_DELTA1010LT: |
554 | case ICE1712_SUBDEVICE_MEDIASTATION: | 565 | case ICE1712_SUBDEVICE_MEDIASTATION: |
555 | ice->num_total_dacs = 8; | 566 | ice->num_total_dacs = 8; |
@@ -559,6 +570,7 @@ static int __devinit snd_ice1712_delta_init(struct snd_ice1712 *ice) | |||
559 | ice->num_total_dacs = 4; /* two AK4324 codecs */ | 570 | ice->num_total_dacs = 4; /* two AK4324 codecs */ |
560 | break; | 571 | break; |
561 | case ICE1712_SUBDEVICE_VX442: | 572 | case ICE1712_SUBDEVICE_VX442: |
573 | case ICE1712_SUBDEVICE_DELTA66E: /* omni not suported yet */ | ||
562 | ice->num_total_dacs = 4; | 574 | ice->num_total_dacs = 4; |
563 | ice->num_total_adcs = 4; | 575 | ice->num_total_adcs = 4; |
564 | break; | 576 | break; |
@@ -568,8 +580,10 @@ static int __devinit snd_ice1712_delta_init(struct snd_ice1712 *ice) | |||
568 | switch (ice->eeprom.subvendor) { | 580 | switch (ice->eeprom.subvendor) { |
569 | case ICE1712_SUBDEVICE_AUDIOPHILE: | 581 | case ICE1712_SUBDEVICE_AUDIOPHILE: |
570 | case ICE1712_SUBDEVICE_DELTA410: | 582 | case ICE1712_SUBDEVICE_DELTA410: |
583 | case ICE1712_SUBDEVICE_DELTA1010E: | ||
571 | case ICE1712_SUBDEVICE_DELTA1010LT: | 584 | case ICE1712_SUBDEVICE_DELTA1010LT: |
572 | case ICE1712_SUBDEVICE_VX442: | 585 | case ICE1712_SUBDEVICE_VX442: |
586 | case ICE1712_SUBDEVICE_DELTA66E: | ||
573 | if ((err = snd_i2c_bus_create(ice->card, "ICE1712 GPIO 1", NULL, &ice->i2c)) < 0) { | 587 | if ((err = snd_i2c_bus_create(ice->card, "ICE1712 GPIO 1", NULL, &ice->i2c)) < 0) { |
574 | snd_printk(KERN_ERR "unable to create I2C bus\n"); | 588 | snd_printk(KERN_ERR "unable to create I2C bus\n"); |
575 | return err; | 589 | return err; |
@@ -601,6 +615,7 @@ static int __devinit snd_ice1712_delta_init(struct snd_ice1712 *ice) | |||
601 | /* no analog? */ | 615 | /* no analog? */ |
602 | switch (ice->eeprom.subvendor) { | 616 | switch (ice->eeprom.subvendor) { |
603 | case ICE1712_SUBDEVICE_DELTA1010: | 617 | case ICE1712_SUBDEVICE_DELTA1010: |
618 | case ICE1712_SUBDEVICE_DELTA1010E: | ||
604 | case ICE1712_SUBDEVICE_DELTADIO2496: | 619 | case ICE1712_SUBDEVICE_DELTADIO2496: |
605 | case ICE1712_SUBDEVICE_MEDIASTATION: | 620 | case ICE1712_SUBDEVICE_MEDIASTATION: |
606 | return 0; | 621 | return 0; |
@@ -627,6 +642,7 @@ static int __devinit snd_ice1712_delta_init(struct snd_ice1712 *ice) | |||
627 | err = snd_ice1712_akm4xxx_init(ak, &akm_delta44, &akm_delta44_priv, ice); | 642 | err = snd_ice1712_akm4xxx_init(ak, &akm_delta44, &akm_delta44_priv, ice); |
628 | break; | 643 | break; |
629 | case ICE1712_SUBDEVICE_VX442: | 644 | case ICE1712_SUBDEVICE_VX442: |
645 | case ICE1712_SUBDEVICE_DELTA66E: | ||
630 | err = snd_ice1712_akm4xxx_init(ak, &akm_vx442, &akm_vx442_priv, ice); | 646 | err = snd_ice1712_akm4xxx_init(ak, &akm_vx442, &akm_vx442_priv, ice); |
631 | break; | 647 | break; |
632 | default: | 648 | default: |
@@ -674,6 +690,7 @@ static int __devinit snd_ice1712_delta_add_controls(struct snd_ice1712 *ice) | |||
674 | if (err < 0) | 690 | if (err < 0) |
675 | return err; | 691 | return err; |
676 | break; | 692 | break; |
693 | case ICE1712_SUBDEVICE_DELTA1010E: | ||
677 | case ICE1712_SUBDEVICE_DELTA1010LT: | 694 | case ICE1712_SUBDEVICE_DELTA1010LT: |
678 | err = snd_ctl_add(ice->card, snd_ctl_new1(&snd_ice1712_delta1010lt_wordclock_select, ice)); | 695 | err = snd_ctl_add(ice->card, snd_ctl_new1(&snd_ice1712_delta1010lt_wordclock_select, ice)); |
679 | if (err < 0) | 696 | if (err < 0) |
@@ -716,6 +733,7 @@ static int __devinit snd_ice1712_delta_add_controls(struct snd_ice1712 *ice) | |||
716 | case ICE1712_SUBDEVICE_DELTA44: | 733 | case ICE1712_SUBDEVICE_DELTA44: |
717 | case ICE1712_SUBDEVICE_DELTA66: | 734 | case ICE1712_SUBDEVICE_DELTA66: |
718 | case ICE1712_SUBDEVICE_VX442: | 735 | case ICE1712_SUBDEVICE_VX442: |
736 | case ICE1712_SUBDEVICE_DELTA66E: | ||
719 | err = snd_ice1712_akm4xxx_build_controls(ice); | 737 | err = snd_ice1712_akm4xxx_build_controls(ice); |
720 | if (err < 0) | 738 | if (err < 0) |
721 | return err; | 739 | return err; |