Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp174035yba; Wed, 3 Apr 2019 06:43:52 -0700 (PDT) X-Google-Smtp-Source: APXvYqxYEaXubnCqNFHeDJPUxGEs3IZeV+O1yitYCnU/ap9rGioY1kczo4r/iRNbzRZ8mkP1hj5v X-Received: by 2002:a63:1048:: with SMTP id 8mr49638886pgq.70.1554299031961; Wed, 03 Apr 2019 06:43:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554299031; cv=none; d=google.com; s=arc-20160816; b=t/C2VviHw3k4ZYmgO6kJkGROf+2jal3gv5vEJmRwDyu5unIxrmVzH9K9WxHAd9KzS3 RhwqYbmegbCZKJtbtO4mbPhhjWHFxY1DhUsl4hwKqcktaw+QXoThSlcSYIIh98OpW3YX wv7JAZ8H7f5iFwcvgIxuUCjV+YA6WyQfHQN89k44RwbWU6LqC2s6aLixMidxAIXNQb1p PNNKbmaJW0Rq8yiblRvct+rzt4YRsQ739rAICvuRW/1fNTLhUuYL7lykQHGjjCiNGDkx Bh83Adr15zd3MO4q2BzbbtoYWh6V+xJID51e3b/v5yH5n9oqQ/iiy0W56WtffnfAk6/N DSSg== 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=srBeKbyzoZr/PxJdt507LJxl1GBVWF5ZLNWvmu7mZLQ=; b=vbo9E4izaXIjYh5Y8P7gK/kl7HESfBAvkMj1t8X3ExQDxntdORFzxEznxzYsPFXahR xGVo4c+wRBblLmjrrGkeJj6Glpy5EdXVVbmokSqtGbaR3Ytc57ddo3c87ZVJa6wwuZ6y VbaQzeAxZF0GyW4+HvmwJC+PyI5jnAdIBruR/FTfOne0QwtM3FiFJaf5o4QxPncHnufJ bDmAyzv+qba9e3C82UvvOwrcyI3rWuTjJxcz8jFlo3qdAqSBmYMWdjtzyCJsGvnfmabo ZDHG4QYMv8Lqo4TwR3LDYfDyt+BXJMgoJmZSXV4GvgzBpOJgy7Z1JUQXZsHwLgsY1jqZ 2asw== 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 w10si13708485plp.329.2019.04.03.06.43.36; Wed, 03 Apr 2019 06:43:51 -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 S1726770AbfDCNmS (ORCPT + 99 others); Wed, 3 Apr 2019 09:42:18 -0400 Received: from regular1.263xmail.com ([211.150.70.195]:57256 "EHLO regular1.263xmail.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726352AbfDCNmI (ORCPT ); Wed, 3 Apr 2019 09:42:08 -0400 Received: from sugar.zhang?rock-chips.com (unknown [192.168.167.12]) by regular1.263xmail.com (Postfix) with ESMTP id 732897E0; Wed, 3 Apr 2019 21:41:54 +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 P16332T140353604671232S1554298910639057_; Wed, 03 Apr 2019 21:41:54 +0800 (CST) X-IP-DOMAINF: 1 X-UNIQUE-TAG: 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: linux-rockchip@lists.infradead.org, Sugar Zhang , Liam Girdwood , Jaroslav Kysela , Takashi Iwai , alsa-devel@alsa-project.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v1 02/12] ASoC: rockchip: pdm: using left justified store mode Date: Wed, 3 Apr 2019 21:40:46 +0800 Message-Id: <1554298856-59028-3-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 set left justified store mode default. Signed-off-by: Sugar Zhang --- sound/soc/rockchip/rockchip_pdm.c | 1 + sound/soc/rockchip/rockchip_pdm.h | 3 +++ 2 files changed, 4 insertions(+) diff --git a/sound/soc/rockchip/rockchip_pdm.c b/sound/soc/rockchip/rockchip_pdm.c index 8a2e3bb..360ebf2 100644 --- a/sound/soc/rockchip/rockchip_pdm.c +++ b/sound/soc/rockchip/rockchip_pdm.c @@ -135,6 +135,7 @@ static int rockchip_pdm_hw_params(struct snd_pcm_substream *substream, regmap_update_bits(pdm->regmap, PDM_HPF_CTRL, PDM_HPF_LE | PDM_HPF_RE, PDM_HPF_LE | PDM_HPF_RE); regmap_update_bits(pdm->regmap, PDM_CLK_CTRL, PDM_CLK_EN, PDM_CLK_EN); + regmap_update_bits(pdm->regmap, PDM_CTRL0, PDM_MODE_MSK, PDM_MODE_LJ); val = 0; switch (params_format(params)) { diff --git a/sound/soc/rockchip/rockchip_pdm.h b/sound/soc/rockchip/rockchip_pdm.h index 886b48d1..00a8fa1 100644 --- a/sound/soc/rockchip/rockchip_pdm.h +++ b/sound/soc/rockchip/rockchip_pdm.h @@ -42,6 +42,9 @@ /* PDM CTRL0 */ #define PDM_PATH_MSK (0xf << 27) +#define PDM_MODE_MSK BIT(31) +#define PDM_MODE_RJ 0 +#define PDM_MODE_LJ BIT(31) #define PDM_PATH3_EN BIT(30) #define PDM_PATH2_EN BIT(29) #define PDM_PATH1_EN BIT(28) -- 2.7.4