mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-02 19:56:43 +07:00
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: 61add81479
(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>
This commit is contained in:
parent
bdd2a858af
commit
7db08b2cb3
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user