aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci
diff options
context:
space:
mode:
Diffstat (limited to 'sound/pci')
-rw-r--r--sound/pci/emu10k1/emu10k1.c6
-rw-r--r--sound/pci/emu10k1/emu10k1_main.c25
2 files changed, 22 insertions, 9 deletions
diff --git a/sound/pci/emu10k1/emu10k1.c b/sound/pci/emu10k1/emu10k1.c
index 2f96b2fc74fb..b17142cabead 100644
--- a/sound/pci/emu10k1/emu10k1.c
+++ b/sound/pci/emu10k1/emu10k1.c
@@ -52,6 +52,7 @@ static int seq_ports[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 4};
52static int max_synth_voices[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 64}; 52static int max_synth_voices[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 64};
53static int max_buffer_size[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 128}; 53static int max_buffer_size[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 128};
54static int enable_ir[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 0}; 54static int enable_ir[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 0};
55static uint subsystem[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 0}; /* Force card subsystem model */
55 56
56module_param_array(index, int, NULL, 0444); 57module_param_array(index, int, NULL, 0444);
57MODULE_PARM_DESC(index, "Index value for the EMU10K1 soundcard."); 58MODULE_PARM_DESC(index, "Index value for the EMU10K1 soundcard.");
@@ -71,7 +72,8 @@ module_param_array(max_buffer_size, int, NULL, 0444);
71MODULE_PARM_DESC(max_buffer_size, "Maximum sample buffer size in MB."); 72MODULE_PARM_DESC(max_buffer_size, "Maximum sample buffer size in MB.");
72module_param_array(enable_ir, bool, NULL, 0444); 73module_param_array(enable_ir, bool, NULL, 0444);
73MODULE_PARM_DESC(enable_ir, "Enable IR."); 74MODULE_PARM_DESC(enable_ir, "Enable IR.");
74 75module_param_array(subsystem, uint, NULL, 0444);
76MODULE_PARM_DESC(subsystem, "Force card subsystem model.");
75/* 77/*
76 * Class 0401: 1102:0008 (rev 00) Subsystem: 1102:1001 -> Audigy2 Value Model:SB0400 78 * Class 0401: 1102:0008 (rev 00) Subsystem: 1102:1001 -> Audigy2 Value Model:SB0400
77 */ 79 */
@@ -122,7 +124,7 @@ static int __devinit snd_card_emu10k1_probe(struct pci_dev *pci,
122 max_buffer_size[dev] = 1024; 124 max_buffer_size[dev] = 1024;
123 if ((err = snd_emu10k1_create(card, pci, extin[dev], extout[dev], 125 if ((err = snd_emu10k1_create(card, pci, extin[dev], extout[dev],
124 (long)max_buffer_size[dev] * 1024 * 1024, 126 (long)max_buffer_size[dev] * 1024 * 1024,
125 enable_ir[dev], 127 enable_ir[dev], subsystem[dev],
126 &emu)) < 0) { 128 &emu)) < 0) {
127 snd_card_free(card); 129 snd_card_free(card);
128 return err; 130 return err;
diff --git a/sound/pci/emu10k1/emu10k1_main.c b/sound/pci/emu10k1/emu10k1_main.c
index 8bc9bc18c74b..4ced4b092539 100644
--- a/sound/pci/emu10k1/emu10k1_main.c
+++ b/sound/pci/emu10k1/emu10k1_main.c
@@ -832,6 +832,7 @@ int __devinit snd_emu10k1_create(snd_card_t * card,
832 unsigned short extout_mask, 832 unsigned short extout_mask,
833 long max_cache_bytes, 833 long max_cache_bytes,
834 int enable_ir, 834 int enable_ir,
835 uint subsystem,
835 emu10k1_t ** remu) 836 emu10k1_t ** remu)
836{ 837{
837 emu10k1_t *emu; 838 emu10k1_t *emu;
@@ -877,10 +878,16 @@ int __devinit snd_emu10k1_create(snd_card_t * card,
877 878
878 for (c = emu_chip_details; c->vendor; c++) { 879 for (c = emu_chip_details; c->vendor; c++) {
879 if (c->vendor == pci->vendor && c->device == pci->device) { 880 if (c->vendor == pci->vendor && c->device == pci->device) {
880 if (c->subsystem && c->subsystem != emu->serial) 881 if (subsystem) {
881 continue; 882 if (c->subsystem && (c->subsystem == subsystem) ) {
882 if (c->revision && c->revision != emu->revision) 883 break;
883 continue; 884 } else continue;
885 } else {
886 if (c->subsystem && (c->subsystem != emu->serial) )
887 continue;
888 if (c->revision && c->revision != emu->revision)
889 continue;
890 }
884 break; 891 break;
885 } 892 }
886 } 893 }
@@ -891,10 +898,14 @@ int __devinit snd_emu10k1_create(snd_card_t * card,
891 return -ENOENT; 898 return -ENOENT;
892 } 899 }
893 emu->card_capabilities = c; 900 emu->card_capabilities = c;
894 if (c->subsystem != 0) 901 if (c->subsystem && !subsystem)
895 snd_printdd("Sound card name=%s\n", c->name); 902 snd_printdd("Sound card name=%s\n", c->name);
896 else 903 else if (subsystem)
897 snd_printdd("Sound card name=%s, vendor=0x%x, device=0x%x, subsystem=0x%x\n", c->name, pci->vendor, pci->device, emu->serial); 904 snd_printdd("Sound card name=%s, vendor=0x%x, device=0x%x, subsystem=0x%x. Forced to subsytem=0x%x\n",
905 c->name, pci->vendor, pci->device, emu->serial, c->subsystem);
906 else
907 snd_printdd("Sound card name=%s, vendor=0x%x, device=0x%x, subsystem=0x%x.\n",
908 c->name, pci->vendor, pci->device, emu->serial);
898 909
899 if (!*card->id && c->id) { 910 if (!*card->id && c->id) {
900 int i, n = 0; 911 int i, n = 0;