1. 08 Feb, 2022 1 commit
    • Guenter Roeck's avatar
      ASoC: Revert "ASoC: mediatek: Check for error clk pointer" · 946eb871
      Guenter Roeck authored
      This reverts commit 9de2b928 ("ASoC: mediatek: Check for error clk
      pointer").
      
      With this patch in the tree, Chromebooks running the affected hardware
      no longer boot. Bisect points to this patch, and reverting it fixes
      the problem.
      
      An analysis of the code with this patch applied shows:
      
              ret = init_clks(pdev, clk);
              if (ret)
                      return ERR_PTR(ret);
      ...
                      for (j = 0; j < MAX_CLKS && data->clk_id[j]; j++) {
                              struct clk *c = clk[data->clk_id[j]];
      
                              if (IS_ERR(c)) {
                                      dev_err(&pdev->dev, "%s: clk unavailable\n",
                                              data->name);
                                      return ERR_CAST(c);
                              }
      
                              scpd->clk[j] = c;
                      }
      
      Not all clocks in the clk_names array have to be present. Only the clocks
      in the data->clk_id array are actually needed. The code already checks if
      the required clocks are available and bails out if not. The assumption that
      all clocks have to be present is wrong, and commit 9de2b928 ("ASoC:
      mediatek: Check for error clk pointer") needs to be reverted.
      
      Cc: Jiasheng Jiang <jiasheng@iscas.ac.cn>
      Cc: Mark Brown <broonie@kernel.org>
      Cc: James Liao <jamesjj.liao@mediatek.com>
      Cc: Kevin Hilman <khilman@baylibre.com>
      Cc: Matthias Brugger <matthias.bgg@gmail.com>
      Reported-by: default avatarFrank Wunderlich <frank-w@public-files.de>
      Reported-by: default avatarDaniel Golle <daniel@makrotopia.org>
      Fixes: 9de2b928 ("ASoC: mediatek: Check for error clk pointer")
      Signed-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
      Link: https://lore.kernel.org/r/20220207160923.3911501-1-linux@roeck-us.netSigned-off-by: default avatarMark Brown <broonie@kernel.org>
      946eb871
  2. 02 Feb, 2022 6 commits
  3. 31 Jan, 2022 1 commit
  4. 28 Jan, 2022 7 commits
  5. 26 Jan, 2022 4 commits
  6. 25 Jan, 2022 3 commits
  7. 21 Jan, 2022 1 commit
  8. 19 Jan, 2022 2 commits
  9. 12 Jan, 2022 1 commit
  10. 11 Jan, 2022 1 commit
  11. 10 Jan, 2022 1 commit
    • 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.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
      e958b588
  12. 07 Jan, 2022 2 commits
  13. 06 Jan, 2022 10 commits