summaryrefslogtreecommitdiff
path: root/arch/sandbox/include
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2018-12-10 20:37:36 +0300
committerSimon Glass <sjg@chromium.org>2018-12-14 02:32:49 +0300
commitd4901898654b664c41d8a03afc0e0fbf531b5812 (patch)
treee757add0074c0f4c193a97157abaa70e7e56ec2e /arch/sandbox/include
parente625b68b04a400ba377ec0a5b958bde0bc6244ff (diff)
downloadu-boot-d4901898654b664c41d8a03afc0e0fbf531b5812.tar.xz
dm: sound: Create a uclass for sound
The sound driver pulls together the audio codec and i2s drivers in order to actually make sounds. It supports setup() and play() methods. The sound_find_codec_i2s() function allows locating the linked codec and i2s devices. They can be referred to from uclass-private data. Add a uclass and a test for sound. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'arch/sandbox/include')
-rw-r--r--arch/sandbox/include/asm/test.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/arch/sandbox/include/asm/test.h b/arch/sandbox/include/asm/test.h
index 71bd50bd5b..74f9618822 100644
--- a/arch/sandbox/include/asm/test.h
+++ b/arch/sandbox/include/asm/test.h
@@ -141,4 +141,24 @@ void sandbox_get_codec_params(struct udevice *dev, int *interfacep, int *ratep,
*/
int sandbox_get_i2s_sum(struct udevice *dev);
+/**
+ * sandbox_get_setup_called() - Returns the number of times setup(*) was called
+ *
+ * This is used in the sound test
+ *
+ * @dev: Device to check
+ * @return call count for the setup() method
+ */
+int sandbox_get_setup_called(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.
+ *
+ * @dev: Device to check
+ * @return sum of audio data
+ */
+int sandbox_get_sound_sum(struct udevice *dev);
+
#endif