Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp804713yba; Wed, 3 Apr 2019 20:59:12 -0700 (PDT) X-Google-Smtp-Source: APXvYqxDr10FUCGE7tZSuyW+Cr7IXzfjZJkL95Jrul2x19VHwtavyrEcr7EHbjLbsy353CIH6o4A X-Received: by 2002:a63:da4e:: with SMTP id l14mr3409168pgj.96.1554350352315; Wed, 03 Apr 2019 20:59:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554350352; cv=none; d=google.com; s=arc-20160816; b=gNAfToCUDa4RNyh+rlSNZU4cei1fB03///nb64c/KJnvvPphIPlRBcmmq3ki4Qaa5H 2fpwLodvl5RJbd/p57hhOA7C67S+wKqtV4bTtwo4IGx8KYvgxOS0Qj6mWLA88iI1GFQ4 IcoAbRuKyL3Ob5VoAj7UxC7RB8d1N1Cjxe27PsSRWBok3eAE1Ho79hJn7Bp6FErsLXVG D1hoAF0prrA+SorWVw5/3uQdhfw1E1G7wR3qREmv9ojgdW1PZmduArJTvsqJ+onoPPmm woXO/3ZJiyM2U0dSzUfPSFNRhyn0NUQ7GISMaZjxcrWil1bC4sCCSLU0dVGGxeaYXQ9a fCKw== 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=6Xp2s2NDRkoEgAdb5uHZVCsA6ux1q2mLedPdn0YMLQs=; b=Vgv6MkFgZxSx/SgsEIceiZ5GlPgcVKaQ71e8LVsRPPDMqdKGje8VM7UXFdMBiV50CB ZhJKajgOKG3DHwN08LIy8lslixfVTWNLlGsfyJ64p4k9unDzCm6hTMxyqVxSM+hTCx61 HDbcM3DI1bhgvLFEUxTzXZWCJqvG2eoessfH2qau18YgpkpvEq3/Jq6dGCJhSJh9cL1m 2M9jFDB0MjrbYR3VxWbH65GpHjpJU883kxgdA5GPEb/We0qGEr6Gv+1gzBtXm15HoP1l 8X+uOhNH8LV6DuF1mlyVb11N7igbkEKoqDJcXsbbTlHRPSG64TccLD3JpX90bm4GWLEY r2Cg== 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 60si15407652pla.428.2019.04.03.20.58.57; Wed, 03 Apr 2019 20:59:12 -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 S1729047AbfDDD6H (ORCPT + 99 others); Wed, 3 Apr 2019 23:58:07 -0400 Received: from regular1.263xmail.com ([211.150.70.203]:52476 "EHLO regular1.263xmail.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728982AbfDDD6H (ORCPT ); Wed, 3 Apr 2019 23:58:07 -0400 Received: from sugar.zhang?rock-chips.com (unknown [192.168.167.183]) by regular1.263xmail.com (Postfix) with ESMTP id 6ACDC3DB; Thu, 4 Apr 2019 11:58:04 +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 P17431T140464758023936S1554350281830449_; Thu, 04 Apr 2019 11:58:03 +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: 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 12/12] ASoC: rockchip: pdm: Correct PDM_CTRL0 reg value Date: Thu, 4 Apr 2019 11:57:57 +0800 Message-Id: <1554350277-24561-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 fix the wrong reg value for rk322x/rk322xh, cuz there is no STORE JUSTIFIED MODE on it. on rk322x/rk322xh, the same bit means PDM_MODE/RESERVED, if the bit is set to RESERVED, the controller will not work. Signed-off-by: Sugar Zhang --- sound/soc/rockchip/rockchip_pdm.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/sound/soc/rockchip/rockchip_pdm.c b/sound/soc/rockchip/rockchip_pdm.c index e89beeb..6c0f242 100644 --- a/sound/soc/rockchip/rockchip_pdm.c +++ b/sound/soc/rockchip/rockchip_pdm.c @@ -210,7 +210,9 @@ 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); + if (pdm->version != RK_PDM_RK3229) + regmap_update_bits(pdm->regmap, PDM_CTRL0, + PDM_MODE_MSK, PDM_MODE_LJ); val = 0; switch (params_format(params)) { @@ -468,7 +470,8 @@ static const struct regmap_config rockchip_pdm_regmap_config = { }; static const struct of_device_id rockchip_pdm_match[] = { - { .compatible = "rockchip,pdm", }, + { .compatible = "rockchip,pdm", + .data = (void *)RK_PDM_RK3229 }, { .compatible = "rockchip,px30-pdm", .data = (void *)RK_PDM_RK3308 }, { .compatible = "rockchip,rk1808-pdm", -- 2.7.4