Lines Matching refs:emu

42 	struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol);
46 /* Limit: emu->spdif_bits */
49 spin_lock_irqsave(&emu->reg_lock, flags);
50 ucontrol->value.iec958.status[0] = (emu->spdif_bits[idx] >> 0) & 0xff;
51 ucontrol->value.iec958.status[1] = (emu->spdif_bits[idx] >> 8) & 0xff;
52 ucontrol->value.iec958.status[2] = (emu->spdif_bits[idx] >> 16) & 0xff;
53 ucontrol->value.iec958.status[3] = (emu->spdif_bits[idx] >> 24) & 0xff;
54 spin_unlock_irqrestore(&emu->reg_lock, flags);
381 struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol);
383 if (emu->card_capabilities->emu_model == EMU_MODEL_EMU1616)
392 struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol);
396 /* Limit: emu1010_output_dst, emu->emu1010.output_source */
398 (emu->card_capabilities->emu_model == EMU_MODEL_EMU1616 &&
401 ucontrol->value.enumerated.item[0] = emu->emu1010.output_source[channel];
408 struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol);
414 (emu->card_capabilities->emu_model == EMU_MODEL_EMU1616 &&
418 /* Limit: emu1010_output_dst, emu->emu1010.output_source */
420 (emu->card_capabilities->emu_model == EMU_MODEL_EMU1616 &&
423 if (emu->emu1010.output_source[channel] == val)
425 emu->emu1010.output_source[channel] = val;
426 if (emu->card_capabilities->emu_model == EMU_MODEL_EMU1616)
427 snd_emu1010_fpga_link_dst_src_write(emu,
430 snd_emu1010_fpga_link_dst_src_write(emu,
438 struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol);
442 /* Limit: emu1010_input_dst, emu->emu1010.input_source */
445 ucontrol->value.enumerated.item[0] = emu->emu1010.input_source[channel];
452 struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol);
458 (emu->card_capabilities->emu_model == EMU_MODEL_EMU1616 &&
462 /* Limit: emu1010_input_dst, emu->emu1010.input_source */
465 if (emu->emu1010.input_source[channel] == val)
467 emu->emu1010.input_source[channel] = val;
468 if (emu->card_capabilities->emu_model == EMU_MODEL_EMU1616)
469 snd_emu1010_fpga_link_dst_src_write(emu,
472 snd_emu1010_fpga_link_dst_src_write(emu,
579 struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol);
581 ucontrol->value.integer.value[0] = (emu->emu1010.adc_pads & mask) ? 1 : 0;
587 struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol);
591 cache = emu->emu1010.adc_pads;
596 if (cache != emu->emu1010.adc_pads) {
597 snd_emu1010_fpga_write(emu, EMU_HANA_ADC_PADS, cache );
598 emu->emu1010.adc_pads = cache;
627 struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol);
629 ucontrol->value.integer.value[0] = (emu->emu1010.dac_pads & mask) ? 1 : 0;
635 struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol);
639 cache = emu->emu1010.dac_pads;
644 if (cache != emu->emu1010.dac_pads) {
645 snd_emu1010_fpga_write(emu, EMU_HANA_DAC_PADS, cache );
646 emu->emu1010.dac_pads = cache;
686 struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol);
688 ucontrol->value.enumerated.item[0] = emu->emu1010.internal_clock;
695 struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol);
703 change = (emu->emu1010.internal_clock != val);
705 emu->emu1010.internal_clock = val;
710 snd_emu1010_fpga_write(emu, EMU_HANA_UNMUTE, EMU_MUTE );
712 snd_emu1010_fpga_write(emu, EMU_HANA_DEFCLOCK, EMU_HANA_DEFCLOCK_44_1K );
714 snd_emu1010_fpga_write(emu, EMU_HANA_WCLOCK,
717 snd_emu1010_fpga_write(emu, EMU_HANA_DOCK_LEDS_2,
722 snd_emu1010_fpga_write(emu, EMU_HANA_UNMUTE, EMU_UNMUTE );
727 snd_emu1010_fpga_write(emu, EMU_HANA_UNMUTE, EMU_MUTE );
729 snd_emu1010_fpga_write(emu, EMU_HANA_DEFCLOCK, EMU_HANA_DEFCLOCK_48K );
731 snd_emu1010_fpga_write(emu, EMU_HANA_WCLOCK,
734 snd_emu1010_fpga_write(emu, EMU_HANA_DOCK_LEDS_2,
739 snd_emu1010_fpga_write(emu, EMU_HANA_UNMUTE, EMU_UNMUTE );
744 snd_emu1010_fpga_write(emu, EMU_HANA_UNMUTE, EMU_MUTE );
746 snd_emu1010_fpga_write(emu, EMU_HANA_DEFCLOCK, EMU_HANA_DEFCLOCK_48K );
748 snd_emu1010_fpga_write(emu, EMU_HANA_WCLOCK,
751 snd_emu1010_fpga_write(emu, EMU_HANA_DOCK_LEDS_2,
757 snd_emu1010_fpga_write(emu, EMU_HANA_UNMUTE, EMU_UNMUTE );
763 snd_emu1010_fpga_write(emu, EMU_HANA_UNMUTE, EMU_MUTE );
765 snd_emu1010_fpga_write(emu, EMU_HANA_DEFCLOCK, EMU_HANA_DEFCLOCK_48K );
767 snd_emu1010_fpga_write(emu, EMU_HANA_WCLOCK,
770 snd_emu1010_fpga_write(emu, EMU_HANA_DOCK_LEDS_2, EMU_HANA_DOCK_LEDS_2_EXT | EMU_HANA_DOCK_LEDS_2_LOCK );
775 snd_emu1010_fpga_write(emu, EMU_HANA_UNMUTE, EMU_UNMUTE );
808 struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol);
810 ucontrol->value.enumerated.item[0] = emu->emu1010.optical_out;
817 struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol);
826 change = (emu->emu1010.optical_out != val);
828 emu->emu1010.optical_out = val;
829 tmp = (emu->emu1010.optical_in ? EMU_HANA_OPTICAL_IN_ADAT : 0) |
830 (emu->emu1010.optical_out ? EMU_HANA_OPTICAL_OUT_ADAT : 0);
831 snd_emu1010_fpga_write(emu, EMU_HANA_OPTICAL_TYPE, tmp);
859 struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol);
861 ucontrol->value.enumerated.item[0] = emu->emu1010.optical_in;
868 struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol);
877 change = (emu->emu1010.optical_in != val);
879 emu->emu1010.optical_in = val;
880 tmp = (emu->emu1010.optical_in ? EMU_HANA_OPTICAL_IN_ADAT : 0) |
881 (emu->emu1010.optical_out ? EMU_HANA_OPTICAL_OUT_ADAT : 0);
882 snd_emu1010_fpga_write(emu, EMU_HANA_OPTICAL_TYPE, tmp);
915 struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol);
917 ucontrol->value.enumerated.item[0] = emu->i2c_capture_source;
924 struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol);
937 /* emu->i2c_capture_volume */
940 change = (emu->i2c_capture_source != source_id);
942 snd_emu10k1_i2c_write(emu, ADC_MUX, 0); /* Mute input */
943 spin_lock_irqsave(&emu->emu_lock, flags);
944 gpio = inl(emu->port + A_IOCFG);
946 outl(gpio | 0x4, emu->port + A_IOCFG);
948 outl(gpio & ~0x4, emu->port + A_IOCFG);
949 spin_unlock_irqrestore(&emu->emu_lock, flags);
951 ngain = emu->i2c_capture_volume[source_id][0]; /* Left */
952 ogain = emu->i2c_capture_volume[emu->i2c_capture_source][0]; /* Left */
954 snd_emu10k1_i2c_write(emu, ADC_ATTEN_ADCL, ((ngain) & 0xff));
955 ngain = emu->i2c_capture_volume[source_id][1]; /* Right */
956 ogain = emu->i2c_capture_volume[emu->i2c_capture_source][1]; /* Right */
958 snd_emu10k1_i2c_write(emu, ADC_ATTEN_ADCR, ((ngain) & 0xff));
961 snd_emu10k1_i2c_write(emu, ADC_MUX, source); /* Set source */
962 emu->i2c_capture_source = source_id;
989 struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol);
993 /* Limit: emu->i2c_capture_volume */
998 ucontrol->value.integer.value[0] = emu->i2c_capture_volume[source_id][0];
999 ucontrol->value.integer.value[1] = emu->i2c_capture_volume[source_id][1];
1006 struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol);
1013 /* Limit: emu->i2c_capture_volume */
1017 ogain = emu->i2c_capture_volume[source_id][0]; /* Left */
1022 if (emu->i2c_capture_source == source_id)
1023 snd_emu10k1_i2c_write(emu, ADC_ATTEN_ADCL, ((ngain) & 0xff) );
1024 emu->i2c_capture_volume[source_id][0] = ngain;
1027 ogain = emu->i2c_capture_volume[source_id][1]; /* Right */
1032 if (emu->i2c_capture_source == source_id)
1033 snd_emu10k1_i2c_write(emu, ADC_ATTEN_ADCR, ((ngain) & 0xff));
1034 emu->i2c_capture_volume[source_id][1] = ngain;
1070 struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol);
1075 spin_lock_irqsave(&emu->reg_lock, flags);
1076 tmp = snd_emu10k1_ptr_read(emu, A_SPDIF_SAMPLERATE, 0);
1090 spin_unlock_irqrestore(&emu->reg_lock, flags);
1097 struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol);
1118 spin_lock_irqsave(&emu->reg_lock, flags);
1119 reg = snd_emu10k1_ptr_read(emu, A_SPDIF_SAMPLERATE, 0);
1123 snd_emu10k1_ptr_write(emu, A_SPDIF_SAMPLERATE, 0, tmp);
1124 spin_unlock_irqrestore(&emu->reg_lock, flags);
1143 struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol);
1149 /* Limit: emu->spdif_bits */
1156 spin_lock_irqsave(&emu->reg_lock, flags);
1157 change = val != emu->spdif_bits[idx];
1159 snd_emu10k1_ptr_write(emu, SPCS0 + idx, 0, val);
1160 emu->spdif_bits[idx] = val;
1162 spin_unlock_irqrestore(&emu->reg_lock, flags);
1187 static void update_emu10k1_fxrt(struct snd_emu10k1 *emu, int voice, unsigned char *route)
1189 if (emu->audigy) {
1190 snd_emu10k1_ptr_write(emu, A_FXRT1, voice,
1192 snd_emu10k1_ptr_write(emu, A_FXRT2, voice,
1195 snd_emu10k1_ptr_write(emu, FXRT, voice,
1200 static void update_emu10k1_send_volume(struct snd_emu10k1 *emu, int voice, unsigned char *volume)
1202 snd_emu10k1_ptr_write(emu, PTRX_FXSENDAMOUNT_A, voice, volume[0]);
1203 snd_emu10k1_ptr_write(emu, PTRX_FXSENDAMOUNT_B, voice, volume[1]);
1204 snd_emu10k1_ptr_write(emu, PSST_FXSENDAMOUNT_C, voice, volume[2]);
1205 snd_emu10k1_ptr_write(emu, DSL_FXSENDAMOUNT_D, voice, volume[3]);
1206 if (emu->audigy) {
1211 snd_emu10k1_ptr_write(emu, A_SENDAMOUNTS, voice, val);
1219 struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol);
1221 uinfo->count = emu->audigy ? 3*8 : 3*4;
1223 uinfo->value.integer.max = emu->audigy ? 0x3f : 0x0f;
1231 struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol);
1233 &emu->pcm_mixer[snd_ctl_get_ioffidx(kcontrol, &ucontrol->id)];
1235 int num_efx = emu->audigy ? 8 : 4;
1236 int mask = emu->audigy ? 0x3f : 0x0f;
1238 spin_lock_irqsave(&emu->reg_lock, flags);
1243 spin_unlock_irqrestore(&emu->reg_lock, flags);
1251 struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol);
1253 &emu->pcm_mixer[snd_ctl_get_ioffidx(kcontrol, &ucontrol->id)];
1255 int num_efx = emu->audigy ? 8 : 4;
1256 int mask = emu->audigy ? 0x3f : 0x0f;
1258 spin_lock_irqsave(&emu->reg_lock, flags);
1269 update_emu10k1_fxrt(emu, mix->epcm->voices[0]->number,
1271 update_emu10k1_fxrt(emu, mix->epcm->voices[1]->number,
1274 update_emu10k1_fxrt(emu, mix->epcm->voices[0]->number,
1278 spin_unlock_irqrestore(&emu->reg_lock, flags);
1295 struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol);
1297 uinfo->count = emu->audigy ? 3*8 : 3*4;
1307 struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol);
1309 &emu->pcm_mixer[snd_ctl_get_ioffidx(kcontrol, &ucontrol->id)];
1311 int num_efx = emu->audigy ? 8 : 4;
1313 spin_lock_irqsave(&emu->reg_lock, flags);
1316 spin_unlock_irqrestore(&emu->reg_lock, flags);
1324 struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol);
1326 &emu->pcm_mixer[snd_ctl_get_ioffidx(kcontrol, &ucontrol->id)];
1328 int num_efx = emu->audigy ? 8 : 4;
1330 spin_lock_irqsave(&emu->reg_lock, flags);
1340 update_emu10k1_send_volume(emu, mix->epcm->voices[0]->number,
1342 update_emu10k1_send_volume(emu, mix->epcm->voices[1]->number,
1345 update_emu10k1_send_volume(emu, mix->epcm->voices[0]->number,
1349 spin_unlock_irqrestore(&emu->reg_lock, flags);
1376 struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol);
1378 &emu->pcm_mixer[snd_ctl_get_ioffidx(kcontrol, &ucontrol->id)];
1382 spin_lock_irqsave(&emu->reg_lock, flags);
1385 spin_unlock_irqrestore(&emu->reg_lock, flags);
1393 struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol);
1395 &emu->pcm_mixer[snd_ctl_get_ioffidx(kcontrol, &ucontrol->id)];
1398 spin_lock_irqsave(&emu->reg_lock, flags);
1408 snd_emu10k1_ptr_write(emu, VTFT_VOLUMETARGET, mix->epcm->voices[0]->number, mix->attn[1]);
1409 snd_emu10k1_ptr_write(emu, VTFT_VOLUMETARGET, mix->epcm->voices[1]->number, mix->attn[2]);
1411 snd_emu10k1_ptr_write(emu, VTFT_VOLUMETARGET, mix->epcm->voices[0]->number, mix->attn[0]);
1414 spin_unlock_irqrestore(&emu->reg_lock, flags);
1433 struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol);
1435 uinfo->count = emu->audigy ? 8 : 4;
1437 uinfo->value.integer.max = emu->audigy ? 0x3f : 0x0f;
1445 struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol);
1447 &emu->efx_pcm_mixer[snd_ctl_get_ioffidx(kcontrol, &ucontrol->id)];
1449 int num_efx = emu->audigy ? 8 : 4;
1450 int mask = emu->audigy ? 0x3f : 0x0f;
1452 spin_lock_irqsave(&emu->reg_lock, flags);
1456 spin_unlock_irqrestore(&emu->reg_lock, flags);
1464 struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol);
1466 struct snd_emu10k1_pcm_mixer *mix = &emu->efx_pcm_mixer[ch];
1468 int num_efx = emu->audigy ? 8 : 4;
1469 int mask = emu->audigy ? 0x3f : 0x0f;
1471 spin_lock_irqsave(&emu->reg_lock, flags);
1482 update_emu10k1_fxrt(emu, mix->epcm->voices[ch]->number,
1486 spin_unlock_irqrestore(&emu->reg_lock, flags);
1503 struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol);
1505 uinfo->count = emu->audigy ? 8 : 4;
1515 struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol);
1517 &emu->efx_pcm_mixer[snd_ctl_get_ioffidx(kcontrol, &ucontrol->id)];
1519 int num_efx = emu->audigy ? 8 : 4;
1521 spin_lock_irqsave(&emu->reg_lock, flags);
1524 spin_unlock_irqrestore(&emu->reg_lock, flags);
1532 struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol);
1534 struct snd_emu10k1_pcm_mixer *mix = &emu->efx_pcm_mixer[ch];
1536 int num_efx = emu->audigy ? 8 : 4;
1538 spin_lock_irqsave(&emu->reg_lock, flags);
1548 update_emu10k1_send_volume(emu, mix->epcm->voices[ch]->number,
1552 spin_unlock_irqrestore(&emu->reg_lock, flags);
1580 struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol);
1582 &emu->efx_pcm_mixer[snd_ctl_get_ioffidx(kcontrol, &ucontrol->id)];
1585 spin_lock_irqsave(&emu->reg_lock, flags);
1587 spin_unlock_irqrestore(&emu->reg_lock, flags);
1595 struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol);
1597 struct snd_emu10k1_pcm_mixer *mix = &emu->efx_pcm_mixer[ch];
1600 spin_lock_irqsave(&emu->reg_lock, flags);
1608 snd_emu10k1_ptr_write(emu, VTFT_VOLUMETARGET, mix->epcm->voices[ch]->number, mix->attn[0]);
1611 spin_unlock_irqrestore(&emu->reg_lock, flags);
1631 struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol);
1633 if (emu->audigy)
1634 ucontrol->value.integer.value[0] = inl(emu->port + A_IOCFG) & A_IOCFG_GPOUT0 ? 1 : 0;
1636 ucontrol->value.integer.value[0] = inl(emu->port + HCFG) & HCFG_GPOUT0 ? 1 : 0;
1637 if (emu->card_capabilities->invert_shared_spdif)
1648 struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol);
1653 if (emu->card_capabilities->invert_shared_spdif)
1655 spin_lock_irqsave(&emu->reg_lock, flags);
1656 if ( emu->card_capabilities->i2c_adc) {
1658 } else if (emu->audigy) {
1659 reg = inl(emu->port + A_IOCFG);
1665 outl(reg | val, emu->port + A_IOCFG);
1668 reg = inl(emu->port + HCFG);
1674 outl(reg | val, emu->port + HCFG);
1676 spin_unlock_irqrestore(&emu->reg_lock, flags);
1705 struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol);
1709 val = snd_ac97_read(emu->ac97, AC97_REC_GAIN);
1717 struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol);
1724 return snd_ac97_update(emu->ac97, AC97_REC_GAIN, val);
1741 struct snd_emu10k1 *emu = ac97->private_data;
1742 emu->ac97 = NULL;
1775 int snd_emu10k1_mixer(struct snd_emu10k1 *emu,
1780 struct snd_card *card = emu->card;
1898 if (emu->card_capabilities->ac97_chip) {
1906 if ((err = snd_ac97_bus(emu->card, 0, &ops, NULL, &pbus)) < 0)
1911 ac97.private_data = emu;
1914 if ((err = snd_ac97_mixer(pbus, &ac97, &emu->ac97)) < 0) {
1915 if (emu->card_capabilities->ac97_chip == 1)
1917 dev_info(emu->card->dev,
1919 dev_info(emu->card->dev,
1921 snd_device_free(emu->card, pbus);
1924 if (emu->audigy) {
1926 snd_ac97_write_cache(emu->ac97, AC97_MASTER, 0x0000);
1928 snd_ac97_write_cache(emu->ac97, AC97_REC_SEL, 0x0000);
1930 snd_ac97_update_bits(emu->ac97, AC97_GENERAL_PURPOSE,
1932 if (emu->card_capabilities->adc_1361t)
1942 if (emu->ac97->id == AC97_ID_STAC9758) {
1943 emu->rear_ac97 = 1;
1944 snd_emu10k1_ptr_write(emu, AC97SLOT, 0, AC97SLOT_CNTR|AC97SLOT_LFE|AC97SLOT_REAR_LEFT|AC97SLOT_REAR_RIGHT);
1945 snd_ac97_write_cache(emu->ac97, AC97_HEADPHONE, 0x0202);
1950 snd_ac97_write_cache(emu->ac97, AC97_SURROUND_MASTER, 0x0202);
1951 snd_ac97_write_cache(emu->ac97, AC97_CENTER_LFE_MASTER, 0x0202);
1956 } else if (emu->card_capabilities->i2c_adc) {
1962 if (emu->card_capabilities->ecard)
1963 strcpy(emu->card->mixername, "EMU APS");
1964 else if (emu->audigy)
1965 strcpy(emu->card->mixername, "SB Audigy");
1967 strcpy(emu->card->mixername, "Emu10k1");
1970 if (emu->audigy)
1971 if (emu->card_capabilities->adc_1361t)
1973 else if (emu->card_capabilities->i2c_adc)
1982 if (emu->card_capabilities->subsystem == 0x80401102) { /* SB Live! Platinum CT4760P */
1988 if (emu->card_capabilities->subsystem == 0x20071102) { /* Audigy 4 Pro */
1994 if ((kctl = emu->ctl_send_routing = snd_ctl_new1(&snd_emu10k1_send_routing_control, emu)) == NULL)
1999 if ((kctl = emu->ctl_send_volume = snd_ctl_new1(&snd_emu10k1_send_volume_control, emu)) == NULL)
2004 if ((kctl = emu->ctl_attn = snd_ctl_new1(&snd_emu10k1_attn_control, emu)) == NULL)
2010 if ((kctl = emu->ctl_efx_send_routing = snd_ctl_new1(&snd_emu10k1_efx_send_routing_control, emu)) == NULL)
2016 if ((kctl = emu->ctl_efx_send_volume = snd_ctl_new1(&snd_emu10k1_efx_send_volume_control, emu)) == NULL)
2022 if ((kctl = emu->ctl_efx_attn = snd_ctl_new1(&snd_emu10k1_efx_attn_control, emu)) == NULL)
2033 mix = &emu->pcm_mixer[pcm];
2053 mix = &emu->efx_pcm_mixer[pcm];
2060 if (emu->audigy)
2070 if (! emu->card_capabilities->ecard) { /* FIXME: APS has these controls? */
2072 if ((kctl = snd_ctl_new1(&snd_emu10k1_spdif_mask_control, emu)) == NULL)
2074 if (!emu->audigy)
2075 kctl->id.device = emu->pcm_efx->device;
2078 if ((kctl = snd_ctl_new1(&snd_emu10k1_spdif_control, emu)) == NULL)
2080 if (!emu->audigy)
2081 kctl->id.device = emu->pcm_efx->device;
2086 if (emu->card_capabilities->emu_model) {
2088 } else if (emu->audigy) {
2089 if ((kctl = snd_ctl_new1(&snd_audigy_shared_spdif, emu)) == NULL)
2094 if ((kctl = snd_ctl_new1(&snd_audigy_spdif_output_rate, emu)) == NULL)
2099 } else if (! emu->card_capabilities->ecard) {
2101 if ((kctl = snd_ctl_new1(&snd_emu10k1_shared_spdif, emu)) == NULL)
2106 if (emu->card_capabilities->ca0151_chip) { /* P16V */
2107 if ((err = snd_p16v_mixer(emu)))
2111 if (emu->card_capabilities->emu_model == EMU_MODEL_EMU1616) {
2118 emu));
2125 emu));
2131 snd_ctl_new1(&snd_emu1010_adc_pads[i], emu));
2137 snd_ctl_new1(&snd_emu1010_dac_pads[i], emu));
2142 snd_ctl_new1(&snd_emu1010_internal_clock, emu));
2146 snd_ctl_new1(&snd_emu1010_optical_out, emu));
2150 snd_ctl_new1(&snd_emu1010_optical_in, emu));
2154 } else if (emu->card_capabilities->emu_model) {
2161 emu));
2168 emu));
2174 snd_ctl_new1(&snd_emu1010_adc_pads[i], emu));
2180 snd_ctl_new1(&snd_emu1010_dac_pads[i], emu));
2185 snd_ctl_new1(&snd_emu1010_internal_clock, emu));
2189 snd_ctl_new1(&snd_emu1010_optical_out, emu));
2193 snd_ctl_new1(&snd_emu1010_optical_in, emu));
2198 if ( emu->card_capabilities->i2c_adc) {
2201 err = snd_ctl_add(card, snd_ctl_new1(&snd_audigy_i2c_capture_source, emu));
2206 err = snd_ctl_add(card, snd_ctl_new1(&snd_audigy_i2c_volume_ctls[i], emu));
2212 if (emu->card_capabilities->ac97_chip && emu->audigy) {
2214 emu));