summaryrefslogtreecommitdiffstats
path: root/drivers/sound
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2014-02-27 13:26:18 -0700
committerSimon Glass <sjg@chromium.org>2014-03-17 20:05:48 -0600
commitc34c0246a3600dc4712247b267f71576234e403b (patch)
treed0e0a3386e5ceedf3f99c18f084a57f439520b88 /drivers/sound
parentbbc09bf27e77dc80f74054f7fc8a66111dd113c6 (diff)
downloadblackbird-obmc-uboot-c34c0246a3600dc4712247b267f71576234e403b.tar.gz
blackbird-obmc-uboot-c34c0246a3600dc4712247b267f71576234e403b.zip
sandbox: Add a simple sound driver
Add a sound driver for sandbox, which uses SDL. Tested-by: Che-Liang Chiou <clchiou@chromium.org> Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'drivers/sound')
-rw-r--r--drivers/sound/Makefile2
-rw-r--r--drivers/sound/sandbox.c23
2 files changed, 25 insertions, 0 deletions
diff --git a/drivers/sound/Makefile b/drivers/sound/Makefile
index 6d252926c6..3793f8af9b 100644
--- a/drivers/sound/Makefile
+++ b/drivers/sound/Makefile
@@ -7,5 +7,7 @@
obj-$(CONFIG_SOUND) += sound.o
obj-$(CONFIG_I2S) += samsung-i2s.o
+obj-$(CONFIG_I2S_SAMSUNG) += samsung-i2s.o
+obj-$(CONFIG_SOUND_SANDBOX) += sandbox.o
obj-$(CONFIG_SOUND_WM8994) += wm8994.o
obj-$(CONFIG_SOUND_MAX98095) += max98095.o
diff --git a/drivers/sound/sandbox.c b/drivers/sound/sandbox.c
new file mode 100644
index 0000000000..fe5c9e9b38
--- /dev/null
+++ b/drivers/sound/sandbox.c
@@ -0,0 +1,23 @@
+/*
+ * Copyright (c) 2013 Google, Inc
+ *
+ * SPDX-License-Identifier: GPL-2.0+
+ */
+
+#include <common.h>
+#include <asm/arch/sound.h>
+#include <asm/sdl.h>
+
+int sound_play(uint32_t msec, uint32_t frequency)
+{
+ sandbox_sdl_sound_start(frequency);
+ mdelay(msec);
+ sandbox_sdl_sound_stop();
+
+ return 0;
+}
+
+int sound_init(const void *blob)
+{
+ return sandbox_sdl_sound_init();
+}
OpenPOWER on IntegriCloud