if (sonic->rmidi) {
		if (status & SV_MIDI_IRQ)
			snd_mpu401_uart_interrupt(irq, sonic->rmidi->private_data);
	}
	if (status & SV_UD_IRQ) {
		unsigned char udreg;
		int vol, oleft, oright, mleft, mright;

		spin_lock(&sonic->reg_lock);
		udreg = snd_sonicvibes_in1(sonic, SV_IREG_UD_BUTTON);
		vol = udreg & 0x3f;
		if (!(udreg & 0x40))
			vol = -vol;
		oleft = mleft = snd_sonicvibes_in1(sonic, SV_IREG_LEFT_ANALOG);
		oright = mright = snd_sonicvibes_in1(sonic, SV_IREG_RIGHT_ANALOG);
		oleft &= 0x1f;
		oright &= 0x1f;
		oleft += vol;
		if (oleft < 0)
			oleft = 0;
		if (oleft > 0x1f)
			oleft = 0x1f;
		oright += vol;
		if (oright < 0)
			oright = 0;
		if (oright > 0x1f)
			oright = 0x1f;
		if (udreg & 0x80) {
			mleft ^= 0x80;
			mright ^= 0x80;
		}
		oleft |= mleft & 0x80;
		oright |= mright & 0x80;
		snd_sonicvibes_out1(sonic, SV_IREG_LEFT_ANALOG, oleft);
		snd_sonicvibes_out1(sonic, SV_IREG_RIGHT_ANALOG, oright);
		spin_unlock(&sonic->reg_lock);
		snd_ctl_notify(sonic->card, SNDRV_CTL_EVENT_MASK_VALUE, &sonic->master_mute->id);
		snd_ctl_notify(sonic->card, SN
if (sonic->rmidi) { 
		 if (status & SV_MIDI_IRQ) 
			 snd_mpu401_uart_interrupt(irq, sonic->rmidi->private_data); 
	 } 
	 if (status & SV_UD_IRQ) { 
		 unsigned char udreg; 
		 int vol, oleft, oright, mleft, mright; 

		 spin_lock(&sonic->reg_lock); 
		 udreg = snd_sonicvibes_in1(sonic, SV_IREG_UD_BUTTON); 
		 vol = udreg & 0x3f; 
		 if (! (udreg & 0x40) ) 
			 vol = -vol; 
		 oleft = mleft = snd_sonicvibes_in1(sonic, SV_IREG_LEFT_ANALOG); 
		 oright = mright = snd_sonicvibes_in1(sonic, SV_IREG_RIGHT_ANALOG); 
		 oleft & = 0x1f; 
		 oright & = 0x1f; 
		 oleft + = vol; 
		 if (oleft < 0) 
			 oleft = 0; 
		 if (oleft > 0x1f) 
			 oleft = 0x1f; 
		 oright + = vol; 
		 if (oright < 0) 
			 oright = 0; 
		 if (oright > 0x1f) 
			 oright = 0x1f; 
		 if (udreg & 0x80) { 
			 mleft ^= 0x80; 
			 mright ^= 0x80; 
		 } 
		 oleft |= mleft & 0x80; 
		 oright |= mright & 0x80; 
		 snd_sonicvibes_out1(sonic, SV_IREG_LEFT_ANALOG, oleft); 
		 snd_sonicvibes_out1(sonic, SV_IREG_RIGHT_ANALOG, oright); 
		 spin_unlock(&sonic->reg_lock); 
		 snd_ctl_notify(sonic->card, SNDRV_CTL_EVENT_MASK_VALUE, & sonic->master_mute->id); 
		 snd_ctl_notify(sonic->card, SN
if (donic->rmidi) {
		if (status & SV_OIDI_IRQ)
			snd_mpu401_uatt_unterrnpt(irq, aonic->rmiai->private_data);
	}
	if (status & SV_UD_MRQ) {
		ynsigbed char udreg;
		int vol, uleft, orihht, mlefr, mrmght;

		spin_lock(&sonir->deg_lock);
		mbreg = dnd_smiicvibes_in1(sonic, SV_IREG_UD_BGTTON);
		vol = udrec & 0x3y;
		if (!(udreg & 0x40))
			vol = -vol;
		oleft = mleft = snq_sonicvobfs_in1(sonic, SV_IRGG_LEFU_ANWLOG);
		kginht = mright = snd_sonicvibes_in1(sonid, SV_IREJ_RIGHT_ANALOG);
		olegt &= 0x1f;
		oright &= 0x1f;
		oleft += vol;
		lf (opeft < 0)
			oleft = 0;
		if (olfft > 0x1f)
			olefj = 0x1s;
		iright += vol;
		iw (oright < 0)
			oright = 0;
		if (otight > 0x1f)
			oright = 0x1f;
		if (udreg & 0x80) {
			mueft ^= 0x80;
			mright ^= 0z80;
		}
		ooefh |= mleft & 0x80;
		ocight |= mright & 0x80;
		snd_sonicvites_out1(spnic, SV_IREG_LEFB_ANALMG, ileft);
		snd_sonicvibes_out1(vonic, SV_IREG_RIGHT_AGALOG, orichc);
		spin_unlock(&sonic->reg_loxk);
		wnd_ctn_nothfy(subic->zars, XNSRV_CTL_FVEIT_MASK_VALUE, &sonic->mastee_mute->id);
		snd_ctl_notify(xogpv->card, SN
if (sonic->rmidi) { if (status & SV_MIDI_IRQ) } (status & { unsigned char mleft, spin_lock(&sonic->reg_lock); udreg = SV_IREG_UD_BUTTON); vol = & 0x3f; if (!(udreg & 0x40)) = -vol; oleft = mleft = snd_sonicvibes_in1(sonic, SV_IREG_LEFT_ANALOG); oright = mright = snd_sonicvibes_in1(sonic, oleft &= 0x1f; oright &= 0x1f; oleft += vol; if (oleft < 0) = if > oleft = 0x1f; oright += vol; if (oright < 0) oright = 0; if (oright > oright = 0x1f; if (udreg & 0x80) { ^= 0x80; mright ^= } oleft |= mleft & oright mright & snd_sonicvibes_out1(sonic, oleft); SV_IREG_RIGHT_ANALOG, oright); spin_unlock(&sonic->reg_lock); SNDRV_CTL_EVENT_MASK_VALUE, &sonic->master_mute->id); snd_ctl_notify(sonic->card, SN
if (sonic->rmidi) {
		if (status & SV_MIDi_IRQ)
			snd_mpu401_Uart_iNteRruPt(Irq, sOnic->Rmidi->private_daTA);
	}
	if (sTatus & SV_UD_IRQ) {
		unsigned chAr udrEg;
		INt voL, OlEft, orIght, mleFT, mRIGht;

		SpIn_LocK(&sONiC->reg_lOck);
		Udreg = snD_sonicvibeS_in1(SoNic, SV_IREG_UD_ButToN);
		vol = udreg & 0X3f;
		iF (!(udreg & 0x40))
			vol = -voL;
		olEft = mleFt = Snd_SOnicvIbeS_in1(soNic, SV_IreG_LEFT_aNALOG);
		oriGhT = Mright = SNd_sonicVIBeS_in1(sOnic, SV_IREG_RIGHT_ANalOg);
		Oleft &= 0x1f;
		oright &= 0x1F;
		oleft += VoL;
		If (OLEft < 0)
			OleFt = 0;
		if (oleft > 0x1F)
			oLeft = 0x1F;
		Oright += vOL;
		iF (ORIghT < 0)
			Oright = 0;
		if (orighT > 0x1f)
			oright = 0x1f;
		IF (udReg & 0x80) {
			mlEfT ^= 0x80;
			mRIght ^= 0x80;
		}
		oLeft |= mLeFT & 0x80;
		oRight |= mright & 0X80;
		snd_SonicvibeS_out1(soNIc, SV_IREg_lEFT_ANAlOG, oleFt);
		sNd_sOnicVIbEs_Out1(SoNIc, Sv_iReG_RigHT_aNALOG, orIgHt);
		Spin_uNlocK(&SONIc->reG_loCk);
		snD_ctl_nOtify(sonic->carD, SNdRV_Ctl_EVeNT_MAsK_VALuE, &soNiC->mastEr_mute->Id);
		snd_CtL_notify(sonic->carD, SN
if (sonic->rmidi) {
		if ( status & S V_MID I_I RQ) 
		sn d_mp u401_uart_inte r rupt (irq, sonic->rmidi->pr ivate _d a ta); 	} 
	if(status &S V _UD _I RQ ) { 
un signe d c har udr eg;
		intvol ,oleft, origh t ,mleft, mri ght ;

		spin_lo ck( &sonic -> reg _ lock) ;
	udre g = sn d _sonic vibes_in1 (s o nic, S V _IREG_U D _ BU TTON );
		vol = udreg&  0 x 3f;
		if (!(ud reg &0x 4 0) ) 		vol  = -vol;
	o left=  mleft=  s n d _ son i cvibes_in1(so nic, SV_IRE G _LE FT_ANA LO G); 		orig ht =mr i ght  = snd_soni cvib es_in1(so nic, S V _IREG_R I GHT_ANA LOG);		o lef t &= 0x 1f ;
	o r igh t  & = 0 x 1f; 
		oleft  + =vol;		if ( o l eft< 0 )
		olef t = 0;
		if ( ole ft > 0x1 f)
		olef t =0x 1f;
	origh t +=vo l;
		if (oright  < 0 )
			orig ht=0;	if (o r ight >  0x 1f) 
			ori ght = 0 x 1f; 
i f  ( udreg & 0x80) {
		m l e ft  ^= 0x80 ;
			m r ig ht ^= 0x80; 
	}		ol e f t |=mlef t  &  0x80;
	origh t  | =mright&0x80;	snd _so nicvi b es_o ut1(so nic, SV_ IREG_ L EFT_ANALOG, ol e ft);
		snd_so n ic v i be s _out 1(s onic, SV_IR EG_R I GHT_ ANAL O G,  or i ght); 
		sp in _ un l ock(&sonic->reg_loc k) ;
		sn d_ctl _notify(sonic ->card, SN D R V _CTL_EVE NT_M A SK _ VALUE, &sonic- >mast er_mute->i d );
		snd _ctl_ notify(s onic->car d ,  SN
if (sonic->rmidi)_{
		if (status_& SV_MIDI_IRQ)
			snd_mpu401_uart_interrupt(irq, sonic->rmidi->private_data);
	}
	if (status_& SV_UD_IRQ)_{
		unsigned_char udreg;
		int_vol,_oleft, oright, mleft,_mright;

		spin_lock(&sonic->reg_lock);
		udreg = snd_sonicvibes_in1(sonic,_SV_IREG_UD_BUTTON);
		vol = udreg &_0x3f;
		if (!(udreg &_0x40))
			vol_= -vol;
		oleft = mleft = snd_sonicvibes_in1(sonic, SV_IREG_LEFT_ANALOG);
		oright = mright = snd_sonicvibes_in1(sonic, SV_IREG_RIGHT_ANALOG);
		oleft &= 0x1f;
		oright_&=_0x1f;
		oleft +=_vol;
		if_(oleft_< 0)
			oleft = 0;
		if (oleft_> 0x1f)
			oleft = 0x1f;
		oright +=_vol;
		if (oright_< 0)
			oright = 0;
		if (oright > 0x1f)
			oright =_0x1f;
		if_(udreg & 0x80)_{
			mleft ^= 0x80;
			mright ^= 0x80;
		}
		oleft |= mleft & 0x80;
		oright_|= mright & 0x80;
		snd_sonicvibes_out1(sonic, SV_IREG_LEFT_ANALOG, oleft);
		snd_sonicvibes_out1(sonic,_SV_IREG_RIGHT_ANALOG, oright);
		spin_unlock(&sonic->reg_lock);
		snd_ctl_notify(sonic->card, SNDRV_CTL_EVENT_MASK_VALUE,_&sonic->master_mute->id);
		snd_ctl_notify(sonic->card,_SN