From patchwork Fri Aug 1 15:09:44 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Jie, Yang" X-Patchwork-Id: 4663571 Return-Path: X-Original-To: patchwork-alsa-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id CE6A09F36A for ; Fri, 1 Aug 2014 15:09:03 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 1E4B9201F7 for ; Fri, 1 Aug 2014 15:09:03 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id D877D201E4 for ; Fri, 1 Aug 2014 15:09:01 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id D427C265516; Fri, 1 Aug 2014 17:09:00 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 Received: from alsa0.perex.cz (localhost [IPv6:::1]) by alsa0.perex.cz (Postfix) with ESMTP id 6EC5E26551C; Fri, 1 Aug 2014 17:08:56 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id 72433265523; Fri, 1 Aug 2014 17:08:55 +0200 (CEST) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by alsa0.perex.cz (Postfix) with ESMTP id EC93126551C for ; Fri, 1 Aug 2014 17:08:46 +0200 (CEST) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga101.fm.intel.com with ESMTP; 01 Aug 2014 08:08:46 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.97,862,1389772800"; d="scan'208";a="366747005" Received: from keyon-u1310.sh.intel.com ([10.239.13.105]) by FMSMGA003.fm.intel.com with ESMTP; 01 Aug 2014 08:05:33 -0700 From: Jie Yang To: alsa-devel@alsa-project.org Date: Fri, 1 Aug 2014 23:09:44 +0800 Message-Id: <1406905784-31182-1-git-send-email-yang.jie@intel.com> X-Mailer: git-send-email 1.8.3.2 MIME-Version: 1.0 Cc: mengdong.lin@intel.com, broonie@kernel.org, pawel.piskorski@intel.com, liam.r.girdwood@intel.com Subject: [alsa-devel] [PATCH] ASoC: Intel: Don't issue ipc when processing response X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP From: Pawe? Piskorski Make sure we dont issue IPC when we are processing a response. Signed-off-by: Pawe? Piskorski Signed-off-by: Liam Girdwood Signed-off-by: Jie Yang --- sound/soc/intel/sst-haswell-ipc.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sound/soc/intel/sst-haswell-ipc.c b/sound/soc/intel/sst-haswell-ipc.c index 5a607ab..0fec686 100644 --- a/sound/soc/intel/sst-haswell-ipc.c +++ b/sound/soc/intel/sst-haswell-ipc.c @@ -457,9 +457,10 @@ static void ipc_tx_msgs(struct kthread_work *work) return; } - /* if the DSP is busy we will TX messages after IRQ */ + /* if the DSP is busy, we will TX messages after IRQ. + * also postpone if we are in the middle of procesing completion irq*/ ipcx = sst_dsp_shim_read_unlocked(hsw->dsp, SST_IPCX); - if (ipcx & SST_IPCX_BUSY) { + if (ipcx & (SST_IPCX_BUSY | SST_IPCX_DONE)) { spin_unlock_irqrestore(&hsw->dsp->spinlock, flags); return; }