return 0;
 }
 
+static inline u64 snd_sof_pcm_get_stream_position(struct snd_sof_dev *sdev,
+                                                 struct snd_soc_component *component,
+                                                 struct snd_pcm_substream *substream)
+{
+       if (sof_ops(sdev) && sof_ops(sdev)->get_stream_position)
+               return sof_ops(sdev)->get_stream_position(sdev, component, substream);
+
+       return 0;
+}
+
 /* machine driver */
 static inline int
 snd_sof_machine_register(struct snd_sof_dev *sdev, void *pdata)
 
        /* pcm ack */
        int (*pcm_ack)(struct snd_sof_dev *sdev, struct snd_pcm_substream *substream); /* optional */
 
+       /*
+        * optional callback to retrieve the link DMA position for the substream
+        * when the position is not reported in the shared SRAM windows but
+        * instead from a host-accessible hardware counter.
+        */
+       u64 (*get_stream_position)(struct snd_sof_dev *sdev,
+                                  struct snd_soc_component *component,
+                                  struct snd_pcm_substream *substream); /* optional */
+
        /* host read DSP stream data */
        int (*ipc_msg_data)(struct snd_sof_dev *sdev,
                            struct snd_sof_pcm_stream *sps,