From 968eaaeaa7a8cf0956e19e9217af9e81bc7fb2eb Mon Sep 17 00:00:00 2001 From: Heinrich Schuchardt Date: Sun, 4 Dec 2022 17:11:41 +0100 Subject: 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 Reviewed-by: Simon Glass --- arch/sandbox/include/asm/test.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'arch/sandbox/include/asm/test.h') diff --git a/arch/sandbox/include/asm/test.h b/arch/sandbox/include/asm/test.h index 0406085917..568738c16d 100644 --- a/arch/sandbox/include/asm/test.h +++ b/arch/sandbox/include/asm/test.h @@ -188,6 +188,16 @@ int sandbox_get_setup_called(struct udevice *dev); */ int sandbox_get_sound_active(struct udevice *dev); +/** + * sandbox_get_sound_count() - Read back the count of the sound data so far + * + * This data is provided to the sandbox driver by the sound play() method. + * + * @dev: Device to check + * Return: count of audio data + */ +int sandbox_get_sound_count(struct udevice *dev); + /** * sandbox_get_sound_sum() - Read back the sum of the sound data so far * -- cgit v1.2.3