1. 27 6月, 2022 1 次提交
  2. 24 12月, 2021 1 次提交
  3. 30 11月, 2021 2 次提交
    • A
      ASoC: Intel: Skylake: Use NHLT API to search for blob · 322fa431
      Amadeusz Sławiński 提交于
      With NHLT enriched with new search functions, remove local code in
      favour of them. This also fixes broken behaviour: search should be based
      on significant bits count rather than container size.
      Signed-off-by: NAmadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
      Signed-off-by: NCezary Rojewski <cezary.rojewski@intel.com>
      Acked-by: NMark Brown <broonie@kernel.org>
      Link: https://lore.kernel.org/r/20211126140355.1042684-4-cezary.rojewski@intel.comSigned-off-by: NTakashi Iwai <tiwai@suse.de>
      322fa431
    • T
      ALSA: hda: Make proper use of timecounter · 6dd21ad8
      Thomas Gleixner 提交于
      HDA uses a timecounter to read a hardware clock running at 24 MHz. The
      conversion factor is set with a mult value of 125 and a shift value of 0,
      which is not converting the hardware clock to nanoseconds, it is converting
      to 1/3 nanoseconds because the conversion factor from 24Mhz to nanoseconds
      is 125/3. The usage sites divide the "nanoseconds" value returned by
      timecounter_read() by 3 to get a real nanoseconds value.
      
      There is a lengthy comment in azx_timecounter_init() explaining this
      choice. That comment makes blatantly wrong assumptions about how
      timecounters work and what can overflow.
      
      The comment says:
      
           * Applying the 1/3 factor as part of the multiplication
           * requires at least 20 bits for a decent precision, however
           * overflows occur after about 4 hours or less, not a option.
      
      timecounters operate on time deltas between two readouts of a clock and use
      the mult/shift pair to calculate a precise nanoseconds value:
      
          delta_nsec = (delta_clock * mult) >> shift;
      
      The fractional part is also taken into account and preserved to prevent
      accumulated rounding errors. For details see cyclecounter_cyc2ns().
      
      The mult/shift pair has to be chosen so that the multiplication of the
      maximum expected delta value does not result in a 64bit overflow. As the
      counter wraps around on 32bit, the maximum observable delta between two
      reads is (1 << 32) - 1 which is about 178.9 seconds.
      
      That in turn means the maximum multiplication factor which fits into an u32
      will not cause a 64bit overflow ever because it's guaranteed that:
      
           ((1 << 32) - 1) ^ 2 < (1 << 64)
      
      The resulting correct multiplication factor is 2796202667 and the shift
      value is 26, i.e. 26 bit precision. The overflow of the multiplication
      would happen exactly at a clock readout delta of 6597069765 which is way
      after the wrap around of the hardware clock at around 274.8 seconds which
      is off from the claimed 4 hours by more than an order of magnitude.
      
      If the counter ever wraps around the last read value then the calculation
      is off by the number of wrap arounds times 178.9 seconds because the
      overflow cannot be observed.
      
      Use clocks_calc_mult_shift(), which calculates the most accurate mult/shift
      pair based on the given clock frequency, and remove the bogus comment along
      with the divisions at the readout sites.
      
      Fixes: 5d890f59 ("ALSA: hda: support for wallclock timestamps")
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      Reviewed-by: NPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
      Link: https://lore.kernel.org/r/871r35kwji.ffs@tglxSigned-off-by: NTakashi Iwai <tiwai@suse.de>
      6dd21ad8
  4. 23 8月, 2021 1 次提交
  5. 30 7月, 2021 1 次提交
  6. 26 10月, 2020 1 次提交
  7. 24 8月, 2020 1 次提交
  8. 31 7月, 2020 1 次提交
    • J
      ASoC: Intel: drop unnecessary list_empty · a383308e
      Julia Lawall 提交于
      list_for_each_entry_safe is able to handle an empty list.
      The only effect of avoiding the loop is not initializing the
      index variable.
      Drop list_empty tests in cases where these variables are not
      used.
      
      Note that list_for_each_entry_safe is defined in terms of
      list_first_entry, which indicates that it should not be used on an
      empty list.  But in list_for_each_entry_safe, the element obtained by
      list_first_entry is not really accessed, only the address of its
      list_head field is compared to the address of the list head, so the
      list_first_entry is safe.
      
      The semantic patch that makes this change is as follows (with another
      variant for the no brace case): (http://coccinelle.lip6.fr/)
      
      <smpl>
      @@
      expression x,e;
      iterator name list_for_each_entry_safe;
      statement S;
      identifier i,j;
      @@
      -if (!(list_empty(x))) {
         list_for_each_entry_safe(i,j,x,...) S
      - }
       ... when != i
           when != j
      (
        i = e;
      |
      ? j = e;
      )
      </smpl>
      Signed-off-by: NJulia Lawall <Julia.Lawall@inria.fr>
      Link: https://lore.kernel.org/r/1595761112-11003-2-git-send-email-Julia.Lawall@inria.frSigned-off-by: NMark Brown <broonie@kernel.org>
      a383308e
  9. 27 7月, 2020 1 次提交
  10. 27 3月, 2020 1 次提交
  11. 25 2月, 2020 1 次提交
  12. 12 12月, 2019 2 次提交
  13. 11 12月, 2019 1 次提交
  14. 10 11月, 2019 2 次提交
  15. 08 10月, 2019 1 次提交
  16. 25 7月, 2019 2 次提交
  17. 25 6月, 2019 4 次提交
  18. 20 6月, 2019 1 次提交
  19. 07 6月, 2019 1 次提交
  20. 05 6月, 2019 1 次提交
  21. 08 4月, 2019 1 次提交
    • R
      ASoC: core: conditionally increase module refcount on component open · b4ed6b51
      Ranjani Sridharan 提交于
      Recently, for Intel platforms the "ignore_module_refcount" field
      was introduced for the component driver. In order to avoid a
      deadlock preventing the PCI modules from being removed
      even when the card was idle, the refcounts were not incremented
      for the device driver module during component probe.
      
      However, this change introduced a nasty side effect:
      the device driver module can be unloaded while a pcm stream is open.
      
      This patch proposes to change the field to be renamed as
      "module_get_upon_open". When this field is set, the module
      refcount should be incremented on pcm open amd decremented
      upon pcm close. This will enable modules to be removed
      when no PCM playback/capture happens and prevent removal
      when the component is actually in use.
      
      Also, align with the skylake component driver with the new name.
      
      Fixes: b450b878('ASoC: core: don't increase component module refcount
                       unconditionally'
      Signed-off-by: NRanjani Sridharan <ranjani.sridharan@linux.intel.com>
      Acked-by: NPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
      Signed-off-by: NMark Brown <broonie@kernel.org>
      b4ed6b51
  22. 05 4月, 2019 1 次提交
  23. 12 3月, 2019 1 次提交
  24. 09 2月, 2019 1 次提交
  25. 07 2月, 2019 1 次提交
  26. 04 1月, 2019 1 次提交
  27. 05 10月, 2018 1 次提交
  28. 29 8月, 2018 1 次提交
  29. 28 6月, 2018 1 次提交
  30. 18 6月, 2018 1 次提交
  31. 18 4月, 2018 2 次提交
  32. 17 4月, 2018 1 次提交