Skip to content
Snippets Groups Projects
  1. May 24, 2021
    • Stephan Gerhold's avatar
      ASoC: codecs: Add driver for NXP/Goodix TFA989x (TFA1) amplifiers · af00978a
      Stephan Gerhold authored
      NXP's TFA98xx (now part of Goodix) are fairly popular speaker amplifiers
      used in many smartphones and tablets. Most of them are sold as "smart
      amplifiers" with built-in "CoolFlux DSP" that is used for volume control,
      plus a "sophisticated speaker-boost and protection algorithm".
      
      Unfortunately, they are also almost entirely undocumented. The short
      datasheets (e.g. [1] for TFA9897) describe the available features,
      but do not provide any information about the registers or how to use
      the "CoolFlux DSP".
      
      The amplifiers are most often configured through proprietary userspace
      libraries. There are also some (rather complex) kernel drivers (e.g. [2])
      but even those rely on obscure firmware blobs for configuration (so-called
      "containers"). They seem to contain different "profiles" with tuned speaker
      settings, sample rates and volume steps (which would be better exposed
      as separate ALSA mixers).
      
      The format of the firmware files seems to have changed a lot over the time,
      so it's not even possible to simply re-use the firmware originally provided
      by the vendor.
      
      Overall, it seems close to impossible to develop a proper mainline driver
      for these amplifiers that could make proper use of the built-in DSP.
      
      This commit implements a compromise: At least the TFA1 family of the
      TFA98xx amplifiers (usually called TFA989x) provide a way to *bypass*
      the DSP using a special register sequence. The register sequence can be
      found in similar variations in the kernel drivers from lots of vendors
      e.g. in [3] and was probably mainly used for factory testing.
      
      With the DSP bypassed, the amplifier acts mostly like a dumb standard
      speaker amplifier, without (hardware) volume control. However, the setup
      is much simpler and it works without any obscure firmware.
      
      This driver implements the DSP bypass combined with chip-specific
      initialization sequences adapted from [2]. Only TFA9895 is supported in
      this initial commit. Except for the lack of volume control I can not hear
      any difference with or without the DSP, it works just fine.
      
      This driver allows the speaker to work on mainline Linux running on the
      Samsung Galaxy A3/A5 (2015) [TFA9895] and Alcatel Idol 3 [TFA9897].
      TFA9897 support will be added in separate patch set later.
      
      [1]: https://product.goodix.com/en/docview/TFA9897%20SDS_Rev.3.1?objectId=47&objectType=document&version=78
      [2]: https://source.codeaurora.org/external/mas/tfa98xx
      [3]: https://github.com/sonyxperiadev/kernel/blob/57b5050e340f40a88e1ddb8d16fd9adb44418923/sound/soc/codecs/tfa98xx.c#L1422-L1462
      
      
      
      Signed-off-by: default avatarStephan Gerhold <stephan@gerhold.net>
      Link: https://lore.kernel.org/r/20210513104129.36583-2-stephan@gerhold.net
      
      
      Signed-off-by: default avatarMark Brown <broonie@kernel.org>
      af00978a
  2. Apr 07, 2021
  3. Mar 25, 2021
  4. Mar 24, 2021
  5. Mar 18, 2021
  6. Mar 10, 2021
  7. Feb 11, 2021
  8. Feb 08, 2021
  9. Jan 20, 2021
  10. Dec 09, 2020
  11. Nov 30, 2020
  12. Nov 26, 2020
  13. Nov 19, 2020
  14. Nov 10, 2020
  15. Oct 08, 2020
  16. Sep 28, 2020
  17. Sep 10, 2020
  18. Aug 20, 2020
  19. Jul 09, 2020
  20. May 28, 2020
    • Arnd Bergmann's avatar
      ASoC: rt5682: split i2c driver into separate module · a50067d4
      Arnd Bergmann authored
      
      With SND_SOC_AMD_RV_RT5682_MACH using the i2c version of the
      driver, we can easily get a build failure when I2C is built-in
      but soundwire is not:
      
       WARNING: unmet direct dependencies detected for SND_SOC_RT5682
         Depends on [m]: SOUND [=y] && !UML && SND [=y] && SND_SOC [=y] && (I2C [=y] || SOUNDWIRE [=m]) && (SOUNDWIRE [=m] || !SOUNDWIRE [=m]) && (I2C [=y] || !I2C [=y])
         Selected by [y]:
         - SND_SOC_AMD_RV_RT5682_MACH [=y] && SOUND [=y] && !UML && SND [=y] && SND_SOC [=y] && SND_SOC_AMD_ACP3x [=y] && I2C [=y] && CROS_EC [=y]
         Selected by [m]:
         - SND_SOC_RT5682_SDW [=m] && SOUND [=y] && !UML && SND [=y] && SND_SOC [=y] && SOUNDWIRE [=m] && (I2C [=y] || !I2C [=y])
      
      Rework the driver to have three separate modules, with the
      main driver just dealing with the common bits and the actual
      initialization as part of i2c and sdw specific modules.
      
      The conversion is fairly mechanical to keep it easy to review,
      i.e. it moves code around with the minimal required renaming
      and changes.
      
      Fixes: 6b8e4e7d ("ASoC: amd: Add machine driver for Raven based platform")
      Fixes: fd443a20 ("ASoC: rt5682: fix I2C/Soundwire dependencies")
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Reviewed-by: default avatarPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
      Link: https://lore.kernel.org/r/20200528091851.2889754-1-arnd@arndb.de
      
      
      Signed-off-by: default avatarMark Brown <broonie@kernel.org>
      a50067d4
  21. May 25, 2020
  22. Apr 21, 2020
  23. Feb 26, 2020
  24. Feb 20, 2020
  25. Jan 23, 2020
  26. Jan 21, 2020
  27. Jan 14, 2020
  28. Jan 13, 2020
  29. Jan 10, 2020
  30. Jan 09, 2020
Loading