[Sound-open-firmware] [PATCH 2/3] platform: add stream region into sof_ipc_window
Xiuli Pan
xiuli.pan at linux.intel.com
Mon Feb 12 07:20:14 CET 2018
From: Pan Xiuli <xiuli.pan at linux.intel.com>
Add stream region memory window into sof_ipc_window used for position
update.
Signed-off-by: Pan Xiuli <xiuli.pan at linux.intel.com>
---
Test with:
Mininow max rt5651
SOF master: 019637ab250daa53c15da0a0a98c54f1c58d8ca3
SOF-Tool master: 33e4b0cc6f6a44e3e7ee849c04c515a5537242c7
https://github.com/plbossart/sound/tree/topic/sof-v4.14:
6fa721a8b7c6567eea0a2181bf9a3d2a12c31b00
---
src/platform/apollolake/platform.c | 10 ++++++++--
src/platform/baytrail/platform.c | 9 ++++++++-
src/platform/cannonlake/platform.c | 10 ++++++++--
src/platform/haswell/platform.c | 9 ++++++++-
4 files changed, 32 insertions(+), 6 deletions(-)
diff --git a/src/platform/apollolake/platform.c b/src/platform/apollolake/platform.c
index bb44634..f3ea04e 100644
--- a/src/platform/apollolake/platform.c
+++ b/src/platform/apollolake/platform.c
@@ -68,7 +68,7 @@ static const struct sof_ipc_fw_ready ready = {
#define SRAM_WINDOW_HOST_OFFSET(x) (0x80000 + x * 0x20000)
-#define NUM_APL_WINDOWS 5
+#define NUM_APL_WINDOWS 6
static const struct sof_ipc_window sram_window = {
.ext_hdr = {
@@ -113,7 +113,13 @@ static const struct sof_ipc_window sram_window = {
.size = MAILBOX_TRACE_SIZE,
.offset = 0,
},
-
+ .window[5] = {
+ .type = SOF_IPC_REGION_STREAM,
+ .id = 1, /* map to host window 1 */
+ .flags = 0, // TODO: set later
+ .size = MAILBOX_STREAM_SIZE,
+ .offset = MAILBOX_STREAM_OFFSET,
+ },
};
static struct work_queue_timesource platform_generic_queue = {
diff --git a/src/platform/baytrail/platform.c b/src/platform/baytrail/platform.c
index 6d08e47..618d5ef 100644
--- a/src/platform/baytrail/platform.c
+++ b/src/platform/baytrail/platform.c
@@ -70,7 +70,7 @@ static const struct sof_ipc_fw_ready ready = {
/* TODO: add capabilities */
};
-#define NUM_BYT_WINDOWS 4
+#define NUM_BYT_WINDOWS 5
static const struct sof_ipc_window sram_window = {
.ext_hdr = {
.hdr.cmd = SOF_IPC_FW_READY,
@@ -107,6 +107,13 @@ static const struct sof_ipc_window sram_window = {
.size = MAILBOX_TRACE_SIZE,
.offset = MAILBOX_TRACE_OFFSET,
},
+ .window[4] = {
+ .type = SOF_IPC_REGION_STREAM,
+ .id = 0, /* map to host window 0 */
+ .flags = 0, // TODO: set later
+ .size = MAILBOX_STREAM_SIZE,
+ .offset = MAILBOX_STREAM_OFFSET,
+ },
};
static struct work_queue_timesource platform_generic_queue = {
diff --git a/src/platform/cannonlake/platform.c b/src/platform/cannonlake/platform.c
index 729364f..805fd1b 100644
--- a/src/platform/cannonlake/platform.c
+++ b/src/platform/cannonlake/platform.c
@@ -70,7 +70,7 @@ static const struct sof_ipc_fw_ready ready = {
#define SRAM_WINDOW_HOST_OFFSET(x) (0x80000 + x * 0x20000)
-#define NUM_CNL_WINDOWS 5
+#define NUM_CNL_WINDOWS 6
static const struct sof_ipc_window sram_window = {
.ext_hdr = {
@@ -115,7 +115,13 @@ static const struct sof_ipc_window sram_window = {
.size = MAILBOX_TRACE_SIZE,
.offset = 0,
},
-
+ .window[5] = {
+ .type = SOF_IPC_REGION_STREAM,
+ .id = 1, /* map to host window 1 */
+ .flags = 0, // TODO: set later
+ .size = MAILBOX_STREAM_SIZE,
+ .offset = MAILBOX_STREAM_OFFSET,
+ },
};
static struct work_queue_timesource platform_generic_queue = {
diff --git a/src/platform/haswell/platform.c b/src/platform/haswell/platform.c
index 2ed3d50..518aa9d 100644
--- a/src/platform/haswell/platform.c
+++ b/src/platform/haswell/platform.c
@@ -69,7 +69,7 @@ static const struct sof_ipc_fw_ready ready = {
/* TODO: add capabilities */
};
-#define NUM_HSW_WINDOWS 4
+#define NUM_HSW_WINDOWS 5
static const struct sof_ipc_window sram_window = {
.ext_hdr = {
.hdr.cmd = SOF_IPC_FW_READY,
@@ -106,6 +106,13 @@ static const struct sof_ipc_window sram_window = {
.size = MAILBOX_TRACE_SIZE,
.offset = MAILBOX_TRACE_OFFSET,
},
+ .window[4] = {
+ .type = SOF_IPC_REGION_STREAM,
+ .id = 0, /* map to host window 0 */
+ .flags = 0, // TODO: set later
+ .size = MAILBOX_STREAM_SIZE,
+ .offset = MAILBOX_STREAM_OFFSET,
+ },
};
static struct work_queue_timesource platform_generic_queue = {
--
2.7.4
More information about the Sound-open-firmware
mailing list