/* Return to Audio Dock programming mode */
snd_printk(KERN_INFO "emu1010: Loading Audio Dock Firmware\n");
snd_emu1010_fpga_write(emu, EMU_HANA_FPGA_CONFIG, EMU_HANA_FPGA_CONFIG_AUDIODOCK );
- if (emu->card_capabilities->emu_model == 1) {
+ if (emu->card_capabilities->emu_model ==
+ EMU_MODEL_EMU1010) {
if ((err = snd_emu1010_load_firmware(emu, DOCK_FILENAME)) != 0) {
continue;
}
- } else if (emu->card_capabilities->emu_model == 2) {
+ } else if (emu->card_capabilities->emu_model ==
+ EMU_MODEL_EMU1010B) {
if ((err = snd_emu1010_load_firmware(emu, MICRO_DOCK_FILENAME)) != 0) {
continue;
}
- } else if (emu->card_capabilities->emu_model == 3) {
+ } else if (emu->card_capabilities->emu_model ==
+ EMU_MODEL_EMU1616) {
if ((err = snd_emu1010_load_firmware(emu, MICRO_DOCK_FILENAME)) != 0) {
continue;
}
}
snd_printk(KERN_INFO "emu1010: EMU_HANA_ID=0x%x\n",reg);
switch (emu->card_capabilities->emu_model) {
- case 1:
+ case EMU_MODEL_EMU1010:
filename = HANA_FILENAME;
break;
- case 2:
+ case EMU_MODEL_EMU1010B:
filename = EMU1010B_FILENAME;
break;
- case 3:
+ case EMU_MODEL_EMU1616:
filename = EMU1010_NOTEBOOK_FILENAME;
break;
- case 4:
+ case EMU_MODEL_EMU0404:
filename = EMU0404_FILENAME;
break;
default:
EMU_DST_HANA_SPDIF_RIGHT1, EMU_SRC_ALICE_EMU32A + 3); /* ALICE2 bus 0xb3 */
#endif
/* Default outputs */
- if (emu->card_capabilities->emu_model == 3) {
+ if (emu->card_capabilities->emu_model == EMU_MODEL_EMU1616) {
/* 1616(M) cardbus default outputs */
/* ALICE2 bus 0xa0 */
snd_emu1010_fpga_link_dst_src_write(emu,
}
snd_emu10k1_free_efx(emu);
}
- if (emu->card_capabilities->emu_model == 1) {
+ if (emu->card_capabilities->emu_model == EMU_MODEL_EMU1010) {
/* Disable 48Volt power to Audio Dock */
snd_emu1010_fpga_write(emu, EMU_HANA_DOCK_PWR, 0 );
}
.emu10k2_chip = 1,
.ca0102_chip = 1,
.spk71 = 1,
- .emu_model = 4} , /* EMU 0404 */
+ .emu_model = EMU_MODEL_EMU0404} , /* EMU 0404 */
/* Tested by James@superbug.co.uk 4th Nov 2007. */
{.vendor = 0x1102, .device = 0x0008, .subsystem = 0x42011102,
.driver = "Audigy2", .name = "E-mu 1010 Notebook [MAEM8950]",
.ca0108_chip = 1,
.ca_cardbus_chip = 1,
.spk71 = 1 ,
- .emu_model = 3} ,
+ .emu_model = EMU_MODEL_EMU1616},
/* Tested by James@superbug.co.uk 4th Nov 2007. */
{.vendor = 0x1102, .device = 0x0008, .subsystem = 0x40041102,
.driver = "Audigy2", .name = "E-mu 1010b PCI [MAEM????]",
.emu10k2_chip = 1,
.ca0108_chip = 1,
.spk71 = 1,
- .emu_model = 2} ,
+ .emu_model = EMU_MODEL_EMU1010B},
/* Tested by James@superbug.co.uk 8th July 2005. */
{.vendor = 0x1102, .device = 0x0004, .subsystem = 0x40011102,
.driver = "Audigy2", .name = "E-mu 1010 [4001]",
.emu10k2_chip = 1,
.ca0102_chip = 1,
.spk71 = 1,
- .emu_model = 1} , /* Emu 1010 */
+ .emu_model = EMU_MODEL_EMU1010} , /* Emu 1010 */
/* Audigy4 (Not PRO) SB0610 */
{.vendor = 0x1102, .device = 0x0008,
.driver = "Audigy2", .name = "Audigy 2 Value [Unknown]",
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 {
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;
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
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 */
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
return err;
}
- if (emu->card_capabilities->emu_model == 3) {
+ if (emu->card_capabilities->emu_model == EMU_MODEL_EMU1616) {
/* 1616(m) cardbus */
int i;