summaryrefslogtreecommitdiff
path: root/arch/sandbox/include
diff options
context:
space:
mode:
authorHeinrich Schuchardt <heinrich.schuchardt@canonical.com>2022-12-04 17:11:41 +0100
committerHeinrich Schuchardt <heinrich.schuchardt@canonical.com>2022-12-05 17:43:21 +0100
commit968eaaeaa7a8cf0956e19e9217af9e81bc7fb2eb (patch)
tree7f09ead7319cf90cb9664ab57f359da363a582eb /arch/sandbox/include
parentd0e8777beeb675b77d6b2bf679133106892eb8dd (diff)
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>
Diffstat (limited to 'arch/sandbox/include')
-rw-r--r--arch/sandbox/include/asm/test.h10
1 files changed, 10 insertions, 0 deletions
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
@@ -189,6 +189,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
*
* This data is provided to the sandbox driver by the sound play() method.