• 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: 's avatarTzung-Bi Shih <tzungbi@google.com>
    Signed-off-by: 's avatarMark Brown <broonie@kernel.org>
    Signed-off-by: 's avatarSasha Levin <sashal@kernel.org>
    4c4ab8d5
Name
Last commit
Last update
Documentation Loading commit data...
arch Loading commit data...
block Loading commit data...
certs Loading commit data...
crypto Loading commit data...
drivers Loading commit data...
firmware Loading commit data...
fs Loading commit data...
include Loading commit data...
init Loading commit data...
ipc Loading commit data...
kernel Loading commit data...
lib Loading commit data...
mm Loading commit data...
net Loading commit data...
samples Loading commit data...
scripts Loading commit data...
security Loading commit data...
sound Loading commit data...
tools Loading commit data...
usr Loading commit data...
virt Loading commit data...
.cocciconfig Loading commit data...
.get_maintainer.ignore Loading commit data...
.gitattributes Loading commit data...
.gitignore Loading commit data...
.mailmap Loading commit data...
COPYING Loading commit data...
CREDITS Loading commit data...
Kbuild Loading commit data...
Kconfig Loading commit data...
MAINTAINERS Loading commit data...
Makefile Loading commit data...
README Loading commit data...
REPORTING-BUGS Loading commit data...