Re: [U-Boot] [PATCH 1/4] sound: Correct data output in sound_create_square_wave()

2018-11-29 Thread sjg
This function currently outputs twice as much data as it should and
overwrites its buffer as a result. Fix it.

Signed-off-by: Simon Glass 
---

 drivers/sound/sound.c | 2 --
 1 file changed, 2 deletions(-)

Applied to u-boot-dm/master, thanks!
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


[U-Boot] [PATCH 1/4] sound: Correct data output in sound_create_square_wave()

2018-11-15 Thread Simon Glass
This function currently outputs twice as much data as it should and
overwrites its buffer as a result. Fix it.

Signed-off-by: Simon Glass 
---

 drivers/sound/sound.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/sound/sound.c b/drivers/sound/sound.c
index 969408186fd..6c1eb4c19cc 100644
--- a/drivers/sound/sound.c
+++ b/drivers/sound/sound.c
@@ -25,12 +25,10 @@ void sound_create_square_wave(unsigned short *data, int 
size, uint32_t freq)
for (i = 0; size && i < half; i++) {
size -= 2;
*data++ = amplitude;
-   *data++ = amplitude;
}
for (i = 0; size && i < period - half; i++) {
size -= 2;
*data++ = -amplitude;
-   *data++ = -amplitude;
}
}
 }
-- 
2.19.1.1215.g8438c0b245-goog

___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot