summaryrefslogtreecommitdiff
path: root/drivers/sound/sound-uclass.c
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2018-12-10 20:37:51 +0300
committerSimon Glass <sjg@chromium.org>2018-12-14 02:37:10 +0300
commitf987177db9c988142032ed8142a093cce2378a90 (patch)
tree9d4f5d9b057a749742e9dcead3cfa41c4ddae5ea /drivers/sound/sound-uclass.c
parente221cdcf44c80a6de78fd9285c5325db231ed20c (diff)
downloadu-boot-f987177db9c988142032ed8142a093cce2378a90.tar.xz
dm: sound: Use the correct number of channels for sound
At present the 'beep' sound generates a waveform for only one channel even if two are being used. This means that the beep is twice the frequency it should be. Correct this by making it a parameter. The fix in a previous commit was correct for sandbox but not for other boards. Fixes: 03f11e87a8 ("sound: Correct data output in sound_create_square_wave()") Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'drivers/sound/sound-uclass.c')
-rw-r--r--drivers/sound/sound-uclass.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/sound/sound-uclass.c b/drivers/sound/sound-uclass.c
index 71e753cb99..2b83626889 100644
--- a/drivers/sound/sound-uclass.c
+++ b/drivers/sound/sound-uclass.c
@@ -53,7 +53,7 @@ int sound_beep(struct udevice *dev, int msecs, int frequency_hz)
}
sound_create_square_wave(i2s_uc_priv->samplingrate, data, data_size,
- frequency_hz);
+ frequency_hz, i2s_uc_priv->channels);
while (msecs >= 1000) {
ret = sound_play(dev, data, data_size);