From patchwork Thu Apr 30 14:52:36 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vinod Koul X-Patchwork-Id: 6304641 Return-Path: X-Original-To: patchwork-alsa-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 95564BEEE1 for ; Thu, 30 Apr 2015 14:53:14 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 57779201F5 for ; Thu, 30 Apr 2015 14:53:13 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id 1BAA2201BB for ; Thu, 30 Apr 2015 14:53:12 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id 39240265E07; Thu, 30 Apr 2015 16:53:11 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 Received: from alsa0.perex.cz (localhost [IPv6:::1]) by alsa0.perex.cz (Postfix) with ESMTP id 11D99264F51; Thu, 30 Apr 2015 16:52:21 +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 180D0264F0A; Thu, 30 Apr 2015 16:52:13 +0200 (CEST) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by alsa0.perex.cz (Postfix) with ESMTP id 7B86A261A3B for ; Thu, 30 Apr 2015 16:52:07 +0200 (CEST) Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga103.jf.intel.com with ESMTP; 30 Apr 2015 07:52:07 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.11,677,1422950400"; d="scan'208";a="564317803" Received: from unknown (HELO vkoul-udesk7.iind.intel.com) ([10.223.84.34]) by orsmga003.jf.intel.com with ESMTP; 30 Apr 2015 07:52:03 -0700 From: Vinod Koul To: alsa-devel@alsa-project.org Date: Thu, 30 Apr 2015 20:22:36 +0530 Message-Id: <1430405556-19166-3-git-send-email-vinod.koul@intel.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1430405556-19166-1-git-send-email-vinod.koul@intel.com> References: <1430405556-19166-1-git-send-email-vinod.koul@intel.com> Cc: liam.r.girdwood@linux.intel.com, tiwai@suse.de, broonie@kernel.org, Vinod Koul , patches.audio@intel.com Subject: [alsa-devel] [PATCH 3/3] ALSA: hda: register selectively for SPT-LP 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 Sunrisepoint-LP HDA controller supports aDSP, so register selectively for this controller Signed-off-by: Vinod Koul --- sound/pci/hda/hda_intel.c | 31 ++++++++++++++++++++++++++++--- 1 file changed, 28 insertions(+), 3 deletions(-) diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c index 488dab208ddc..314a7beb2b29 100644 --- a/sound/pci/hda/hda_intel.c +++ b/sound/pci/hda/hda_intel.c @@ -2023,9 +2023,6 @@ static const struct pci_device_id azx_ids[] = { /* Sunrise Point */ { PCI_DEVICE(0x8086, 0xa170), .driver_data = AZX_DRIVER_PCH | AZX_DCAPS_INTEL_SKYLAKE }, - /* Sunrise Point-LP */ - { PCI_DEVICE(0x8086, 0x9d70), - .driver_data = AZX_DRIVER_PCH | AZX_DCAPS_INTEL_SKYLAKE }, /* Haswell */ { PCI_DEVICE(0x8086, 0x0a0c), .driver_data = AZX_DRIVER_HDMI | AZX_DCAPS_INTEL_HASWELL }, @@ -2205,6 +2202,14 @@ static const struct pci_device_id azx_ids[] = { }; MODULE_DEVICE_TABLE(pci, azx_ids); +static const struct pci_device_id azx_intel_adsp_ids[] = { + /* Sunrise Point-LP */ + { PCI_DEVICE(0x8086, 0x9d70), + .driver_data = AZX_DRIVER_PCH | AZX_DCAPS_INTEL_SKYLAKE }, + { 0, } +}; +MODULE_DEVICE_TABLE(pci, azx_intel_adsp_ids); + /* pci_driver definition */ static struct pci_driver azx_driver = { .name = KBUILD_MODNAME, @@ -2217,12 +2222,25 @@ static struct pci_driver azx_driver = { }, }; +static struct pci_driver azx_intel_adsp_driver = { + .name = KBUILD_MODNAME, + .id_table = azx_intel_adsp_ids, + .probe = azx_probe, + .remove = azx_remove, + .shutdown = azx_shutdown, + .driver = { + .pm = AZX_PM_OPS, + }, +}; + static int __init azx_module_init(void) { int ret; ret = pci_register_driver(&azx_driver); + if (!hdac_adsp_enable) + ret = pci_register_driver(&azx_intel_adsp_driver); return ret; } module_init(azx_module_init); @@ -2231,5 +2249,12 @@ static void __exit azx_module_exit(void) { pci_unregister_driver(&azx_driver); + /* Some Intel HDA controllers support aDSP this is enabled thru the + * ASoC HDA aDSP driver So we register for these devices only when + * aDSP is disabled by the hdac_adsp_enable flag + */ + if (!hdac_adsp_enable) + pci_unregister_driver(&azx_intel_adsp_driver); + } module_exit(azx_module_exit);