From patchwork Fri Jan 12 12:28:28 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Brown X-Patchwork-Id: 124309 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp2001144qgn; Fri, 12 Jan 2018 04:28:51 -0800 (PST) X-Google-Smtp-Source: ACJfBovjUjlceMyhfUoGoWbwdGkXqVZq8uW3Ka+wbDltvuF6Xcsc6zsT86sDwFaJgM3beyiyDfPO X-Received: by 10.28.238.6 with SMTP id m6mr4217861wmh.97.1515760131107; Fri, 12 Jan 2018 04:28:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1515760131; cv=none; d=google.com; s=arc-20160816; b=SzYJs7NN98ja4bDxw7rSn1xTTWYWocsW/zDfgTLss8vXNB3nqhW+TgiABQfXLTM3IS TWShhJsmujWrznwxO3SryGpsKT18lk3+DshfPUtbECNzcofgbKfdBZB/MBnT8I5InqrK 7o4d9NjoXNeB1vF5xdffwlFUM2W9YBxSZBfPn+MlVnAAMiUr0xSr3EjEbeIQ9+0qhq9p CWfU+eayBInUhZStACPA/v5O6C7q5Pbuhdpa1TCPLTDIcM5WcJpbN5C751EaO/iEnjAM 6B+DDJken2Cx6oM586Nis3J9xEACgwPkpviISI3OpNT/6ODgl5JQol14YYR6sTmckw2d jKhQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:cc:date:message-id:in-reply-to:to:from :dkim-signature:delivered-to:arc-authentication-results; bh=lSbLmMa8GhrM+6WNB2K+LnpWlyjQVLo+Ug+rsTus1Xg=; b=UOaIgDY7IrM4YuPkUmAUM75KPLfR8HOKC0VM9E0FeAx/rbKPjvAaajdnCND5cMTlkl lVn0C7NGCuVtNMpcQuA55sCwH/XutE4tBQMLCmQFtwnZHC3uJEyLKJ05dcpSEhR5Czc9 1ztHg+uRC8BNpyd0T9jQlsShZFDlELVVnayyZVUWVqd5dved9mUL3WYfmPwzsEG9/wfF 9b5HAvz5X7tQ1grwcTSiUazGTr2oLQGlxvzOdm1X5htbI0QAQ+0enqBe8qBfTpkA2KXw ErwMh17gSpy/YVGQpNvqWoRuvTPOMdpQpSPj64QcM0sjN609VCt8dM/MeDnFnvEhXscN IAkg== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@sirena.org.uk header.s=20170815-heliosphere header.b=S6KSYNqb; spf=pass (google.com: domain of alsa-devel-bounces@alsa-project.org designates 77.48.224.243 as permitted sender) smtp.mailfrom=alsa-devel-bounces@alsa-project.org Return-Path: Received: from alsa0.perex.cz (alsa0.perex.cz. [77.48.224.243]) by mx.google.com with ESMTP id r185si2266618wmg.71.2018.01.12.04.28.48; Fri, 12 Jan 2018 04:28:51 -0800 (PST) Received-SPF: pass (google.com: domain of alsa-devel-bounces@alsa-project.org designates 77.48.224.243 as permitted sender) client-ip=77.48.224.243; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@sirena.org.uk header.s=20170815-heliosphere header.b=S6KSYNqb; spf=pass (google.com: domain of alsa-devel-bounces@alsa-project.org designates 77.48.224.243 as permitted sender) smtp.mailfrom=alsa-devel-bounces@alsa-project.org Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 49C9C266E42; Fri, 12 Jan 2018 13:28:47 +0100 (CET) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id D720E266E73; Fri, 12 Jan 2018 13:28:45 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mail1.perex.cz X-Spam-Level: X-Spam-Status: No, score=0.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, SPF_PASS, T_RP_MATCHES_RCVD autolearn=disabled version=3.4.0 Received: from heliosphere.sirena.org.uk (heliosphere.sirena.org.uk [172.104.155.198]) by alsa0.perex.cz (Postfix) with ESMTP id 5AB84266E07 for ; Fri, 12 Jan 2018 13:28:42 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sirena.org.uk; s=20170815-heliosphere; h=Date:Message-Id:In-Reply-To: Subject:Cc:To:From:Sender:Reply-To:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:References: List-Id:List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner: List-Archive; bh=nhDkSomEYhsPRAfk6jKINMMYL12INbyAWifxV5lBrzc=; b=S6KSYNqb+RzJ 22Ns45FEX3jyAx8f84W0sCGCEksD+855NozabvqHyNGN5XG6OkYKvDZmmP8FXinjTzYS4kW0DiN9z 8zixbo4lR5GgNKNNEWVv3TKpzJ3Jv7Bvf7Syqggbi7+i71851PWKVXiiYeRipyHk5qt3jHoGgztv+ fUWyo=; Received: from debutante.sirena.org.uk ([2001:470:1f1d:6b5::3] helo=debutante) by heliosphere.sirena.org.uk with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1eZyRh-0005Qd-1W; Fri, 12 Jan 2018 12:28:29 +0000 Received: from broonie by debutante with local (Exim 4.90) (envelope-from ) id 1eZyRg-0006Ix-7m; Fri, 12 Jan 2018 12:28:28 +0000 From: Mark Brown To: Pierre-Louis Bossart In-Reply-To: <20180103184241.11690-1-pierre-louis.bossart@linux.intel.com> Message-Id: Date: Fri, 12 Jan 2018 12:28:28 +0000 Cc: alsa-devel@alsa-project.org, tiwai@suse.de, liam.r.girdwood@linux.intel.com, Hans de Goede , broonie@kernel.org, Bard Liao , vinod.koul@intel.com Subject: [alsa-devel] Applied "ASoC: rt5645: add fallback case for jack detection support" to the asoc tree X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org The patch ASoC: rt5645: add fallback case for jack detection support has been applied to the asoc tree at https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted. You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed. If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced. Please add any relevant lists and maintainers to the CCs when replying to this mail. Thanks, Mark >From 5954c4a1455c3bc42acb2c286744eae1aaa00918 Mon Sep 17 00:00:00 2001 From: Pierre-Louis Bossart Date: Thu, 11 Jan 2018 14:05:11 -0600 Subject: [PATCH] ASoC: rt5645: add fallback case for jack detection support Commit 78f5605c0329 ("ASoC: rt5645: cleanup DMI matching code") did a lot of useful cleanups. This patch adds a default case to enable jack detection if there is no pdata, device property or quirk. The chosen jd-mode3 is the most common and should limit the addition of new DMI-based quirks. Existing DMI quirks which only set this mode are left as is and not removed. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Hans de Goede Signed-off-by: Mark Brown --- sound/soc/codecs/rt5645.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) -- 2.15.1 _______________________________________________ Alsa-devel mailing list Alsa-devel@alsa-project.org http://mailman.alsa-project.org/mailman/listinfo/alsa-devel diff --git a/sound/soc/codecs/rt5645.c b/sound/soc/codecs/rt5645.c index fbaf36aeb587..5292fca2f54f 100644 --- a/sound/soc/codecs/rt5645.c +++ b/sound/soc/codecs/rt5645.c @@ -3739,6 +3739,17 @@ static const struct dmi_system_id dmi_platform_data[] = { { } }; +static bool rt5645_check_dp(struct device *dev) +{ + if (device_property_present(dev, "realtek,in2-differential") || + device_property_present(dev, "realtek,dmic1-data-pin") || + device_property_present(dev, "realtek,dmic2-data-pin") || + device_property_present(dev, "realtek,jd-mode")) + return true; + + return false; +} + static int rt5645_parse_dt(struct rt5645_priv *rt5645, struct device *dev) { rt5645->pdata.in2_diff = device_property_read_bool(dev, @@ -3779,8 +3790,10 @@ static int rt5645_i2c_probe(struct i2c_client *i2c, if (pdata) rt5645->pdata = *pdata; - else + else if (rt5645_check_dp(&i2c->dev)) rt5645_parse_dt(rt5645, &i2c->dev); + else + rt5645->pdata = jd_mode3_platform_data; if (quirk != -1) { rt5645->pdata.in2_diff = QUIRK_IN2_DIFF(quirk);