• Tzung-Bi Shih's avatar
    ASoC: dapm: Recalculate audio map forcely when card instantiated · 4c4ab8d5
    Tzung-Bi Shih authored
    [ Upstream commit 882eab6c28d23a970ae73b7eb831b169a672d456 ]
    
    Audio map are possible in wrong state before card->instantiated has
    been set to true.  Imaging the following examples:
    
    time 1: at the beginning
    
      in:-1    in:-1    in:-1    in:-1
     out:-1   out:-1   out:-1   out:-1
     SIGGEN        A        B      Spk
    
    time 2: after someone called snd_soc_dapm_new_widgets()
    (e.g. create_fill_widget_route_map() in sound/soc/codecs/hdac_hdmi.c)
    
       in:1     in:0     in:0     in:0
      out:0    out:0    out:0    out:1
     SIGGEN        A        B      Spk
    
    time 3: routes added
    
       in:1     in:0     in:0     in:0
      out:0    out:0    out:0    out:1
     SIGGEN -----> A -----> B ---> Spk
    
    In the end, the path should be powered on but it did not.  At time 3,
    "in" of SIGGEN and "out" of Spk did not propagate to their neighbors
    because snd_soc_dapm_add_path() will not invalidate the paths if
    the card has not instantiated (i.e. card->instantiated is false).
    To correct the state of audio map, recalculate the whole map forcely.
    Signed-off-by: default avatarTzung-Bi Shih <tzungbi@google.com>
    Signed-off-by: default avatarMark Brown <broonie@kernel.org>
    Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
    4c4ab8d5
Name
Last commit
Last update
..
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...
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...