1. 06 Jul, 2023 3 commits
  2. 05 Jul, 2023 4 commits
  3. 04 Jul, 2023 1 commit
    • Johan Hovold's avatar
      ASoC: codecs: wcd938x: fix missing mbhc init error handling · 7dfae263
      Johan Hovold authored
      MBHC initialisation can fail so add the missing error handling to avoid
      dereferencing an error pointer when later configuring the jack:
      
          Unable to handle kernel paging request at virtual address fffffffffffffff8
      
          pc : wcd_mbhc_start+0x28/0x380 [snd_soc_wcd_mbhc]
          lr : wcd938x_codec_set_jack+0x28/0x48 [snd_soc_wcd938x]
      
          Call trace:
           wcd_mbhc_start+0x28/0x380 [snd_soc_wcd_mbhc]
           wcd938x_codec_set_jack+0x28/0x48 [snd_soc_wcd938x]
           snd_soc_component_set_jack+0x28/0x8c [snd_soc_core]
           qcom_snd_wcd_jack_setup+0x7c/0x19c [snd_soc_qcom_common]
           sc8280xp_snd_init+0x20/0x2c [snd_soc_sc8280xp]
           snd_soc_link_init+0x28/0x90 [snd_soc_core]
           snd_soc_bind_card+0x628/0xbfc [snd_soc_core]
           snd_soc_register_card+0xec/0x104 [snd_soc_core]
           devm_snd_soc_register_card+0x4c/0xa4 [snd_soc_core]
           sc8280xp_platform_probe+0xf0/0x108 [snd_soc_sc8280xp]
      
      Fixes: bcee7ed0 ("ASoC: codecs: wcd938x: add Multi Button Headset Control support")
      Cc: stable@vger.kernel.org      # 5.15
      Cc: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
      Signed-off-by: default avatarJohan Hovold <johan+linaro@kernel.org>
      Link: https://lore.kernel.org/r/20230703124701.11734-1-johan+linaro@kernel.orgSigned-off-by: default avatarMark Brown <broonie@kernel.org>
      7dfae263
  4. 03 Jul, 2023 1 commit
  5. 30 Jun, 2023 9 commits
  6. 29 Jun, 2023 3 commits
    • Sameer Pujar's avatar
      ASoC: rt5640: Fix sleep in atomic context · 70a6404f
      Sameer Pujar authored
      Following prints are observed while testing audio on Jetson AGX Orin which
      has onboard RT5640 audio codec:
      
        BUG: sleeping function called from invalid context at kernel/workqueue.c:3027
        in_atomic(): 1, irqs_disabled(): 128, non_block: 0, pid: 0, name: swapper/0
        preempt_count: 10001, expected: 0
        RCU nest depth: 0, expected: 0
        ------------[ cut here ]------------
        WARNING: CPU: 0 PID: 0 at kernel/irq/handle.c:159 __handle_irq_event_percpu+0x1e0/0x270
        ---[ end trace ad1c64905aac14a6 ]-
      
      The IRQ handler rt5640_irq() runs in interrupt context and can sleep
      during cancel_delayed_work_sync().
      
      Fix this by running IRQ handler, rt5640_irq(), in thread context.
      Hence replace request_irq() calls with devm_request_threaded_irq().
      
      Fixes: 051dade3 ("ASoC: rt5640: Fix the wrong state of JD1 and JD2")
      Cc: stable@vger.kernel.org
      Cc: Oder Chiou <oder_chiou@realtek.com>
      Signed-off-by: default avatarSameer Pujar <spujar@nvidia.com>
      Link: https://lore.kernel.org/r/1688015537-31682-4-git-send-email-spujar@nvidia.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
      70a6404f
    • Sheetal's avatar
      ASoC: tegra: Fix ADX byte map · 6dfe70be
      Sheetal authored
      Byte mask for channel-1 of stream-1 is not getting enabled and this
      causes failures during ADX 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.
      
      ADX supports 4 output streams and each stream can have a maximum of
      16 channels. Each byte in the input frame is uniquely mapped to a
      byte in one of these 4 outputs. 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
      set 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: 3c97881b ("ASoC: tegra: Fix kcontrol put callback in ADX")
      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-3-git-send-email-spujar@nvidia.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
      6dfe70be
    • 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
  7. 26 Jun, 2023 7 commits
  8. 23 Jun, 2023 3 commits
  9. 22 Jun, 2023 9 commits