aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/emu10k1/emu10k1_main.c
diff options
context:
space:
mode:
authorJames Courtier-Dutton <James@superbug.co.uk>2005-07-06 16:21:51 -0400
committerJaroslav Kysela <perex@suse.cz>2005-07-28 06:22:00 -0400
commite66bc8b2a7d85166935a2da651b94efb9e7a2f11 (patch)
treecedf246b40a32ff25934f6f060eed44fc7e7b6f7 /sound/pci/emu10k1/emu10k1_main.c
parent2201987c562f7c810440d399ef7a85fe79be01e7 (diff)
[ALSA] emu10k1: Add module option uint subsystem.
EMU10K1/EMU10K2 driver It allows the user to force the snd-emu10k1 module to think the user has a particular sound card. Useful if their particular sound card is not yet recognised. Signed-off-by: James Courtier-Dutton <James@superbug.co.uk>
Diffstat (limited to 'sound/pci/emu10k1/emu10k1_main.c')
-rw-r--r--sound/pci/emu10k1/emu10k1_main.c25
1 files changed, 18 insertions, 7 deletions
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;