Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp983262pxb; Wed, 6 Apr 2022 06:01:50 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyOisuBQl9JfLorZ+sn9DdH9s3wQ2hGSTWGW7WP13TwANmjFtqjSvs7THg5wPUhuFgbuhUN X-Received: by 2002:a02:ccdb:0:b0:321:2cf8:8c70 with SMTP id k27-20020a02ccdb000000b003212cf88c70mr4772406jaq.32.1649250109847; Wed, 06 Apr 2022 06:01:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649250109; cv=none; d=google.com; s=arc-20160816; b=QiV4NUR+WtuGdtFBQpBgn+fzdf0OlfAYlLYkLp0ayPFvd4Ri+Fgi0hPBr10HSrbx21 OzusudSn0SxD6ifm3mRJ5G9DO/XM3XDS4fLeJj6OfA5TFZ1Wc1DasOpKydO4hbDKO4UN YisCjgNbVc72dxKgzcBakAu5FnRglDCMTBdhGlqQi3n+y0ncAqelKU1mc/Y7U2fclb3G Ap8hv2iMrXDdeWIXb+4b7iAvOT0Qk+JtQHsBrmLcsY2DipOY5fCKi2KyQiNklxfAS+l6 EpjpHGUSkyQT0Pe9GYkgKAhZf7/QxpW2BTmpEvTAld720MCgC434kr661er06K9LxWUb 1EbQ== 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=cXAk40y8jWDsOWTlXezbAzpCeXh9X5K56ehZ50ENoHY=; b=PrFO9ujN3r7Sfi9pDKoh2MHjVfqEMoE5gqc4dZEOargp5sO4LdiQ7iPtau9UnwDzmr /mqNTRJUpN0Nvusm0Zgw5udlYaGKtAPOymQJMCC9fLQ3MUX7dPzVdWhBAWzRJRf3xslp fXLnIpHA18pu3P/mmR6Clex0nBz9WLZN+z4JexOGskK04T6b5Ikoo4o9tC/LOn+1wy5/ 58j1FJOWsaZB7Wt9D68r1DoHHzvYw8h3f6VnYXayvAd81kLDq3PbQCnoTgGZxEonLMrW e68msGfTjbx9VTGdqJNJ/QkLGm1aohrMcGGw6oya7DBHT8uob0zUQEq6Ihb3Xgf1e96Y DglQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=nyce7OYo; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id o6-20020a056e02188600b002c7c7bfb6bdsi443251ilu.91.2022.04.06.06.01.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Apr 2022 06:01:49 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=nyce7OYo; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 878A664D63B; Wed, 6 Apr 2022 03:18:08 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345190AbiDEUVw (ORCPT + 99 others); Tue, 5 Apr 2022 16:21:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45298 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1348833AbiDEJsk (ORCPT ); Tue, 5 Apr 2022 05:48:40 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5679AB3DEC; Tue, 5 Apr 2022 02:36:32 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id E386361675; Tue, 5 Apr 2022 09:36:31 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id EE380C385A2; Tue, 5 Apr 2022 09:36:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1649151391; bh=SzrysxvBq5ZNLxqpDPYaIE3D44TsoqwU/9BTGFVVG8w=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=nyce7OYoMeaoGfSx9h4JKgz8gRHe8w4JiQFBb77lUHtp/UAVI1+3Lt3tMCqrIqnXw ixLQeA2hH2rZn4MtqegRldfb/bZdb5BU9eUH3DWrm5V4KyCPyrpGtI5I9bm7XSvmYI bigut6eLGU4iF7s/n8VQhy//cD6Wshc2o52MONpc= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Meng Tang , Mark Brown , Sasha Levin Subject: [PATCH 5.15 371/913] ASoC: amd: Fix reference to PCM buffer address Date: Tue, 5 Apr 2022 09:23:53 +0200 Message-Id: <20220405070350.967960528@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220405070339.801210740@linuxfoundation.org> References: <20220405070339.801210740@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Meng Tang [ Upstream commit 54e1bf9f6177a3ffbd920474f4481a25361163aa ] PCM buffers might be allocated dynamically when the buffer preallocation failed or a larger buffer is requested, and it's not guaranteed that substream->dma_buffer points to the actually used buffer. The driver needs to refer to substream->runtime->dma_addr instead for the buffer address. Fixes: cab396d8b22c1 ("ASoC: amd: add ACP5x pcm dma driver ops") Signed-off-by: Meng Tang Link: https://lore.kernel.org/r/20220316091303.9745-1-tangmeng@uniontech.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin --- sound/soc/amd/vangogh/acp5x-pcm-dma.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/amd/vangogh/acp5x-pcm-dma.c b/sound/soc/amd/vangogh/acp5x-pcm-dma.c index f10de38976cb..6abcc2133a2c 100644 --- a/sound/soc/amd/vangogh/acp5x-pcm-dma.c +++ b/sound/soc/amd/vangogh/acp5x-pcm-dma.c @@ -281,7 +281,7 @@ static int acp5x_dma_hw_params(struct snd_soc_component *component, return -EINVAL; } size = params_buffer_bytes(params); - rtd->dma_addr = substream->dma_buffer.addr; + rtd->dma_addr = substream->runtime->dma_addr; rtd->num_pages = (PAGE_ALIGN(size) >> PAGE_SHIFT); config_acp5x_dma(rtd, substream->stream); return 0; -- 2.34.1