]> git.dujemihanovic.xyz Git - u-boot.git/commit
sound: avoid endless loop
authorHeinrich Schuchardt <heinrich.schuchardt@canonical.com>
Sun, 4 Dec 2022 13:00:05 +0000 (14:00 +0100)
committerHeinrich Schuchardt <heinrich.schuchardt@canonical.com>
Mon, 5 Dec 2022 16:43:21 +0000 (17:43 +0100)
commitd0e8777beeb675b77d6b2bf679133106892eb8dd
tree6986a7653c006895bd23fc7b9eef06dd3749f08a
parenta50622d78c5c6babd1853ae913f339df54fe532c
sound: avoid endless loop

'sound play 1 100000' results in an endless loop on the sandbox.

If the frequency exceeds half the sampling rate, zero out the output
buffer.

Fixes: 511ed5fdd389 ("SOUND: SAMSUNG: Add I2S driver")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
drivers/sound/sound.c