1. 16 8月, 2019 3 次提交
  2. 06 3月, 2019 1 次提交
    • D
      ALSA: compress: prevent potential divide by zero bugs · e7b2f9f2
      Dan Carpenter 提交于
      [ Upstream commit 678e2b44c8e3fec3afc7202f1996a4500a50be93 ]
      
      The problem is seen in the q6asm_dai_compr_set_params() function:
      
      	ret = q6asm_map_memory_regions(dir, prtd->audio_client, prtd->phys,
      				       (prtd->pcm_size / prtd->periods),
                                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      				       prtd->periods);
      
      In this code prtd->pcm_size is the buffer_size and prtd->periods comes
      from params->buffer.fragments.  If we allow the number of fragments to
      be zero then it results in a divide by zero bug.  One possible fix would
      be to use prtd->pcm_count directly instead of using the division to
      re-calculate it.  But I decided that it doesn't really make sense to
      allow zero fragments.
      Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com>
      Signed-off-by: NMark Brown <broonie@kernel.org>
      Signed-off-by: NSasha Levin <sashal@kernel.org>
      e7b2f9f2
  3. 03 8月, 2018 1 次提交
    • T
      ALSA: compress: Remove empty init and exit · a6403299
      Takashi Iwai 提交于
      For a sake of code simplification, remove the init and the exit
      entries that do nothing.
      
      Notes for readers: actually it's OK to remove *both* init and exit,
      but not OK to remove the exit entry.  By removing only the exit while
      keeping init, the module becomes permanently loaded; i.e. you cannot
      unload it any longer!
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      a6403299
  4. 28 5月, 2018 1 次提交
  5. 12 2月, 2018 1 次提交
    • L
      vfs: do bulk POLL* -> EPOLL* replacement · a9a08845
      Linus Torvalds 提交于
      This is the mindless scripted replacement of kernel use of POLL*
      variables as described by Al, done by this script:
      
          for V in IN OUT PRI ERR RDNORM RDBAND WRNORM WRBAND HUP RDHUP NVAL MSG; do
              L=`git grep -l -w POLL$V | grep -v '^t' | grep -v /um/ | grep -v '^sa' | grep -v '/poll.h$'|grep -v '^D'`
              for f in $L; do sed -i "-es/^\([^\"]*\)\(\<POLL$V\>\)/\\1E\\2/" $f; done
          done
      
      with de-mangling cleanups yet to come.
      
      NOTE! On almost all architectures, the EPOLL* constants have the same
      values as the POLL* constants do.  But they keyword here is "almost".
      For various bad reasons they aren't the same, and epoll() doesn't
      actually work quite correctly in some cases due to this on Sparc et al.
      
      The next patch from Al will sort out the final differences, and we
      should be all done.
      Scripted-by: NAl Viro <viro@zeniv.linux.org.uk>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      a9a08845
  6. 28 11月, 2017 1 次提交
  7. 18 9月, 2017 1 次提交
  8. 17 9月, 2016 1 次提交
  9. 22 8月, 2016 1 次提交
  10. 13 6月, 2016 1 次提交
    • C
      ALSA: compress: Add function to indicate the stream has gone bad · a4f2d87c
      Charles Keepax 提交于
      Currently, the avail IOCTL doesn't pass any error status, which
      means typically on error it simply shows no data available. This
      can lead to situations where user-space is waiting indefinitely
      for data that will never come as the DSP has suffered an
      unrecoverable error.
      
      Add snd_compr_stop_error which end drivers can call to indicate
      the stream has suffered an unrecoverable error and stop it. The
      avail and poll IOCTLs are then updated to report if the stream is
      in an error state to user-space. Allowing the error to propagate
      out. Processing of the actual snd_compr_stop needs to be deferred
      to a worker thread as the end driver may detect the errors during
      an existing operation callback.
      Signed-off-by: NCharles Keepax <ckeepax@opensource.wolfsonmicro.com>
      Acked-by: NVinod Koul <vinod.koul@intel.com>
      Signed-off-by: NMark Brown <broonie@kernel.org>
      a4f2d87c
  11. 09 5月, 2016 4 次提交
  12. 05 3月, 2016 3 次提交
  13. 04 3月, 2016 1 次提交
  14. 26 1月, 2016 1 次提交
    • T
      ALSA: compress: Disable GET_CODEC_CAPS ioctl for some architectures · 462b3f16
      Takashi Iwai 提交于
      Some architectures like PowerPC can handle the maximum struct size in
      an ioctl only up to 13 bits, and struct snd_compr_codec_caps used by
      SNDRV_COMPRESS_GET_CODEC_CAPS ioctl overflows this limit.  This
      problem was revealed recently by a powerpc change, as it's now treated
      as a fatal build error.
      
      This patch is a stop-gap for that: for architectures with less than 14
      bit ioctl struct size, get rid of the handling of the relevant ioctl.
      We should provide an alternative equivalent ioctl code later, but for
      now just paper over it.  Luckily, the compress API hasn't been used on
      such architectures, so the impact must be effectively zero.
      Reviewed-by: NMark Brown <broonie@kernel.org>
      Acked-by: NSudip Mukherjee <sudipm.mukherjee@gmail.com>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      462b3f16
  15. 07 12月, 2015 1 次提交
  16. 30 11月, 2015 2 次提交
  17. 03 2月, 2015 1 次提交
    • T
      ALSA: Simplify snd_device_register() variants · 40a4b263
      Takashi Iwai 提交于
      Now that all callers have been replaced with
      snd_device_register_for_dev(), let's drop the obsolete device
      registration code and concentrate only on the code handling struct
      device directly.  That said,
      
      - remove the old snd_device_register(),
      - rename snd_device_register_for_dev() with snd_device_register(),
      - drop superfluous arguments from snd_device_register(),
      - change snd_unregister_device() to pass the device pointer directly
      Reviewed-by: NJaroslav Kysela <perex@perex.cz>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      40a4b263
  18. 02 2月, 2015 1 次提交
  19. 16 7月, 2014 1 次提交
  20. 19 3月, 2014 1 次提交
  21. 05 1月, 2014 1 次提交
  22. 12 11月, 2013 1 次提交
  23. 07 11月, 2013 1 次提交
    • V
      ALSA: compress: fix drain calls blocking other compress functions (v6) · f44f2a54
      Vinod Koul 提交于
      The drain and drain_notify callback were blocked by low level driver
      until the draining was complete. Due to this being invoked with big
      fat mutex held, others ops like reading timestamp, calling pause, drop
      were blocked.
      
      So to fix this we add a new snd_compr_drain_notify() API. This would
      be required to be invoked by low level driver when drain or partial
      drain has been completed by the DSP. Thus we make the drain and
      partial_drain callback as non blocking and driver returns immediately
      after notifying DSP.  The waiting is done while releasing the lock so
      that other ops can go ahead.
      
      [ The commit 917f4b5c was wrongly applied from the preliminary
        patch.  This commit corrects to the final version.
        Sorry for inconvenience!  -- tiwai ]
      Signed-off-by: NVinod Koul <vinod.koul@intel.com>
      CC: stable@vger.kernel.org
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      f44f2a54
  24. 24 10月, 2013 1 次提交
    • V
      ALSA: compress: fix drain calls blocking other compress functions · 917f4b5c
      Vinod Koul 提交于
      The drain and drain_notify callback were blocked by low level driver untill the
      draining was complete. Due to this being invoked with big fat mutex held, others
      ops like reading timestamp, calling pause, drop were blocked.
      
      So to fix this we add a new snd_compr_drain_notify() API. This would be required
      to be invoked by low level driver when drain or partial drain has been completed
      by the DSP. Thus we make the drain and partial_drain callback as non blocking
      and driver returns immediately after notifying DSP.
      The waiting is done while relasing the lock so that other ops can go ahead.
      Signed-off-by: NVinod Koul <vinod.koul@intel.com>
      CC: stable@vger.kernel.org
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      917f4b5c
  25. 26 9月, 2013 1 次提交
  26. 20 9月, 2013 1 次提交
  27. 29 7月, 2013 1 次提交
  28. 29 4月, 2013 1 次提交
  29. 22 4月, 2013 2 次提交
  30. 21 4月, 2013 2 次提交