[alsa-devel] [PATCH] ASoC: amd: use do_div rather than 64 bit division to fix 32 bit builds
From: Guenter Roeck groeck@chromium.org
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 (cherry picked from commit 7ca726e80f21abdbaed9a5a70def1c33a26f8533) Reviewed-on: https://chromium-review.googlesource.com/681618 Signed-off-by: Alex Deucher alexander.deucher@amd.com --- sound/soc/amd/acp-pcm-dma.c | 3 +-- 1 file changed, 1 insertion(+), 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) if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { if (bytescount > rtd->renderbytescount) bytescount = bytescount - rtd->renderbytescount; - pos = bytescount % buffersize; } else { if (bytescount > rtd->capturebytescount) bytescount = bytescount - rtd->capturebytescount; - pos = bytescount % buffersize; } + pos = do_div(bytescount, buffersize); return bytes_to_frames(runtime, pos); }
On Wed, Nov 08, 2017 at 04:34:54PM -0500, Alex Deucher wrote:
fixes: 61add8147942 (ASoC: amd: Report accurate hw_ptr during dma)
Fixes:
Signed-off-by: Guenter Roeck groeck@chromium.org Reviewed-on: https://chromium-review.googlesource.com/678919 Reviewed-by: Jason Clinton jclinton@chromium.org (cherry picked from commit 7ca726e80f21abdbaed9a5a70def1c33a26f8533)
This isn't how we show cherry picks upstream for stable (you need a tree reference of some kind) and it's not relevant if you ever cherry picked anything in your internal process anyway.
participants (2)
-
Alex Deucher
-
Mark Brown