Skip to content
  1. Jan 28, 2022
  2. Jan 26, 2022
  3. Jan 25, 2022
  4. Jan 22, 2022
  5. Jan 20, 2022
    • Julian Braha's avatar
      ASoC: mediatek: fix unmet dependency on GPIOLIB for SND_SOC_DMIC · 579b2c8f
      Julian Braha authored
      
      
      When SND_SOC_MT8195_MT6359_RT1011_RT5682 is selected,
      and GPIOLIB is not selected,
      Kbuild gives the following warning:
      
      WARNING: unmet direct dependencies detected for SND_SOC_DMIC
        Depends on [n]: SOUND [=y] && !UML && SND [=y] && SND_SOC [=y] && GPIOLIB [=n]
        Selected by [y]:
        - SND_SOC_MT8195_MT6359_RT1011_RT5682 [=y] && SOUND [=y] && !UML && SND [=y] && SND_SOC [=y] && I2C [=y] && SND_SOC_MT8195 [=y] && MTK_PMIC_WRAP [=y]
      
      This is because SND_SOC_MT8195_MT6359_RT1011_RT5682
      selects SND_SOC_DMIC without selecting or depending on
      GPIOLIB, depsite SND_SOC_DMIC depending on GPIOLIB.
      
      This unmet dependency bug was detected by Kismet,
      a static analysis tool for Kconfig. Please advise
      if this is not the appropriate solution.
      
      Signed-off-by: default avatarJulian Braha <julianbraha@gmail.com>
      Reviewed-by: default avatarTzung-Bi Shih <tzungbi@google.com>
      Link: https://lore.kernel.org/r/20220117050324.68371-1-julianbraha@gmail.com
      Signed-off-by: default avatarMark Brown <broonie@kernel.org>
      579b2c8f
    • Dan Carpenter's avatar
      ASoC: max9759: fix underflow in speaker_gain_control_put() · 4c907bcd
      Dan Carpenter authored
      Check for negative values of "priv->gain" to prevent an out of bounds
      access.  The concern is that these might come from the user via:
        -> snd_ctl_elem_write_user()
          -> snd_ctl_elem_write()
            -> kctl->put()
      
      Fixes: fa8d9151
      
       ("ASoC: max9759: Add Amplifier Driver")
      Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
      Link: https://lore.kernel.org/r/20220119123101.GA9509@kili
      Signed-off-by: default avatarMark Brown <broonie@kernel.org>
      4c907bcd
  6. Jan 12, 2022
  7. Jan 11, 2022
    • Robert Hancock's avatar
      ASoC: simple-card: fix probe failure on platform component · a64067f4
      Robert Hancock authored
      A previous change to simple-card resulted in asoc_simple_parse_dai
      attempting to retrieve the dai_name for platform components, which are
      unlikely to have a valid DAI name. This caused simple-card to fail to
      probe when using the xlnx_formatter_pcm as the platform component, since
      it does not register any DAI components.
      
      Since the dai_name is not used for platform components, just skip trying
      to retrieve it for those.
      
      Fixes: f107294c
      
       ("ASoC: simple-card: support snd_soc_dai_link_component style for cpu")
      Signed-off-by: default avatarRobert Hancock <robert.hancock@calian.com>
      Link: https://lore.kernel.org/r/20220107214711.1100162-6-robert.hancock@calian.com
      Signed-off-by: default avatarMark Brown <broonie@kernel.org>
      a64067f4
  8. Jan 10, 2022
    • Robert Hancock's avatar
      ASoC: xilinx: xlnx_formatter_pcm: Make buffer bytes multiple of period bytes · e958b588
      Robert Hancock authored
      This patch is based on one in the Xilinx kernel tree, "ASoc: xlnx: Make
      buffer bytes multiple of period bytes" by Devarsh Thakkar. The same
      issue exists in the mainline version of the driver. The original
      patch description is as follows:
      
      "The Xilinx Audio Formatter IP has a constraint on period
      bytes to be multiple of 64. This leads to driver changing
      the period size to suitable frames such that period bytes
      are multiple of 64.
      
      Now since period bytes and period size are updated but not
      the buffer bytes, this may make the buffer bytes unaligned
      and not multiple of period bytes.
      
      When this happens we hear popping noise as while DMA is being
      done the buffer bytes are not enough to complete DMA access
      for last period of frame within the application buffer boundary.
      
      To avoid this, align buffer bytes too as multiple of 64, and
      set another constraint to always enforce number of periods as
      integer. Now since, there is already a rule in alsa core
      to enforce Buffer size = Number of Periods * Period Size
      this automatically aligns buffer bytes as multiple of period
      bytes."
      
      Fixes: 6f6c3c36
      
       ("ASoC: xlnx: add pcm formatter platform driver")
      Cc: Devarsh Thakkar <devarsh.thakkar@xilinx.com>
      Signed-off-by: default avatarRobert Hancock <robert.hancock@calian.com>
      Link: https://lore.kernel.org/r/20220107214711.1100162-2-robert.hancock@calian.com
      Signed-off-by: default avatarMark Brown <broonie@kernel.org>
      e958b588
  9. Jan 08, 2022
  10. Jan 07, 2022
  11. Jan 06, 2022
  12. Jan 05, 2022