aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuenter Roeck <groeck@chromium.org>2017-11-08 16:34:54 -0500
committerMark Brown <broonie@kernel.org>2017-11-08 16:42:17 -0500
commit7db08b2cb36cbfbcb06c44dc8e48ccb6a119466f (patch)
treef2414b879881235666ce95b038c7e53e06efa913
parentbdd2a858afd55cc11723df9dd2841241a4c49ce5 (diff)
ASoC: amd: use do_div rather than 64 bit division to fix 32 bit builds
ERROR: "__aeabi_uldivmod" [sound/soc/amd/snd-soc-acp-pcm.ko] undefined! 64-bit divides require special operations to avoid build errors on 32-bit systems. [Reword the commit message to make it clearer - Alex] fixes: 61add8147942 (ASoC: amd: Report accurate hw_ptr during dma) Signed-off-by: Guenter Roeck <groeck@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/678919 Reviewed-by: Jason Clinton <jclinton@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/681618 Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r--sound/soc/amd/acp-pcm-dma.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/sound/soc/amd/acp-pcm-dma.c b/sound/soc/amd/acp-pcm-dma.c
index 13d040a4d26f..ef7e98ad960c 100644
--- a/sound/soc/amd/acp-pcm-dma.c
+++ b/sound/soc/amd/acp-pcm-dma.c
@@ -856,12 +856,11 @@ static snd_pcm_uframes_t acp_dma_pointer(struct snd_pcm_substream *substream)
856 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { 856 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) {
857 if (bytescount > rtd->renderbytescount) 857 if (bytescount > rtd->renderbytescount)
858 bytescount = bytescount - rtd->renderbytescount; 858 bytescount = bytescount - rtd->renderbytescount;
859 pos = bytescount % buffersize;
860 } else { 859 } else {
861 if (bytescount > rtd->capturebytescount) 860 if (bytescount > rtd->capturebytescount)
862 bytescount = bytescount - rtd->capturebytescount; 861 bytescount = bytescount - rtd->capturebytescount;
863 pos = bytescount % buffersize;
864 } 862 }
863 pos = do_div(bytescount, buffersize);
865 return bytes_to_frames(runtime, pos); 864 return bytes_to_frames(runtime, pos);
866} 865}
867 866