clear-pkgs-linux-iot-lts2018/0171-ASoC-intel-skylake-mar...

47 lines
1.4 KiB
Diff
Raw Normal View History

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Ramesh Babu <ramesh.babu@intel.com>
Date: Mon, 23 Nov 2015 03:22:40 +0530
Subject: [PATCH] ASoC: intel: skylake: mark ring buffer as non-cacheble
Change-Id: I8c08f3a91682654e5f1db95033b580258201da91
Signed-off-by: Ramesh Babu <ramesh.babu@intel.com>
Reviewed-on:
---
sound/soc/intel/skylake/skl-pcm.c | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/sound/soc/intel/skylake/skl-pcm.c b/sound/soc/intel/skylake/skl-pcm.c
2020-10-27 02:14:06 +08:00
index 6b2c8c6e7a00..fcd9523d759b 100644
--- a/sound/soc/intel/skylake/skl-pcm.c
+++ b/sound/soc/intel/skylake/skl-pcm.c
@@ -80,17 +80,25 @@ static int skl_substream_alloc_pages(struct hdac_bus *bus,
size_t size)
{
struct hdac_ext_stream *stream = get_hdac_ext_stream(substream);
+ int ret;
hdac_stream(stream)->bufsize = 0;
hdac_stream(stream)->period_bytes = 0;
hdac_stream(stream)->format_val = 0;
- return snd_pcm_lib_malloc_pages(substream, size);
+ ret = snd_pcm_lib_malloc_pages(substream, size);
+ if (ret < 0)
+ return ret;
+ ebus->bus.io_ops->mark_pages_uc(snd_pcm_get_dma_buf(substream), true);
+
+ return ret;
}
static int skl_substream_free_pages(struct hdac_bus *bus,
struct snd_pcm_substream *substream)
{
+ bus->io_ops->mark_pages_uc(snd_pcm_get_dma_buf(substream), false);
+
return snd_pcm_lib_free_pages(substream);
}
--
https://clearlinux.org