• Takashi Iwai's avatar
    ALSA: hda: Fix too short HDMI/DP chmap reporting · c2432466
    Takashi Iwai authored
    We got a regression report about the HD-audio HDMI chmap, where some
    surround channels are reported as UNKNOWN.  The git bisection pointed
    the culprit at the commit 9b3dc8aa ("ALSA: hda - Register chmap
    obj as priv data instead of codec").  The story behind scene is like
    this:
    
    - While moving the code out of the legacy HDA to the HDA common place,
      the patch modifies the code to obtain the chmap array indirectly in
      a byte array, and it expands it to kctl value array.
    - At the latter operation, the size of the array is wrongly passed by
      sizeof() to the pointer.
    - It can be 4 on 32bit arch, thus too short for 6+ channels.
      (And that's the reason why it didn't hit other persons; it's 8 on
      64bit arch, thus it's usually enough.)
    
    The code was further changed meanwhile, but the problem persisted.
    Let's fix it by correctly evaluating the array size.
    
    Fixes: 9b3dc8aa ("ALSA: hda - Register chmap obj as priv data instead of codec")
    Reported-by: default avatarVDR User <user.vdr@gmail.com>
    Cc: <stable@vger.kernel.org>
    Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
    c2432466
Name
Last commit
Last update
..
ac97 Loading commit data...
aoa Loading commit data...
arm Loading commit data...
atmel Loading commit data...
core Loading commit data...
drivers Loading commit data...
firewire Loading commit data...
hda Loading commit data...
i2c Loading commit data...
isa Loading commit data...
mips Loading commit data...
oss Loading commit data...
parisc Loading commit data...
pci Loading commit data...
pcmcia Loading commit data...
ppc Loading commit data...
sh Loading commit data...
soc Loading commit data...
sparc Loading commit data...
spi Loading commit data...
synth Loading commit data...
usb Loading commit data...
x86 Loading commit data...
Kconfig Loading commit data...
Makefile Loading commit data...
ac97_bus.c Loading commit data...
last.c Loading commit data...
sound_core.c Loading commit data...