From patchwork Mon Jul 22 13:44:05 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pierre-Louis Bossart X-Patchwork-Id: 11052467 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 7E42B138D for ; Mon, 22 Jul 2019 13:52:13 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6B408286DB for ; Mon, 22 Jul 2019 13:52:13 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5F5FB286E6; Mon, 22 Jul 2019 13:52:13 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 77A73286E6 for ; Mon, 22 Jul 2019 13:52:12 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 570AC17D3; Mon, 22 Jul 2019 15:44:45 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 570AC17D3 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1563803135; bh=Ot4rPihvXCRBau1TCD6T/gWpOYRIwo/fxfgoyxQScmI=; h=From:To:Date:Cc:Subject:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From; b=YuNBmhMXD+9ygFMJX89/oCNQt6+isK2Q6oTR4tcf9qeyhvwqqFrR9+cl6TZU6+wUQ ftMUjj8ijtSzCqvgpWMiJqbyvh9+s3yrxuU8lZU0empWr6lCIrRWa57cgKAjxe76vN Ylel9dgd0rQbN1fLuGrb6cjZKQZqlTt6YD/iqyVs= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 6F211F803D5; Mon, 22 Jul 2019 15:44:44 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa1.perex.cz (Postfix, from userid 50401) id 89C28F803D5; Mon, 22 Jul 2019 15:44:42 +0200 (CEST) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id B9B33F800E8 for ; Mon, 22 Jul 2019 15:44:37 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz B9B33F800E8 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 22 Jul 2019 06:44:20 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,295,1559545200"; d="scan'208";a="159882561" Received: from gprabakx-mobl4.amr.corp.intel.com (HELO pbossart-mobl3.intel.com) ([10.254.184.17]) by orsmga007.jf.intel.com with ESMTP; 22 Jul 2019 06:44:19 -0700 From: Pierre-Louis Bossart To: alsa-devel@alsa-project.org Date: Mon, 22 Jul 2019 08:44:05 -0500 Message-Id: <20190722134410.9602-1-pierre-louis.bossart@linux.intel.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Cc: tiwai@suse.de, Pierre-Louis Bossart , Daniel Drake , Hui Wang , Curtis Malainey , broonie@kernel.org Subject: [alsa-devel] [PATCH v3 0/5] ALSA/HDA: abort probe when DMICs are detected X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 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: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" X-Virus-Scanned: ClamAV using ClamSMTP This is the second take on same problem of detecting when the HDaudio legacy driver can be used and when the SST or SOF drivers are required. The previous attempt based on a the PCI Class information was a resounding failure and broke audio on Linus' laptop, so we need additional information to avoid enabling a DSP-based driver without a good reason to do so. This patchset suggests the use of the NHLT information which *in theory* exposes DMIC endpoints. The legacy HDaudio driver cannot handle DMICs and will not provide any capture capabilities. Since it's typically the first one to probe due to the Makefile order, aborting the probe will let the PCI subsystem look for the next driver which hopefully will support this capability. I tested this patch on 5 devices (SKL, KBL, APL, GLK, WHL), three without DMICs and two with, and the detection seems to work as planned. Additional testing by Canonical and Endless folks did not expose any issues. Changes since v2 (Feedback from Takahi and Cezary) Added comment in Kconfig to alert the user to the dependency on ACPI Changes since v1 (Feedback from Takashi): Squashed patch3 in patch2 Changed log to dbg_info Fixed module parameter handling Changes since RFC: Cosmetic code improvements Moved intel-nhlt.h to include/sound Moved intel-nhlt.c to sound/hda Removed SOC prefixes Added full-support for vendor-defined geometries Added Kconfig and kernel module parameter to opt-in Pierre-Louis Bossart (5): ASoC: Intel: Skylake: move NHLT header to common directory ALSA: hda: move parts of NHLT code to new module ALSA: hda: intel-nhlt: handle NHLT VENDOR_DEFINED DMIC geometry ASoC: Intel: Skylake: use common NHLT module ALSA: hda/intel: stop probe if DMICS are detected on Skylake+ platforms .../skl-nhlt.h => include/sound/intel-nhlt.h | 51 +++++++-- sound/hda/Kconfig | 5 + sound/hda/Makefile | 3 + sound/hda/intel-nhlt.c | 102 ++++++++++++++++++ sound/pci/hda/Kconfig | 10 ++ sound/pci/hda/hda_intel.c | 34 ++++++ sound/soc/intel/Kconfig | 1 + sound/soc/intel/skylake/skl-nhlt.c | 91 +--------------- sound/soc/intel/skylake/skl-ssp-clk.c | 1 + sound/soc/intel/skylake/skl-topology.c | 1 + sound/soc/intel/skylake/skl.c | 12 ++- sound/soc/intel/skylake/skl.h | 4 - 12 files changed, 207 insertions(+), 108 deletions(-) rename sound/soc/intel/skylake/skl-nhlt.h => include/sound/intel-nhlt.h (65%) create mode 100644 sound/hda/intel-nhlt.c