Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp803816yba; Wed, 3 Apr 2019 20:57:31 -0700 (PDT) X-Google-Smtp-Source: APXvYqwTAIyUyUcKM1BBXU2qlwEhXSWM/WVwUBjZuryczDggM2f73jQ/iDzNHzYAc3yrRK03IfwR X-Received: by 2002:a17:902:b281:: with SMTP id u1mr4016637plr.30.1554350251882; Wed, 03 Apr 2019 20:57:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554350251; cv=none; d=google.com; s=arc-20160816; b=MFWPuUcuGne5uoXyX5RqyZJztMYZKyqZBFbnEpYJ0LYQuhjZzU2eUiRiaZm1xt9VSc C/Lk6faA4Vdj8XkAPbNhNl+Y0LnCCbmGXuSUCdevCsKHJgy7wueK3dm0NrR3B+R+IlB2 9hOViTN0cOjTLzMcv1CtNOR6JDKMxL25Kll1dY3K2FVKXKbdvO4NUOBf8Urk+OtEA5CK FJRiwUme/cEWL9s1SxxUGn0GIvOWmKpqhFDcVIojtFNCAFCUf5cuHySIFOY6yw9Vjlq9 3U4BnxyRU7TTklX2+yhg4LZSHN9lwzHGBiATluV7cyrGcaiwqeVqychVjUI4kfMVffNR e3Mw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from; bh=IXfXNZId0em9KHA8LSC16wVpj/RBW4MQ59hncgX8vb8=; b=hoDgvX0yrl+aj/n59jc2c60Xk++zfGkOLkNR7vRCkQcuSTUNmcxYX7gFuRBJG4DIsY 2eHT+hVG7gfPf0DoBpIZD4ePTWEfP8oqmY3q1KDZymebci4UjjwQpTLpxUKQB3uWtNu/ EshHu5LKaGdnC6Bacjdw8GCNbVCjNidPziQ0eox27VRUW6TmK6/CqZ4VxfERbsUyft2C InuEYcdd1ermmSFrhMdky6W7XTHSueYlEFZVw5pzNaT0yLcLn94m+ryZE+jyFHTaBVXF DV+wLJ9ZWfEKM4IrOsdVcPPvWVrZ2cU0xUTl5UGJSXgSMP2MjlUPlZOnysaercp+MoT+ f1UA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f10si15173790pgv.589.2019.04.03.20.57.16; Wed, 03 Apr 2019 20:57:31 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728982AbfDDD4h (ORCPT + 99 others); Wed, 3 Apr 2019 23:56:37 -0400 Received: from regular1.263xmail.com ([211.150.70.197]:57814 "EHLO regular1.263xmail.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728933AbfDDD4h (ORCPT ); Wed, 3 Apr 2019 23:56:37 -0400 Received: from sugar.zhang?rock-chips.com (unknown [192.168.167.192]) by regular1.263xmail.com (Postfix) with ESMTP id 44C9368A; Thu, 4 Apr 2019 11:56:35 +0800 (CST) X-263anti-spam: KSV:0;BIG:0; X-MAIL-GRAY: 0 X-MAIL-DELIVERY: 1 X-KSVirus-check: 0 X-ADDR-CHECKED4: 1 X-ABS-CHECKED: 1 X-SKE-CHECKED: 1 X-ANTISPAM-LEVEL: 2 Received: from localhost.localdomain (unknown [58.22.7.114]) by smtp.263.net (postfix) whith ESMTP id P27186T140355238283008S1554350192612308_; Thu, 04 Apr 2019 11:56:34 +0800 (CST) X-IP-DOMAINF: 1 X-UNIQUE-TAG: <42b942c1645e5b1a64fa1c8b90af1a18> X-RL-SENDER: sugar.zhang@rock-chips.com X-SENDER: zxg@rock-chips.com X-LOGIN-NAME: sugar.zhang@rock-chips.com X-FST-TO: heiko@sntech.de X-SENDER-IP: 58.22.7.114 X-ATTACHMENT-NUM: 0 X-DNS-TYPE: 0 From: Sugar Zhang To: heiko@sntech.de, broonie@kernel.org Cc: Liam Girdwood , Jaroslav Kysela , Takashi Iwai , alsa-devel@alsa-project.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org, Sugar Zhang Subject: [PATCH v1 10/12] ASoC: rockchip: pdm: adjust waterlevel in frame unit Date: Thu, 4 Apr 2019 11:56:29 +0800 Message-Id: <1554350189-24318-1-git-send-email-sugar.zhang@rock-chips.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1554298856-59028-1-git-send-email-sugar.zhang@rock-chips.com> References: <1554298856-59028-1-git-send-email-sugar.zhang@rock-chips.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This patch make the waterlevel more reasonable, because the pdm controller share the single FIFO(128 entries) with each channel. adjust waterlevel in frame to meet the vad or dma frames request. Signed-off-by: Sugar Zhang --- sound/soc/rockchip/rockchip_pdm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sound/soc/rockchip/rockchip_pdm.c b/sound/soc/rockchip/rockchip_pdm.c index 3e1c5fd..955cdc2 100644 --- a/sound/soc/rockchip/rockchip_pdm.c +++ b/sound/soc/rockchip/rockchip_pdm.c @@ -255,8 +255,9 @@ static int rockchip_pdm_hw_params(struct snd_pcm_substream *substream, regmap_update_bits(pdm->regmap, PDM_CTRL0, PDM_PATH_MSK | PDM_VDW_MSK, val); + /* all channels share the single FIFO */ regmap_update_bits(pdm->regmap, PDM_DMA_CTRL, PDM_DMA_RDL_MSK, - PDM_DMA_RDL(16)); + PDM_DMA_RDL(8 * params_channels(params))); return 0; } -- 2.7.4