aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i2c
diff options
context:
space:
mode:
authorJean-Francois Moine <moinejf@free.fr>2014-01-25 12:14:44 -0500
committerRussell King <rmk+kernel@arm.linux.org.uk>2014-02-02 11:33:09 -0500
commit7288ca07b638db485abec5752bd6b1faed1c33ef (patch)
tree1553858c9dd0c4e8ef6b4f0bf3595ab7161cecf0 /drivers/gpu/drm/i2c
parentd8ec26d7f8287f5788a494f56e8814210f0e64be (diff)
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: Russell King <rmk+kernel@arm.linux.org.uk> Acked-by: Russell King <rmk+kernel@arm.linux.org.uk> Signed-off-by: Jean-Francois Moine <moinejf@free.fr> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'drivers/gpu/drm/i2c')
-rw-r--r--drivers/gpu/drm/i2c/tda998x_drv.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/i2c/tda998x_drv.c b/drivers/gpu/drm/i2c/tda998x_drv.c
index 400b0c4a10fb..e62082654e01 100644
--- a/drivers/gpu/drm/i2c/tda998x_drv.c
+++ b/drivers/gpu/drm/i2c/tda998x_drv.c
@@ -528,10 +528,10 @@ tda998x_write_aif(struct drm_encoder *encoder, struct tda998x_encoder_params *p)
528{ 528{
529 uint8_t buf[PB(5) + 1]; 529 uint8_t buf[PB(5) + 1];
530 530
531 memset(buf, 0, sizeof(buf));
531 buf[HB(0)] = 0x84; 532 buf[HB(0)] = 0x84;
532 buf[HB(1)] = 0x01; 533 buf[HB(1)] = 0x01;
533 buf[HB(2)] = 10; 534 buf[HB(2)] = 10;
534 buf[PB(0)] = 0;
535 buf[PB(1)] = p->audio_frame[1] & 0x07; /* CC */ 535 buf[PB(1)] = p->audio_frame[1] & 0x07; /* CC */
536 buf[PB(2)] = p->audio_frame[2] & 0x1c; /* SF */ 536 buf[PB(2)] = p->audio_frame[2] & 0x1c; /* SF */
537 buf[PB(4)] = p->audio_frame[4]; 537 buf[PB(4)] = p->audio_frame[4];