From: Vinod Koul Date: Fri, 13 Jun 2014 12:33:53 +0000 (+0530) Subject: ASoc: Intel: mfld-pcm: report pcm delay X-Git-Tag: firefly_0821_release~176^2~3158^2~37^2~7^2~26 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=2a6358250081c24cc1e564cb82ecbfd19d8c7238;p=firefly-linux-kernel-4.4.55.git ASoc: Intel: mfld-pcm: report pcm delay Now the DSP is capable of reporting the delay, report it to upper layers Signed-off-by: Vinod Koul Signed-off-by: Mark Brown --- diff --git a/sound/soc/intel/sst-mfld-platform-pcm.c b/sound/soc/intel/sst-mfld-platform-pcm.c index 4528946f5e9e..80879e5fcb49 100644 --- a/sound/soc/intel/sst-mfld-platform-pcm.c +++ b/sound/soc/intel/sst-mfld-platform-pcm.c @@ -409,6 +409,7 @@ static snd_pcm_uframes_t sst_platform_pcm_pointer pr_err("sst: error code = %d\n", ret_val); return ret_val; } + substream->runtime->delay = str_info->pcm_delay; return str_info->buffer_ptr; } diff --git a/sound/soc/intel/sst-mfld-platform.h b/sound/soc/intel/sst-mfld-platform.h index 6d929c7d7bbb..33a0a2776238 100644 --- a/sound/soc/intel/sst-mfld-platform.h +++ b/sound/soc/intel/sst-mfld-platform.h @@ -42,6 +42,7 @@ struct pcm_stream_info { void *arg; void (*period_elapsed) (void *arg); unsigned long long buffer_ptr; + unsigned long long pcm_delay; int sfreq; };