• Richard Fitzgerald's avatar
    ASoC: cs35l56: Firmware file must match the version of preloaded firmware · f4ef5149
    Richard Fitzgerald authored
    Check during initialization whether the firmware is already patched.
    If so, include the firmware version in the wm_adsp fwf_name string.
    
    If the firmware has already been patched by the BIOS the driver
    can only replace it if it has control of hard RESET.
    
    If the driver cannot replace the firmware, it can still load a wmfw
    (for ALSA control definitions) and/or a bin (for additional tunings).
    But these must match the version of firmware that is running on the
    CS35L56.
    
    The firmware is pre-patched if FIRMWARE_MISSING == 0.
    
    Including the firmware version in the fwf_name string will
    qualify the firmware file name:
    
    Normal (unpatched or replaceable firmware):
      cs35l56-rev-dsp1-misc[-system_name].[wmfw|bin]
    
    Preloaded firmware:
      cs35l56-rev[-s]-VVVVVV-dsp1-misc[-system_name].[wmfw|bin]
    
    Where:
       [-s] is an optional -s added into the name for a secured CS35L56
       VVVVVV is the 24-bit firmware version in hexadecimal.
    Signed-off-by: default avatarRichard Fitzgerald <rf@opensource.cirrus.com>
    Fixes: 608f1b0d ("ASoC: cs35l56: Move DSP part string generation so that it is done only once")
    Link: https://msgid.link/r/20240129162737.497-13-rf@opensource.cirrus.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
    f4ef5149
cs35l56-shared.c 26.1 KB