MLK-15934-2: ASoc: fsl: different pointer length issue for hifi4
authorWeiguang Kong <weiguang.kong@nxp.com>
Mon, 10 Jul 2017 04:03:53 +0000 (12:03 +0800)
committerNitin Garg <nitin.garg@nxp.com>
Mon, 19 Mar 2018 20:33:29 +0000 (15:33 -0500)
when transferring struct icm_open_resp_info_t type
between hifi4 framework and hifi4 driver, because this
struct has an element "*dtstamp" which is a pointer,
but for hifi4 firmware, this pointer occupies 4 bytes,
for hifi4 driver, this pointer occupies 8 bytes.
different pointer length will cause issue when reading
this structure's content in hifi4 driver.

By changing the pointer type to unsigned int type to
fix this issue.

Signed-off-by: Weiguang Kong <weiguang.kong@nxp.com>
sound/soc/fsl/fsl_hifi4.c
sound/soc/fsl/fsl_hifi4.h

index 7d3a762..3782c65 100644 (file)
@@ -1003,6 +1003,8 @@ int process_act_complete(struct fsl_hifi4 *hifi4_priv, u32 msg)
                            (struct icm_open_resp_info_t *)pmsg_apu;
                        codec_iobuf_info->proc_id = pext_msg->proc_id;
                        hifi4_priv->is_done = 1;
+                       hifi4_priv->dpu_tstamp =
+                           (struct timestamp_info_t *)pext_msg->dtstamp;
                        hifi4_priv->ret_status = pext_msg->ret;
                        complete(&hifi4_priv->cmd_complete);
                }
index eb10a7c..3cb8356 100644 (file)
@@ -145,7 +145,8 @@ enum aud_status_t {
 
 struct icm_open_resp_info_t {
        u32 proc_id;
-       struct timestamp_info_t *dtstamp;
+       u32 dtstamp;                /* address value of timestamp_info_t */
+
        s32 ret;
 };
 
@@ -212,6 +213,7 @@ struct fsl_hifi4 {
        struct icm_pcm_prop_t           pcm_prop_info;
        struct xtlib_pil_info           pil_info;
        struct xtlib_loader_globals     xtlib_globals;
+       struct timestamp_info_t         *dpu_tstamp;
 };
 
 struct fsl_hifi4_engine {