diff options
author | Clemens Ladisch <clemens@ladisch.de> | 2011-01-10 10:37:19 -0500 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2011-01-10 10:47:28 -0500 |
commit | a4b1696916abc4a0b6b11fc4cc2cd52421a0c7ac (patch) | |
tree | 2ec939a722acc8ba14e10baaf049a59af69f0188 /sound/pci/oxygen/oxygen.c | |
parent | a1f80fcfd51c81960bb32601d9aa0acda9d62504 (diff) |
ALSA: oxygen: add some card names
Instead of the generic Oxygen, use the actual card name, if known.
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/oxygen/oxygen.c')
-rw-r--r-- | sound/pci/oxygen/oxygen.c | 24 |
1 files changed, 21 insertions, 3 deletions
diff --git a/sound/pci/oxygen/oxygen.c b/sound/pci/oxygen/oxygen.c index 22cbf3e67ac4..be264d33f9b5 100644 --- a/sound/pci/oxygen/oxygen.c +++ b/sound/pci/oxygen/oxygen.c | |||
@@ -84,10 +84,13 @@ MODULE_PARM_DESC(enable, "enable card"); | |||
84 | enum { | 84 | enum { |
85 | MODEL_CMEDIA_REF, | 85 | MODEL_CMEDIA_REF, |
86 | MODEL_MERIDIAN, | 86 | MODEL_MERIDIAN, |
87 | MODEL_MERIDIAN_2G, | ||
87 | MODEL_CLARO, | 88 | MODEL_CLARO, |
88 | MODEL_CLARO_HALO, | 89 | MODEL_CLARO_HALO, |
89 | MODEL_FANTASIA, | 90 | MODEL_FANTASIA, |
91 | MODEL_SERENADE, | ||
90 | MODEL_2CH_OUTPUT, | 92 | MODEL_2CH_OUTPUT, |
93 | MODEL_HG2PCI, | ||
91 | MODEL_XONAR_DG, | 94 | MODEL_XONAR_DG, |
92 | }; | 95 | }; |
93 | 96 | ||
@@ -107,15 +110,15 @@ static DEFINE_PCI_DEVICE_TABLE(oxygen_ids) = { | |||
107 | /* PCI 2.0 HD Audio */ | 110 | /* PCI 2.0 HD Audio */ |
108 | { OXYGEN_PCI_SUBID(0x13f6, 0x8782), .driver_data = MODEL_2CH_OUTPUT }, | 111 | { OXYGEN_PCI_SUBID(0x13f6, 0x8782), .driver_data = MODEL_2CH_OUTPUT }, |
109 | /* Kuroutoshikou CMI8787-HG2PCI */ | 112 | /* Kuroutoshikou CMI8787-HG2PCI */ |
110 | { OXYGEN_PCI_SUBID(0x13f6, 0xffff), .driver_data = MODEL_2CH_OUTPUT }, | 113 | { OXYGEN_PCI_SUBID(0x13f6, 0xffff), .driver_data = MODEL_HG2PCI }, |
111 | /* TempoTec HiFier Fantasia */ | 114 | /* TempoTec HiFier Fantasia */ |
112 | { OXYGEN_PCI_SUBID(0x14c3, 0x1710), .driver_data = MODEL_FANTASIA }, | 115 | { OXYGEN_PCI_SUBID(0x14c3, 0x1710), .driver_data = MODEL_FANTASIA }, |
113 | /* TempoTec HiFier Serenade */ | 116 | /* TempoTec HiFier Serenade */ |
114 | { OXYGEN_PCI_SUBID(0x14c3, 0x1711), .driver_data = MODEL_2CH_OUTPUT }, | 117 | { OXYGEN_PCI_SUBID(0x14c3, 0x1711), .driver_data = MODEL_SERENADE }, |
115 | /* AuzenTech X-Meridian */ | 118 | /* AuzenTech X-Meridian */ |
116 | { OXYGEN_PCI_SUBID(0x415a, 0x5431), .driver_data = MODEL_MERIDIAN }, | 119 | { OXYGEN_PCI_SUBID(0x415a, 0x5431), .driver_data = MODEL_MERIDIAN }, |
117 | /* AuzenTech X-Meridian 2G */ | 120 | /* AuzenTech X-Meridian 2G */ |
118 | { OXYGEN_PCI_SUBID(0x5431, 0x017a), .driver_data = MODEL_MERIDIAN }, | 121 | { OXYGEN_PCI_SUBID(0x5431, 0x017a), .driver_data = MODEL_MERIDIAN_2G }, |
119 | /* HT-Omega Claro */ | 122 | /* HT-Omega Claro */ |
120 | { OXYGEN_PCI_SUBID(0x7284, 0x9761), .driver_data = MODEL_CLARO }, | 123 | { OXYGEN_PCI_SUBID(0x7284, 0x9761), .driver_data = MODEL_CLARO }, |
121 | /* HT-Omega Claro halo */ | 124 | /* HT-Omega Claro halo */ |
@@ -669,9 +672,20 @@ static const struct oxygen_model model_generic = { | |||
669 | static int __devinit get_oxygen_model(struct oxygen *chip, | 672 | static int __devinit get_oxygen_model(struct oxygen *chip, |
670 | const struct pci_device_id *id) | 673 | const struct pci_device_id *id) |
671 | { | 674 | { |
675 | static const char *const names[] = { | ||
676 | [MODEL_MERIDIAN] = "AuzenTech X-Meridian", | ||
677 | [MODEL_MERIDIAN_2G] = "AuzenTech X-Meridian 2G", | ||
678 | [MODEL_CLARO] = "HT-Omega Claro", | ||
679 | [MODEL_CLARO_HALO] = "HT-Omega Claro halo", | ||
680 | [MODEL_FANTASIA] = "TempoTec HiFier Fantasia", | ||
681 | [MODEL_SERENADE] = "TempoTec HiFier Serenade", | ||
682 | [MODEL_HG2PCI] = "CMI8787-HG2PCI", | ||
683 | }; | ||
684 | |||
672 | chip->model = model_generic; | 685 | chip->model = model_generic; |
673 | switch (id->driver_data) { | 686 | switch (id->driver_data) { |
674 | case MODEL_MERIDIAN: | 687 | case MODEL_MERIDIAN: |
688 | case MODEL_MERIDIAN_2G: | ||
675 | chip->model.init = meridian_init; | 689 | chip->model.init = meridian_init; |
676 | chip->model.mixer_init = meridian_mixer_init; | 690 | chip->model.mixer_init = meridian_mixer_init; |
677 | chip->model.resume = meridian_resume; | 691 | chip->model.resume = meridian_resume; |
@@ -702,7 +716,9 @@ static int __devinit get_oxygen_model(struct oxygen *chip, | |||
702 | CAPTURE_1_FROM_SPDIF; | 716 | CAPTURE_1_FROM_SPDIF; |
703 | break; | 717 | break; |
704 | case MODEL_FANTASIA: | 718 | case MODEL_FANTASIA: |
719 | case MODEL_SERENADE: | ||
705 | case MODEL_2CH_OUTPUT: | 720 | case MODEL_2CH_OUTPUT: |
721 | case MODEL_HG2PCI: | ||
706 | chip->model.shortname = "C-Media CMI8787"; | 722 | chip->model.shortname = "C-Media CMI8787"; |
707 | chip->model.chip = "CMI8787"; | 723 | chip->model.chip = "CMI8787"; |
708 | if (id->driver_data == MODEL_FANTASIA) | 724 | if (id->driver_data == MODEL_FANTASIA) |
@@ -731,6 +747,8 @@ static int __devinit get_oxygen_model(struct oxygen *chip, | |||
731 | chip->model.misc_flags = OXYGEN_MISC_MIDI; | 747 | chip->model.misc_flags = OXYGEN_MISC_MIDI; |
732 | chip->model.device_config |= MIDI_OUTPUT | MIDI_INPUT; | 748 | chip->model.device_config |= MIDI_OUTPUT | MIDI_INPUT; |
733 | } | 749 | } |
750 | if (id->driver_data < ARRAY_SIZE(names) && names[id->driver_data]) | ||
751 | chip->model.shortname = names[id->driver_data]; | ||
734 | return 0; | 752 | return 0; |
735 | } | 753 | } |
736 | 754 | ||