Received: by 2002:a05:6a10:9e8c:0:0:0:0 with SMTP id y12csp181038pxx; Wed, 28 Oct 2020 01:53:15 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwFPcpxjSNAkt4bV7OtlUdRi1Vx7N/lEu0ehrCwHFWMWhFZJkDTlRH6+I/TnXBiq2QDcSQi X-Received: by 2002:a17:906:f0ce:: with SMTP id dk14mr6738112ejb.539.1603875194719; Wed, 28 Oct 2020 01:53:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603875194; cv=none; d=google.com; s=arc-20160816; b=Ko7DSBXVYpgMaL8i8wymdr0YSalDJnvI9dnXwOHlXnaE2I2dvV6P0yCBWXqDBI6RR3 TPU8Ob7rt8dNGJnGnnmbh8ExIFrY+NIb+OfoYI6Kgmeg0p7/zStz3i9CYLEwXNs0TFX+ SlJD4Q9fuh1nyePIzDCPxCIMXeiarOeftUBMkB+Hvf+Q/oMbNyTqrNcUYZQAik2QfMn3 RgEIDZ0C14ZGzJzDeFLzPMED42LJKVYKlYdX3ebn1PCAI4PClaL5E53RBrLTZ8GEoGAN xIoqYHe5gP177BJkXRjhWM5GbmWm9kOaofVMB2NaLVkBO6K9i5r6foRFyMToif7RVz9z Gztg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=SOnfcwRYhdnN0yD0VcrPdI37tz7ojMZvOlxvGz8cASE=; b=GOhWzIrU2UyhfSVWgC9IvdVtznwVwP40dNxR8I5t1YhAaXlsdb80gF9J3uhNMpRMm7 LZbrwvxbPLdtmTKYHwgqXFcNS/d08Z75TMFWKpQVOVCAAXyVZB4IzCVwsUMw55iFQX3u iNGVWyTQ1yrQoA5lDB+fhSRofj57gneec+F9Kg/7ggIGNgESDucuHekm0ay9qPkdaLZx G1Fjyix4WVBYEH9NMs3VGY5YdM1/sMzA7v2oEHH+roD2GvuyPsFbqxWjyzU3Z8tWDqrc 9lo0cTHOQvYOrkuSkZUgJmo43wTaSt+R3ivShBdvXFtPo12dcJvoBH+mFVDdK7P9i1D/ NMGw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=lJLqEVB0; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y19si2789537ejd.730.2020.10.28.01.52.52; Wed, 28 Oct 2020 01:53:14 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=lJLqEVB0; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756451AbgJ0ONV (ORCPT + 99 others); Tue, 27 Oct 2020 10:13:21 -0400 Received: from mail.kernel.org ([198.145.29.99]:59142 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755484AbgJ0OKD (ORCPT ); Tue, 27 Oct 2020 10:10:03 -0400 Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 40CB72072D; Tue, 27 Oct 2020 14:10:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1603807802; bh=lBkSbt/5r2Hk71TiUK3/rd4T0f4CaLTH6Zoq8zJyLps=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=lJLqEVB0lTopMfC8RqcoX8qRNP0EV/MWaz8t078rG+bV01PzncLrb7iHHvDWUCXxT bBKWk0wObWRgtblxvh5bXP9Kr2PeBTxwb18AodBR0vZRvNAkuxYDRdB2gcxH7blXBY uZ/A91WOjKofNAfr2P8LFWVOXLmUy9szSZ/NydYk= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Rohit kumar , Srinivas Kandagatla , Mark Brown , Sasha Levin Subject: [PATCH 4.14 047/191] ASoC: qcom: lpass-cpu: fix concurrency issue Date: Tue, 27 Oct 2020 14:48:22 +0100 Message-Id: <20201027134911.997616183@linuxfoundation.org> X-Mailer: git-send-email 2.29.1 In-Reply-To: <20201027134909.701581493@linuxfoundation.org> References: <20201027134909.701581493@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Rohit kumar [ Upstream commit 753a6e17942f6f425ca622e1610625998312ad89 ] i2sctl register value is set to 0 during hw_free(). This impacts any ongoing concurrent session on the same i2s port. As trigger() stop already resets enable bit to 0, there is no need of explicit hw_free. Removing it to fix the issue. Fixes: 80beab8e1d86 ("ASoC: qcom: Add LPASS CPU DAI driver") Signed-off-by: Rohit kumar Reviewed-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/1597402388-14112-7-git-send-email-rohitkr@codeaurora.org Signed-off-by: Mark Brown Signed-off-by: Sasha Levin --- sound/soc/qcom/lpass-cpu.c | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/sound/soc/qcom/lpass-cpu.c b/sound/soc/qcom/lpass-cpu.c index 292b103abada9..475579a9830a3 100644 --- a/sound/soc/qcom/lpass-cpu.c +++ b/sound/soc/qcom/lpass-cpu.c @@ -182,21 +182,6 @@ static int lpass_cpu_daiops_hw_params(struct snd_pcm_substream *substream, return 0; } -static int lpass_cpu_daiops_hw_free(struct snd_pcm_substream *substream, - struct snd_soc_dai *dai) -{ - struct lpass_data *drvdata = snd_soc_dai_get_drvdata(dai); - int ret; - - ret = regmap_write(drvdata->lpaif_map, - LPAIF_I2SCTL_REG(drvdata->variant, dai->driver->id), - 0); - if (ret) - dev_err(dai->dev, "error writing to i2sctl reg: %d\n", ret); - - return ret; -} - static int lpass_cpu_daiops_prepare(struct snd_pcm_substream *substream, struct snd_soc_dai *dai) { @@ -277,7 +262,6 @@ const struct snd_soc_dai_ops asoc_qcom_lpass_cpu_dai_ops = { .startup = lpass_cpu_daiops_startup, .shutdown = lpass_cpu_daiops_shutdown, .hw_params = lpass_cpu_daiops_hw_params, - .hw_free = lpass_cpu_daiops_hw_free, .prepare = lpass_cpu_daiops_prepare, .trigger = lpass_cpu_daiops_trigger, }; -- 2.25.1