Message ID | 20180704094944.16440-7-srinivas.kandagatla@linaro.org (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org> 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 3682C603D7 for <patchwork-linux-arm@patchwork.kernel.org>; Wed, 4 Jul 2018 09:54:55 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3573928DD5 for <patchwork-linux-arm@patchwork.kernel.org>; Wed, 4 Jul 2018 09:54:55 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 28FA928DD9; Wed, 4 Jul 2018 09:54:55 +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=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id B813428DD5 for <patchwork-linux-arm@patchwork.kernel.org>; Wed, 4 Jul 2018 09:54:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=swsXhN60B/qmlmTRu4LgW9qeTAxK1v7RZwiZEyZ09kU=; b=oxw532MSkNvUe/cL0PjCae5khK x/Z5XCtw+E/EgID5ksvNZUerdsWL/JOaJQcxxtC/FpjkQZXhl6KrqJZb0XtbLEmZH0WWKAsVsnaVZ mViaQILFeFA9xnTJyI98xqGpRDg4JUG7QhQ209aRdl8tae0ne5VE+jfjPzC/BlqpM7JKXFIOJnAhT yKfCDuEFBXM+++z43//VTe7lbyxFhwkmioxQF+l0C2xzxsR6aCpqB0kdK5WWhiNf3PDtNvtTar/0E Ih5z3fuHrIN/VwOmPCsabtG8loZpr7iBDo5HOd3yCgRVZc95tywDxYyeUnxXixKIpMQnBu68QnkpL 1Lta+BIg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1faeUo-00049Y-1R; Wed, 04 Jul 2018 09:54:46 +0000 Received: from mail-wm0-x22b.google.com ([2a00:1450:400c:c09::22b]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1faeSI-0001zM-LG for linux-arm-kernel@lists.infradead.org; Wed, 04 Jul 2018 09:52:17 +0000 Received: by mail-wm0-x22b.google.com with SMTP id s12-v6so5154434wmc.1 for <linux-arm-kernel@lists.infradead.org>; Wed, 04 Jul 2018 02:52:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=U2hFfWmmsNEuowUtZFEQCnLNHtXFTHE2eMSugD1fOFs=; b=fcQhHFce0+XGd0vzjSI/rSY7zQ8hSEEOVD2G7ZvhxbU5F/hywUR0bcxr3P9V0wRk2K 9Oqq8jwIkFrZlJasfWif+HcBaA7/UAus5s4Gq02XaRccSmHUDUV0P0kGExnjr9l62AT4 j9Fzf5uXG/tPc4AyQrEA3Nf+jgf9lqG6p8Fpk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=U2hFfWmmsNEuowUtZFEQCnLNHtXFTHE2eMSugD1fOFs=; b=BQRDY6IlzDfIIH4xepmKDqpuBVulARIr+9JfYwA8fqCwBvWLcIlkB78VDX09aTNC2c TgEzhQeCKl713cp6zl56yQygp6sH2toubdyU1eEhmZQv2panlp0p3KCEJTmVQUvgzdy8 bGYaFu1/x8ZfLUuIlD34inedxjvDBvX/2JtsZuyQ3GhSSD4dxh8sfdhCx1eZvik68GZw +copKqyG03sfIn1QcedfnYEK56CRvO0cHAL8L189Lbu/EB7O2YphzvQO16KqVAvg+XKl bcG9Vty9GtuLcpUm+0+lWCZoU8RLn2AWSeo6AbkoDB9X/Cbvvsi8C9uIr7+UAR4LsNWz I4cQ== X-Gm-Message-State: APt69E1uC1QHB2GeF92a9wa4jGYbDx+rWuiCFzZ/zaoMti3kSXZNImjB lbzl1hshqShqZ3uBZaPGFgeNDQ== X-Google-Smtp-Source: AAOMgpdjCWZX2FMBTsRSU7/nlCZpG5La0JWTbxVqG6Exn0J7n4DXKmZrbrTdR9DQKUkIdOhdEUn6UA== X-Received: by 2002:a1c:17d4:: with SMTP id 203-v6mr1087806wmx.75.1530697918899; Wed, 04 Jul 2018 02:51:58 -0700 (PDT) Received: from localhost.localdomain (cpc90716-aztw32-2-0-cust92.18-1.cable.virginm.net. [86.26.100.93]) by smtp.gmail.com with ESMTPSA id 125-v6sm6370089wmw.9.2018.07.04.02.51.58 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 04 Jul 2018 02:51:58 -0700 (PDT) From: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> To: broonie@kernel.org, alsa-devel@alsa-project.org Subject: [PATCH 6/6] ASoC: qdsp6: q6asm-dai: do not close port if its not opened Date: Wed, 4 Jul 2018 10:49:44 +0100 Message-Id: <20180704094944.16440-7-srinivas.kandagatla@linaro.org> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180704094944.16440-1-srinivas.kandagatla@linaro.org> References: <20180704094944.16440-1-srinivas.kandagatla@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180704_025211_044504_2F934C2A X-CRM114-Status: GOOD ( 13.03 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: <linux-arm-kernel.lists.infradead.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/linux-arm-kernel/> List-Post: <mailto:linux-arm-kernel@lists.infradead.org> List-Help: <mailto:linux-arm-kernel-request@lists.infradead.org?subject=help> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe> Cc: bgoswami@codeaurora.org, linux-arm-msm@vger.kernel.org, tiwai@suse.com, lgirdwood@gmail.com, linux-kernel@vger.kernel.org, Srinivas Kandagatla <srinivas.kandagatla@linaro.org>, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" <linux-arm-kernel-bounces@lists.infradead.org> Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP |
diff --git a/sound/soc/qcom/qdsp6/q6asm-dai.c b/sound/soc/qcom/qdsp6/q6asm-dai.c index 1196dc7483d2..199d0fb6f90a 100644 --- a/sound/soc/qcom/qdsp6/q6asm-dai.c +++ b/sound/soc/qcom/qdsp6/q6asm-dai.c @@ -390,7 +390,9 @@ static int q6asm_dai_close(struct snd_pcm_substream *substream) struct q6asm_dai_rtd *prtd = runtime->private_data; if (prtd->audio_client) { - q6asm_cmd(prtd->audio_client, CMD_CLOSE); + if (prtd->state) + q6asm_cmd(prtd->audio_client, CMD_CLOSE); + q6asm_unmap_memory_regions(substream->stream, prtd->audio_client); q6asm_audio_client_free(prtd->audio_client);
asm ports are open as part of prepare, so for use cases like "aplay sample.wav" were sample.wav is not present. This would call port close eventhough port was never opened. DSP would return errors for such use cases. Avoid doing this by checking the port state. Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> --- sound/soc/qcom/qdsp6/q6asm-dai.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)