linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: linux-kernel@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	stable@vger.kernel.org, Sam McNally <sammc@chromium.org>,
	Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>,
	Mark Brown <broonie@kernel.org>, Sasha Levin <sashal@kernel.org>
Subject: [PATCH 5.4 076/110] ASoC: Intel: cht_bsw_rt5645: Add quirk for boards using pmc_plt_clk_0
Date: Thu, 30 Jan 2020 19:38:52 +0100	[thread overview]
Message-ID: <20200130183623.338398446@linuxfoundation.org> (raw)
In-Reply-To: <20200130183613.810054545@linuxfoundation.org>

From: Sam McNally <sammc@chromium.org>

[ Upstream commit adebb11139029ddf1fba6f796c4a476f17eacddc ]

As of commit 648e921888ad ("clk: x86: Stop marking clocks as
CLK_IS_CRITICAL"), the cht_bsw_rt5645 driver needs to enable the clock
it's using for the codec's mclk. It does this from commit 7735bce05a9c
("ASoC: Intel: boards: use devm_clk_get() unconditionally"), enabling
pmc_plt_clk_3. However, Strago family Chromebooks use pmc_plt_clk_0 for
the codec mclk, resulting in white noise with some digital microphones.
Add a DMI-based quirk for Strago family Chromebooks to use pmc_plt_clk_0
instead - mirroring the changes made to cht_bsw_max98090_ti in
commit a182ecd3809c ("ASoC: intel: cht_bsw_max98090_ti: Add quirk for
boards using pmc_plt_clk_0") and making use of the existing
dmi_check_system() call and related infrastructure added in
commit 22af29114eb4 ("ASoC: Intel: cht-bsw-rt5645: add quirks for
SSP0/AIF1/AIF2 routing").

Signed-off-by: Sam McNally <sammc@chromium.org>
Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20190917054933.209335-1-sammc@chromium.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 sound/soc/intel/boards/cht_bsw_rt5645.c | 26 +++++++++++++++++++------
 1 file changed, 20 insertions(+), 6 deletions(-)

diff --git a/sound/soc/intel/boards/cht_bsw_rt5645.c b/sound/soc/intel/boards/cht_bsw_rt5645.c
index 8879c3be29d5a..c68a5b85a4a03 100644
--- a/sound/soc/intel/boards/cht_bsw_rt5645.c
+++ b/sound/soc/intel/boards/cht_bsw_rt5645.c
@@ -48,6 +48,7 @@ struct cht_mc_private {
 #define CHT_RT5645_SSP2_AIF2     BIT(16) /* default is using AIF1  */
 #define CHT_RT5645_SSP0_AIF1     BIT(17)
 #define CHT_RT5645_SSP0_AIF2     BIT(18)
+#define CHT_RT5645_PMC_PLT_CLK_0 BIT(19)
 
 static unsigned long cht_rt5645_quirk = 0;
 
@@ -59,6 +60,8 @@ static void log_quirks(struct device *dev)
 		dev_info(dev, "quirk SSP0_AIF1 enabled");
 	if (cht_rt5645_quirk & CHT_RT5645_SSP0_AIF2)
 		dev_info(dev, "quirk SSP0_AIF2 enabled");
+	if (cht_rt5645_quirk & CHT_RT5645_PMC_PLT_CLK_0)
+		dev_info(dev, "quirk PMC_PLT_CLK_0 enabled");
 }
 
 static int platform_clock_control(struct snd_soc_dapm_widget *w,
@@ -226,15 +229,21 @@ static int cht_aif1_hw_params(struct snd_pcm_substream *substream,
 	return 0;
 }
 
-/* uncomment when we have a real quirk
 static int cht_rt5645_quirk_cb(const struct dmi_system_id *id)
 {
 	cht_rt5645_quirk = (unsigned long)id->driver_data;
 	return 1;
 }
-*/
 
 static const struct dmi_system_id cht_rt5645_quirk_table[] = {
+	{
+		/* Strago family Chromebooks */
+		.callback = cht_rt5645_quirk_cb,
+		.matches = {
+			DMI_MATCH(DMI_PRODUCT_FAMILY, "Intel_Strago"),
+		},
+		.driver_data = (void *)CHT_RT5645_PMC_PLT_CLK_0,
+	},
 	{
 	},
 };
@@ -526,6 +535,7 @@ static int snd_cht_mc_probe(struct platform_device *pdev)
 	int dai_index = 0;
 	int ret_val = 0;
 	int i;
+	const char *mclk_name;
 
 	drv = devm_kzalloc(&pdev->dev, sizeof(*drv), GFP_KERNEL);
 	if (!drv)
@@ -662,11 +672,15 @@ static int snd_cht_mc_probe(struct platform_device *pdev)
 	if (ret_val)
 		return ret_val;
 
-	drv->mclk = devm_clk_get(&pdev->dev, "pmc_plt_clk_3");
+	if (cht_rt5645_quirk & CHT_RT5645_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));
+		dev_err(&pdev->dev, "Failed to get MCLK from %s: %ld\n",
+			mclk_name, PTR_ERR(drv->mclk));
 		return PTR_ERR(drv->mclk);
 	}
 
-- 
2.20.1




  parent reply	other threads:[~2020-01-30 18:45 UTC|newest]

Thread overview: 116+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-30 18:37 [PATCH 5.4 000/110] 5.4.17-stable review Greg Kroah-Hartman
2020-01-30 18:37 ` [PATCH 5.4 001/110] Bluetooth: btusb: fix non-atomic allocation in completion handler Greg Kroah-Hartman
2020-01-30 18:37 ` [PATCH 5.4 002/110] orinoco_usb: fix interface sanity check Greg Kroah-Hartman
2020-01-30 18:37 ` [PATCH 5.4 003/110] rsi_91x_usb: " Greg Kroah-Hartman
2020-01-30 18:37 ` [PATCH 5.4 004/110] usb: dwc3: pci: add ID for the Intel Comet Lake -V variant Greg Kroah-Hartman
2020-01-30 18:37 ` [PATCH 5.4 005/110] usb: host: xhci-tegra: set MODULE_FIRMWARE for tegra186 Greg Kroah-Hartman
2020-01-30 18:37 ` [PATCH 5.4 006/110] USB: serial: ir-usb: add missing endpoint sanity check Greg Kroah-Hartman
2020-01-30 18:37 ` [PATCH 5.4 007/110] USB: serial: ir-usb: fix link-speed handling Greg Kroah-Hartman
2020-01-30 18:37 ` [PATCH 5.4 008/110] USB: serial: ir-usb: fix IrLAP framing Greg Kroah-Hartman
2020-01-30 18:37 ` [PATCH 5.4 009/110] usb: dwc3: turn off VBUS when leaving host mode Greg Kroah-Hartman
2020-01-30 18:37 ` [PATCH 5.4 010/110] usb: typec: wcove: fix "op-sink-microwatt" default that was in mW Greg Kroah-Hartman
2020-01-30 18:37 ` [PATCH 5.4 011/110] usb: typec: fusb302: " Greg Kroah-Hartman
2020-01-30 18:37 ` [PATCH 5.4 012/110] staging: most: net: fix buffer overflow Greg Kroah-Hartman
2020-01-30 18:37 ` [PATCH 5.4 013/110] staging: wlan-ng: ensure error return is actually returned Greg Kroah-Hartman
2020-01-30 18:37 ` [PATCH 5.4 014/110] staging: vt6656: correct packet types for CTS protect, mode Greg Kroah-Hartman
2020-01-30 18:37 ` [PATCH 5.4 015/110] staging: vt6656: use NULLFUCTION stack on mac80211 Greg Kroah-Hartman
2020-01-30 18:37 ` [PATCH 5.4 016/110] staging: vt6656: Fix false Tx excessive retries reporting Greg Kroah-Hartman
2020-01-30 18:37 ` [PATCH 5.4 017/110] serial: 8250_bcm2835aux: Fix line mismatch on driver unbind Greg Kroah-Hartman
2020-01-30 18:37 ` [PATCH 5.4 018/110] serial: imx: fix a race condition in receive path Greg Kroah-Hartman
2020-01-30 18:37 ` [PATCH 5.4 019/110] debugfs: Return -EPERM when locked down Greg Kroah-Hartman
2020-01-30 18:37 ` [PATCH 5.4 020/110] component: do not dereference opaque pointer in debugfs Greg Kroah-Hartman
2020-01-30 18:37 ` [PATCH 5.4 021/110] binder: fix log spam for existing debugfs file creation Greg Kroah-Hartman
2020-01-30 18:37 ` [PATCH 5.4 022/110] mei: hdcp: bind only with i915 on the same PCH Greg Kroah-Hartman
2020-01-30 18:37 ` [PATCH 5.4 023/110] mei: me: add comet point (lake) H device ids Greg Kroah-Hartman
2020-01-30 18:38 ` [PATCH 5.4 024/110] iio: adc: stm32-dfsdm: fix single conversion Greg Kroah-Hartman
2020-01-30 18:38 ` [PATCH 5.4 025/110] iio: st_gyro: Correct data for LSM9DS0 gyro Greg Kroah-Hartman
2020-01-30 18:38 ` [PATCH 5.4 026/110] driver core: Fix test_async_driver_probe if NUMA is disabled Greg Kroah-Hartman
2020-01-30 18:38 ` [PATCH 5.4 027/110] crypto: chelsio - fix writing tfm flags to wrong place Greg Kroah-Hartman
2020-01-30 18:38 ` [PATCH 5.4 028/110] CIFS: Fix task struct use-after-free on reconnect Greg Kroah-Hartman
2020-01-30 18:38 ` [PATCH 5.4 029/110] cifs: set correct max-buffer-size for smb2_ioctl_init() Greg Kroah-Hartman
2020-01-30 18:38 ` [PATCH 5.4 030/110] cifs: Fix memory allocation in __smb2_handle_cancelled_cmd() Greg Kroah-Hartman
2020-01-30 18:38 ` [PATCH 5.4 031/110] ath9k: fix storage endpoint lookup Greg Kroah-Hartman
2020-01-30 18:38 ` [PATCH 5.4 032/110] brcmfmac: fix interface sanity check Greg Kroah-Hartman
2020-01-30 18:38 ` [PATCH 5.4 033/110] rtl8xxxu: " Greg Kroah-Hartman
2020-01-30 18:38 ` [PATCH 5.4 034/110] zd1211rw: fix storage endpoint lookup Greg Kroah-Hartman
2020-01-30 18:38 ` [PATCH 5.4 035/110] net_sched: ematch: reject invalid TCF_EM_SIMPLE Greg Kroah-Hartman
2020-01-30 18:38 ` [PATCH 5.4 036/110] net_sched: fix ops->bind_class() implementations Greg Kroah-Hartman
2020-01-30 18:38 ` [PATCH 5.4 037/110] net_sched: walk through all child classes in tc_bind_tclass() Greg Kroah-Hartman
2020-01-30 18:38 ` [PATCH 5.4 038/110] net: socionext: fix possible user-after-free in netsec_process_rx Greg Kroah-Hartman
2020-01-30 18:38 ` [PATCH 5.4 039/110] net: socionext: fix xdp_result initialization " Greg Kroah-Hartman
2020-01-30 18:38 ` [PATCH 5.4 040/110] udp: segment looped gso packets correctly Greg Kroah-Hartman
2020-01-30 18:38 ` [PATCH 5.4 041/110] mlxsw: minimal: Fix an error handling path in mlxsw_m_port_create() Greg Kroah-Hartman
2020-01-30 18:38 ` [PATCH 5.4 042/110] net: include struct nhmsg size in nh nlmsg size Greg Kroah-Hartman
2020-01-30 18:38 ` [PATCH 5.4 043/110] rxrpc: Fix use-after-free in rxrpc_receive_data() Greg Kroah-Hartman
2020-01-30 18:38 ` [PATCH 5.4 044/110] HID: multitouch: Add LG MELF0410 I2C touchscreen support Greg Kroah-Hartman
2020-01-30 18:38 ` [PATCH 5.4 045/110] arc: eznps: fix allmodconfig kconfig warning Greg Kroah-Hartman
2020-01-30 18:38 ` [PATCH 5.4 046/110] HID: Add quirk for Xin-Mo Dual Controller Greg Kroah-Hartman
2020-01-30 18:38 ` [PATCH 5.4 047/110] HID: ite: Add USB id match for Acer SW5-012 keyboard dock Greg Kroah-Hartman
2020-01-30 18:38 ` [PATCH 5.4 048/110] HID: asus: Ignore Asus vendor-page usage-code 0xff events Greg Kroah-Hartman
2020-01-30 18:38 ` [PATCH 5.4 049/110] HID: Add quirk for incorrect input length on Lenovo Y720 Greg Kroah-Hartman
2020-01-30 18:38 ` [PATCH 5.4 050/110] HID: intel-ish-hid: ipc: add CMP device id Greg Kroah-Hartman
2020-01-30 18:38 ` [PATCH 5.4 051/110] HID: wacom: Recognize new MobileStudio Pro PID Greg Kroah-Hartman
2020-01-30 18:38 ` [PATCH 5.4 052/110] ASoC: SOF: fix fault at driver unload after failed probe Greg Kroah-Hartman
2020-01-30 18:38 ` [PATCH 5.4 053/110] ASoC: SOF: Intel: hda: hda-dai: fix oops on hda_link .hw_free Greg Kroah-Hartman
2020-01-30 18:38 ` [PATCH 5.4 054/110] drivers/hid/hid-multitouch.c: fix a possible null pointer access Greg Kroah-Hartman
2020-01-30 18:38 ` [PATCH 5.4 055/110] phy: qcom-qmp: Increase PHY ready timeout Greg Kroah-Hartman
2020-01-30 18:38 ` [PATCH 5.4 056/110] ASoC: fsl_audmix: add missed pm_runtime_disable Greg Kroah-Hartman
2020-01-30 18:38 ` [PATCH 5.4 057/110] ASoC: topology: Prevent use-after-free in snd_soc_get_pcm_runtime() Greg Kroah-Hartman
2020-01-30 18:38 ` [PATCH 5.4 058/110] phy: cpcap-usb: Prevent USB line glitches from waking up modem Greg Kroah-Hartman
2020-01-30 18:38 ` [PATCH 5.4 059/110] HID: intel-ish-hid: ipc: Add Tiger Lake PCI device ID Greg Kroah-Hartman
2020-01-30 18:38 ` [PATCH 5.4 060/110] watchdog: max77620_wdt: fix potential build errors Greg Kroah-Hartman
2020-01-30 18:38 ` [PATCH 5.4 061/110] watchdog: rn5t618_wdt: fix module aliases Greg Kroah-Hartman
2020-01-30 18:38 ` [PATCH 5.4 062/110] watchdog: orion: fix platform_get_irq() complaints Greg Kroah-Hartman
2020-01-30 18:38 ` [PATCH 5.4 063/110] usb: musb: jz4740: Silence error if code is -EPROBE_DEFER Greg Kroah-Hartman
2020-01-30 18:38 ` [PATCH 5.4 064/110] can: tcan4x5x: tcan4x5x_parse_config(): reset device before register access Greg Kroah-Hartman
2020-01-30 18:38 ` [PATCH 5.4 065/110] spi: spi-dw: Add lock protect dw_spi rx/tx to prevent concurrent calls Greg Kroah-Hartman
2020-01-30 18:38 ` [PATCH 5.4 066/110] net: Google gve: Remove dma_wmb() before ringing doorbell Greg Kroah-Hartman
2020-01-30 18:38 ` [PATCH 5.4 067/110] drivers/net/b44: Change to non-atomic bit operations on pwol_mask Greg Kroah-Hartman
2020-01-30 18:38 ` [PATCH 5.4 068/110] net: wan: sdla: Fix cast from pointer to integer of different size Greg Kroah-Hartman
2020-01-30 18:38 ` [PATCH 5.4 069/110] gpio: max77620: Add missing dependency on GPIOLIB_IRQCHIP Greg Kroah-Hartman
2020-01-30 18:38 ` [PATCH 5.4 070/110] iommu/dma: fix variable cookie set but not used Greg Kroah-Hartman
2020-01-30 18:38 ` [PATCH 5.4 071/110] drm/amd/display: Reduce HDMI pixel encoding if max clock is exceeded Greg Kroah-Hartman
2020-01-30 18:38 ` [PATCH 5.4 072/110] stmmac: debugfs entry name is not be changed when udev rename device name Greg Kroah-Hartman
2020-01-30 18:38 ` [PATCH 5.4 073/110] atm: eni: fix uninitialized variable warning Greg Kroah-Hartman
2020-01-30 18:38 ` [PATCH 5.4 074/110] HID: steam: Fix input device disappearing Greg Kroah-Hartman
2020-01-30 18:38 ` [PATCH 5.4 075/110] extcon-intel-cht-wc: Dont reset USB data connection at probe Greg Kroah-Hartman
2020-01-30 18:38 ` Greg Kroah-Hartman [this message]
2020-01-30 18:38 ` [PATCH 5.4 077/110] drm/amdgpu/SRIOV: add navi12 pci id for SRIOV (v2) Greg Kroah-Hartman
2020-01-30 18:38 ` [PATCH 5.4 078/110] libbpf: Fix BTF-defined maps __type macro handling of arrays Greg Kroah-Hartman
2020-01-30 18:38 ` [PATCH 5.4 079/110] staging: mt7621-pci: add quirks for E2 revision using soc_device_attribute Greg Kroah-Hartman
2020-01-30 18:38 ` [PATCH 5.4 080/110] platform/x86: dell-laptop: disable kbd backlight on Inspiron 10xx Greg Kroah-Hartman
2020-01-30 18:38 ` [PATCH 5.4 081/110] PCI: Add DMA alias quirk for Intel VCA NTB Greg Kroah-Hartman
2020-01-30 18:38 ` [PATCH 5.4 082/110] media: dvbsky: add support for eyeTV Geniatech T2 lite Greg Kroah-Hartman
2020-01-30 18:38 ` [PATCH 5.4 083/110] bus: ti-sysc: Handle mstandby quirk and use it for musb Greg Kroah-Hartman
2020-01-30 18:39 ` [PATCH 5.4 084/110] bus: ti-sysc: Use swsup quirks also for am335x musb Greg Kroah-Hartman
2020-01-30 18:39 ` [PATCH 5.4 085/110] spi: pxa2xx: Add support for Intel Comet Lake-H Greg Kroah-Hartman
2020-01-30 18:39 ` [PATCH 5.4 086/110] iommu/amd: Support multiple PCI DMA aliases in device table Greg Kroah-Hartman
2020-01-30 18:39 ` [PATCH 5.4 087/110] iommu/amd: Support multiple PCI DMA aliases in IRQ Remapping Greg Kroah-Hartman
2020-01-30 18:39 ` [PATCH 5.4 088/110] perf/imx_ddr: Add enhanced AXI ID filter support Greg Kroah-Hartman
2020-01-30 18:39 ` [PATCH 5.4 089/110] mfd: intel-lpss: Add Intel Comet Lake PCH-H PCI IDs Greg Kroah-Hartman
2020-01-30 18:39 ` [PATCH 5.4 090/110] ARM: config: aspeed-g5: Enable 8250_DW quirks Greg Kroah-Hartman
2020-01-30 18:39 ` [PATCH 5.4 091/110] ARM: OMAP2+: SmartReflex: add omap_sr_pdata definition Greg Kroah-Hartman
2020-01-30 18:39 ` [PATCH 5.4 092/110] mmc: sdhci-pci: Quirk for AMD SDHC Device 0x7906 Greg Kroah-Hartman
2020-01-30 18:39 ` [PATCH 5.4 093/110] mmc: sdhci-pci: Add support for Intel JSL Greg Kroah-Hartman
2020-01-30 18:39 ` [PATCH 5.4 094/110] bus: ti-sysc: Add module enable quirk for audio AESS Greg Kroah-Hartman
2020-01-30 18:39 ` [PATCH 5.4 095/110] usb-storage: Disable UAS on JMicron SATA enclosure Greg Kroah-Hartman
2020-01-30 18:39 ` [PATCH 5.4 096/110] ALSA: hda/realtek - Move some alc236 pintbls to fallback table Greg Kroah-Hartman
2020-01-30 18:39 ` [PATCH 5.4 097/110] Bluetooth: Allow combination of BDADDR_PROPERTY and INVALID_BDADDR quirks Greg Kroah-Hartman
2020-01-30 18:39 ` [PATCH 5.4 098/110] Bluetooth: btbcm: Use the BDADDR_PROPERTY quirk Greg Kroah-Hartman
2020-01-30 18:39 ` [PATCH 5.4 099/110] bus: ti-sysc: Fix missing force mstandby quirk handling Greg Kroah-Hartman
2020-01-30 18:39 ` [PATCH 5.4 100/110] rsi: fix use-after-free on failed probe and unbind Greg Kroah-Hartman
2020-01-30 18:39 ` [PATCH 5.4 101/110] rsi: fix use-after-free on probe errors Greg Kroah-Hartman
2020-01-30 18:39 ` [PATCH 5.4 102/110] rsi: fix memory leak on failed URB submission Greg Kroah-Hartman
2020-01-30 18:39 ` [PATCH 5.4 103/110] rsi: fix non-atomic allocation in completion handler Greg Kroah-Hartman
2020-01-30 18:39 ` [PATCH 5.4 104/110] crypto: af_alg - Use bh_lock_sock in sk_destruct Greg Kroah-Hartman
2020-01-30 18:39 ` [PATCH 5.4 105/110] crypto: vmx - reject xts inputs that are too short Greg Kroah-Hartman
2020-01-30 18:39 ` [PATCH 5.4 106/110] crypto: caam - do not reset pointer size from MCFGR register Greg Kroah-Hartman
2020-01-30 18:39 ` [PATCH 5.4 107/110] crypto: pcrypt - Fix user-after-free on module unload Greg Kroah-Hartman
2020-01-30 18:39 ` [PATCH 5.4 108/110] KVM: arm64: Write arch.mdcr_el2 changes since last vcpu_load on VHE Greg Kroah-Hartman
2020-01-30 18:39 ` [PATCH 5.4 109/110] Revert "um: Enable CONFIG_CONSTRUCTORS" Greg Kroah-Hartman
2020-01-30 18:39 ` [PATCH 5.4 110/110] power/supply: ingenic-battery: Dont change scale if theres only one Greg Kroah-Hartman
2020-01-31  4:39 ` [PATCH 5.4 000/110] 5.4.17-stable review shuah
2020-01-31 11:03 ` Jon Hunter
2020-01-31 14:42 ` Naresh Kamboju
2020-01-31 17:32 ` Guenter Roeck
2020-01-31 19:44 ` Jeffrin Jose

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200130183623.338398446@linuxfoundation.org \
    --to=gregkh@linuxfoundation.org \
    --cc=broonie@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pierre-louis.bossart@linux.intel.com \
    --cc=sammc@chromium.org \
    --cc=sashal@kernel.org \
    --cc=stable@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).