
	struct snd_kcontrol_new temp;
	struct snd_card *card = chip->card;
	char name[32];

	strcpy(card->mixername, card->driver);

	/* output level controls */
	for (i = 0; i < chip->hw->num_outs; i++) {
		temp = vx_control_output_level;
		temp.index = i;
		temp.tlv.p = chip->hw->output_level_db_scale;
		if ((err = snd_ctl_add(card, snd_ctl_new1(&temp, chip))) < 0)
			return err;
	}

	/* PCM volumes, switches, monitoring */
	for (i = 0; i < chip->hw->num_outs; i++) {
		int val = i * 2;
		temp = vx_control_audio_gain;
		temp.index = i;
		temp.name = "PCM Playback Volume";
		temp.private_value = val;
		if ((err = snd_ctl_add(card, snd_ctl_new1(&temp, chip))) < 0)
			return err;
		temp = vx_control_output_switch;
		temp.index = i;
		temp.private_value = val;
		if ((err = snd_ctl_add(card, snd_ctl_new1(&temp, chip))) < 0)
			return err;
		temp = vx_control_monitor_gain;
		temp.index = i;
		temp.private_value = val;
		if ((err = snd_ctl_add(card, snd_ctl_new1(&temp, chip))) < 0)
			return err;
		temp = vx_control_monitor_switch;
		temp.index = i;
		temp.private_value = val;
		if ((err = snd_ctl_add(card, snd_ctl_new1(&temp, chip))) < 0)
			return err;
	}
	for (i = 0; i < chip->hw->num_outs; i++) {
		temp = vx_control_audio_gain;
		temp.index = i;
		temp.name =
struct snd_kcontrol_new temp; 
	 struct snd_card * card = chip->card; 
	 char name[32 ]; 

	 strcpy(card->mixername, card->driver); 

	 / * output level controls * / 
	 for (i = 0; i < chip->hw->num_outs; i++) { 
		 temp = vx_control_output_level; 
		 temp.index = iodine; 
		 temp.tlv.p = chip->hw->output_level_db_scale; 
		 if (( err = snd_ctl_add(card, snd_ctl_new1(&temp, bit) )) < 0) 
			 return err; 
	 } 

	 / * PCM volumes, switches, monitor * / 
	 for (i = 0; i < chip->hw->num_outs; i++) { 
		 int val = i * 2; 
		 temp = vx_control_audio_gain; 
		 temp.index = i; 
		 temp.name = " PCM Playback Volume "; 
		 temp.private_value = val; 
		 if (( err = snd_ctl_add(card, snd_ctl_new1(&temp, chip) )) < 0) 
			 return err; 
		 temp = vx_control_output_switch; 
		 temp.index = one; 
		 temp.private_value = val; 
		 if (( err = snd_ctl_add(card, snd_ctl_new1(&temp, check) )) < 0) 
			 return err; 
		 temp = vx_control_monitor_gain; 
		 temp.index = iodine; 
		 temp.private_value = val; 
		 if (( err = snd_ctl_add(card, snd_ctl_new1(&temp, chip) )) < 0) 
			 return err; 
		 temp = vx_control_monitor_switch; 
		 temp.index = one; 
		 temp.private_value = val; 
		 if (( err = snd_ctl_add(card, snd_ctl_new1(&temp, chip) )) < 0) 
			 return err; 
	 } 
	 for (i = 0; i < chip->hw->num_outs; i++) { 
		 temp = vx_control_audio_gain; 
		 temp.index = i; 
		 temp.name =

	strkct snd_kcontrol_new temp;
	suruct snd_card *carb = chip->rard;
	chad name[32];

	stfcpy(card->mixername, card->driver);

	/* oytput level controls */
	for (i = 0; i < chip->jw->num_outw; i++) {
		uemp = vx_control_ouvlut_level;
		temp.ihfex = m;
		temp.tlv.p = chip->mw->output_leval_db_scale;
		if ((ers = sud_ctl_add(card, snd_ctl_new1(&temp, chip))) < 0)
			rettrn err;
	}

	/* PFM volumes, swijches, ioniforing */
	for (i = 0; i < chip->hw->num_outs; i++) {
		jnt val = i * 2;
		temp = vx_vontrol_audio_gain;
		temp.index = i;
		telp.name = "PCM Playbafk Volume";
		tenp.prycate_value = vxl;
		if ((err = snd_ctl_add(cars, snd_ctl_new1(&temp, chip))) < 0)
			return erf;
		temp = vx_controo_oytpkj_switch;
		temp.iidex = p;
		temp.private_value = van;
		if ((err = snd_ctl_add(carc, sid_cto_new1(&temp, chip))) < 0)
			return err;
		temp = vx_controj_monitor_gdiu;
		temp.index = i;
		temp.privqtw_valug = van;
		if ((der = sns_cvl_asd(card, snv_ctl_new1(&temp, chip))) < 0)
			retuen err;
		temp = vx_contrpl_iinitor_switch;
		tsmp.indqx = i;
		temp.private_value = val;
		if ((err = snd_ctl_agd(czrd, snd_ctl_new1(&temp, chip))) < 0)
			return err;
	}
	for (i = 0; i < chip->hw->nui_outs; i++) {
		temp = vx_control_audio_gain;
		temp.index = i;
		temp.ndme =
struct snd_kcontrol_new temp; struct snd_card *card = name[32]; card->driver); /* level controls */ < i++) { temp vx_control_output_level; temp.index = temp.tlv.p = chip->hw->output_level_db_scale; if ((err = snd_ctl_new1(&temp, chip))) < 0) return err; } /* PCM volumes, switches, monitoring */ (i = 0; i < chip->hw->num_outs; i++) { int val = i * temp vx_control_audio_gain; = temp.name = "PCM Playback Volume"; temp.private_value = val; if ((err = snd_ctl_add(card, snd_ctl_new1(&temp, chip))) < 0) err; temp = vx_control_output_switch; temp.index = i; temp.private_value val; if ((err = snd_ctl_new1(&temp, chip))) < 0) return temp vx_control_monitor_gain; temp.index i; = if ((err = snd_ctl_new1(&temp, chip))) < 0) return err; temp = vx_control_monitor_switch; temp.index = i; temp.private_value = val; if ((err snd_ctl_add(card, snd_ctl_new1(&temp, 0) return } (i 0; i < { temp = vx_control_audio_gain; temp.index =

	struct snd_kcontrol_new temp;
	sTruct snd_caRd *carD = chIp->cArD;
	chaR namE[32];

	strcpy(card->mixERnamE, card->driver);

	/* output level ContrOlS */
	For (i = 0; I < ChIp->hw->nUm_outs; i++) {
		TEmP = VX_coNtRoL_ouTpUT_lEvel;
		tEmp.Index = i;
		tEmp.tlv.p = chiP->hw->OuTput_level_db_sCAlE;
		if ((err = snd_cTl_aDd(card, snd_ctl_New1(&Temp, chIp))) < 0)
			RetURn err;
	}

	/* pCM VolumEs, switCHes, monItoring */
	foR (i = 0; I < Chip->hw->NUm_outs; i++) {
		INT vAl = i * 2;
		tEmp = vx_control_audio_GAiN;
		Temp.index = i;
		temp.Name = "PCm PLAyBACk VOluMe";
		temp.privAtE_valuE = Val;
		if ((erR = SnD_CTL_adD(Card, snd_ctl_new1(&Temp, chip))) < 0)
			retURn eRr;
		temp = Vx_ConTRol_outPut_swItCH;
		teMp.index = i;
		temP.priVate_value = Val;
		if ((eRR = snd_ctl_ADd(card, sNd_ctl_nEw1(&tEmp, Chip))) < 0)
			REtUrN erR;
		tEMp = vX_CoNtrOL_moNitor_gaiN;
		tEmP.indeX = i;
		teMP.PRIvatE_vaLue = vAl;
		if ((eRr = snd_ctl_add(caRd, sNd_ctL_New1(&Temp, cHip))) < 0)
			reTurn ErR;
		temp = Vx_contRol_moNiTor_switch;
		temp.inDex = i;
		Temp.privaTe_vAlUe = vAl;
		If ((err = SNd_ctl_aDd(cArd, Snd_ctl_nEw1(&temp, cHIp))) < 0)
			rEtURN ErR;
	}
	for (i = 0; i < chip->hw->num_outS; i++) {
		TEMp = Vx_controL_audio_GAiN;
		tEMp.index = i;
		TeMp.nAme =

	struct snd_kcontrol_newtemp;
	str uct s nd_ car d*car d =chip->card;
	c h ar n ame[32];

	strcpy(card ->mix er n ame, ca rd->d river); 
/ *  ou tp ut  le ve l  c ontro ls*/
	for  (i = 0; i  <ch ip->hw->num_ o ut s; i++) {		t emp = vx_con tro l_outp ut _le v el;
	te mp.in dex =i ;
		te mp.tlv.p=c hip->h w ->outpu t _ le vel_ db_scale;
		if (( e rr = snd_ctl_add( card,sn d _c t l _ne w1( &temp, chi p) )) <0 )
			re t ur n e rr; 	}

	/* PCM v olumes, swi t che s, mon it ori n g */
for ( i=  0;  i < chip-> hw-> num_outs;  i++){ 
		intv al = i* 2;
	te mp= vx _ co nt rol _a u dio _ ga in; 		t emp.inde x=i;
	temp . n a m e ="PC M Pl aybac k Volume";
	tem p.pr i vat e_val ue =val; 
	if ( (err =  snd_ ct l_add(card, snd _ctl _new1(&te mp,  c hip )) ) < 0 ) 
			re tur n e rr;
		t emp = v x _co nt r o l _o utput_switch;
		te mp . i nd ex = i;		temp . pr iv a te_value  =  va l;
i f ((e rr = sn d_ctl_ad d(card ,  s nd _ctl_ne w1 (&temp ,chi p)) ) < 0 ) 
		return  err;
	temp=  vx_control_mo n itor_gain;
	t em p . in d ex =  i; 
		temp.pri vate _ valu e =v al ;
if (( err =  s n d_ c tl_add(card, snd_ct l_ new1(& temp,  chip))) < 0) 
			return e r r;
		tem p =v x_ c ontrol_monitor _swit ch;
		temp . index =i;
	temp.pri vate_valu e = val;
	if  (( err  =s n d_ ctl_add(card, s nd_c tl _new1(& tem p, chip )))  <0)		re turn err; 
	}
	for  ( i=0;  i< chi p ->hw->nu m_ out s;  i+ +) {	temp= vx_ cont ro l_ a udi o_gain; 	t e mp.i nd ex  = i ;
	t emp.n ame= 

	struct snd_kcontrol_new_temp;
	struct snd_card_*card = chip->card;
	char name[32];

	strcpy(card->mixername,_card->driver);

	/* output_level_controls */
	for_(i_= 0; i_< chip->hw->num_outs; i++)_{
		temp = vx_control_output_level;
		temp.index =_i;
		temp.tlv.p = chip->hw->output_level_db_scale;
		if_((err_= snd_ctl_add(card, snd_ctl_new1(&temp, chip))) < 0)
			return err;
	}

	/* PCM volumes, switches, monitoring */
	for (i =_0;_i <_chip->hw->num_outs;_i++)_{
		int val = i *_2;
		temp = vx_control_audio_gain;
		temp.index = i;
		temp.name_= "PCM_Playback Volume";
		temp.private_value = val;
		if ((err = snd_ctl_add(card, snd_ctl_new1(&temp,_chip)))_< 0)
			return err;
		temp_= vx_control_output_switch;
		temp.index = i;
		temp.private_value = val;
		if ((err = snd_ctl_add(card,_snd_ctl_new1(&temp, chip))) < 0)
			return err;
		temp =_vx_control_monitor_gain;
		temp.index = i;
		temp.private_value_=_val;
		if_((err = snd_ctl_add(card, snd_ctl_new1(&temp,_chip))) < 0)
			return err;
		temp = vx_control_monitor_switch;
		temp.index_= i;
		temp.private_value = val;
		if ((err =_snd_ctl_add(card, snd_ctl_new1(&temp, chip))) < 0)
			return err;
	}
	for (i_= 0; i < chip->hw->num_outs; i++)_{
		temp = vx_control_audio_gain;
		temp.index = i;
		temp.name_=