]> git.ipfire.org Git - thirdparty/qemu.git/commit
hw/audio/lm4549: Don't try to open a zero-frequency audio voice
authorPeter Maydell <peter.maydell@linaro.org>
Fri, 7 Nov 2025 15:41:16 +0000 (15:41 +0000)
committerPeter Maydell <peter.maydell@linaro.org>
Fri, 14 Nov 2025 13:20:10 +0000 (13:20 +0000)
commit522444744eb79dd01e377ad2ed15544f10bcc70c
treef54fb4b4389c384951e405ebbbe31dd0e3e4fcdc
parent5fc50b4ec841c8a01e7346c2c804088fc3accb6b
hw/audio/lm4549: Don't try to open a zero-frequency audio voice

If the guest incorrectly programs the lm4549 audio chip with a zero
frequency, we will pass this to AUD_open_out(), which will complain:

   A bug was just triggered in AUD_open_out
   Save all your work and restart without audio
   I am sorry
   Context:
   audio: frequency=0 nchannels=2 fmt=S16 endianness=little

The datasheet doesn't say what we should do here, only that the valid
range for the freqency is 4000 to 48000 Hz; we choose to log the
guest error and ignore an attempt to change the DAC rate to something
outside the valid range.

Resolves: https://gitlab.com/qemu-project/qemu/-/issues/410
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-id: 20251107154116.1396769-1-peter.maydell@linaro.org
hw/audio/lm4549.c