ASoC: Intel: avs: Set max DMA segment size
[platform/kernel/linux-starfive.git] / sound / soc / intel / avs / core.c
index 3a0997c..6a35bf4 100644 (file)
@@ -23,6 +23,7 @@
 #include <sound/hdaudio_ext.h>
 #include <sound/intel-dsp-config.h>
 #include <sound/intel-nhlt.h>
+#include "../../codecs/hda.h"
 #include "avs.h"
 #include "cldma.h"
 
@@ -356,7 +357,7 @@ static int avs_bus_init(struct avs_dev *adev, struct pci_dev *pci, const struct
        struct device *dev = &pci->dev;
        int ret;
 
-       ret = snd_hdac_ext_bus_init(&bus->core, dev, NULL, NULL);
+       ret = snd_hdac_ext_bus_init(&bus->core, dev, NULL, &soc_hda_ext_bus_ops);
        if (ret < 0)
                return ret;
 
@@ -445,6 +446,7 @@ static int avs_pci_probe(struct pci_dev *pci, const struct pci_device_id *id)
                dma_set_mask(dev, DMA_BIT_MASK(32));
                dma_set_coherent_mask(dev, DMA_BIT_MASK(32));
        }
+       dma_set_max_seg_size(dev, UINT_MAX);
 
        ret = avs_hdac_bus_init_streams(bus);
        if (ret < 0) {
@@ -555,6 +557,7 @@ static int __maybe_unused avs_suspend_common(struct avs_dev *adev)
                return AVS_IPC_RET(ret);
        }
 
+       avs_ipc_block(adev->ipc);
        avs_dsp_op(adev, int_control, false);
        snd_hdac_ext_bus_ppcap_int_enable(bus, false);