diff options
author | Takashi Iwai <tiwai@suse.de> | 2007-12-21 16:33:32 +0100 |
---|---|---|
committer | Mercurial server <hg@alsa0.alsa-project.org> | 2008-01-31 17:30:24 +0100 |
commit | 3839e4f136d6da3dc85d237aa9569ee94bfea763 (patch) | |
tree | c000a5a87e22c22890c24b8eb4f1fee861bbd79a /sound/pci/emu10k1/emumixer.c | |
parent | 88aa139057f2740c5dd55e2a542b2425186e4d3c (diff) | |
download | op-kernel-dev-3839e4f136d6da3dc85d237aa9569ee94bfea763.zip op-kernel-dev-3839e4f136d6da3dc85d237aa9569ee94bfea763.tar.gz |
[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/emumixer.c')
-rw-r--r-- | sound/pci/emu10k1/emumixer.c | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/sound/pci/emu10k1/emumixer.c b/sound/pci/emu10k1/emumixer.c index 7ebf035..fd22120 100644 --- a/sound/pci/emu10k1/emumixer.c +++ b/sound/pci/emu10k1/emumixer.c @@ -397,7 +397,7 @@ static int snd_emu1010_input_output_source_info(struct snd_kcontrol *kcontrol, uinfo->type = SNDRV_CTL_ELEM_TYPE_ENUMERATED; uinfo->count = 1; - if (emu->card_capabilities->emu_model == 3) { /* 1616(m) cardbus */ + if (emu->card_capabilities->emu_model == EMU_MODEL_EMU1616) { uinfo->value.enumerated.items = 49; items = emu1616_src_texts; } else { @@ -421,7 +421,8 @@ static int snd_emu1010_output_source_get(struct snd_kcontrol *kcontrol, channel = (kcontrol->private_value) & 0xff; /* Limit: emu1010_output_dst, emu->emu1010.output_source */ if (channel >= 24 || - (emu->card_capabilities->emu_model == 3 && channel >= 18)) + (emu->card_capabilities->emu_model == EMU_MODEL_EMU1616 && + channel >= 18)) return -EINVAL; ucontrol->value.enumerated.item[0] = emu->emu1010.output_source[channel]; return 0; @@ -436,17 +437,19 @@ static int snd_emu1010_output_source_put(struct snd_kcontrol *kcontrol, val = ucontrol->value.enumerated.item[0]; if (val >= 53 || - (emu->card_capabilities->emu_model == 3 && val >= 49)) + (emu->card_capabilities->emu_model == EMU_MODEL_EMU1616 && + val >= 49)) return -EINVAL; channel = (kcontrol->private_value) & 0xff; /* Limit: emu1010_output_dst, emu->emu1010.output_source */ if (channel >= 24 || - (emu->card_capabilities->emu_model == 3 && channel >= 18)) + (emu->card_capabilities->emu_model == EMU_MODEL_EMU1616 && + channel >= 18)) return -EINVAL; if (emu->emu1010.output_source[channel] == val) return 0; emu->emu1010.output_source[channel] = val; - if (emu->card_capabilities->emu_model == 3) /* 1616(m) cardbus */ + if (emu->card_capabilities->emu_model == EMU_MODEL_EMU1616) snd_emu1010_fpga_link_dst_src_write(emu, emu1616_output_dst[channel], emu1616_src_regs[val]); else @@ -478,7 +481,8 @@ static int snd_emu1010_input_source_put(struct snd_kcontrol *kcontrol, val = ucontrol->value.enumerated.item[0]; if (val >= 53 || - (emu->card_capabilities->emu_model == 3 && val >= 49)) + (emu->card_capabilities->emu_model == EMU_MODEL_EMU1616 && + val >= 49)) return -EINVAL; channel = (kcontrol->private_value) & 0xff; /* Limit: emu1010_input_dst, emu->emu1010.input_source */ @@ -487,7 +491,7 @@ static int snd_emu1010_input_source_put(struct snd_kcontrol *kcontrol, if (emu->emu1010.input_source[channel] == val) return 0; emu->emu1010.input_source[channel] = val; - if (emu->card_capabilities->emu_model == 3) /* 1616(m) cardbus */ + if (emu->card_capabilities->emu_model == EMU_MODEL_EMU1616) snd_emu1010_fpga_link_dst_src_write(emu, emu1010_input_dst[channel], emu1616_src_regs[val]); else @@ -1991,7 +1995,7 @@ int __devinit snd_emu10k1_mixer(struct snd_emu10k1 *emu, return err; } - if (emu->card_capabilities->emu_model == 3) { + if (emu->card_capabilities->emu_model == EMU_MODEL_EMU1616) { /* 1616(m) cardbus */ int i; |