diff options
author | Wu Fengguang <fengguang.wu@intel.com> | 2011-06-29 14:26:07 +0800 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2011-06-29 08:48:24 +0200 |
commit | f5b2d0ef631bb0647ae8ed1752d2127b8fb6da70 (patch) | |
tree | 156ae197e1696ea311926d64c8b30e8f371a5b03 /sound/pci/hda/hda_eld.c | |
parent | 0cfae7c9378cf77434f6be89b5fb65d8f9a5031f (diff) |
ALSA: HDMI - fix ELD monitor name length
I noticed that the last character of the ELD monitor name is lost,
this fixes the issue.
This fix should be confirming to the HDA spec, and works together with
the DRM part of the ELD patch.
The HDA spec does not mention that Monitor_Name_String is an '\0'
ending string, and it allows NML to be 1, which is only valid when MNL
does not count the possible ending '\0'.
Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/hda/hda_eld.c')
-rw-r--r-- | sound/pci/hda/hda_eld.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/pci/hda/hda_eld.c b/sound/pci/hda/hda_eld.c index b05f7be9dc1..e3e853153d1 100644 --- a/sound/pci/hda/hda_eld.c +++ b/sound/pci/hda/hda_eld.c @@ -294,7 +294,7 @@ static int hdmi_update_eld(struct hdmi_eld *e, snd_printd(KERN_INFO "HDMI: out of range MNL %d\n", mnl); goto out_fail; } else - strlcpy(e->monitor_name, buf + ELD_FIXED_BYTES, mnl); + strlcpy(e->monitor_name, buf + ELD_FIXED_BYTES, mnl + 1); for (i = 0; i < e->sad_count; i++) { if (ELD_FIXED_BYTES + mnl + 3 * (i + 1) > size) { |