From patchwork Mon Nov 5 11:57:21 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Brown X-Patchwork-Id: 150171 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp2505978ljp; Mon, 5 Nov 2018 03:57:31 -0800 (PST) X-Google-Smtp-Source: AJdET5fSi655y3r9ZVWPa6/0+qo0GZUMY1CxTv97WGb9Dkp7js3jhz981NnbR/sRdG1NMm1MW2da X-Received: by 2002:a1c:4b1a:: with SMTP id y26-v6mr6059054wma.82.1541419051046; Mon, 05 Nov 2018 03:57:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541419051; cv=none; d=google.com; s=arc-20160816; b=zKGAcUdrIDkwoHP5jasBXHixhFr/uAHX4Fcu+o1ax72Z+/qJwyHGnNtfsv6278Ejs0 bl2Es4iEccqqPjxobUCZjghA8Ot8e+NaNReLMNMTHjL52J0BM4fZFT1W7CZw4lv7FFwk IQxBZ0MlAvdUm4kKrmnfAWzJAFEp8b+Lsf/V+JP+d/Mll9JqOuZtbGsV1UApiNTrBInB rrqnFUEjohysiBtP45ZN4D1kGUiaQHy0t32k5jOjcbskhaWKmySwMtZX/a/xPh2K0nCp x416WqTJhs2XfSI9mDgfhVXe9+t/T9ctt5j6G69bUdHxWztW0gk//XMiuVjJgNP5NDxu eTkw== 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; bh=kOE3IHP4cQBWmk4gL5WqYVNbchdb2nSin/g0Yp0Y/TQ=; b=XGJT/YK1+5vug8EGvazxlpwWmsn1LMOP2v4+s5XEj3NLXdEOLIl3EHC7/d2PNDIdjx 2aUfvuKSy7FS408BaMXKwwfP60pFV556ZsJye6LZOu2J4Bql/jXjsPZJnL/SM8mhZbHY Ar5+zNauFJ3zI8QsBy6Re++iv/ghJZq+4IiavmWK6J0eU+0Rx8X68Z41G9/VbzigxzCm ZSJsVHoSBRsK649Aqp3eO0MzDYMbSX7664IlM2tcmgJ/6J+8GaL4lcQWtXvILTP11kKH XOcjlWYKdb5Fdu567Gz0UQ4zjQMptbJZ+klsmX4LSz1Bi/do0g/ou/JIF2hM9d+QMWAe N3Sg== 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="FSmklY/O"; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from alsa0.perex.cz (alsa0.perex.cz. [77.48.224.243]) by mx.google.com with ESMTP id d15-v6si28808602wrb.51.2018.11.05.03.57.30; Mon, 05 Nov 2018 03:57:31 -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="FSmklY/O"; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id B7E352679B1; Mon, 5 Nov 2018 12:57:29 +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 48F022679B0; Mon, 5 Nov 2018 12:57:26 +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.0 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_NONE 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 6E4002679B1 for ; Mon, 5 Nov 2018 12:57:23 +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=39btBMeOIuzzDoOpBNzigQWc9scVAaQix7p/pjCV2tk=; b=FSmklY/OSdNt EJpNZ5fVttseiG3ZrLD+mwmS9QzniCB+7mQvM18yxRketzNpG9q2q0jRqm8hq7sGr1eHnY+cS5+7i JUUPZ4RutlJiUXwVZSVvG7VTp6Qg1tv4yrHVDrfYCC6ECaK3WEH8cNJ4E/1gKphQC8sS+9iwN3TQ7 yW1mA=; Received: from cpc102320-sgyl38-2-0-cust46.18-2.cable.virginm.net ([82.37.168.47] helo=debutante.sirena.org.uk) by heliosphere.sirena.org.uk with esmtpa (Exim 4.89) (envelope-from ) id 1gJdVR-0008HS-Vw; Mon, 05 Nov 2018 11:57:22 +0000 Received: by debutante.sirena.org.uk (Postfix, from userid 1000) id AFD5A1124D98; Mon, 5 Nov 2018 11:57:21 +0000 (GMT) From: Mark Brown To: Hans de Goede In-Reply-To: <20181031142225.16109-1-hdegoede@redhat.com> Message-Id: <20181105115721.AFD5A1124D98@debutante.sirena.org.uk> Date: Mon, 5 Nov 2018 11:57:21 +0000 (GMT) Cc: alsa-devel@alsa-project.org, Pierre-Louis Bossart , stable@vger.kernel.org, Dean Wallace , Liam Girdwood , Mark Brown , Andy Shevchenko Subject: [alsa-devel] Applied "ASoC: intel: cht_bsw_max98090_ti: Add quirk for boards using pmc_plt_clk_0" 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: intel: cht_bsw_max98090_ti: Add quirk for boards using pmc_plt_clk_0 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 a182ecd3809c8d5a2da80c520f3602e301c5317e Mon Sep 17 00:00:00 2001 From: Hans de Goede Date: Wed, 31 Oct 2018 15:22:25 +0100 Subject: [PATCH] ASoC: intel: cht_bsw_max98090_ti: Add quirk for boards using pmc_plt_clk_0 Some boards such as the Swanky model Chromebooks use pmc_plt_clk_0 for the mclk instead of pmc_plt_clk_3. This commit adds a DMI based quirk for this. This fixing audio no longer working on these devices after commit 648e921888ad ("clk: x86: Stop marking clocks as CLK_IS_CRITICAL") that commit fixes us unnecessary keeping unused clocks on, but in case of the Swanky that was breaking audio support since we were not using the right clock in the cht_bsw_max98090_ti machine driver. Cc: stable@vger.kernel.org Fixes: 648e921888ad ("clk: x86: Stop marking clocks as CLK_IS_CRITICAL") Reported-and-tested-by: Dean Wallace Signed-off-by: Hans de Goede Signed-off-by: Mark Brown --- sound/soc/intel/boards/cht_bsw_max98090_ti.c | 32 ++++++++++++++++++-- 1 file changed, 29 insertions(+), 3 deletions(-) -- 2.19.0.rc2 _______________________________________________ Alsa-devel mailing list Alsa-devel@alsa-project.org http://mailman.alsa-project.org/mailman/listinfo/alsa-devel diff --git a/sound/soc/intel/boards/cht_bsw_max98090_ti.c b/sound/soc/intel/boards/cht_bsw_max98090_ti.c index db6976f4ddaa..9d9f6e41d81c 100644 --- a/sound/soc/intel/boards/cht_bsw_max98090_ti.c +++ b/sound/soc/intel/boards/cht_bsw_max98090_ti.c @@ -19,6 +19,7 @@ * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ +#include #include #include #include @@ -35,6 +36,8 @@ #define CHT_PLAT_CLK_3_HZ 19200000 #define CHT_CODEC_DAI "HiFi" +#define QUIRK_PMC_PLT_CLK_0 0x01 + struct cht_mc_private { struct clk *mclk; struct snd_soc_jack jack; @@ -385,11 +388,29 @@ static struct snd_soc_card snd_soc_card_cht = { .num_controls = ARRAY_SIZE(cht_mc_controls), }; +static const struct dmi_system_id cht_max98090_quirk_table[] = { + { + /* Swanky model Chromebook (Toshiba Chromebook 2) */ + .matches = { + DMI_MATCH(DMI_PRODUCT_NAME, "Swanky"), + }, + .driver_data = (void *)QUIRK_PMC_PLT_CLK_0, + }, + {} +}; + static int snd_cht_mc_probe(struct platform_device *pdev) { + const struct dmi_system_id *dmi_id; struct device *dev = &pdev->dev; int ret_val = 0; struct cht_mc_private *drv; + const char *mclk_name; + int quirks = 0; + + dmi_id = dmi_first_match(cht_max98090_quirk_table); + if (dmi_id) + quirks = (unsigned long)dmi_id->driver_data; drv = devm_kzalloc(&pdev->dev, sizeof(*drv), GFP_KERNEL); if (!drv) @@ -411,11 +432,16 @@ static int snd_cht_mc_probe(struct platform_device *pdev) snd_soc_card_cht.dev = &pdev->dev; snd_soc_card_set_drvdata(&snd_soc_card_cht, drv); - drv->mclk = devm_clk_get(&pdev->dev, "pmc_plt_clk_3"); + if (quirks & QUIRK_PMC_PLT_CLK_0) + mclk_name = "pmc_plt_clk_0"; + else + mclk_name = "pmc_plt_clk_3"; + + drv->mclk = devm_clk_get(&pdev->dev, mclk_name); if (IS_ERR(drv->mclk)) { dev_err(&pdev->dev, - "Failed to get MCLK from pmc_plt_clk_3: %ld\n", - PTR_ERR(drv->mclk)); + "Failed to get MCLK from %s: %ld\n", + mclk_name, PTR_ERR(drv->mclk)); return PTR_ERR(drv->mclk); }