1. 06 Feb, 2020 1 commit
  2. 05 Feb, 2020 1 commit
  3. 04 Feb, 2020 3 commits
  4. 02 Feb, 2020 4 commits
  5. 01 Feb, 2020 4 commits
  6. 31 Jan, 2020 1 commit
    • Takashi Iwai's avatar
      ALSA: pcm: Fix sparse warnings wrt snd_pcm_state_t · cb639a42
      Takashi Iwai authored
      Since we have a bitwise definition of snd_pcm_state_t and use it for
      certain struct fields, a few new (and years old) sparse warnings came
      up.  This patch is an attempt to cover them.
      
      - The state fields in snd_pcm_mmap_status* and co are all defined as
        snd_pcm_state_t type now
      
      - The PCM action callbacks take snd_pcm_state_t argument as well;
        some actions taking special values got the explicit cast and
        comments
      
      - For the PCM action that doesn't need an extra argument receives
        ACTION_ARG_IGNORE instead of ambiguous 0
      
      While we're at it, the boolean argument is also properly changed to
      bool and true/false, as well as a slight refactoring of PCM pause
      helper function to make easier to read.
      
      No functional changes, just shutting up chatty sparse.
      
      Fixes: 46b770f7 ("ALSA: uapi: Fix sparse warning")
      Reported-by: default avatarkbuild test robot <lkp@intel.com>
      Link: https://lore.kernel.org/r/20200131152214.11698-1-tiwai@suse.deSigned-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      cb639a42
  7. 29 Jan, 2020 7 commits
  8. 28 Jan, 2020 1 commit
    • Mohan Kumar's avatar
      ALSA: hda: Reset stream if DMA RUN bit not cleared · 7faa26c1
      Mohan Kumar authored
      Tegra HDA has FIFO size which can hold upto 10 audio frames to support
      DVFS. When HDA DMA RUN bit is set to 0 to stop the stream, the DMA RUN
      bit will be cleared to 0 only after transferring all the remaining audio
      frames queued up in the fifo. This is not in sync with spec which states
      the controller will stop transmitting(output) in the beginning of the
      next frame for the relevant stream.
      
      The above behavior with Tegra HDA was resulting in machine check error
      during the system suspend flow with active audio playback with below kernel
      error logs.
      [ 33.524583] mc-err: [mcerr] (hda) csr_hdar: EMEM address decode error
      [ 33.531088] mc-err: [mcerr] status = 0x20000015; addr = 0x00000000
      [ 33.537431] mc-err: [mcerr] secure: no, access-type: read, SMMU fault: none
      
      This was due to the fifo has more than one audio frame when the DMA
      RUN bit is set to 0 during system suspend flow and the timeout handling in
      snd_hdac_stream_sync() was not designed to handle this scenario. So the
      DMA will continue running even after timeout hit until all remaining
      audio frames in the fifo are transferred, but the suspend flow will try
      to reset the controller and turn off the hda clocks without the knowledge
      of the DMA is still running and could result in mc-err.
      
      The above issue can be resolved by doing stream reset with the help of
      snd_hdac_stream_reset() which would ensure the DMA RUN bit is cleared
      if the timeout was hit in snd_hdac_stream_sync().
      Signed-off-by: default avatarMohan Kumar <mkumard@nvidia.com>
      Link: https://lore.kernel.org/r/20200128051508.26064-1-mkumard@nvidia.comSigned-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      7faa26c1
  9. 27 Jan, 2020 11 commits
  10. 26 Jan, 2020 3 commits
  11. 24 Jan, 2020 2 commits
    • Nathan Chancellor's avatar
      ASoC: rt1015: Remove unnecessary const · e91440dd
      Nathan Chancellor authored
      Clang warns:
      
      ../sound/soc/codecs/rt1015.c:392:14: warning: duplicate 'const'
      declaration specifier [-Wduplicate-decl-specifier]
      static const SOC_ENUM_SINGLE_DECL(rt1015_boost_mode_enum, 0, 0,
                   ^
      ../include/sound/soc.h:355:2: note: expanded from macro
      'SOC_ENUM_SINGLE_DECL'
              SOC_ENUM_DOUBLE_DECL(name, xreg, xshift, xshift, xtexts)
              ^
      ../include/sound/soc.h:352:2: note: expanded from macro
      'SOC_ENUM_DOUBLE_DECL'
              const struct soc_enum name = SOC_ENUM_DOUBLE(xreg, xshift_l, xshift_r, \
              ^
      1 warning generated.
      
      Remove the const after static to fix it.
      
      Fixes: df310074 ("ASoC: rt1015: add rt1015 amplifier driver")
      Link: https://github.com/ClangBuiltLinux/linux/issues/845Signed-off-by: default avatarNathan Chancellor <natechancellor@gmail.com>
      Link: https://lore.kernel.org/r/20200124155750.33753-1-natechancellor@gmail.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
      e91440dd
    • Marek Szyprowski's avatar
      ASoC: max98090: silence lockdep warning · 3a6adf32
      Marek Szyprowski authored
      Commit 08df0d9a ("ASoC: max98090: revert "ASoC: max98090: fix lockdep
      warning"") provided a good rationale for removing separate lock for the
      SHDN register access. However it restored the lockdep warning during the
      system boot. To silence the lockdep warning, mark the mutex taken in the
      max98090_shdn_save() function with the lockdep class dedicated for the
      runtime DAPM operations: SND_SOC_DAPM_CLASS_RUNTIME. This finally fixes
      the following lockdep warning observed on Exynos4412-based Odroid U3
      board:
      
      ======================================================
      WARNING: possible circular locking dependency detected
      5.5.0-rc7-next-20200123 #7329 Not tainted
      ------------------------------------------------------
      alsactl/1105 is trying to acquire lock:
      ed4f7cf4 (&card->dapm_mutex){+.+.}, at: max98090_shdn_save+0x1c/0x28
      
      but task is already holding lock:
      edb8d49c (&card->controls_rwsem){++++}, at: snd_ctl_ioctl+0xcc/0xbb8
      
      which lock already depends on the new lock.
      
      the existing dependency chain (in reverse order) is:
      
      -> #1 (&card->controls_rwsem){++++}:
             snd_ctl_add_replace+0x3c/0x84
             dapm_create_or_share_kcontrol+0x24c/0x2e0
             snd_soc_dapm_new_widgets+0x308/0x594
             snd_soc_bind_card+0x834/0xa94
             devm_snd_soc_register_card+0x34/0x6c
             odroid_audio_probe+0x288/0x34c
             platform_drv_probe+0x6c/0xa4
             really_probe+0x200/0x48c
             driver_probe_device+0x78/0x1f8
             bus_for_each_drv+0x74/0xb8
             __device_attach+0xd4/0x16c
             bus_probe_device+0x88/0x90
             deferred_probe_work_func+0x3c/0xd0
             process_one_work+0x230/0x7bc
             worker_thread+0x44/0x524
             kthread+0x130/0x164
             ret_from_fork+0x14/0x20
             0x0
      
      -> #0 (&card->dapm_mutex){+.+.}:
             lock_acquire+0xe8/0x270
             __mutex_lock+0x9c/0xb18
             mutex_lock_nested+0x1c/0x24
             max98090_shdn_save+0x1c/0x28
             max98090_put_enum_double+0x20/0x40
             snd_ctl_ioctl+0x190/0xbb8
             ksys_ioctl+0x484/0xb10
             ret_fast_syscall+0x0/0x28
             0xbede0564
      
      other info that might help us debug this:
      
       Possible unsafe locking scenario:
      
             CPU0                    CPU1
             ----                    ----
        lock(&card->controls_rwsem);
                                     lock(&card->dapm_mutex);
                                     lock(&card->controls_rwsem);
        lock(&card->dapm_mutex);
      
       *** DEADLOCK ***
      
      1 lock held by alsactl/1105:
       #0: edb8d49c (&card->controls_rwsem){++++}, at: snd_ctl_ioctl+0xcc/0xbb8
      
      stack backtrace:
      CPU: 2 PID: 1105 Comm: alsactl Not tainted 5.5.0-rc7-next-20200123 #7329
      Hardware name: Samsung Exynos (Flattened Device Tree)
      [<c01126f0>] (unwind_backtrace) from [<c010e1e8>] (show_stack+0x10/0x14)
      [<c010e1e8>] (show_stack) from [<c0b5234c>] (dump_stack+0xb4/0xe0)
      [<c0b5234c>] (dump_stack) from [<c018a610>] (check_noncircular+0x1ec/0x208)
      [<c018a610>] (check_noncircular) from [<c018ca2c>] (__lock_acquire+0x1210/0x25ec)
      [<c018ca2c>] (__lock_acquire) from [<c018e728>] (lock_acquire+0xe8/0x270)
      [<c018e728>] (lock_acquire) from [<c0b71928>] (__mutex_lock+0x9c/0xb18)
      [<c0b71928>] (__mutex_lock) from [<c0b723c0>] (mutex_lock_nested+0x1c/0x24)
      [<c0b723c0>] (mutex_lock_nested) from [<c086097c>] (max98090_shdn_save+0x1c/0x28)
      [<c086097c>] (max98090_shdn_save) from [<c08613f8>] (max98090_put_enum_double+0x20/0x40)
      [<c08613f8>] (max98090_put_enum_double) from [<c0833f20>] (snd_ctl_ioctl+0x190/0xbb8)
      [<c0833f20>] (snd_ctl_ioctl) from [<c02cae14>] (ksys_ioctl+0x484/0xb10)
      [<c02cae14>] (ksys_ioctl) from [<c0101000>] (ret_fast_syscall+0x0/0x28)
      Exception stack(0xed331fa8 to 0xed331ff0)
      ...
      
      Fixes: 08df0d9a ("ASoC: max98090: revert "ASoC: max98090: fix lockdep warning"")
      Signed-off-by: default avatarMarek Szyprowski <m.szyprowski@samsung.com>
      Reviewed-by: default avatarTzung-Bi Shih <tzungbi@google.com>
      Link: https://lore.kernel.org/r/20200123134046.9769-1-m.szyprowski@samsung.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
      3a6adf32
  12. 23 Jan, 2020 2 commits