aboutsummaryrefslogtreecommitdiff
path: root/drivers/sound/sandbox.c
diff options
context:
space:
mode:
authorSimon Glass2018-12-10 10:37:47 -0700
committerSimon Glass2018-12-13 16:36:41 -0700
commitf2b25c9bf8212139f43ded090c78d604babc4337 (patch)
tree8da5a8bcb40cf982708cfb9af886f94c9f6364c1 /drivers/sound/sandbox.c
parent1e224fef9446e8c0cde57636dd8a36d0ebc85437 (diff)
dm: sound: Complete migration to driver model
All users of sound are converted to use driver model. Drop the old code and the CONFIG_DM_SOUND option. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'drivers/sound/sandbox.c')
-rw-r--r--drivers/sound/sandbox.c19
1 files changed, 1 insertions, 18 deletions
diff --git a/drivers/sound/sandbox.c b/drivers/sound/sandbox.c
index 83b3295f0d4..089d8309727 100644
--- a/drivers/sound/sandbox.c
+++ b/drivers/sound/sandbox.c
@@ -8,7 +8,6 @@
#include <dm.h>
#include <i2s.h>
#include <sound.h>
-#include <asm/sound.h>
#include <asm/sdl.h>
struct sandbox_codec_priv {
@@ -28,22 +27,6 @@ struct sandbox_sound_priv {
int sum; /* Use to sum the provided audio data */
};
-#ifndef CONFIG_DM_SOUND
-int sound_play(uint32_t msec, uint32_t frequency)
-{
- sandbox_sdl_sound_start(frequency);
- mdelay(msec);
- sandbox_sdl_sound_stop();
-
- return 0;
-}
-#endif /* CONFIG_DM_SOUND */
-
-int sound_init(const void *blob)
-{
- return sandbox_sdl_sound_init();
-}
-
void sandbox_get_codec_params(struct udevice *dev, int *interfacep, int *ratep,
int *mclk_freqp, int *bits_per_samplep,
uint *channelsp)
@@ -102,7 +85,7 @@ static int sandbox_i2s_tx_data(struct udevice *dev, void *data,
for (i = 0; i < data_size; i++)
priv->sum += ((uint8_t *)data)[i];
- return 0;
+ return sandbox_sdl_sound_play(data, data_size);
}
static int sandbox_i2s_probe(struct udevice *dev)