mirror of
https://gitlab.com/qemu-project/qemu.git
synced 2026-10-28 14:04:39 +08:00
Left-aligned regular conversion results must occupy bits [15:4], [15:6], or [15:8] for 12-, 10-, or 8-bit resolution respectively. At 6-bit resolution the result is aligned within a byte, in bits [7:2]. The current single-bit shift and 0xFFF0 mask both misalign the result and discard significant sample bits. Select the shift according to RES and keep the existing right-aligned sample generation unchanged. Signed-off-by: Manuele Conti <conti.manuele@gmail.com> Message-id: 20261020211529.99689-1-conti.manuele@gmail.com [PMM: expanded comment slightly, added brackets for clarity] Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>