1. 22 Apr, 2023 8 commits
  2. 21 Apr, 2023 4 commits
  3. 19 Apr, 2023 2 commits
  4. 18 Apr, 2023 1 commit
  5. 11 Apr, 2023 1 commit
  6. 08 Apr, 2023 1 commit
    • Oswald Buddenhagen's avatar
      ALSA: pcm: fix wait_time calculations · 3ed2b549
      Oswald Buddenhagen authored
      ... in wait_for_avail() and snd_pcm_drain().
      
      t was calculated in seconds, so it would be pretty much always zero, to
      be subsequently de-facto ignored due to being max(t, 10)'d. And then it
      (i.e., 10) would be treated as secs, which doesn't seem right.
      
      However, fixing it to properly calculate msecs would potentially cause
      timeouts when using twice the period size for the default timeout (which
      seems reasonable to me), so instead use the buffer size plus 10 percent
      to be on the safe side ... but that still seems insufficient, presumably
      because the hardware typically needs a moment to fire up. To compensate
      for this, we up the minimal timeout to 100ms, which is still two orders
      of magnitude less than the bogus minimum.
      
      substream->wait_time was also misinterpreted as jiffies, despite being
      documented as being in msecs. Only the soc/sof driver sets it - to 500,
      which looks very much like msecs were intended.
      
      Speaking of which, shouldn't snd_pcm_drain() also use substream->
      wait_time?
      
      As a drive-by, make the debug messages on timeout less confusing.
      Signed-off-by: default avatarOswald Buddenhagen <oswald.buddenhagen@gmx.de>
      Link: https://lore.kernel.org/r/20230405201219.2197774-1-oswald.buddenhagen@gmx.deSigned-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      3ed2b549
  7. 06 Apr, 2023 3 commits
  8. 30 Mar, 2023 1 commit
  9. 29 Mar, 2023 8 commits
  10. 24 Mar, 2023 8 commits
  11. 22 Mar, 2023 1 commit
  12. 21 Mar, 2023 2 commits
    • Takashi Iwai's avatar
      ALSA: usb-audio: Fix recursive locking at XRUN during syncing · 8c721c53
      Takashi Iwai authored
      The recent support of low latency playback in USB-audio driver made
      the snd_usb_queue_pending_output_urbs() function to be called via PCM
      ack ops.  In the new code path, the function is performed already in
      the PCM stream lock.  The problem is that, when an XRUN is detected,
      the function calls snd_pcm_xrun() to notify, but snd_pcm_xrun() is
      supposed to be called only outside the stream lock.  As a result, it
      leads to a deadlock of PCM stream locking.
      
      For avoiding such a recursive locking, this patch adds an additional
      check to the code paths in PCM core that call the ack callback; now it
      checks the error code from the callback, and if it's -EPIPE, the XRUN
      is handled in the PCM core side gracefully.  Along with it, the
      USB-audio driver code is changed to follow that, i.e. -EPIPE is
      returned instead of the explicit snd_pcm_xrun() call when the function
      is performed already in the stream lock.
      
      Fixes: d5f871f8 ("ALSA: usb-audio: Improved lowlatency playback support")
      Reported-and-tested-by: default avatarJohn Keeping <john@metanate.com>
      Link: https://lore.kernel.org/r/20230317195128.3911155-1-john@metanate.comReviewed-by: default avatarJaroslav Kysela <perex@perex.cz>
      Reviewed-by; Takashi Sakamoto <o-takashi@sakamocchi.jp>
      Link: https://lore.kernel.org/r/20230320142838.494-1-tiwai@suse.deSigned-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      8c721c53
    • Takashi Iwai's avatar
      ALSA: hda/conexant: Partial revert of a quirk for Lenovo · b871cb97
      Takashi Iwai authored
      The recent commit f83bb259 ("ALSA: hda/conexant: Add quirk for
      LENOVO 20149 Notebook model") introduced a quirk for the device with
      17aa:3977, but this caused a regression on another model (Lenovo
      Ideadpad U31) with the very same PCI SSID.  And, through skimming over
      the net, it seems that this PCI SSID is used for multiple different
      models, so it's no good idea to apply the quirk with the SSID.
      
      Although we may take a different ID check (e.g. the codec SSID instead
      of the PCI SSID), unfortunately, the original patch author couldn't
      identify the hardware details any longer as the machine was returned,
      and we can't develop the further proper fix.
      
      In this patch, instead, we partially revert the change so that the
      quirk won't be applied as default for addressing the regression.
      Meanwhile, the quirk function itself is kept, and it's now made to be
      applicable via the explicit model=lenovo-20149 option.
      
      Fixes: f83bb259 ("ALSA: hda/conexant: Add quirk for LENOVO 20149 Notebook model")
      Reported-by: default avatarJetro Jormalainen <jje-lxkl@jetro.fi>
      Link: https://lore.kernel.org/r/20230308215009.4d3e58a6@mopti
      Cc: <stable@vger.kernel.org>
      Link: https://lore.kernel.org/r/20230320140954.31154-1-tiwai@suse.deSigned-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      b871cb97