diff options
author | Takashi Iwai <tiwai@suse.de> | 2007-12-21 10:33:32 -0500 |
---|---|---|
committer | Mercurial server <hg@alsa0.alsa-project.org> | 2008-01-31 11:30:24 -0500 |
commit | 3839e4f136d6da3dc85d237aa9569ee94bfea763 (patch) | |
tree | c000a5a87e22c22890c24b8eb4f1fee861bbd79a /sound/pci/emu10k1/emu10k1_main.c | |
parent | 88aa139057f2740c5dd55e2a542b2425186e4d3c (diff) |
[ALSA] emu10k1 - Use enum for emu_model types
Use enum instead of digits for emu_model types.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Diffstat (limited to 'sound/pci/emu10k1/emu10k1_main.c')
-rw-r--r-- | sound/pci/emu10k1/emu10k1_main.c | 29 |
1 files changed, 16 insertions, 13 deletions
diff --git a/sound/pci/emu10k1/emu10k1_main.c b/sound/pci/emu10k1/emu10k1_main.c index 54b978e74f58..7e46325974a5 100644 --- a/sound/pci/emu10k1/emu10k1_main.c +++ b/sound/pci/emu10k1/emu10k1_main.c | |||
@@ -725,15 +725,18 @@ int emu1010_firmware_thread(void *data) { | |||
725 | /* Return to Audio Dock programming mode */ | 725 | /* Return to Audio Dock programming mode */ |
726 | snd_printk(KERN_INFO "emu1010: Loading Audio Dock Firmware\n"); | 726 | snd_printk(KERN_INFO "emu1010: Loading Audio Dock Firmware\n"); |
727 | snd_emu1010_fpga_write(emu, EMU_HANA_FPGA_CONFIG, EMU_HANA_FPGA_CONFIG_AUDIODOCK ); | 727 | snd_emu1010_fpga_write(emu, EMU_HANA_FPGA_CONFIG, EMU_HANA_FPGA_CONFIG_AUDIODOCK ); |
728 | if (emu->card_capabilities->emu_model == 1) { | 728 | if (emu->card_capabilities->emu_model == |
729 | EMU_MODEL_EMU1010) { | ||
729 | if ((err = snd_emu1010_load_firmware(emu, DOCK_FILENAME)) != 0) { | 730 | if ((err = snd_emu1010_load_firmware(emu, DOCK_FILENAME)) != 0) { |
730 | continue; | 731 | continue; |
731 | } | 732 | } |
732 | } else if (emu->card_capabilities->emu_model == 2) { | 733 | } else if (emu->card_capabilities->emu_model == |
734 | EMU_MODEL_EMU1010B) { | ||
733 | if ((err = snd_emu1010_load_firmware(emu, MICRO_DOCK_FILENAME)) != 0) { | 735 | if ((err = snd_emu1010_load_firmware(emu, MICRO_DOCK_FILENAME)) != 0) { |
734 | continue; | 736 | continue; |
735 | } | 737 | } |
736 | } else if (emu->card_capabilities->emu_model == 3) { | 738 | } else if (emu->card_capabilities->emu_model == |
739 | EMU_MODEL_EMU1616) { | ||
737 | if ((err = snd_emu1010_load_firmware(emu, MICRO_DOCK_FILENAME)) != 0) { | 740 | if ((err = snd_emu1010_load_firmware(emu, MICRO_DOCK_FILENAME)) != 0) { |
738 | continue; | 741 | continue; |
739 | } | 742 | } |
@@ -845,16 +848,16 @@ static int snd_emu10k1_emu1010_init(struct snd_emu10k1 * emu) | |||
845 | } | 848 | } |
846 | snd_printk(KERN_INFO "emu1010: EMU_HANA_ID=0x%x\n",reg); | 849 | snd_printk(KERN_INFO "emu1010: EMU_HANA_ID=0x%x\n",reg); |
847 | switch (emu->card_capabilities->emu_model) { | 850 | switch (emu->card_capabilities->emu_model) { |
848 | case 1: | 851 | case EMU_MODEL_EMU1010: |
849 | filename = HANA_FILENAME; | 852 | filename = HANA_FILENAME; |
850 | break; | 853 | break; |
851 | case 2: | 854 | case EMU_MODEL_EMU1010B: |
852 | filename = EMU1010B_FILENAME; | 855 | filename = EMU1010B_FILENAME; |
853 | break; | 856 | break; |
854 | case 3: | 857 | case EMU_MODEL_EMU1616: |
855 | filename = EMU1010_NOTEBOOK_FILENAME; | 858 | filename = EMU1010_NOTEBOOK_FILENAME; |
856 | break; | 859 | break; |
857 | case 4: | 860 | case EMU_MODEL_EMU0404: |
858 | filename = EMU0404_FILENAME; | 861 | filename = EMU0404_FILENAME; |
859 | break; | 862 | break; |
860 | default: | 863 | default: |
@@ -1103,7 +1106,7 @@ static int snd_emu10k1_emu1010_init(struct snd_emu10k1 * emu) | |||
1103 | EMU_DST_HANA_SPDIF_RIGHT1, EMU_SRC_ALICE_EMU32A + 3); /* ALICE2 bus 0xb3 */ | 1106 | EMU_DST_HANA_SPDIF_RIGHT1, EMU_SRC_ALICE_EMU32A + 3); /* ALICE2 bus 0xb3 */ |
1104 | #endif | 1107 | #endif |
1105 | /* Default outputs */ | 1108 | /* Default outputs */ |
1106 | if (emu->card_capabilities->emu_model == 3) { | 1109 | if (emu->card_capabilities->emu_model == EMU_MODEL_EMU1616) { |
1107 | /* 1616(M) cardbus default outputs */ | 1110 | /* 1616(M) cardbus default outputs */ |
1108 | /* ALICE2 bus 0xa0 */ | 1111 | /* ALICE2 bus 0xa0 */ |
1109 | snd_emu1010_fpga_link_dst_src_write(emu, | 1112 | snd_emu1010_fpga_link_dst_src_write(emu, |
@@ -1250,7 +1253,7 @@ static int snd_emu10k1_free(struct snd_emu10k1 *emu) | |||
1250 | } | 1253 | } |
1251 | snd_emu10k1_free_efx(emu); | 1254 | snd_emu10k1_free_efx(emu); |
1252 | } | 1255 | } |
1253 | if (emu->card_capabilities->emu_model == 1) { | 1256 | if (emu->card_capabilities->emu_model == EMU_MODEL_EMU1010) { |
1254 | /* Disable 48Volt power to Audio Dock */ | 1257 | /* Disable 48Volt power to Audio Dock */ |
1255 | snd_emu1010_fpga_write(emu, EMU_HANA_DOCK_PWR, 0 ); | 1258 | snd_emu1010_fpga_write(emu, EMU_HANA_DOCK_PWR, 0 ); |
1256 | } | 1259 | } |
@@ -1394,7 +1397,7 @@ static struct snd_emu_chip_details emu_chip_details[] = { | |||
1394 | .emu10k2_chip = 1, | 1397 | .emu10k2_chip = 1, |
1395 | .ca0102_chip = 1, | 1398 | .ca0102_chip = 1, |
1396 | .spk71 = 1, | 1399 | .spk71 = 1, |
1397 | .emu_model = 4} , /* EMU 0404 */ | 1400 | .emu_model = EMU_MODEL_EMU0404} , /* EMU 0404 */ |
1398 | /* Tested by James@superbug.co.uk 4th Nov 2007. */ | 1401 | /* Tested by James@superbug.co.uk 4th Nov 2007. */ |
1399 | {.vendor = 0x1102, .device = 0x0008, .subsystem = 0x42011102, | 1402 | {.vendor = 0x1102, .device = 0x0008, .subsystem = 0x42011102, |
1400 | .driver = "Audigy2", .name = "E-mu 1010 Notebook [MAEM8950]", | 1403 | .driver = "Audigy2", .name = "E-mu 1010 Notebook [MAEM8950]", |
@@ -1403,7 +1406,7 @@ static struct snd_emu_chip_details emu_chip_details[] = { | |||
1403 | .ca0108_chip = 1, | 1406 | .ca0108_chip = 1, |
1404 | .ca_cardbus_chip = 1, | 1407 | .ca_cardbus_chip = 1, |
1405 | .spk71 = 1 , | 1408 | .spk71 = 1 , |
1406 | .emu_model = 3} , | 1409 | .emu_model = EMU_MODEL_EMU1616}, |
1407 | /* Tested by James@superbug.co.uk 4th Nov 2007. */ | 1410 | /* Tested by James@superbug.co.uk 4th Nov 2007. */ |
1408 | {.vendor = 0x1102, .device = 0x0008, .subsystem = 0x40041102, | 1411 | {.vendor = 0x1102, .device = 0x0008, .subsystem = 0x40041102, |
1409 | .driver = "Audigy2", .name = "E-mu 1010b PCI [MAEM????]", | 1412 | .driver = "Audigy2", .name = "E-mu 1010b PCI [MAEM????]", |
@@ -1411,7 +1414,7 @@ static struct snd_emu_chip_details emu_chip_details[] = { | |||
1411 | .emu10k2_chip = 1, | 1414 | .emu10k2_chip = 1, |
1412 | .ca0108_chip = 1, | 1415 | .ca0108_chip = 1, |
1413 | .spk71 = 1, | 1416 | .spk71 = 1, |
1414 | .emu_model = 2} , | 1417 | .emu_model = EMU_MODEL_EMU1010B}, |
1415 | /* Tested by James@superbug.co.uk 8th July 2005. */ | 1418 | /* Tested by James@superbug.co.uk 8th July 2005. */ |
1416 | {.vendor = 0x1102, .device = 0x0004, .subsystem = 0x40011102, | 1419 | {.vendor = 0x1102, .device = 0x0004, .subsystem = 0x40011102, |
1417 | .driver = "Audigy2", .name = "E-mu 1010 [4001]", | 1420 | .driver = "Audigy2", .name = "E-mu 1010 [4001]", |
@@ -1419,7 +1422,7 @@ static struct snd_emu_chip_details emu_chip_details[] = { | |||
1419 | .emu10k2_chip = 1, | 1422 | .emu10k2_chip = 1, |
1420 | .ca0102_chip = 1, | 1423 | .ca0102_chip = 1, |
1421 | .spk71 = 1, | 1424 | .spk71 = 1, |
1422 | .emu_model = 1} , /* Emu 1010 */ | 1425 | .emu_model = EMU_MODEL_EMU1010} , /* Emu 1010 */ |
1423 | /* Audigy4 (Not PRO) SB0610 */ | 1426 | /* Audigy4 (Not PRO) SB0610 */ |
1424 | {.vendor = 0x1102, .device = 0x0008, | 1427 | {.vendor = 0x1102, .device = 0x0008, |
1425 | .driver = "Audigy2", .name = "Audigy 2 Value [Unknown]", | 1428 | .driver = "Audigy2", .name = "Audigy 2 Value [Unknown]", |