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>
This commit is contained in:
@@ -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
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user