From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6B80AC388F7 for ; Thu, 12 Nov 2020 22:43:23 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 95EE720578 for ; Thu, 12 Nov 2020 22:43:22 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=alsa-project.org header.i=@alsa-project.org header.b="S66miv5J" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 95EE720578 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.intel.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-devel-bounces@alsa-project.org 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 1432E1843; Thu, 12 Nov 2020 23:42:31 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 1432E1843 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1605221001; bh=lI61Awzofp7JD5eLBv3A4Gs7SFPL59dS/EjSDT+6uPY=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=S66miv5Ja1EDGip4bgqMxhqTPa4LIpSXifeBZVG5MwoMIhgstTgPKzPbzEuC3nFiZ 40q/h3mxG3byHoyKRGJVKnphZpT2cnJh6Z5zrSwY/dk9XG1KWUBx0KkdCin88Bo3nn nsdHASF6PaBFPcf425wl1FZCr4teGZGnVdORnJuE= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id BC64DF80508; Thu, 12 Nov 2020 23:39:20 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 7BB11F804BD; Thu, 12 Nov 2020 23:39:12 +0100 (CET) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) (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 44C99F804BD for ; Thu, 12 Nov 2020 23:38:59 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 44C99F804BD IronPort-SDR: p6sSE2dGR8PvHnA6enf6gPY0qjtcw0Jonk5Yb2ZNu/PWhKgpSDmW3zMtzLPOnxtOS3Gp8IaHBN hpZ50lrQfNbQ== X-IronPort-AV: E=McAfee;i="6000,8403,9803"; a="166885008" X-IronPort-AV: E=Sophos;i="5.77,473,1596524400"; d="scan'208";a="166885008" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Nov 2020 14:38:57 -0800 IronPort-SDR: 2l2UZvmnZfSU+YZQtAgukKOf9pGMugq65TnFR4IST1I+2aaOQ6ZBNv5pD0vwwiPOpCpKNO+9zl 7dkQ2LX6ucYw== X-IronPort-AV: E=Sophos;i="5.77,473,1596524400"; d="scan'208";a="323797491" Received: from gjshield-mobl.amr.corp.intel.com (HELO pbossart-mobl3.intel.com) ([10.213.180.118]) by orsmga003-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Nov 2020 14:38:56 -0800 From: Pierre-Louis Bossart To: alsa-devel@alsa-project.org Subject: [PATCH 08/14] ASoC: Intel: Atom: add dynamic selection of DSP driver Date: Thu, 12 Nov 2020 16:38:19 -0600 Message-Id: <20201112223825.39765-9-pierre-louis.bossart@linux.intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201112223825.39765-1-pierre-louis.bossart@linux.intel.com> References: <20201112223825.39765-1-pierre-louis.bossart@linux.intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Cc: Guennadi Liakhovetski , tiwai@suse.de, Ranjani Sridharan , Pierre-Louis Bossart , Hans de Goede , broonie@kernel.org, Rander Wang 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" Follow PCI example and stop the probe when another driver is desired for the same ACPI HID. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Reviewed-by: Rander Wang Reviewed-by: Guennadi Liakhovetski --- sound/soc/intel/Kconfig | 1 + sound/soc/intel/atom/sst/sst_acpi.c | 8 ++++++++ 2 files changed, 9 insertions(+) diff --git a/sound/soc/intel/Kconfig b/sound/soc/intel/Kconfig index a5b446d5af19..4e9f910751a9 100644 --- a/sound/soc/intel/Kconfig +++ b/sound/soc/intel/Kconfig @@ -55,6 +55,7 @@ config SND_SST_ATOM_HIFI2_PLATFORM_ACPI depends on X86 && ACPI && PCI select SND_SST_ATOM_HIFI2_PLATFORM select SND_SOC_ACPI_INTEL_MATCH + select SND_INTEL_DSP_CONFIG select IOSF_MBI help If you have a Intel Baytrail or Cherrytrail platform with an I2S diff --git a/sound/soc/intel/atom/sst/sst_acpi.c b/sound/soc/intel/atom/sst/sst_acpi.c index f943a0884976..2c1b8a2e3506 100644 --- a/sound/soc/intel/atom/sst/sst_acpi.c +++ b/sound/soc/intel/atom/sst/sst_acpi.c @@ -21,6 +21,7 @@ #include #include #include +#include #include #include #include @@ -246,6 +247,13 @@ static int sst_acpi_probe(struct platform_device *pdev) id = acpi_match_device(dev->driver->acpi_match_table, dev); if (!id) return -ENODEV; + + ret = snd_intel_acpi_dsp_driver_probe(dev, id->id); + if (ret != SND_INTEL_DSP_DRIVER_ANY && ret != SND_INTEL_DSP_DRIVER_SST) { + dev_dbg(dev, "SST ACPI driver not selected, aborting probe\n"); + return -ENODEV; + } + dev_dbg(dev, "for %s\n", id->id); mach = (struct snd_soc_acpi_mach *)id->driver_data; -- 2.25.1