Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Vinod Koul <vinod.koul@intel.com>
To: alsa-devel@alsa-project.org
Cc: liam.r.girdwood@linux.intel.com, tiwai@suse.de,
	broonie@kernel.org, Vinod Koul <vinod.koul@intel.com>,
	patches.audio@intel.com
Subject: [PATCH 3/3] ALSA: hda: register selectively for SPT-LP
Date: Thu, 30 Apr 2015 20:22:36 +0530	[thread overview]
Message-ID: <1430405556-19166-3-git-send-email-vinod.koul@intel.com> (raw)
In-Reply-To: <1430405556-19166-1-git-send-email-vinod.koul@intel.com>

Sunrisepoint-LP HDA controller supports aDSP, so register selectively for
this controller

Signed-off-by: Vinod Koul <vinod.koul@intel.com>
---
 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);
-- 
1.9.1

  parent reply	other threads:[~2015-04-30 14:52 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-30 14:52 [PATCH 1/3] ALSA: hda: add hdac_adsp_enable module flag Vinod Koul
2015-04-30 14:52 ` [PATCH 2/3] ALSA: hda: remove module_pci_driver Vinod Koul
2015-04-30 14:52 ` Vinod Koul [this message]
2015-04-30 20:33   ` [PATCH 3/3] ALSA: hda: register selectively for SPT-LP Mark Brown
2015-04-30 20:59     ` Takashi Iwai
2015-04-30 21:23       ` Mark Brown
2015-05-01  4:31         ` Vinod Koul
2015-04-30 16:02 ` [PATCH 1/3] ALSA: hda: add hdac_adsp_enable module flag Pierre-Louis Bossart
2015-04-30 19:27   ` Mark Brown
2015-04-30 20:44     ` Takashi Iwai
2015-05-01  4:39       ` Vinod Koul
2015-05-01 14:15         ` Pierre-Louis Bossart
2015-05-01 14:41           ` Mark Brown
2015-05-01 11:13       ` Mark Brown
2015-04-30 20:47 ` Takashi Iwai

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=1430405556-19166-3-git-send-email-vinod.koul@intel.com \
    --to=vinod.koul@intel.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=liam.r.girdwood@linux.intel.com \
    --cc=patches.audio@intel.com \
    --cc=tiwai@suse.de \
    /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