projects
/
linux-2.6-block.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'asoc-5.2' into asoc-5.3
[linux-2.6-block.git]
/
sound
/
soc
/
sof
/
intel
/
hda.c
diff --git
a/sound/soc/sof/intel/hda.c
b/sound/soc/sof/intel/hda.c
index faf1a8ada091fddc7352a9b7ac107ab7a80a8c9d..47b508463218a9eebd9b92292f1598a79c24a548 100644
(file)
--- a/
sound/soc/sof/intel/hda.c
+++ b/
sound/soc/sof/intel/hda.c
@@
-496,7
+496,9
@@
int hda_dsp_probe(struct snd_sof_dev *sdev)
* TODO: support interrupt mode selection with kernel parameter
* support msi multiple vectors
*/
* TODO: support interrupt mode selection with kernel parameter
* support msi multiple vectors
*/
+#if IS_ENABLED(CONFIG_PCI)
ret = pci_alloc_irq_vectors(pci, 1, 1, PCI_IRQ_MSI);
ret = pci_alloc_irq_vectors(pci, 1, 1, PCI_IRQ_MSI);
+#endif
if (ret < 0) {
dev_info(sdev->dev, "use legacy interrupt mode\n");
/*
if (ret < 0) {
dev_info(sdev->dev, "use legacy interrupt mode\n");
/*
@@
-508,7
+510,9
@@
int hda_dsp_probe(struct snd_sof_dev *sdev)
sdev->msi_enabled = 0;
} else {
dev_info(sdev->dev, "use msi interrupt mode\n");
sdev->msi_enabled = 0;
} else {
dev_info(sdev->dev, "use msi interrupt mode\n");
+#if IS_ENABLED(CONFIG_PCI)
hdev->irq = pci_irq_vector(pci, 0);
hdev->irq = pci_irq_vector(pci, 0);
+#endif
/* ipc irq number is the same of hda irq */
sdev->ipc_irq = hdev->irq;
sdev->msi_enabled = 1;
/* ipc irq number is the same of hda irq */
sdev->ipc_irq = hdev->irq;
sdev->msi_enabled = 1;
@@
-565,8
+569,10
@@
free_ipc_irq:
free_hda_irq:
free_irq(hdev->irq, bus);
free_irq_vector:
free_hda_irq:
free_irq(hdev->irq, bus);
free_irq_vector:
+#if IS_ENABLED(CONFIG_PCI)
if (sdev->msi_enabled)
pci_free_irq_vectors(pci);
if (sdev->msi_enabled)
pci_free_irq_vectors(pci);
+#endif
free_streams:
hda_dsp_stream_free(sdev);
/* dsp_unmap: not currently used */
free_streams:
hda_dsp_stream_free(sdev);
/* dsp_unmap: not currently used */
@@
-581,7
+587,6
@@
int hda_dsp_remove(struct snd_sof_dev *sdev)
{
struct sof_intel_hda_dev *hda = sdev->pdata->hw_pdata;
struct hdac_bus *bus = sof_to_bus(sdev);
{
struct sof_intel_hda_dev *hda = sdev->pdata->hw_pdata;
struct hdac_bus *bus = sof_to_bus(sdev);
- struct pci_dev *pci = to_pci_dev(sdev->dev);
const struct sof_intel_dsp_desc *chip = hda->desc;
#if IS_ENABLED(CONFIG_SND_SOC_SOF_HDA)
const struct sof_intel_dsp_desc *chip = hda->desc;
#if IS_ENABLED(CONFIG_SND_SOC_SOF_HDA)
@@
-610,8
+615,12
@@
int hda_dsp_remove(struct snd_sof_dev *sdev)
free_irq(sdev->ipc_irq, sdev);
free_irq(hda->irq, bus);
free_irq(sdev->ipc_irq, sdev);
free_irq(hda->irq, bus);
- if (sdev->msi_enabled)
+#if IS_ENABLED(CONFIG_PCI)
+ if (sdev->msi_enabled) {
+ struct pci_dev *pci = to_pci_dev(sdev->dev);
pci_free_irq_vectors(pci);
pci_free_irq_vectors(pci);
+ }
+#endif
hda_dsp_stream_free(sdev);
#if IS_ENABLED(CONFIG_SND_SOC_SOF_HDA)
hda_dsp_stream_free(sdev);
#if IS_ENABLED(CONFIG_SND_SOC_SOF_HDA)