summaryrefslogtreecommitdiff
path: root/arch/sandbox/include
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2018-12-10 10:37:50 -0700
committerSimon Glass <sjg@chromium.org>2018-12-13 16:37:09 -0700
commite221cdcf44c80a6de78fd9285c5325db231ed20c (patch)
tree138387d1a785612a1cef0c36c8f7209c2f235df4 /arch/sandbox/include
parentbc58184ec5013a6ec5bf75a314c08bd7ae24d60b (diff)
downloadu-boot-e221cdcf44c80a6de78fd9285c5325db231ed20c.tar.gz
dm: sandbox: Allow selection of sample rate and channels
At present these parameters are hard-coded in the sdl interface code. Allow them to be specified by the driver instead. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'arch/sandbox/include')
-rw-r--r--arch/sandbox/include/asm/sdl.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/arch/sandbox/include/asm/sdl.h b/arch/sandbox/include/asm/sdl.h
index 2799a8bee0..1027b59e73 100644
--- a/arch/sandbox/include/asm/sdl.h
+++ b/arch/sandbox/include/asm/sdl.h
@@ -71,9 +71,11 @@ int sandbox_sdl_sound_stop(void);
/**
* sandbox_sdl_sound_init() - set up the sound system
*
+ * @rate: Sample rate to use
+ * @channels: Number of channels to use (1=mono, 2=stereo)
* @return 0 if OK, -ENODEV if no sound is available
*/
-int sandbox_sdl_sound_init(void);
+int sandbox_sdl_sound_init(int rate, int channels);
#else
static inline int sandbox_sdl_init_display(int width, int height,
@@ -112,7 +114,7 @@ static inline int sandbox_sdl_sound_stop(void)
return -ENODEV;
}
-static inline int sandbox_sdl_sound_init(void)
+int sandbox_sdl_sound_init(int rate, int channels)
{
return -ENODEV;
}