1. 07 9月, 2020 1 次提交
  2. 01 8月, 2020 1 次提交
  3. 24 7月, 2020 1 次提交
  4. 26 6月, 2020 1 次提交
  5. 16 6月, 2020 7 次提交
  6. 15 6月, 2020 1 次提交
  7. 09 6月, 2020 1 次提交
  8. 29 5月, 2020 1 次提交
  9. 25 5月, 2020 3 次提交
  10. 18 5月, 2020 3 次提交
  11. 29 4月, 2020 3 次提交
  12. 15 4月, 2020 1 次提交
    • S
      ASoC: soc-pcm: dpcm: Only allow playback/capture if supported · 9b5db059
      Stephan Gerhold 提交于
      At the moment, PCM devices for DPCM are only created based on the
      dpcm_playback/capture parameters of the DAI link, without considering
      if the CPU/FE DAI is actually capable of playback/capture.
      
      Normally the dpcm_playback/capture parameter should match the
      capabilities of the CPU DAI. However, there is no way to set that
      parameter from the device tree (e.g. with simple-audio-card or
      qcom sound cards). dpcm_playback/capture are always both set to 1.
      
      This causes problems when the CPU DAI does only support playback
      or capture. Attemting to open that PCM device with an unsupported
      stream type then results in a null pointer dereference:
      
          Unable to handle kernel NULL pointer dereference at virtual address 0000000000000128
          Internal error: Oops: 96000044 [#1] PREEMPT SMP
          CPU: 3 PID: 1582 Comm: arecord Not tainted 5.7.0-rc1
          pc : invalidate_paths_ep+0x30/0xe0
          lr : snd_soc_dapm_dai_get_connected_widgets+0x170/0x1a8
          Call trace:
           invalidate_paths_ep+0x30/0xe0
           snd_soc_dapm_dai_get_connected_widgets+0x170/0x1a8
           dpcm_path_get+0x38/0xd0
           dpcm_fe_dai_open+0x70/0x920
           snd_pcm_open_substream+0x564/0x840
           snd_pcm_open+0xfc/0x228
           snd_pcm_capture_open+0x4c/0x78
           snd_open+0xac/0x1a8
           ...
      
      ... because the DAI playback/capture_widget is not set in that case.
      
      We could add checks there to fix the problem (maybe we should
      anyway), but much easier is to not expose the device as
      playback/capture in the first place. Attemting to use that
      device would always fail later anyway.
      
      Add checks for snd_soc_dai_stream_valid() to the DPCM case
      to avoid exposing playback/capture if it is not supported.
      Signed-off-by: NStephan Gerhold <stephan@gerhold.net>
      Link: https://lore.kernel.org/r/20200415104928.86091-1-stephan@gerhold.netSigned-off-by: NMark Brown <broonie@kernel.org>
      9b5db059
  13. 14 4月, 2020 1 次提交
  14. 01 4月, 2020 1 次提交
  15. 21 3月, 2020 1 次提交
  16. 12 3月, 2020 2 次提交
  17. 11 3月, 2020 1 次提交
  18. 10 3月, 2020 1 次提交
  19. 06 3月, 2020 7 次提交
  20. 05 3月, 2020 2 次提交