From patchwork Sat Sep 24 03:35:58 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chunxu Li X-Patchwork-Id: 12987399 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 784B3C07E9D for ; Sat, 24 Sep 2022 03:56:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Type: Content-Transfer-Encoding:MIME-Version:References:In-Reply-To:Message-ID:Date :Subject:CC:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=hIQ4mUx+Rp+E2H2Xc+2URnzvQPQLSU49LU5vAQg5gU4=; b=sLHAszbw1M1JYxc8X0QL8hcnBj UhIO0Nu+r9gRa5ROHlyOqn5EyW9dPX8Zny95h7iHRD/LW2nh+Jv5r0PAJaYXA9zFtU1zUlAQRYgNv oJbuHxvTrZc40ZxbG3aBeyqop7Q0U+WsPZ/qLEpYecEuBWSPUgzvgs3HrbdNN/qQPkdFVTKLeaL3O SvuIKCLhbdCYsSLfQaHdV9mhXXdHvlPdKv3rtb5kmwkSuuEe/MFmGb2VM50CR11ckeQmyXOtqJWpF yAvU1xN1bKlTDOvubRGIPm38S6DCHd0A9oSwvMy6el5Xcw3k9ovGnuVHcNV7ijZs0BjHtbUqmqtSA Zc86fDdA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1obwH4-006I42-74; Sat, 24 Sep 2022 03:56:18 +0000 Received: from mailgw02.mediatek.com ([216.200.240.185]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1obwH0-006I3O-St; Sat, 24 Sep 2022 03:56:16 +0000 X-UUID: a136ed7065004e98a2262fa4da2ecfe0-20220923 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Type:Content-Transfer-Encoding:MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:CC:To:From; bh=hIQ4mUx+Rp+E2H2Xc+2URnzvQPQLSU49LU5vAQg5gU4=; b=IyMe534NRYAo7OtW6kKXXYR6pe5h9g11Pg/frj2KJ0b3ho33YSjTFrxJMhJC31QSTKZNjMFMNn2fYqdIXJncLL7HSaW86aT2InUDQwbaBT97qZtWLYKgvpm67FxMgn3fZI0OAhzJiknVWvNf23Rj4yQRoEictdKglbw8sd6m6aA=; X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.1.11,REQID:28ad2e97-7c36-4494-9efd-09dcef45e6c3,IP:0,U RL:0,TC:0,Content:-5,EDM:0,RT:0,SF:0,FILE:0,BULK:0,RULE:Release_Ham,ACTION :release,TS:-5 X-CID-META: VersionHash:39a5ff1,CLOUDID:9d0cda06-1cee-4c38-b21b-a45f9682fdc0,B ulkID:nil,BulkQuantity:0,Recheck:0,SF:nil,TC:nil,Content:0,EDM:-3,IP:nil,U RL:11|1,File:nil,Bulk:nil,QS:nil,BEC:nil,COL:0 X-UUID: a136ed7065004e98a2262fa4da2ecfe0-20220923 Received: from mtkmbs11n1.mediatek.inc [(172.21.101.185)] by mailgw02.mediatek.com (envelope-from ) (musrelay.mediatek.com ESMTP with TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 256/256) with ESMTP id 2145220303; Fri, 23 Sep 2022 20:56:08 -0700 Received: from mtkmbs11n2.mediatek.inc (172.21.101.187) by mtkmbs10n1.mediatek.inc (172.21.101.34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.792.15; Sat, 24 Sep 2022 11:36:05 +0800 Received: from localhost.localdomain (10.17.3.154) by mtkmbs11n2.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.2.792.15 via Frontend Transport; Sat, 24 Sep 2022 11:36:04 +0800 From: Chunxu Li To: , , , , , CC: , , , , , , , , Chunxu Li Subject: [PATCH 1/2] ASoC: SOF: mediatek: mt8195: Add pcm_hw_params callback Date: Sat, 24 Sep 2022 11:35:58 +0800 Message-ID: <20220924033559.26599-2-chunxu.li@mediatek.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220924033559.26599-1-chunxu.li@mediatek.com> References: <20220924033559.26599-1-chunxu.li@mediatek.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220923_205614_948059_8D53C53C X-CRM114-Status: GOOD ( 10.57 ) X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org Add pcm_hw_params callback for mt8195 to support continue update dma host position Signed-off-by: Chunxu Li Reviewed-by: AngeloGioacchino Del Regno --- sound/soc/sof/mediatek/mt8195/mt8195.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/sound/soc/sof/mediatek/mt8195/mt8195.c b/sound/soc/sof/mediatek/mt8195/mt8195.c index c12192c8a6f8..882fde741cf5 100644 --- a/sound/soc/sof/mediatek/mt8195/mt8195.c +++ b/sound/soc/sof/mediatek/mt8195/mt8195.c @@ -496,6 +496,16 @@ static int mt8195_get_bar_index(struct snd_sof_dev *sdev, u32 type) return type; } +static int mt8195_pcm_hw_params(struct snd_sof_dev *sdev, + struct snd_pcm_substream *substream, + struct snd_pcm_hw_params *params, + struct snd_sof_platform_stream_params *platform_params) +{ + platform_params->cont_update_posn = 1; + + return 0; +} + static void mt8195_adsp_dump(struct snd_sof_dev *sdev, u32 flags) { u32 dbg_pc, dbg_data, dbg_bus0, dbg_bus1, dbg_inst; @@ -588,6 +598,7 @@ static struct snd_sof_dsp_ops sof_mt8195_ops = { /* stream callbacks */ .pcm_open = sof_stream_pcm_open, + .pcm_hw_params = mt8195_pcm_hw_params, .pcm_close = sof_stream_pcm_close, /* firmware loading */