From: Takashi Iwai Subject: Re: Dreamcast AICA driver Date: Mon, 13 Mar 2006 12:48:18 +0100 Message-ID: References: <1142124747.9496.50.camel@localhost.localdomain> <1142125920.25358.22.camel@mindpipe> <1142126427.9496.56.camel@localhost.localdomain> <1142145536.25358.116.camel@mindpipe> <1142195736.8342.4.camel@localhost.localdomain> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Return-path: In-Reply-To: <1142195736.8342.4.camel@localhost.localdomain> Sender: alsa-devel-admin@lists.sourceforge.net Errors-To: alsa-devel-admin@lists.sourceforge.net List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , List-Archive: To: Manuel Jander Cc: Alsa-devel list List-Id: alsa-devel@alsa-project.org At Sun, 12 Mar 2006 21:35:36 +0100, Manuel Jander wrote: > > Hi, > > On Sun, 2006-03-12 at 01:38 -0500, Lee Revell wrote: > > On Sun, 2006-03-12 at 01:20 +0000, Adrian McMenamin wrote: > > > > > http://newgolddream.dyndns.info/cgi-bin/cvsweb > > > > > > > > > > > > > dreamcastcard->clicks++; > > > if (dreamcastcard->clicks == 8) dreamcastcard->clicks = 0; > > > > dreamcastcard->clicks %= 8; > > Watch out. The ARM7 does not support this in direct assembler. If the > compiler is not smart enough it would require a division, and that is > really realy slow on a any ARM processor. > Helping the compiler by using > > dreamcastcard->clicks &= 0x00000003; Should be 7 instead of 3 :) BTW, you don't have to restrict the buffer size and period size as long as you have double-buffer, i.e. a buffer on CPU side and transfer to the h/w buffer. The only restricted parameter is the period size. For example, a buffer with 13 periods can be mapped like: BUF 0 ... 7 8 9 10 11 12 | 0 1 2 3 4 ... H/W 0 ... 7 0 1 2 3 4 | 5 6 7 0 1 ... Takashi ------------------------------------------------------- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642