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>master
parent
bbc09bf27e
commit
c34c0246a3
@ -0,0 +1,14 @@ |
|||||||
|
/*
|
||||||
|
* Copyright (c) 2013 Google, Inc |
||||||
|
* |
||||||
|
* SPDX-License-Identifier: GPL-2.0+ |
||||||
|
*/ |
||||||
|
|
||||||
|
#ifndef __SANDBOX_SOUND_H |
||||||
|
#define __SANDBOX_SOUND_H |
||||||
|
|
||||||
|
int sound_play(unsigned int msec, unsigned int frequency); |
||||||
|
|
||||||
|
int sound_init(const void *blob); |
||||||
|
|
||||||
|
#endif |
@ -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(); |
||||||
|
} |
Loading…
Reference in new issue