amixer.s 1.69 KB
/*************************************************************************
 *                                                                       *
 *               Copyright (C) 1994, Silicon Graphics, Inc.              *
 *                                                                       *
 *  These coded instructions, statements, and computer programs  contain *
 *  unpublished  proprietary  information of Silicon Graphics, Inc., and *
 *  are protected by Federal copyright  law.  They  may not be disclosed *
 *  to  third  parties  or copied or duplicated in any form, in whole or *
 *  in part, without the prior written consent of Silicon Graphics, Inc. *
 *                                                                       *
 ************************************************************************/
	
/* amixer.s */

.name	dm_in,		$23
.name   dm_out,		$22
.name	count,		$21
.name	gain,		$20

.name	vconst,		$v31
.name	vgain,		$v30
.name	vin,		$v29
.name	vout,		$v28
.name   vtemp,          $v27

case_A_MIXER:
	lqv	vconst[0], AL_CONST_C_SHIFT(zero)
	andi	dm_out, aud1, 0xffff
	addi	dm_out, dm_out, RSP_BUFFER_OFFSET
	lqv	vout[0], 0(dm_out)
	
	srl	dm_in, aud1, 16
	addi	dm_in, dm_in, RSP_BUFFER_OFFSET
	lqv	vin[0], 0(dm_in)
	mtc2	aud0, vgain

	addi	count, zero, AL_ALL_COUNTER
	
MIXloop:
				vmulf	vtemp, vout, vconst[5]
	addi	count, count, -16
	addi	dm_in, dm_in, 16
	addi	dm_out, dm_out, 16
				vmacf	vtemp, vin, vgain[0]
	lqv	vout[0], 0(dm_out)
	lqv	vin[0], 0(dm_in)
	bgtz	count, MIXloop
	sqv	vtemp[0], -16(dm_out)

MIXdone:
	j	AudDone
	addi	dlcount, dlcount, -8

.unname	dm_in
.unname dm_out
.unname	count
.unname gain

.unname	vconst
.unname	vgain
.unname	vin
.unname	vin1
.unname vout
.unname vout1