Home | History | Annotate | Download | only in dc

Lines Matching refs:ch

17 #define	CHNREGADDR(ch,x)	SNDREGADDR(0x80*(ch)+(x))
22 #define CHNREG32(ch, x) (*(volatile unsigned long *)CHNREGADDR(ch,x))
23 #define CHNREG8(ch, x) (*(volatile unsigned long *)CHNREGADDR(ch,x))
139 ch is the channel to play on (0 - 63)
151 void aica_play(int ch,int mode,unsigned long smpptr,int loopst,int loopend,int freq,int vol,int pan,int loopflag) {
158 aica_stop(ch);
175 CHNREG32(ch, 8) = loopst & 0xffff;
176 CHNREG32(ch, 12) = loopend & 0xffff;
179 CHNREG32(ch, 24) = AICA_FREQ(freq);
183 CHNREG32(ch, 36) = AICA_PAN(pan) | (0xf<<8);
187 CHNREG32(ch, 40) = 0x24 | (vol<<8);
196 CHNREG32(ch, 16) = 0xf010;
198 CHNREG32(ch, 16) = 0x1f; /* No volume envelope */
205 CHNREG32(ch, 4) = smpptr & 0xffff;
209 CHNREG32(ch, 0) = val;
214 /* CHNREG32(ch, 0) |= 0xc000; */
220 CHNREG32(ch, 40) = 0x24 | (i<<8);;
228 void aica_stop(int ch) {
229 g2_write_32(CHNREGADDR(ch, 0),(g2_read_32(CHNREGADDR(ch, 0)) & ~0x4000) | 0x8000);
238 void aica_vol(int ch,int vol) {
239 // g2_write_8(CHNREGADDR(ch, 41),AICA_VOL(vol));
240 g2_write_32(CHNREGADDR(ch, 40),(g2_read_32(CHNREGADDR(ch, 40))&0xffff00ff)|(AICA_VOL(vol)<<8) );
245 void aica_pan(int ch,int pan) {
246 // g2_write_8(CHNREGADDR(ch, 36),AICA_PAN(pan));
247 g2_write_32(CHNREGADDR(ch, 36),(g2_read_32(CHNREGADDR(ch, 36))&0xffffff00)|(AICA_PAN(pan)) );
252 void aica_freq(int ch,int freq) {
253 g2_write_32(CHNREGADDR(ch, 24),AICA_FREQ(freq));
258 int aica_get_pos(int ch) {
260 /* Observe channel ch */
261 g2_write_32(SNDREGADDR(0x280c),(g2_read_32(SNDREGADDR(0x280c))&0xffff00ff) | (ch<<8));
266 /* Observe channel ch */
267 g2_write_8(SNDREGADDR(0x280d),ch);