From patchwork Wed Jul 25 00:50:55 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pierre-Louis Bossart X-Patchwork-Id: 10543367 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 C9756157A for ; Wed, 25 Jul 2018 00:52:56 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B8D47203B9 for ; Wed, 25 Jul 2018 00:52:56 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id AC77C23201; Wed, 25 Jul 2018 00:52:56 +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,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]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4D8CD203B9 for ; Wed, 25 Jul 2018 00:52:55 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id B06AB267762; Wed, 25 Jul 2018 02:52:40 +0200 (CEST) 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 3FAA4267749; Wed, 25 Jul 2018 02:52:36 +0200 (CEST) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by alsa0.perex.cz (Postfix) with ESMTP id 53319267749 for ; Wed, 25 Jul 2018 02:52:33 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 24 Jul 2018 17:52:28 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.51,399,1526367600"; d="scan'208";a="59547193" Received: from rbumberh-mobl.amr.corp.intel.com (HELO pbossart-mobl3.intel.com) ([10.255.33.207]) by orsmga008.jf.intel.com with ESMTP; 24 Jul 2018 17:51:06 -0700 From: Pierre-Louis Bossart To: alsa-devel@alsa-project.org Date: Tue, 24 Jul 2018 19:50:55 -0500 Message-Id: <20180725005055.18138-9-pierre-louis.bossart@linux.intel.com> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20180725005055.18138-1-pierre-louis.bossart@linux.intel.com> References: <20180725005055.18138-1-pierre-louis.bossart@linux.intel.com> Cc: tiwai@suse.de, liam.r.girdwood@linux.intel.com, vkoul@kernel.org, broonie@kernel.org, Pierre-Louis Bossart Subject: [alsa-devel] [PATCH v4 8/8] ASoC: Intel: Skylake: add option to control HDAudio + DSP usage 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 X-Virus-Scanned: ClamAV using ClamSMTP Add two options to explicitly enable HDAudio + DSP usage and force its use Signed-off-by: Pierre-Louis Bossart --- sound/soc/intel/Kconfig | 18 ++++++++++++++++++ sound/soc/intel/skylake/skl.c | 7 ++++++- 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/sound/soc/intel/Kconfig b/sound/soc/intel/Kconfig index 0caa1f4eb94d..494cc1015207 100644 --- a/sound/soc/intel/Kconfig +++ b/sound/soc/intel/Kconfig @@ -117,6 +117,24 @@ config SND_SOC_INTEL_SKYLAKE GeminiLake or CannonLake platform with the DSP enabled in the BIOS then enable this option by saying Y or m. +config SND_SOC_INTEL_SKYLAKE_HDA_DSP + tristate "Enable HDA+DSP support" + depends on SND_SOC_INTEL_SKYLAKE + help + If you have a Intel Skylake+ platform with the DSP enabled in the BIOS, + and an HDAudio codec, the enable this option by saying Y or m. + This option will only have an effect if there are no ACPI-enumerated audio + devices (I2C, SoundWire). + +config SND_SOC_INTEL_SKYLAKE_FORCE_HDA_DSP + tristate "Force HDA+DSP support" + depends on SND_SOC_INTEL_SKYLAKE_HDA_DSP + help + If you have a Intel Skylake+ platform with the DSP enabled in the BIOS, + and an HDAudio codec, the enable this option by saying Y or m. + This option will ignore information from the BIOS and force the use of the + HDaudio codec, if present. This is a debug option not recommended for distros. + config SND_SOC_ACPI_INTEL_MATCH tristate select SND_SOC_ACPI if ACPI diff --git a/sound/soc/intel/skylake/skl.c b/sound/soc/intel/skylake/skl.c index e8bf46cfea45..b14a47e765de 100644 --- a/sound/soc/intel/skylake/skl.c +++ b/sound/soc/intel/skylake/skl.c @@ -474,6 +474,7 @@ static struct skl_ssp_clk skl_ssp_clks[] = { {.name = "ssp5_sclkfs"}, }; +#if IS_ENABLED(CONFIG_SND_SOC_INTEL_SKYLAKE_HDA_DSP) static struct snd_soc_acpi_mach *skl_find_hda_machine(struct skl *skl, struct snd_soc_acpi_mach *machines) { @@ -492,6 +493,7 @@ static struct snd_soc_acpi_mach *skl_find_hda_machine(struct skl *skl, return mach; } +#endif static int skl_find_machine(struct skl *skl, void *driver_data) { @@ -500,13 +502,16 @@ static int skl_find_machine(struct skl *skl, void *driver_data) struct skl_machine_pdata *pdata; mach = snd_soc_acpi_find_machine(mach); - if (!mach) { + if (!mach || IS_ENABLED(CONFIG_SND_SOC_INTEL_SKYLAKE_FORCE_HDA_DSP)) { dev_dbg(bus->dev, "No matching I2S machine driver found\n"); +#if IS_ENABLED(CONFIG_SND_SOC_INTEL_SKYLAKE_HDA_DSP) mach = skl_find_hda_machine(skl, driver_data); +#endif if (!mach) { dev_err(bus->dev, "No matching machine driver found\n"); return -ENODEV; } + } skl->mach = mach;