ASoC: amd: use do_div rather than 64 bit division to fix 32 bit builds
Subsystems (3)
PATCH 1/1 ASoC: amd: use do_div rather than 64 bit division to fix 32 bit builds
From: Guenter Roeck <[email protected]>
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 <[email protected]>
Reviewed-on: https://chromium-review.googlesource.com/678919
Reviewed-by Jason Clinton <[email protected]>
(cherry picked from commit 7ca726e80f21abdbaed9a5a70def1c33a26f8533)
Reviewed-on: https://chromium-review.googlesource.com/681618
Signed-off-by Alex Deucher <[email protected]>
--- sound/soc/amd/acp-pcm-dma.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
sound/soc/amd/acp-pcm-dma.c +1 -2
@@ -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); }
Signature · 1 line
2.13.6
Mark Brown
maintainerQuoted 1 line · Alex Deucher
Fixes 61add8147942 (ASoC: amd: Report accurate hw_ptr during dma)
Fixes:
Quoted 4 lines
Signed-off-by Guenter Roeck <[email protected]>Reviewed-on: https://chromium-review.googlesource.com/678919
Reviewed-by Jason Clinton <[email protected]>(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.