]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - drivers/sound/sandbox.c
sandbox: Add a simple sound driver
[karo-tx-uboot.git] / drivers / sound / sandbox.c
diff --git a/drivers/sound/sandbox.c b/drivers/sound/sandbox.c
new file mode 100644 (file)
index 0000000..fe5c9e9
--- /dev/null
@@ -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();
+}