Skip to content

Commit

Permalink
ASoC: intel: skl: Simplify with dma_set_mask_and_coherent()
Browse files Browse the repository at this point in the history
ASoC Intel Skylake driver still has explicit calls of dma_set_mask()
and dma_set_coherent_mask().

Let's simplify with dma_set_mask_and_coherent().

Cc: Cezary Rojewski <cezary.rojewski@intel.com>
Cc: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://lore.kernel.org/r/20210114133337.1039-2-tiwai@suse.de
Signed-off-by: Mark Brown <broonie@kernel.org>
  • Loading branch information
Takashi Iwai authored and Mark Brown committed Jan 19, 2021
1 parent 39860fe commit d3afb00
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions sound/soc/intel/skylake/skl.c
Original file line number Diff line number Diff line change
Expand Up @@ -950,12 +950,8 @@ static int skl_first_init(struct hdac_bus *bus)
bus->num_streams = cp_streams + pb_streams;

/* allow 64bit DMA address if supported by H/W */
if (!dma_set_mask(bus->dev, DMA_BIT_MASK(64))) {
dma_set_coherent_mask(bus->dev, DMA_BIT_MASK(64));
} else {
dma_set_mask(bus->dev, DMA_BIT_MASK(32));
dma_set_coherent_mask(bus->dev, DMA_BIT_MASK(32));
}
if (dma_set_mask_and_coherent(bus->dev, DMA_BIT_MASK(64)))
dma_set_mask_and_coherent(bus->dev, DMA_BIT_MASK(32));

/* initialize streams */
snd_hdac_ext_stream_init_all
Expand Down

0 comments on commit d3afb00

Please sign in to comment.