diff options
author | Liam Girdwood <liam.r.girdwood@linux.intel.com> | 2014-05-02 11:56:33 -0400 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2014-05-02 12:54:05 -0400 |
commit | 51b4e24f383c84ed927fef348072b6dc65b9816d (patch) | |
tree | d0818cfe74582d6152c4b094d915bd53c8f36333 /sound/soc/intel/sst-haswell-ipc.c | |
parent | 916152c48848290a8aba5cf4dd16c2a8a888e11c (diff) |
ASoC: Intel: Fix stream position pointer.
Read the stream offset and presentation position from DSP memory rather
than using the old estimated position. This fixes timing issues with
pulseaudio.
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'sound/soc/intel/sst-haswell-ipc.c')
-rw-r--r-- | sound/soc/intel/sst-haswell-ipc.c | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/sound/soc/intel/sst-haswell-ipc.c b/sound/soc/intel/sst-haswell-ipc.c index 5bcf5963a0ba..e7996b39a484 100644 --- a/sound/soc/intel/sst-haswell-ipc.c +++ b/sound/soc/intel/sst-haswell-ipc.c | |||
@@ -1547,10 +1547,28 @@ int sst_hsw_stream_reset(struct sst_hsw *hsw, struct sst_hsw_stream *stream) | |||
1547 | } | 1547 | } |
1548 | 1548 | ||
1549 | /* Stream pointer positions */ | 1549 | /* Stream pointer positions */ |
1550 | int sst_hsw_get_dsp_position(struct sst_hsw *hsw, | 1550 | u32 sst_hsw_get_dsp_position(struct sst_hsw *hsw, |
1551 | struct sst_hsw_stream *stream) | 1551 | struct sst_hsw_stream *stream) |
1552 | { | 1552 | { |
1553 | return stream->rpos.position; | 1553 | u32 rpos; |
1554 | |||
1555 | sst_dsp_read(hsw->dsp, &rpos, | ||
1556 | stream->reply.read_position_register_address, sizeof(rpos)); | ||
1557 | |||
1558 | return rpos; | ||
1559 | } | ||
1560 | |||
1561 | /* Stream presentation (monotonic) positions */ | ||
1562 | u64 sst_hsw_get_dsp_presentation_position(struct sst_hsw *hsw, | ||
1563 | struct sst_hsw_stream *stream) | ||
1564 | { | ||
1565 | u64 ppos; | ||
1566 | |||
1567 | sst_dsp_read(hsw->dsp, &ppos, | ||
1568 | stream->reply.presentation_position_register_address, | ||
1569 | sizeof(ppos)); | ||
1570 | |||
1571 | return ppos; | ||
1554 | } | 1572 | } |
1555 | 1573 | ||
1556 | int sst_hsw_stream_set_write_position(struct sst_hsw *hsw, | 1574 | int sst_hsw_stream_set_write_position(struct sst_hsw *hsw, |