1. 08 2月, 2016 1 次提交
    • T
      ALSA: dummy: Implement timer backend switching more safely · ddce57a6
      Takashi Iwai 提交于
      Currently the selected timer backend is referred at any moment from
      the running PCM callbacks.  When the backend is switched, it's
      possible to lead to inconsistency from the running backend.  This was
      pointed by syzkaller fuzzer, and the commit [7ee96216: ALSA:
      dummy: Disable switching timer backend via sysfs] disabled the dynamic
      switching for avoiding the crash.
      
      This patch improves the handling of timer backend switching.  It keeps
      the reference to the selected backend during the whole operation of an
      opened stream so that it won't be changed by other streams.
      
      Together with this change, the hrtimer parameter is reenabled as
      writable now.
      
      NOTE: this patch also turned out to fix the still remaining race.
      Namely, ops was still replaced dynamically at dummy_pcm_open:
      
        static int dummy_pcm_open(struct snd_pcm_substream *substream)
        {
        ....
                dummy->timer_ops = &dummy_systimer_ops;
                if (hrtimer)
                        dummy->timer_ops = &dummy_hrtimer_ops;
      
      Since dummy->timer_ops is common among all streams, and when the
      replacement happens during accesses of other streams, it may lead to a
      crash.  This was actually triggered by syzkaller fuzzer and KASAN.
      
      This patch rewrites the code not to use the ops shared by all streams
      any longer, too.
      
      BugLink: http://lkml.kernel.org/r/CACT4Y+aZ+xisrpuM6cOXbL21DuM0yVxPYXf4cD4Md9uw0C3dBQ@mail.gmail.comReported-by: NDmitry Vyukov <dvyukov@google.com>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      ddce57a6
  2. 28 1月, 2016 1 次提交
  3. 31 12月, 2015 1 次提交
  4. 29 5月, 2015 1 次提交
  5. 26 5月, 2015 1 次提交
    • T
      ALSA: dummy: make local data static · e4c28688
      Takashi Iwai 提交于
      Add missing prefix to make some local data static.
      
      Spotted by sparse:
        sound/drivers/dummy.c:159:20: warning: symbol 'model_emu10k1' was not declared. Should it be static?
        sound/drivers/dummy.c:165:20: warning: symbol 'model_rme9652' was not declared. Should it be static?
        ....
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      e4c28688
  6. 19 1月, 2015 1 次提交
  7. 20 10月, 2014 1 次提交
  8. 12 2月, 2014 1 次提交
  9. 21 7月, 2013 1 次提交
  10. 29 5月, 2013 1 次提交
  11. 07 12月, 2012 1 次提交
  12. 21 10月, 2012 1 次提交
  13. 09 8月, 2012 1 次提交
  14. 03 7月, 2012 1 次提交
  15. 02 7月, 2012 1 次提交
  16. 19 12月, 2011 1 次提交
  17. 01 11月, 2011 1 次提交
  18. 03 2月, 2010 1 次提交
  19. 02 11月, 2009 1 次提交
  20. 30 10月, 2009 1 次提交
  21. 09 9月, 2009 1 次提交
  22. 08 9月, 2009 1 次提交
  23. 07 9月, 2009 1 次提交
    • T
      ALSA: dummy - Fake buffer allocations · a68c4d11
      Takashi Iwai 提交于
      Instead of allocating the real buffers, use a fake buffer and ignore
      read/write in the dummy driver so that we can save the resources.
      For mmap, a single page (unique to the direction, though) is reused
      to all buffers.
      
      When the app requires to read/write the real buffers, pass fake_buffer=0
      module option at loading time.  This will get back to the old behavior.
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      a68c4d11
  24. 04 9月, 2009 1 次提交
  25. 03 9月, 2009 2 次提交
    • T
      ALSA: dummy - Better jiffies handling · b142037b
      Takashi Iwai 提交于
      In the system-timer mode, snd-dummy driver issues each tick to update
      the position.  This is highly inefficient and even inaccurate if the
      timer can't be triggered at each tick.
      
      Now rewritten to wake up only at the period boundary.  The position
      is calculated from the current jiffies.
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      b142037b
    • T
      ALSA: dummy - Support high-res timer mode · c631d03c
      Takashi Iwai 提交于
      Allow snd-dummy driver to use high-res timer as its timing source
      instead of the system timer.  The new module option "hrtimer" is added
      to turn on/off the high-res timer support.  It can be switched even
      dynamically via sysfs.
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      c631d03c
  26. 12 1月, 2009 1 次提交
  27. 19 10月, 2008 1 次提交
  28. 15 8月, 2008 2 次提交
  29. 13 8月, 2008 1 次提交
  30. 24 4月, 2008 3 次提交
  31. 01 2月, 2008 1 次提交
    • T
      [ALSA] Remove sound/driver.h · 9004acc7
      Takashi Iwai 提交于
      This header file exists only for some hacks to adapt alsa-driver
      tree.  It's useless for building in the kernel.  Let's move a few
      lines in it to sound/core.h and remove it.
      With this patch, sound/driver.h isn't removed but has just a single
      compile warning to include it.  This should be really killed in
      future.
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      Signed-off-by: NJaroslav Kysela <perex@perex.cz>
      9004acc7
  32. 16 10月, 2007 2 次提交
  33. 20 7月, 2007 1 次提交
  34. 14 2月, 2007 1 次提交
    • P
      [ALSA] Fix __devinit and __devexit issues with sound drivers · 788c6043
      Prarit Bhargava 提交于
      Fix __devinit and __devexit issues with sound drivers.
      Resolves MODPOST warnings similar to:
      WARNING: sound/drivers/snd-dummy.o - Section mismatch: reference to .init.text:snd_dummy_probe from .data.rel.local between 'snd_dummy_driver' (at offset 0x0) and 'snd_dummy_controls'
      WARNING: sound/drivers/snd-mtpav.o - Section mismatch: reference to .init.text:snd_mtpav_probe from .data.rel.local between 'snd_mtpav_driver' (at offset 0x0) and 'snd_mtpav_input'
      WARNING: sound/drivers/snd-virmidi.o - Section mismatch: reference to .init.text:snd_virmidi_probe from .data.rel.local after 'snd_virmidi_driver' (at offset 0x0)
      Signed-off-by: NPrarit Bhargava <prarit@redhat.com>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      Signed-off-by: NJaroslav Kysela <perex@suse.cz>
      788c6043
  35. 09 2月, 2007 1 次提交