Commit a5bbbde2 authored by Amadeusz Sławiński's avatar Amadeusz Sławiński Committed by Mark Brown

ASoC: Intel: avs: Use helper function to set up DMA

dma_set_mask() and dma_set_coherent_mask() can be performed with one
call to dma_set_mask_and_coherent(), which slightly reduces amount of
code on our side.
Signed-off-by: default avatarAmadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Signed-off-by: default avatarCezary Rojewski <cezary.rojewski@intel.com>
Link: https://lore.kernel.org/r/20220707124153.1858249-9-cezary.rojewski@intel.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent 8544eebc
...@@ -440,12 +440,8 @@ static int avs_pci_probe(struct pci_dev *pci, const struct pci_device_id *id) ...@@ -440,12 +440,8 @@ static int avs_pci_probe(struct pci_dev *pci, const struct pci_device_id *id)
if (bus->mlcap) if (bus->mlcap)
snd_hdac_ext_bus_get_ml_capabilities(bus); snd_hdac_ext_bus_get_ml_capabilities(bus);
if (!dma_set_mask(dev, DMA_BIT_MASK(64))) { if (!dma_set_mask_and_coherent(dev, DMA_BIT_MASK(64)))
dma_set_coherent_mask(dev, DMA_BIT_MASK(64)); dma_set_mask_and_coherent(dev, DMA_BIT_MASK(32));
} else {
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); dma_set_max_seg_size(dev, UINT_MAX);
ret = avs_hdac_bus_init_streams(bus); ret = avs_hdac_bus_init_streams(bus);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment