diff options
Diffstat (limited to 'sound')
-rw-r--r-- | sound/pci/hda/hda_eld.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/sound/pci/hda/hda_eld.c b/sound/pci/hda/hda_eld.c index 9b697a28cf53..79ca80f6c77a 100644 --- a/sound/pci/hda/hda_eld.c +++ b/sound/pci/hda/hda_eld.c | |||
@@ -792,12 +792,15 @@ int snd_hdmi_get_eld_ati(struct hda_codec *codec, hda_nid_t nid, | |||
792 | /* else unknown/invalid or 0ms or video ahead of audio, so use zero */ | 792 | /* else unknown/invalid or 0ms or video ahead of audio, so use zero */ |
793 | } | 793 | } |
794 | 794 | ||
795 | /* Baseline length */ | ||
796 | buf[2] = pos - 4; | ||
797 | |||
798 | /* SAD count */ | 795 | /* SAD count */ |
799 | buf[5] |= ((pos - ELD_FIXED_BYTES - sink_desc_len) / 3) << 4; | 796 | buf[5] |= ((pos - ELD_FIXED_BYTES - sink_desc_len) / 3) << 4; |
800 | 797 | ||
798 | /* Baseline ELD block length is 4-byte aligned */ | ||
799 | pos = round_up(pos, 4); | ||
800 | |||
801 | /* Baseline ELD length (4-byte header is not counted in) */ | ||
802 | buf[2] = (pos - 4) / 4; | ||
803 | |||
801 | *eld_size = pos; | 804 | *eld_size = pos; |
802 | 805 | ||
803 | return 0; | 806 | return 0; |