aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/emu10k1/emumixer.c
diff options
context:
space:
mode:
authorLee Revell <rlrevell@joe-job.com>2005-03-30 06:51:18 -0500
committerJaroslav Kysela <perex@suse.cz>2005-05-29 03:00:41 -0400
commit2b637da5a1bb3c128ecdadea6aee693f6ff3b786 (patch)
tree636819c212a13118758a8c19db9905a55b20ef9e /sound/pci/emu10k1/emumixer.c
parent51f633dada113ef724a145bb5b33ec77d1b092f6 (diff)
[ALSA] clean up card features
EMU10K1/EMU10K2 driver This patch converts the emu10k1 driver to use the card capabilities structure for some more things. Not extensively tested but seems to work. Signed-off-by: Lee Revell <rlrevell@joe-job.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/emu10k1/emumixer.c')
-rw-r--r--sound/pci/emu10k1/emumixer.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/sound/pci/emu10k1/emumixer.c b/sound/pci/emu10k1/emumixer.c
index 044663d31aa7..d0b296587cc0 100644
--- a/sound/pci/emu10k1/emumixer.c
+++ b/sound/pci/emu10k1/emumixer.c
@@ -791,7 +791,7 @@ int __devinit snd_emu10k1_mixer(emu10k1_t *emu)
791 NULL 791 NULL
792 }; 792 };
793 793
794 if (!emu->no_ac97) { 794 if (emu->card_capabilities->ac97_chip) {
795 ac97_bus_t *pbus; 795 ac97_bus_t *pbus;
796 ac97_template_t ac97; 796 ac97_template_t ac97;
797 static ac97_bus_ops_t ops = { 797 static ac97_bus_ops_t ops = {
@@ -833,7 +833,7 @@ int __devinit snd_emu10k1_mixer(emu10k1_t *emu)
833 for (; *c; c++) 833 for (; *c; c++)
834 remove_ctl(card, *c); 834 remove_ctl(card, *c);
835 } else { 835 } else {
836 if (emu->APS) 836 if (emu->card_capabilities->ecard)
837 strcpy(emu->card->mixername, "EMU APS"); 837 strcpy(emu->card->mixername, "EMU APS");
838 else if (emu->audigy) 838 else if (emu->audigy)
839 strcpy(emu->card->mixername, "SB Audigy"); 839 strcpy(emu->card->mixername, "SB Audigy");
@@ -918,7 +918,7 @@ int __devinit snd_emu10k1_mixer(emu10k1_t *emu)
918 mix->attn[0] = 0xffff; 918 mix->attn[0] = 0xffff;
919 } 919 }
920 920
921 if (! emu->APS) { /* FIXME: APS has these controls? */ 921 if (! emu->card_capabilities->ecard) { /* FIXME: APS has these controls? */
922 /* sb live! and audigy */ 922 /* sb live! and audigy */
923 if ((kctl = snd_ctl_new1(&snd_emu10k1_spdif_mask_control, emu)) == NULL) 923 if ((kctl = snd_ctl_new1(&snd_emu10k1_spdif_mask_control, emu)) == NULL)
924 return -ENOMEM; 924 return -ENOMEM;
@@ -939,14 +939,14 @@ int __devinit snd_emu10k1_mixer(emu10k1_t *emu)
939 return -ENOMEM; 939 return -ENOMEM;
940 if ((err = snd_ctl_add(card, kctl))) 940 if ((err = snd_ctl_add(card, kctl)))
941 return err; 941 return err;
942 } else if (! emu->APS) { 942 } else if (! emu->card_capabilities->ecard) {
943 /* sb live! */ 943 /* sb live! */
944 if ((kctl = snd_ctl_new1(&snd_emu10k1_shared_spdif, emu)) == NULL) 944 if ((kctl = snd_ctl_new1(&snd_emu10k1_shared_spdif, emu)) == NULL)
945 return -ENOMEM; 945 return -ENOMEM;
946 if ((err = snd_ctl_add(card, kctl))) 946 if ((err = snd_ctl_add(card, kctl)))
947 return err; 947 return err;
948 } 948 }
949 if (emu->audigy && emu->revision == 4) { /* P16V */ 949 if (emu->card_capabilities->ca0151_chip) { /* P16V */
950 if ((err = snd_p16v_mixer(emu))) 950 if ((err = snd_p16v_mixer(emu)))
951 return err; 951 return err;
952 } 952 }