From c34c0246a3600dc4712247b267f71576234e403b Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Thu, 27 Feb 2014 13:26:18 -0700 Subject: sandbox: Add a simple sound driver Add a sound driver for sandbox, which uses SDL. Tested-by: Che-Liang Chiou Signed-off-by: Simon Glass --- drivers/sound/sandbox.c | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 drivers/sound/sandbox.c (limited to 'drivers/sound/sandbox.c') 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 +#include +#include + +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(); +} -- cgit v1.2.1