diff options
author | Simon Glass <sjg@chromium.org> | 2018-12-10 20:37:34 +0300 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2018-12-14 02:32:49 +0300 |
commit | e96fa6c91177d0aa81119d1d24cc0aa2dd663581 (patch) | |
tree | 333d54a1f9349c5e238f836675d49dbe5b59bc4b /arch/sandbox/include | |
parent | ce6d99a056ebc9ad329521ca3660f6cb298a7666 (diff) | |
download | u-boot-e96fa6c91177d0aa81119d1d24cc0aa2dd663581.tar.xz |
dm: sound: Create a uclass for i2s
The i2s bus is commonly used with audio codecs. It provides a way to
stream digital data sychronously in both directions. U-Boot only supports
audio output, so this uclass is very simple, with a single tx_data()
method.
Add a uclass and a test for i2s.
Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'arch/sandbox/include')
-rw-r--r-- | arch/sandbox/include/asm/test.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/arch/sandbox/include/asm/test.h b/arch/sandbox/include/asm/test.h index f70e0d8417..71bd50bd5b 100644 --- a/arch/sandbox/include/asm/test.h +++ b/arch/sandbox/include/asm/test.h @@ -131,4 +131,14 @@ void sandbox_get_codec_params(struct udevice *dev, int *interfacep, int *ratep, int *mclk_freqp, int *bits_per_samplep, uint *channelsp); +/** + * sandbox_get_i2s_sum() - Read back the sum of the audio data so far + * + * This data is provided to the sandbox driver by the I2S tx_data() method. + * + * @dev: Device to check + * @return sum of audio data + */ +int sandbox_get_i2s_sum(struct udevice *dev); + #endif |