All of lore.kernel.org
 help / color / mirror / Atom feed
* Buffers used in ASoC Intel Atom SST driver
@ 2022-08-18 15:42 Takashi Iwai
  2022-08-18 15:59 ` Cezary Rojewski
  0 siblings, 1 reply; 6+ messages in thread
From: Takashi Iwai @ 2022-08-18 15:42 UTC (permalink / raw)
  To: alsa-devel
  Cc: Cezary Rojewski, Kai Vehmanen, Peter Ujfalusi,
	Pierre-Louis Bossart, Ranjani Sridharan, Liam Girdwood, Bard Liao

Hi,

while cleaning up / fixing the memory allocation code, I noticed that
Intel SST driver is the only driver that currently uses the
SNDRV_DMA_TYPE_CONTINUOUS pages for its PCM buffer.

Is there any reason not to use the standard device buffer
(SNDRV_DMA_TYPE_DEV)?  i.e. the change like below.


thanks,

Takashi

-- 8< --
From: Takashi Iwai <tiwai@suse.de>
Subject: [PATCH] ASoC: Intel: sst: Switch to standard device pages

Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
 sound/soc/intel/atom/sst-mfld-platform-pcm.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/sound/soc/intel/atom/sst-mfld-platform-pcm.c b/sound/soc/intel/atom/sst-mfld-platform-pcm.c
index a56dd48c045f..c75616a5fd0a 100644
--- a/sound/soc/intel/atom/sst-mfld-platform-pcm.c
+++ b/sound/soc/intel/atom/sst-mfld-platform-pcm.c
@@ -676,10 +676,9 @@ static int sst_soc_pcm_new(struct snd_soc_component *component,
 
 	if (dai->driver->playback.channels_min ||
 			dai->driver->capture.channels_min) {
-		snd_pcm_set_managed_buffer_all(pcm,
-			SNDRV_DMA_TYPE_CONTINUOUS,
-			snd_dma_continuous_data(GFP_DMA),
-			SST_MIN_BUFFER, SST_MAX_BUFFER);
+		snd_pcm_set_managed_buffer_all(pcm, SNDRV_DMA_TYPE_DEV,
+					       pcm->card->dev,
+					       SST_MIN_BUFFER, SST_MAX_BUFFER);
 	}
 	return 0;
 }
-- 
2.35.3


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2022-09-11 18:09 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-08-18 15:42 Buffers used in ASoC Intel Atom SST driver Takashi Iwai
2022-08-18 15:59 ` Cezary Rojewski
2022-08-18 16:03   ` Takashi Iwai
2022-08-18 16:11     ` Pierre-Louis Bossart
2022-08-23 11:56     ` Takashi Iwai
2022-09-11 18:08     ` Hans de Goede

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.