aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/ctxfi
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2009-06-08 12:29:38 -0400
committerTakashi Iwai <tiwai@suse.de>2009-06-08 12:30:37 -0400
commit09521d2e3edd0bf02b66e5b8c13f1559f2d6958a (patch)
treebc42e16c5ca59e4113171256b625f3de397a5d9f /sound/pci/ctxfi
parent9470195a9cd13e6d90221b8b5d897e9232da8d28 (diff)
ALSA: ctxfi - Fix wrong model id for UAA
CTUAA should be checked instead of CTHENDRIX. The latter is for 20k2 chip. Also, fixed the detection of UAA/HENDRIX models by fixing the mask bits. Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/ctxfi')
-rw-r--r--sound/pci/ctxfi/ctatc.c9
-rw-r--r--sound/pci/ctxfi/cthw20k1.c10
2 files changed, 10 insertions, 9 deletions
diff --git a/sound/pci/ctxfi/ctatc.c b/sound/pci/ctxfi/ctatc.c
index 002a70e0b13a..4e25b24848bd 100644
--- a/sound/pci/ctxfi/ctatc.c
+++ b/sound/pci/ctxfi/ctatc.c
@@ -44,8 +44,8 @@ static struct snd_pci_quirk __devinitdata subsys_20k1_list[] = {
44 SND_PCI_QUIRK(PCI_VENDOR_ID_CREATIVE, 0x002f, "SB055x", CTSB055X), 44 SND_PCI_QUIRK(PCI_VENDOR_ID_CREATIVE, 0x002f, "SB055x", CTSB055X),
45 SND_PCI_QUIRK(PCI_VENDOR_ID_CREATIVE, 0x0029, "SB073x", CTSB073X), 45 SND_PCI_QUIRK(PCI_VENDOR_ID_CREATIVE, 0x0029, "SB073x", CTSB073X),
46 SND_PCI_QUIRK(PCI_VENDOR_ID_CREATIVE, 0x0031, "SB073x", CTSB073X), 46 SND_PCI_QUIRK(PCI_VENDOR_ID_CREATIVE, 0x0031, "SB073x", CTSB073X),
47 SND_PCI_QUIRK_MASK(PCI_VENDOR_ID_CREATIVE, 0x6000, 47 SND_PCI_QUIRK_MASK(PCI_VENDOR_ID_CREATIVE, 0xf000, 0x6000,
48 PCI_SUBDEVICE_ID_CREATIVE_HENDRIX, "UAA", CTUAA), 48 "UAA", CTUAA),
49 SND_PCI_QUIRK_VENDOR(PCI_VENDOR_ID_CREATIVE, 49 SND_PCI_QUIRK_VENDOR(PCI_VENDOR_ID_CREATIVE,
50 "Unknown", CT20K1_UNKNOWN), 50 "Unknown", CT20K1_UNKNOWN),
51 { } /* terminator */ 51 { } /* terminator */
@@ -60,8 +60,9 @@ static struct snd_pci_quirk __devinitdata subsys_20k2_list[] = {
60 "SB0880", CTSB0880), 60 "SB0880", CTSB0880),
61 SND_PCI_QUIRK(PCI_VENDOR_ID_CREATIVE, PCI_SUBDEVICE_ID_CREATIVE_SB08803, 61 SND_PCI_QUIRK(PCI_VENDOR_ID_CREATIVE, PCI_SUBDEVICE_ID_CREATIVE_SB08803,
62 "SB0880", CTSB0880), 62 "SB0880", CTSB0880),
63 SND_PCI_QUIRK_MASK(PCI_VENDOR_ID_CREATIVE, 0x6000, 63 SND_PCI_QUIRK_MASK(PCI_VENDOR_ID_CREATIVE, 0xf000,
64 PCI_SUBDEVICE_ID_CREATIVE_HENDRIX, "UAA", CTHENDRIX), 64 PCI_SUBDEVICE_ID_CREATIVE_HENDRIX, "HENDRIX",
65 CTHENDRIX),
65 { } /* terminator */ 66 { } /* terminator */
66}; 67};
67 68
diff --git a/sound/pci/ctxfi/cthw20k1.c b/sound/pci/ctxfi/cthw20k1.c
index 5d58650beb73..cb69d9ddfbe3 100644
--- a/sound/pci/ctxfi/cthw20k1.c
+++ b/sound/pci/ctxfi/cthw20k1.c
@@ -1541,7 +1541,7 @@ static int hw_is_adc_input_selected(struct hw *hw, enum ADCSRC type)
1541 return is_adc_input_selected_SB055x(hw, type); 1541 return is_adc_input_selected_SB055x(hw, type);
1542 case CTSB073X: 1542 case CTSB073X:
1543 return is_adc_input_selected_hendrix(hw, type); 1543 return is_adc_input_selected_hendrix(hw, type);
1544 case CTHENDRIX: 1544 case CTUAA:
1545 return is_adc_input_selected_hendrix(hw, type); 1545 return is_adc_input_selected_hendrix(hw, type);
1546 default: 1546 default:
1547 return is_adc_input_selected_SBx(hw, type); 1547 return is_adc_input_selected_SBx(hw, type);
@@ -1692,7 +1692,7 @@ static int hw_adc_input_select(struct hw *hw, enum ADCSRC type)
1692 return adc_input_select_SB055x(hw, type, state); 1692 return adc_input_select_SB055x(hw, type, state);
1693 case CTSB073X: 1693 case CTSB073X:
1694 return adc_input_select_hendrix(hw, type, state); 1694 return adc_input_select_hendrix(hw, type, state);
1695 case CTHENDRIX: 1695 case CTUAA:
1696 return adc_input_select_hendrix(hw, type, state); 1696 return adc_input_select_hendrix(hw, type, state);
1697 default: 1697 default:
1698 return adc_input_select_SBx(hw, type, state); 1698 return adc_input_select_SBx(hw, type, state);
@@ -1780,7 +1780,7 @@ static int hw_adc_init(struct hw *hw, const struct adc_conf *info)
1780static int hw_have_digit_io_switch(struct hw *hw) 1780static int hw_have_digit_io_switch(struct hw *hw)
1781{ 1781{
1782 /* SB073x and Vista compatible cards have no digit IO switch */ 1782 /* SB073x and Vista compatible cards have no digit IO switch */
1783 return !(hw->model == CTSB073X || hw->model == CTHENDRIX); 1783 return !(hw->model == CTSB073X || hw->model == CTUAA);
1784} 1784}
1785 1785
1786#define CTLBITS(a, b, c, d) (((a) << 24) | ((b) << 16) | ((c) << 8) | (d)) 1786#define CTLBITS(a, b, c, d) (((a) << 24) | ((b) << 16) | ((c) << 8) | (d))
@@ -1916,7 +1916,7 @@ static int hw_card_start(struct hw *hw)
1916 goto error1; 1916 goto error1;
1917 1917
1918 /* Switch to X-Fi mode from UAA mode if neeeded */ 1918 /* Switch to X-Fi mode from UAA mode if neeeded */
1919 if (hw->model == CTHENDRIX) { 1919 if (hw->model == CTUAA) {
1920 err = uaa_to_xfi(pci); 1920 err = uaa_to_xfi(pci);
1921 if (err) 1921 if (err)
1922 goto error2; 1922 goto error2;
@@ -2027,7 +2027,7 @@ static int hw_card_init(struct hw *hw, struct card_conf *info)
2027 case CTSB073X: 2027 case CTSB073X:
2028 hw_write_20kx(hw, GPIOCTL, 0x00e6); 2028 hw_write_20kx(hw, GPIOCTL, 0x00e6);
2029 break; 2029 break;
2030 case CTHENDRIX: /* Vista compatible cards */ 2030 case CTUAA:
2031 hw_write_20kx(hw, GPIOCTL, 0x00c2); 2031 hw_write_20kx(hw, GPIOCTL, 0x00c2);
2032 break; 2032 break;
2033 default: 2033 default: