1. 04 Mar, 2024 2 commits
    • Chancel Liu's avatar
      ASoC: soc-core.c: Prefer to return dai->driver->name in snd_soc_dai_name_get() · 755bb9a4
      Chancel Liu authored
      ASoC machine driver can use snd_soc_{of_}get_dlc() (A) to get DAI name
      for dlc (snd_soc_dai_link_component). In this function call
      dlc->dai_name is parsed via snd_soc_dai_name_get() (B).
      
      (A)	int snd_soc_get_dlc(...)
      	{
      		...
      (B)		dlc->dai_name = snd_soc_dai_name_get(dai);
      		...
      	}
      
      (B) has a priority to return dai->name as dlc->dai_name. In most cases
      card can probe successfully. However it has an issue that ASoC tries to
      rebind card. Here is a simplified flow for example:
      
       |	a) Card probes successfully at first
       |	b) One of the component bound to this card is removed for some
       |	   reason the component->dev is released
       |	c) That component is re-registered
       v	d) ASoC calls snd_soc_try_rebind_card()
      
      a) points dlc->dai_name to dai->name. b) releases all resource of the
      old DAI. c) creates new DAI structure. In result d) can not use
      dlc->dai_name to add new created DAI.
      
      So it's reasonable that prefer to return dai->driver->name in
      snd_soc_dai_name_get() because dai->driver is a pre-defined global
      variable. Also update snd_soc_is_matching_dai() for alignment.
      Signed-off-by: default avatarChancel Liu <chancel.liu@nxp.com>
      Link: https://msgid.link/r/20240304072128.2845432-1-chancel.liu@nxp.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
      755bb9a4
    • Richard Fitzgerald's avatar
      ASoC: cs-amp-lib: Add KUnit test for calibration helpers · 17786231
      Richard Fitzgerald authored
      Add a KUnit test for the cs-amp-lib library. This has test cases
      for cs_amp_get_efi_calibration_data() and cs_amp_write_cal_coeffs().
      
      A KUNIT_STATIC_STUB_REDIRECT() has been added to
      cs_amp_get_efi_variable() and cs_amp_write_cal_coeff() so that the
      KUnit test can redirect these to test harness functions.
      
      Much of the testing involves invoking the same function with different
      parameters, i.e. the number of amps and the amp index within the array.
      This uses parameterization rather than looping. The idea is to avoid
      looping over configurations within one test case as that has a higher
      chance of having a bug that doesn't actually test all the expected cases.
      Having the test run exactly one configuration, and then tear-down, is less
      prone to accidentally skipped configurations.
      Signed-off-by: default avatarRichard Fitzgerald <rf@opensource.cirrus.com>
      Link: https://msgid.link/r/20240304143705.26362-1-rf@opensource.cirrus.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
      17786231
  2. 27 Feb, 2024 2 commits
  3. 26 Feb, 2024 9 commits
  4. 24 Feb, 2024 1 commit
    • Mark Brown's avatar
      ALSA: cs35l56: Apply calibration from EFI · 0c4ebb28
      Mark Brown authored
      Merge series from Richard Fitzgerald <rf@opensource.cirrus.com>:
      
      Factory calibration of the speakers stores the calibration information
      into an EFI variable.
      
      This set of patches adds support for applying speaker calibration
      data from that EFI variable.
      
      The HDA patch (#5) depends on the ASoC patches #2 and #3
      0c4ebb28
  5. 23 Feb, 2024 7 commits
  6. 22 Feb, 2024 3 commits
  7. 21 Feb, 2024 9 commits
  8. 20 Feb, 2024 7 commits