103 lines
3.2 KiB
Diff
103 lines
3.2 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Pardha Saradhi K <pardha.saradhi.kesapragada@intel.com>
|
|
Date: Wed, 24 Feb 2016 17:04:30 +0530
|
|
Subject: [PATCH] ASoC: Intel: Skylake: Support Pipeline Properties IPC
|
|
|
|
Add support to query te properties of any pipeline, that is
|
|
running in te ADSP. This ipc involves sending the
|
|
pipe id for which properties is sought for.
|
|
This IPC is supported in a TLV format and so the
|
|
associated changes in the framework are done.
|
|
Typical syntax from a debugfs standpoint is
|
|
echo 11,<pipeid> > adsp_prop_ctrl
|
|
|
|
Change-Id: I69f0c5b0a6bbe93587ba6981b0f76e423fb97be8
|
|
Signed-off-by: Pardha Saradhi K <pardha.saradhi.kesapragada@intel.com>
|
|
Reviewed-on:
|
|
Reviewed-by: Babu, Ramesh <ramesh.babu@intel.com>
|
|
Tested-by: Babu, Ramesh <ramesh.babu@intel.com>
|
|
Reviewed-on:
|
|
Reviewed-by: Kale, Sanyog R <sanyog.r.kale@intel.com>
|
|
Reviewed-by: Avati, Santosh Kumar <santosh.kumar.avati@intel.com>
|
|
Tested-by: Avati, Santosh Kumar <santosh.kumar.avati@intel.com>
|
|
---
|
|
sound/soc/intel/skylake/skl-debug.c | 23 ++++++++++++++++++-----
|
|
1 file changed, 18 insertions(+), 5 deletions(-)
|
|
|
|
diff --git a/sound/soc/intel/skylake/skl-debug.c b/sound/soc/intel/skylake/skl-debug.c
|
|
index 587fcac..8f6d11d 100644
|
|
--- a/sound/soc/intel/skylake/skl-debug.c
|
|
+++ b/sound/soc/intel/skylake/skl-debug.c
|
|
@@ -34,6 +34,8 @@
|
|
#define IPC_MOD_LARGE_CONFIG_GET 3
|
|
#define IPC_MOD_LARGE_CONFIG_SET 4
|
|
#define MOD_BUF1 (3 * PAGE_SIZE)
|
|
+#define MAX_TLV_PAYLOAD_SIZE 4088
|
|
+#define EXTENDED_PARAMS_SZ 2
|
|
|
|
#define DEFAULT_SZ 100
|
|
#define DEFAULT_ID 0XFF
|
|
@@ -43,6 +45,7 @@
|
|
#define HARDWARE_CONFIG_SZ 0x84
|
|
#define MODULES_INFO_SZ 0xa70
|
|
#define PIPELINE_LIST_INFO_SZ 0xc
|
|
+#define PIPELINE_PROPS_SZ 0x60
|
|
#define SCHEDULERS_INFO_SZ 0x34
|
|
#define GATEWAYS_INFO_SZ 0x4e4
|
|
#define MEMORY_STATE_INFO_SZ 0x1000
|
|
@@ -585,7 +588,7 @@ static ssize_t adsp_control_write(struct file *file,
|
|
struct skl_sst *ctx = d->skl->skl_sst;
|
|
struct skl_ipc_large_config_msg msg;
|
|
char id[8];
|
|
- u32 tx_data;
|
|
+ u32 tx_data[EXTENDED_PARAMS_SZ];
|
|
int j = 0, bufsize, tx_param = 0, tx_param_id;
|
|
int len = min(count, (sizeof(buf)-1));
|
|
|
|
@@ -622,7 +625,8 @@ static ssize_t adsp_control_write(struct file *file,
|
|
if (err)
|
|
return -EINVAL;
|
|
|
|
- tx_data = (tx_param_id << 8) | dsp_property;
|
|
+ tx_data[0] = (tx_param_id << 8) | dsp_property;
|
|
+ tx_data[1] = MAX_TLV_PAYLOAD_SIZE;
|
|
}
|
|
|
|
ipc_data = kzalloc(DSP_BUF, GFP_ATOMIC);
|
|
@@ -657,6 +661,10 @@ static ssize_t adsp_control_write(struct file *file,
|
|
replysz = PIPELINE_LIST_INFO_SZ;
|
|
break;
|
|
|
|
+ case PIPELINE_PROPS:
|
|
+ replysz = PIPELINE_PROPS_SZ;
|
|
+ break;
|
|
+
|
|
case SCHEDULERS_INFO:
|
|
replysz = SCHEDULERS_INFO_SZ;
|
|
break;
|
|
@@ -681,13 +689,18 @@ static ssize_t adsp_control_write(struct file *file,
|
|
|
|
msg.module_id = 0x0;
|
|
msg.instance_id = 0x0;
|
|
- msg.large_param_id = dsp_property;
|
|
+
|
|
+ if (tx_param == 1)
|
|
+ msg.large_param_id = 0xFF;
|
|
+ else
|
|
+ msg.large_param_id = dsp_property;
|
|
+
|
|
msg.param_data_size = replysz;
|
|
|
|
if (tx_param == 1)
|
|
skl_ipc_get_large_config(&ctx->ipc, &msg,
|
|
- ipc_data, &tx_data,
|
|
- sizeof(u32), NULL);
|
|
+ ipc_data, tx_data,
|
|
+ EXTENDED_PARAMS_SZ*sizeof(u32), NULL);
|
|
else
|
|
skl_ipc_get_large_config(&ctx->ipc, &msg,
|
|
ipc_data, NULL,
|
|
--
|
|
https://clearlinux.org
|
|
|