1. 03 Feb, 2023 2 commits
    • Arnd Bergmann's avatar
      ASoC: SOF: fix intel-soundwire link failure · c5a61db9
      Arnd Bergmann authored
      My randconfig build setup ran into a rare build failure with
      
      CONFIG_SND_SOC_SOF_INTEL_SOUNDWIRE_LINK_BASELINE=y
      CONFIG_SND_SOC_SOF_INTEL_SOUNDWIRE=m
      CONFIG_SOUNDWIRE=y
      CONFIG_SOUNDWIRE_INTEL=m
      CONFIG_SND_SOC_SOF_HDA=y
      CONFIG_SND_SOC_SOF_INTEL_TGL=y
      
      x86_64-linux-ld: sound/soc/sof/intel/hda.o: in function `hda_init_caps':
      hda.c:(.text+0x691): undefined reference to `sdw_intel_cnl_hw_ops'
      x86_64-linux-ld: hda.c:(.text+0x6f2): undefined reference to `sdw_intel_probe'
      x86_64-linux-ld: sound/soc/sof/intel/hda.o: in function `hda_sdw_startup':
      hda.c:(.text+0x1c40): undefined reference to `sdw_intel_startup'
      x86_64-linux-ld: sound/soc/sof/intel/hda.o: in function `hda_sdw_process_wakeen':
      hda.c:(.text+0x1cb6): undefined reference to `sdw_intel_process_wakeen_event'
      x86_64-linux-ld: sound/soc/sof/intel/hda.o: in function `hda_dsp_interrupt_thread':
      hda.c:(.text+0x1d67): undefined reference to `sdw_intel_thread'
      x86_64-linux-ld: sound/soc/sof/intel/hda.o: in function `hda_dsp_remove':
      hda.c:(.text+0x2655): undefined reference to `sdw_intel_exit'
      
      My best understanding is that the definition of
      SND_SOC_SOF_INTEL_SOUNDWIRE_LINK_BASELINE was intended to avoid this
      problem, but got it wrong for the SND_SOC_SOF_INTEL_SOUNDWIRE=m case,
      where the 'select' is meant to set SOUNDWIRE_INTEL to the value of
      SND_SOC_SOF_INTEL_SOUNDWIRE_LINK_BASELINE rather than the intersection of
      SND_SOC_SOF_INTEL_SOUNDWIRE_LINK_BASELINE and SND_SOC_SOF_INTEL_SOUNDWIRE.
      
      Change the condition to check for SND_SOC_SOF_INTEL_SOUNDWIRE to be a
      boolean rather than a tristate expression in order to propagate this
      as intended.
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Link: https://lore.kernel.org/r/20230202102247.806749-1-arnd@kernel.orgSigned-off-by: default avatarMark Brown <broonie@kernel.org>
      c5a61db9
    • Trevor Wu's avatar
      ASoC: mediatek: mt8188: remove etdm dead code · 66b9e94c
      Trevor Wu authored
      Some Smatch static checker warning like below was found.
      
      sound/soc/mediatek/mt8188/mt8188-dai-etdm.c:2487
      mt8188_dai_etdm_parse_of()
      warn: 'ret' returned from snprintf() might be larger than 48
      
          2479         for (i = 0; i < MT8188_AFE_IO_ETDM_NUM; i++) {
          2480                 dai_id = ETDM_TO_DAI_ID(i);
          2481                 etdm_data = afe_priv->dai_priv[dai_id];
          2482
          2483                 ret = snprintf(prop, sizeof(prop),
          2484                                "mediatek,%s-multi-pin-mode",
          2485                                of_afe_etdms[i].name);
          2486                 if (ret < 0) {
      --> 2487                         dev_err(afe->dev, "%s snprintf
      err=%d\n",
          2488
      
      In linux kernel, snprintf() never returns negatives. On the other hand,
      the format string like "mediatek,%s-multi-pin-mode" must be smaller
      than sizeof(prop)=48.
      
      After discussing in the mail thread[1], I remove the dead code to fix
      the Smatch warnings.
      
      [1]: https://lore.kernel.org/all/Y9EdBg641tJDDrt%2F@kili/Signed-off-by: default avatarTrevor Wu <trevor.wu@mediatek.com>
      Link: https://lore.kernel.org/r/20230202103704.15626-1-trevor.wu@mediatek.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
      66b9e94c
  2. 02 Feb, 2023 9 commits
  3. 01 Feb, 2023 18 commits
  4. 31 Jan, 2023 11 commits