dm: sandbox: Allow selection of sample rate and channels

At present these parameters are hard-coded in the sdl interface code.
Allow them to be specified by the driver instead.

Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
Simon Glass
2018-12-10 10:37:50 -07:00
parent bc58184ec5
commit e221cdcf44
3 changed files with 8 additions and 10 deletions

View File

@@ -102,7 +102,7 @@ static int sandbox_i2s_probe(struct udevice *dev)
uc_priv->id = 1;
/* Ignore any error here - we'll just have no sound */
sandbox_sdl_sound_init();
sandbox_sdl_sound_init(uc_priv->samplingrate, uc_priv->channels);
return 0;
}