From: Vinod Koul <vinod.koul@intel.com>
To: alsa-devel@alsa-project.org
Cc: tiwai@suse.de, patches.audio@intel.com,
liam.r.girdwood@linux.intel.com,
Vinod Koul <vinod.koul@intel.com>,
broonie@kernel.org, Jeeja KP <jeeja.kp@intel.com>
Subject: [PATCH v2 2/2] ALSA: hda: use snd_adsp_enable in HDA driver
Date: Thu, 18 Jun 2015 12:08:25 +0530 [thread overview]
Message-ID: <1434609505-776-3-git-send-email-vinod.koul@intel.com> (raw)
In-Reply-To: <1434609505-776-1-git-send-email-vinod.koul@intel.com>
The SKL platform support aDSP, so we add a new caps AZX_DCAPS_ADSP for
this. On platforms with aDSP we still load the HDA driver till ASoC
SKL driver is merged and ecosystem around it matured. Later on we need
to move this based on BIOS configuration of platform
Signed-off-by: Jeeja KP <jeeja.kp@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
---
sound/pci/hda/hda_controller.h | 1 +
sound/pci/hda/hda_intel.c | 10 +++++++++-
2 files changed, 10 insertions(+), 1 deletion(-)
diff --git a/sound/pci/hda/hda_controller.h b/sound/pci/hda/hda_controller.h
index 314105cd5061..e30aec1af780 100644
--- a/sound/pci/hda/hda_controller.h
+++ b/sound/pci/hda/hda_controller.h
@@ -50,6 +50,7 @@
#define AZX_DCAPS_CORBRP_SELF_CLEAR (1 << 28) /* CORBRP clears itself after reset */
#define AZX_DCAPS_NO_MSI64 (1 << 29) /* Stick to 32-bit MSIs */
#define AZX_DCAPS_SEPARATE_STREAM_TAG (1 << 30) /* capture and playback use separate stream tag */
+#define AZX_DCAPS_ADSP (1 << 31) /* Intel aDSP support */
enum {
AZX_SNOOP_TYPE_NONE,
diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c
index ea0df95bff5d..b91610bd4fba 100644
--- a/sound/pci/hda/hda_intel.c
+++ b/sound/pci/hda/hda_intel.c
@@ -1894,6 +1894,14 @@ static int azx_probe(struct pci_dev *pci,
return -ENOENT;
}
+ /*
+ * check if this device has aDSP caps and DSP is disabled in
+ * configuration, then go ahead, otherwise ASoC driver will load for
+ * this device
+ */
+ if ((pci_id->driver_data && AZX_DCAPS_ADSP) && (snd_adsp_enable == true))
+ return -ENODEV;
+
err = snd_card_new(&pci->dev, index[dev], id[dev], THIS_MODULE,
0, &card);
if (err < 0) {
@@ -2101,7 +2109,7 @@ static const struct pci_device_id azx_ids[] = {
.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 },
+ .driver_data = AZX_DRIVER_PCH | AZX_DCAPS_INTEL_SKYLAKE | AZX_DCAPS_ADSP },
/* Haswell */
{ PCI_DEVICE(0x8086, 0x0a0c),
.driver_data = AZX_DRIVER_HDMI | AZX_DCAPS_INTEL_HASWELL },
--
1.9.1
next prev parent reply other threads:[~2015-06-18 6:36 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-18 6:38 [PATCH v2 0/2] ALSA: hda: add module flag snd_adsp_enable Vinod Koul
2015-06-18 6:38 ` [PATCH v2 1/2] ALSA: hda: add snd_adsp_enable module flag Vinod Koul
2015-06-18 6:38 ` Vinod Koul [this message]
2015-06-19 11:37 ` [PATCH v2 0/2] ALSA: hda: add module flag snd_adsp_enable Takashi Iwai
2015-06-22 10:58 ` Vinod Koul
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=1434609505-776-3-git-send-email-vinod.koul@intel.com \
--to=vinod.koul@intel.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=jeeja.kp@intel.com \
--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