• Cristian Ciocaltea's avatar
    ASoC: SOF: core: Skip firmware test for custom loaders · 369b997a
    Cristian Ciocaltea authored
    The ACP driver for Vangogh platform uses a quirk for Valve Galileo
    device to setup a custom firmware loader, which neither requires nor
    uses the firmware file indicated via the default_fw_filename member of
    struct sof_dev_desc.
    
    Since commit 6c393ebb ("ASoC: SOF: core: Implement IPC version
    fallback if firmware files are missing"), the provided filename gets
    verified and triggers a fatal error on probe:
    
    [ 7.719337] snd_sof_amd_vangogh 0000:04:00.5: enabling device (0000 -> 0002)
    [ 7.721486] snd_sof_amd_vangogh 0000:04:00.5: SOF firmware and/or topology file not found.
    [ 7.721565] snd_sof_amd_vangogh 0000:04:00.5: Supported default profiles
    [ 7.721569] snd_sof_amd_vangogh 0000:04:00.5: - ipc type 0 (Requested):
    [ 7.721573] snd_sof_amd_vangogh 0000:04:00.5:  Firmware file: amd/sof/sof-vangogh.ri
    [ 7.721577] snd_sof_amd_vangogh 0000:04:00.5:  Topology file: amd/sof-tplg/sof-vangogh-nau8821-max.tplg
    [ 7.721582] snd_sof_amd_vangogh 0000:04:00.5: Check if you have 'sof-firmware' package installed.
    [ 7.721585] snd_sof_amd_vangogh 0000:04:00.5: Optionally it can be manually downloaded from:
    [ 7.721589] snd_sof_amd_vangogh 0000:04:00.5:    https://github.com/thesofproject/sof-bin/
    [ 7.721997] snd_sof_amd_vangogh: probe of 0000:04:00.5 failed with error -2
    
    According to AMD, a combined ".ri" file which includes the code and data
    segments cannot be used due to a limitation preventing the code image to
    be signed on build time.
    
    Fix the issue by skipping the firmware file test if a custom loader is
    being used instead of the generic one.
    
    Fixes: 6c393ebb ("ASoC: SOF: core: Implement IPC version fallback if firmware files are missing")
    Co-developed-by: default avatarPéter Ujfalusi <peter.ujfalusi@linux.intel.com>
    Signed-off-by: default avatarPéter Ujfalusi <peter.ujfalusi@linux.intel.com>
    Signed-off-by: default avatarCristian Ciocaltea <cristian.ciocaltea@collabora.com>
    Link: https://msgid.link/r/20231219030728.2431640-8-cristian.ciocaltea@collabora.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
    369b997a
fw-file-profile.c 9.39 KB