Commit 7288ca07 authored by Jean-Francois Moine's avatar Jean-Francois Moine Committed by Russell King

drm/i2c: tda998x: fix bad value in the AIF

The AIF has an uninitialized byte. This patch clears the whole buffer
before filling it.
Tested-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
Acked-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: default avatarJean-Francois Moine <moinejf@free.fr>
Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
parent d8ec26d7
...@@ -528,10 +528,10 @@ tda998x_write_aif(struct drm_encoder *encoder, struct tda998x_encoder_params *p) ...@@ -528,10 +528,10 @@ tda998x_write_aif(struct drm_encoder *encoder, struct tda998x_encoder_params *p)
{ {
uint8_t buf[PB(5) + 1]; uint8_t buf[PB(5) + 1];
memset(buf, 0, sizeof(buf));
buf[HB(0)] = 0x84; buf[HB(0)] = 0x84;
buf[HB(1)] = 0x01; buf[HB(1)] = 0x01;
buf[HB(2)] = 10; buf[HB(2)] = 10;
buf[PB(0)] = 0;
buf[PB(1)] = p->audio_frame[1] & 0x07; /* CC */ buf[PB(1)] = p->audio_frame[1] & 0x07; /* CC */
buf[PB(2)] = p->audio_frame[2] & 0x1c; /* SF */ buf[PB(2)] = p->audio_frame[2] & 0x1c; /* SF */
buf[PB(4)] = p->audio_frame[4]; buf[PB(4)] = p->audio_frame[4];
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment