From patchwork Wed Aug 31 06:13:05 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Harsha Priya X-Patchwork-Id: 9306333 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 8B7FE601C0 for ; Wed, 31 Aug 2016 06:13:31 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7CDDF28E28 for ; Wed, 31 Aug 2016 06:13:31 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 71E9228E32; Wed, 31 Aug 2016 06:13:31 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BAFED28E28 for ; Wed, 31 Aug 2016 06:13:30 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id 1DA9A266D64; Wed, 31 Aug 2016 08:13:29 +0200 (CEST) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 8A561266B4F; Wed, 31 Aug 2016 08:13:21 +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 BCB35266BED; Wed, 31 Aug 2016 08:13:20 +0200 (CEST) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by alsa0.perex.cz (Postfix) with ESMTP id 06A7D26662A for ; Wed, 31 Aug 2016 08:13:12 +0200 (CEST) Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga101.fm.intel.com with ESMTP; 30 Aug 2016 23:13:11 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.30,260,1470726000"; d="scan'208";a="872877994" Received: from pharsha-ubuntu.sc.intel.com ([10.3.62.103]) by orsmga003.jf.intel.com with ESMTP; 30 Aug 2016 23:13:11 -0700 From: Harsha Priya To: alsa-devel@alsa-project.org, vinod.koul@intel.com, lgirdwood@gmail.com, broonie@kernel.org Date: Tue, 30 Aug 2016 23:13:05 -0700 Message-Id: <1472623985-31234-1-git-send-email-harshapriya.n@intel.com> X-Mailer: git-send-email 1.9.1 Cc: Harsha Priya , Naveen M Subject: [alsa-devel] [PATCH] ASoC: Intel: Atom: Fix message handling during drop stream 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: , MIME-Version: 1.0 Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP If a stream is being dropped, the period_elapsed received then after need not be processed. Processing of the period_elapsed message causes a time out in drop stream response processing. This patch adds a condition to skip period_elapsed message processing if the stream is in INIT state. Signed-off-by: Harsha Priya Signed-off-by: Naveen M Acked-by: Vinod Koul --- sound/soc/intel/atom/sst/sst_ipc.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sound/soc/intel/atom/sst/sst_ipc.c b/sound/soc/intel/atom/sst/sst_ipc.c index 8afa6fe..bfc8899 100644 --- a/sound/soc/intel/atom/sst/sst_ipc.c +++ b/sound/soc/intel/atom/sst/sst_ipc.c @@ -267,6 +267,9 @@ static void process_fw_async_msg(struct intel_sst_drv *sst_drv_ctx, "Period elapsed rcvd for pipe id 0x%x\n", pipe_id); stream = &sst_drv_ctx->streams[str_id]; + /* If stream is dropped, skip processing this message*/ + if (stream->status == STREAM_INIT) + break; if (stream->period_elapsed) stream->period_elapsed(stream->pcm_substream); if (stream->compr_cb)