* [PATCH] HDMI - fix ELD monitor name length
@ 2011-06-29 6:26 Wu Fengguang
2011-06-29 6:31 ` Wu Fengguang
2011-06-29 6:50 ` Takashi Iwai
0 siblings, 2 replies; 3+ messages in thread
From: Wu Fengguang @ 2011-06-29 6:26 UTC (permalink / raw)
To: Takashi Iwai; +Cc: alsa-devel, Stephen Warren
I noticed that the last character of the ELD monitor name is lost,
this fixes the issue.
Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
---
sound/pci/hda/hda_eld.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- sound-2.6.orig/sound/pci/hda/hda_eld.c 2011-06-29 13:08:23.000000000 +0800
+++ sound-2.6/sound/pci/hda/hda_eld.c 2011-06-29 14:13:25.000000000 +0800
@@ -294,7 +294,7 @@ static int hdmi_update_eld(struct hdmi_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) {
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH] HDMI - fix ELD monitor name length
2011-06-29 6:26 [PATCH] HDMI - fix ELD monitor name length Wu Fengguang
@ 2011-06-29 6:31 ` Wu Fengguang
2011-06-29 6:50 ` Takashi Iwai
1 sibling, 0 replies; 3+ messages in thread
From: Wu Fengguang @ 2011-06-29 6:31 UTC (permalink / raw)
To: Takashi Iwai; +Cc: alsa-devel, Stephen Warren
Takashi,
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'.
Thanks,
Fengguang
On Wed, Jun 29, 2011 at 02:26:07PM +0800, Wu Fengguang wrote:
> I noticed that the last character of the ELD monitor name is lost,
> this fixes the issue.
>
> Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
> ---
> sound/pci/hda/hda_eld.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> --- sound-2.6.orig/sound/pci/hda/hda_eld.c 2011-06-29 13:08:23.000000000 +0800
> +++ sound-2.6/sound/pci/hda/hda_eld.c 2011-06-29 14:13:25.000000000 +0800
> @@ -294,7 +294,7 @@ static int hdmi_update_eld(struct hdmi_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) {
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH] HDMI - fix ELD monitor name length
2011-06-29 6:26 [PATCH] HDMI - fix ELD monitor name length Wu Fengguang
2011-06-29 6:31 ` Wu Fengguang
@ 2011-06-29 6:50 ` Takashi Iwai
1 sibling, 0 replies; 3+ messages in thread
From: Takashi Iwai @ 2011-06-29 6:50 UTC (permalink / raw)
To: Wu Fengguang; +Cc: alsa-devel, Stephen Warren
At Wed, 29 Jun 2011 14:26:07 +0800,
Wu Fengguang wrote:
>
> I noticed that the last character of the ELD monitor name is lost,
> this fixes the issue.
>
> Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Thanks, applied now (with more changelog comments from your follow-up
mail).
Takashi
> ---
> sound/pci/hda/hda_eld.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> --- sound-2.6.orig/sound/pci/hda/hda_eld.c 2011-06-29 13:08:23.000000000 +0800
> +++ sound-2.6/sound/pci/hda/hda_eld.c 2011-06-29 14:13:25.000000000 +0800
> @@ -294,7 +294,7 @@ static int hdmi_update_eld(struct hdmi_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) {
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2011-06-29 6:50 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-06-29 6:26 [PATCH] HDMI - fix ELD monitor name length Wu Fengguang
2011-06-29 6:31 ` Wu Fengguang
2011-06-29 6:50 ` Takashi Iwai
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.