From patchwork Tue Jun 1 11:18:22 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Ujfalusi X-Patchwork-Id: 103469 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o51BIp6G020705 for ; Tue, 1 Jun 2010 11:18:52 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755580Ab0FALSu (ORCPT ); Tue, 1 Jun 2010 07:18:50 -0400 Received: from smtp.nokia.com ([192.100.122.230]:57758 "EHLO mgw-mx03.nokia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755132Ab0FALSt (ORCPT ); Tue, 1 Jun 2010 07:18:49 -0400 Received: from esebh105.NOE.Nokia.com (esebh105.ntc.nokia.com [172.21.138.211]) by mgw-mx03.nokia.com (Switch-3.3.3/Switch-3.3.3) with ESMTP id o51BIExC026178; Tue, 1 Jun 2010 14:18:42 +0300 Received: from vaebh104.NOE.Nokia.com ([10.160.244.30]) by esebh105.NOE.Nokia.com with Microsoft SMTPSVC(6.0.3790.4675); Tue, 1 Jun 2010 14:18:41 +0300 Received: from mgw-da02.ext.nokia.com ([147.243.128.26]) by vaebh104.NOE.Nokia.com over TLS secured channel with Microsoft SMTPSVC(6.0.3790.4675); Tue, 1 Jun 2010 14:18:40 +0300 Received: from cseresznye.nmp.nokia.com (cseresznye.nmp.nokia.com [172.22.211.20]) by mgw-da02.ext.nokia.com (Switch-3.3.3/Switch-3.3.3) with ESMTP id o51BINNh014596; Tue, 1 Jun 2010 14:18:34 +0300 From: Peter Ujfalusi To: alsa-devel@alsa-project.org, linux-omap@vger.kernel.org Cc: broonie@opensource.wolfsonmicro.com, lrg@slimlogic.co.uk, jhnikula@gmail.com, tony@atomide.com, ext-eero.nurkkala@nokia.com, eduardo.valentin@nokia.com Subject: [PATCH v3 3/5] OMAP2: McBSP: Use the port's buffer_size when calculating tx delay Date: Tue, 1 Jun 2010 14:18:22 +0300 Message-Id: <1275391104-26387-4-git-send-email-peter.ujfalusi@nokia.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1275391104-26387-1-git-send-email-peter.ujfalusi@nokia.com> References: <1275391104-26387-1-git-send-email-peter.ujfalusi@nokia.com> X-OriginalArrivalTime: 01 Jun 2010 11:18:40.0609 (UTC) FILETIME=[302E1510:01CB017C] X-Nokia-AV: Clean Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Tue, 01 Jun 2010 11:18:52 +0000 (UTC) differently. Signed-off-by: Peter Ujfalusi --- arch/arm/plat-omap/mcbsp.c | 7 +------ 1 files changed, 1 insertions(+), 6 deletions(-) diff --git a/arch/arm/plat-omap/mcbsp.c b/arch/arm/plat-omap/mcbsp.c index d883bbf..ac09c79 100644 --- a/arch/arm/plat-omap/mcbsp.c +++ b/arch/arm/plat-omap/mcbsp.c @@ -575,8 +575,6 @@ u16 omap_mcbsp_get_fifo_size(unsigned int id) } EXPORT_SYMBOL(omap_mcbsp_get_fifo_size); -#define MCBSP2_FIFO_SIZE 0x500 /* 1024 + 256 locations */ -#define MCBSP1345_FIFO_SIZE 0x80 /* 128 locations */ /* * omap_mcbsp_get_tx_delay returns the number of used slots in the McBSP FIFO */ @@ -595,10 +593,7 @@ u16 omap_mcbsp_get_tx_delay(unsigned int id) buffstat = MCBSP_READ(mcbsp, XBUFFSTAT); /* Number of slots are different in McBSP ports */ - if (mcbsp->id == 2) - return MCBSP2_FIFO_SIZE - buffstat; - else - return MCBSP1345_FIFO_SIZE - buffstat; + return mcbsp->pdata->buffer_size - buffstat; } EXPORT_SYMBOL(omap_mcbsp_get_tx_delay);