[alsa-devel] [RESEND][PATCH v4 2/3] ALSA: hda: ext: add spib to stream context
Sriram Periyasamy
sriramx.periyasamy at intel.com
Tue Mar 20 17:01:07 CET 2018
From: Ramesh Babu <ramesh.babu at intel.com>
Platforms like skylake support SPIB (software position index in
Buffer) capability, through which application pointer can be
programmed in DMA. This helps DMA stop rendering stale data.
This patch saves spib values in stream context which can be
restored during resume from S3.
Signed-off-by: Ramesh Babu <ramesh.babu at intel.com>
Signed-off-by: Subhransu S. Prusty <subhransu.s.prusty at intel.com>
Signed-off-by: Sriram Periyasamy <sriramx.periyasamy at intel.com>
---
include/sound/hdaudio_ext.h | 1 +
sound/hda/ext/hdac_ext_stream.c | 2 ++
2 files changed, 3 insertions(+)
diff --git a/include/sound/hdaudio_ext.h b/include/sound/hdaudio_ext.h
index 9c14e21dda85..34c41496fbc7 100644
--- a/include/sound/hdaudio_ext.h
+++ b/include/sound/hdaudio_ext.h
@@ -89,6 +89,7 @@ struct hdac_ext_stream {
u32 dpib;
u32 lpib;
+ u32 spib;
bool decoupled:1;
bool link_locked:1;
bool link_prepared;
diff --git a/sound/hda/ext/hdac_ext_stream.c b/sound/hda/ext/hdac_ext_stream.c
index c96d7a7a36af..c5212709bdb7 100644
--- a/sound/hda/ext/hdac_ext_stream.c
+++ b/sound/hda/ext/hdac_ext_stream.c
@@ -461,6 +461,8 @@ int snd_hdac_ext_stream_set_spib(struct hdac_ext_bus *ebus,
}
writel(value, stream->spib_addr);
+ /* save the spib value in stream context */
+ stream->spib = value;
return 0;
}
--
2.7.4
More information about the Alsa-devel
mailing list