From mboxrd@z Thu Jan 1 00:00:00 1970 From: Peter Ujfalusi Subject: Re: [RFC PATCH 5/5] ASoC: omap-mcbsp: Place correct constraints for streams Date: Tue, 1 Jun 2010 11:07:32 +0300 Message-ID: <201006011107.32406.peter.ujfalusi@nokia.com> References: <1275293810-31984-1-git-send-email-peter.ujfalusi@nokia.com> <201006010947.09640.peter.ujfalusi@nokia.com> <20100601103828.55e7b394.jhnikula@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Return-path: In-Reply-To: <20100601103828.55e7b394.jhnikula@gmail.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: alsa-devel-bounces@alsa-project.org Errors-To: alsa-devel-bounces@alsa-project.org To: alsa-devel@alsa-project.org Cc: "tony@atomide.com" , "broonie@opensource.wolfsonmicro.com" , "Valentin Eduardo (Nokia-D/Helsinki)" , "Nurkkala Eero.An (EXT-Offcode/Oulu)" , "linux-omap@vger.kernel.org" , "ext@alsa-project.org" , Girdwood List-Id: linux-omap@vger.kernel.org On Tuesday 01 June 2010 10:38:28 ext Jarkko Nikula wrote: > On Tue, 1 Jun 2010 09:47:09 +0300 > = > Peter Ujfalusi wrote: > > I like the following naming: > > omap_mcbsp_hwrule_min_buffersize() > > omap_mcbsp_hwrule_max_periodsize() > = > Looks clear to me. > = > > Also, I think there is no point to limit the lower period size in > > threshold mode to 32, so I will remove that as well I think. > = > What was the reason why period size cannot be bigger than threshold? > This constraint was there before your patch but I don't remember reason > for it. When DMA is used to push the data to McBSP on OMAP3: The McBSP threshold means, that if threshold amount of locations (words) ar= e = free in the buffer, than the DMA request line will be asserted, and McBSP = expects that DMA will transfer _exactly_ threshold number of words in respo= nse = to the DMA request. So, if threshold is 1 (in register it is 0), than McBSP requests for new wo= rd, = whenever a single location is free in the FIFO. The DMA should send 1 word = per = DMA request. If threshold is configured to 100 (99 in register), than McBSP will asserts= the = DMA request line, when 100 locations are free. Than DMA has to send 100 wor= ds = per DMA request. So we need to limit the period size (which is used to configure the DMA's e= lem = count - number of words per DMA request) that it shall never be bigger than= the = threshold. > Should it be opposite that period size cannot be smaller than threshold? No. -- = P=E9ter