1. 29 Jun, 2023 1 commit
    • Sheetal's avatar
      ASoC: tegra: Fix AMX byte map · 49bd7b08
      Sheetal authored
      Byte mask for channel-1 of stream-1 is not getting enabled and this
      causes failures during AMX use cases. This happens because the byte
      map value 0 matches the byte map array and put() callback returns
      without enabling the corresponding bits in the byte mask.
      
      AMX supports 4 input streams and each stream can take a maximum of
      16 channels. Each byte in the output frame is uniquely mapped to a
      byte in one of these 4 inputs. This mapping is done with the help of
      byte map array via user space control setting. The byte map array
      size in the driver is 16 and each array element is of size 4 bytes.
      This corresponds to 64 byte map values.
      
      Each byte in the byte map array can have any value between 0 to 255
      to enable the corresponding bits in the byte mask. The value 256 is
      used as a way to disable the byte map. However the byte map array
      element cannot store this value. The put() callback disables the byte
      mask for 256 value and byte map value is reset to 0 for this case.
      This causes problems during subsequent runs since put() callback,
      for value of 0, just returns without enabling the byte mask. In short,
      the problem is coming because 0 and 256 control values are stored as
      0 in the byte map array.
      
      Right now fix the put() callback by actually looking at the byte mask
      array state to identify if any change is needed and update the fields
      accordingly. The get() callback needs an update as well to return the
      correct control value that user has set before. Note that when user
      sets 256, the value is stored as 0 and byte mask is disabled. So byte
      mask state is used to either return 256 or the value from byte map
      array.
      
      Given above, this looks bit complicated and all this happens because
      the byte map array is tightly packed and cannot actually store the 256
      value. Right now the priority is to fix the existing failure and a TODO
      item is put to improve this logic.
      
      Fixes: 8db78ace ("ASoC: tegra: Fix kcontrol put callback in AMX")
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarSheetal <sheetal@nvidia.com>
      Reviewed-by: default avatarMohan Kumar D <mkumard@nvidia.com>
      Reviewed-by: default avatarSameer Pujar <spujar@nvidia.com>
      Link: https://lore.kernel.org/r/1688015537-31682-2-git-send-email-spujar@nvidia.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
      49bd7b08
  2. 26 Jun, 2023 7 commits
  3. 23 Jun, 2023 3 commits
  4. 22 Jun, 2023 9 commits
  5. 21 Jun, 2023 6 commits
  6. 20 Jun, 2023 14 commits