int __devinit snd_cs46xx_mixer(cs46xx_t *chip) 
int __devinit snd_cs46xx_mixer(cs46xx_t *chip, int spdif_device) 
int __devinit snd_cs46xx_mixer(cs46xx_t *chip){	snd_card_t *card = chip->card;	snd_ctl_elem_id_t id;	int err;	unsigned int idx;	static ac97_bus_ops_t ops = {#ifdef CONFIG_SND_CS46XX_NEW_DSP		.reset = snd_cs46xx_codec_reset,#endif		.write = snd_cs46xx_ac97_write,		.read = snd_cs46xx_ac97_read,	};	/* detect primary codec */	chip->nr_ac97_codecs = 0;	snd_printdd("snd_cs46xx: detecting primary codec\n");	if ((err = snd_ac97_bus(card, 0, &ops, chip, &chip->ac97_bus)) < 0)		return err;	chip->ac97_bus->private_free = snd_cs46xx_mixer_free_ac97_bus;	if (cs46xx_detect_codec(chip, CS46XX_PRIMARY_CODEC_INDEX) < 0)		return -ENXIO;	chip->nr_ac97_codecs = 1;#ifdef CONFIG_SND_CS46XX_NEW_DSP	snd_printdd("snd_cs46xx: detecting seconadry codec\n");	/* try detect a secondary codec */	if (! cs46xx_detect_codec(chip, CS46XX_SECONDARY_CODEC_INDEX))		chip->nr_ac97_codecs = 2;#endif /* CONFIG_SND_CS46XX_NEW_DSP */	/* add cs4630 mixer controls */	for (idx = 0; idx < ARRAY_SIZE(snd_cs46xx_controls); idx++) {		snd_kcontrol_t *kctl;		kctl = snd_ctl_new1(&snd_cs46xx_controls[idx], chip);		if ((err = snd_ctl_add(card, kctl)) < 0)			return err;	}	/* get EAPD mixer switch (for voyetra hack) */	memset(&id, 0, sizeof(id));	id.iface = SNDRV_CTL_ELEM_IFACE_MIXER;	strcpy(id.name, "External Amplifier");	chip->eapd_switch = snd_ctl_find_id(chip->card, &id);    #ifdef CONFIG_SND_CS46XX_NEW_DSP	if (chip->nr_ac97_codecs == 1) {		unsigned int id2 = chip->ac97[CS46XX_PRIMARY_CODEC_INDEX]->id & 0xffff;		if (id2 == 0x592b || id2 == 0x592d) {			err = snd_ctl_add(card, snd_ctl_new1(&snd_cs46xx_front_dup_ctl, chip));			if (err < 0)				return err;			snd_ac97_write_cache(chip->ac97[CS46XX_PRIMARY_CODEC_INDEX],					     AC97_CSR_ACMODE, 0x200);		}	}	/* do soundcard specific mixer setup */	if (chip->mixer_init) {		snd_printdd ("calling chip->mixer_init(chip);\n");		chip->mixer_init(chip);	}#endif 	/* turn on amplifier */	chip->amplifier_ctrl(chip, 1);    	return 0;}
4520	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4520/67ed4161f60d76b3b27efc085b36357a6a90768c/cs46xx_lib.c/clean/sound/pci/cs46xx/cs46xx_lib.c