amixer.s
1.69 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
/*************************************************************************
* *
* 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