1. 08 2月, 2017 1 次提交
    • T
      ALSA: seq: Fix race at creating a queue · 4842e98f
      Takashi Iwai 提交于
      When a sequencer queue is created in snd_seq_queue_alloc(),it adds the
      new queue element to the public list before referencing it.  Thus the
      queue might be deleted before the call of snd_seq_queue_use(), and it
      results in the use-after-free error, as spotted by syzkaller.
      
      The fix is to reference the queue object at the right time.
      Reported-by: NDmitry Vyukov <dvyukov@google.com>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      4842e98f
  2. 07 2月, 2017 1 次提交
  3. 06 2月, 2017 1 次提交
  4. 10 1月, 2017 1 次提交
  5. 09 1月, 2017 1 次提交
  6. 07 1月, 2017 2 次提交
  7. 05 1月, 2017 6 次提交
    • P
      ASoC: Intel: bytcr-rt5640: fix settings in internal clock mode · 60448b07
      Pierre-Louis Bossart 提交于
      Frequency value of zero did not make sense, use same 24.576MHz
      setting and only change the clock source in idle mode
      Suggested-by: NBard Liao <bardliao@realtek.com>
      Signed-off-by: NPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
      Signed-off-by: NMark Brown <broonie@kernel.org>
      60448b07
    • T
      Revert "ALSA: firewire-lib: change structure member with proper type" · e4f34cf6
      Takashi Sakamoto 提交于
      This reverts commit 6b7e95d1. This commit
      is based on a concern about value of the given parameter. It's expected
      to be ORed value with some enumeration-constants, thus often it can not be
      one of the enumeration-constants. I understood that this is out of
      specification and causes implementation-dependent issues.
      
      In C language specification, enumerated type can be interpreted as an
      integer type, in which all of enumeration-constants in corresponding
      enumerator-list can be stored. Implementations can select one of char,
      signed int and unsigned int as its type, and this selection is
      implementation-dependent.
      
      In GCC, a signed integer is selected when at least one of
      enumeration-constants has negative value, else an unsigned integer is
      selected. This behaviour can be switched by -fshort-enums to short type.
      Anyway, the type can be decided after scanning all of
      enumeration-constants.
      
      Totally, there's no rules to constrain the value of enumerated type to
      be one of enumeration-constants. In short, in enumerated type, decision
      of actual type for the type is the most important and
      enumeration-constants are just used for the decision, thus it's permitted
      to have an integer value in a range of enumeration-constants. In our case,
      actual type for the type is currently deterministic to be either char or
      unsigned int. Under GCC, it's unsigned int.
      Signed-off-by: NTakashi Sakamoto <o-takashi@sakamocchi.jp>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      e4f34cf6
    • I
      ALSA: usb-audio: test EP_FLAG_RUNNING at urb completion · 13a6c832
      Ioan-Adrian Ratiu 提交于
      Testing EP_FLAG_RUNNING in snd_complete_urb() before running the completion
      logic allows us to save a few cpu cycles by returning early, skipping the
      pending urb in case the stream was stopped; the stop logic handles the urb
      and sets the completion callbacks to NULL.
      Signed-off-by: NIoan-Adrian Ratiu <adi@adirat.com>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      13a6c832
    • I
      ALSA: usb-audio: Fix irq/process data synchronization · 1d0f9530
      Ioan-Adrian Ratiu 提交于
      Commit 16200948 ("ALSA: usb-audio: Fix race at stopping the stream") was
      incomplete causing another more severe kernel panic, so it got reverted.
      This fixes both the original problem and its fallout kernel race/crash.
      
      The original fix is to move the endpoint member NULL clearing logic inside
      wait_clear_urbs() so the irq triggering the urb completion doesn't call
      retire_capture/playback_urb() after the NULL clearing and generate a panic.
      
      However this creates a new race between snd_usb_endpoint_start()'s call
      to wait_clear_urbs() and the irq urb completion handler which again calls
      retire_capture/playback_urb() leading to a new NULL dereference.
      
      We keep the EP deactivation code in snd_usb_endpoint_start() because
      removing it will break the EP reference counting (see [1] [2] for info),
      however we don't need the "can_sleep" mechanism anymore because a new
      function was introduced (snd_usb_endpoint_sync_pending_stop()) which
      synchronizes pending stops and gets called inside the pcm prepare callback.
      
      It also makes sense to remove can_sleep because it was also removed from
      deactivate_urbs() signature in [3] so we benefit from more simplification.
      
      [1] commit 015618b9 ("ALSA: snd-usb: Fix URB cancellation at stream start")
      [2] commit e9ba389c ("ALSA: usb-audio: Fix scheduling-while-atomic bug in PCM capture stream")
      [3] commit ccc1696d ("ALSA: usb-audio: simplify endpoint deactivation code")
      
      Fixes: f8114f85 ("Revert "ALSA: usb-audio: Fix race at stopping the stream"")
      Signed-off-by: NIoan-Adrian Ratiu <adi@adirat.com>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      1d0f9530
    • T
      ALSA: hda - Apply asus-mode8 fixup to ASUS X71SL · c7efff92
      Takashi Iwai 提交于
      Although the old quirk table showed ASUS X71SL with ALC663 codec being
      compatible with asus-mode3 fixup, the bugzilla reporter explained that
      asus-model8 fits better for the dual headphone controls.  So be it.
      
      Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=191781
      Cc: <stable@vger.kernel.org>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      c7efff92
    • C
      ASoC: fsl_ssi: set fifo watermark to more reliable value · 4ee437fb
      Caleb Crome 提交于
      The fsl_ssi fifo watermark is by default set to 2 free spaces (i.e.
      activate DMA on FIFO when only 2 spaces are left.)  This means the
      DMA must service the fifo within 2 audio samples, which is just not
      enough time  for many use cases with high data rate.  In many
      configurations the audio channel slips (causing l/r swap in stereo
      configurations, or channel slipping in multi-channel configurations).
      
      This patch gives more breathing room and allows the SSI to operate
      reliably by changing the fifio refill watermark to 8.
      
      There is no change in behavior for older chips (with an 8-deep fifo).
      Only the newer chips with a 15-deep fifo get the new behavior. I
      suspect a new fifo depth setting could be optimized on the older
      chips too, but I have not tested.
      Signed-off-by: NCaleb Crome <caleb@crome.org>
      Reviewed-by: NFabio Estevam <fabio.estevam@nxp.com>
      Signed-off-by: NMark Brown <broonie@kernel.org>
      4ee437fb
  8. 04 1月, 2017 1 次提交
  9. 03 1月, 2017 3 次提交
  10. 01 1月, 2017 5 次提交
  11. 26 12月, 2016 2 次提交
    • T
      ktime: Cleanup ktime_set() usage · 8b0e1953
      Thomas Gleixner 提交于
      ktime_set(S,N) was required for the timespec storage type and is still
      useful for situations where a Seconds and Nanoseconds part of a time value
      needs to be converted. For anything where the Seconds argument is 0, this
      is pointless and can be replaced with a simple assignment.
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      Cc: Peter Zijlstra <peterz@infradead.org>
      8b0e1953
    • T
      ktime: Get rid of the union · 2456e855
      Thomas Gleixner 提交于
      ktime is a union because the initial implementation stored the time in
      scalar nanoseconds on 64 bit machine and in a endianess optimized timespec
      variant for 32bit machines. The Y2038 cleanup removed the timespec variant
      and switched everything to scalar nanoseconds. The union remained, but
      become completely pointless.
      
      Get rid of the union and just keep ktime_t as simple typedef of type s64.
      
      The conversion was done with coccinelle and some manual mopping up.
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      Cc: Peter Zijlstra <peterz@infradead.org>
      2456e855
  12. 25 12月, 2016 2 次提交
  13. 22 12月, 2016 1 次提交
  14. 20 12月, 2016 1 次提交
  15. 19 12月, 2016 1 次提交
    • P
      ASoC: Intel: bytcr_rt5640: fallback mechanism if MCLK is not enabled · 4a8b3a68
      Pierre-Louis Bossart 提交于
      Commit df1a2776 ("ASoC: Intel: bytcr_rt5640: add MCLK support")
      was merged but the corresponding clock framework patches have not,
      after being bumped from audio to clock to x86 domains. The missing
      clock-related patches result in a regression starting with 4.9 with
      the audio card not being created.
      
      Rather than reverting this commit and all following updates already
      queued up for 4.10, handle run-time dependency on MCLK and fall back
      to the previous bit-clock mode. This provides the same functionality
      as in 4.8 for Baytrail devices. On Baytrail-CR most devices remain
      silent with this fallback but additional patches are needed anyway.
      As suggested by Mark Brown, the fallback is only allowed with -ENOENT,
      all other run-time errors, including -EPROBE_DEFER, will stop the probe
      with no sound card registered.
      
      This patch should be applied to -stable as well as ASoC 4.10 fixes
      Signed-off-by: NPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
      Signed-off-by: NMark Brown <broonie@kernel.org>
      4a8b3a68
  16. 15 12月, 2016 2 次提交
  17. 14 12月, 2016 1 次提交
    • J
      ASoC: dwc: Fix PIO mode initialization · 6fce983f
      Jose Abreu 提交于
      We can no longer rely on the return value of
      devm_snd_dmaengine_pcm_register(...) to check if the DMA
      handle is declared in the DT.
      
      Previously this check activated PIO mode but currently
      dma_request_chan returns either a valid channel or -EPROBE_DEFER.
      
      In order to activate PIO mode check instead if the interrupt
      line is declared. This reflects better what is documented in
      the DT bindings (see Documentation/devicetree/bindings/sound/
      designware-i2s.txt).
      
      Also, initialize use_pio variable which was never being set
      causing PIO mode to never work.
      Signed-off-by: NJose Abreu <joabreu@synopsys.com>
      Signed-off-by: NMark Brown <broonie@kernel.org>
      6fce983f
  18. 13 12月, 2016 4 次提交
  19. 12 12月, 2016 2 次提交
  20. 09 12月, 2016 2 次提交