test: test sandbox sound driver more rigorously
authorHeinrich Schuchardt <heinrich.schuchardt@canonical.com>
Sun, 4 Dec 2022 16:11:41 +0000 (17:11 +0100)
committerHeinrich Schuchardt <heinrich.schuchardt@canonical.com>
Mon, 5 Dec 2022 16:43:21 +0000 (17:43 +0100)
commit968eaaeaa7a8cf0956e19e9217af9e81bc7fb2eb
tree7f09ead7319cf90cb9664ab57f359da363a582eb
parentd0e8777beeb675b77d6b2bf679133106892eb8dd
test: test sandbox sound driver more rigorously

Consider unexpected values for frequency:

* negative frequency
* zero frequency
* frequency exceeding sampling frequency

As in these cases the sum of the samples is zero also check the count of
the samples.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
arch/sandbox/include/asm/test.h
drivers/sound/sandbox.c
test/dm/sound.c