1. 18 Jan, 2021 3 commits
    • Takashi Iwai's avatar
      ALSA: usb-audio: Avoid implicit feedback on Pioneer devices · 532a208a
      Takashi Iwai authored
      For addressing the regression on Pioneer devices, we recently
      corrected the quirk code to enable the implicit feedback mode on those
      devices properly.  However, the devices still showed problems with the
      full duplex operations with JACK, and after debug sessions, we figured
      out that the older kernels that had worked with JACK also didn't use
      the implicit feedback mode at all although they had the quirk code to
      enable it; instead, the old code worked just to skip the normal sync
      endpoint setup that would have been detected without it.  IOW, what
      broke without the implicit-fb quirk in the past was the application of
      the normal sync endpoint that is actually the capture data endpoint on
      these devices.
      
      This patch covers the overseen piece: it modifies the quirk code again
      not to enable the implicit feedback mode but just to make the driver
      skipping the sync endpoint detection.  This made the driver working
      with JACK full-duplex mode again.
      
      Still it's not quite clear why the implicit feedback doesn't work on
      those devices yet; maybe it's about some issues in the URB setup.  But
      at least, with this patch, the driver should work in the level of the
      older kernels again.
      
      Fixes: 167c9dc8 ("ALSA: usb-audio: Fix implicit feedback sync setup for Pioneer devices")
      Link: https://lore.kernel.org/r/20210118075816.25068-4-tiwai@suse.deSigned-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      532a208a
    • Takashi Iwai's avatar
      ALSA: usb-audio: Set sample rate for all sharing EPs on UAC1 · 3784d449
      Takashi Iwai authored
      The UAC2/3 sample rate setup is based on the clock node, which is
      usually shared in the interface, and can't be re-setup without
      deselecting the interface once, and that's how the current code
      behaves.  OTOH, the sample rate setup of UAC1 is per endpoint, hence
      we basically need to call for each endpoint usage even if those share
      the same interface.
      
      This patch fixes the behavior of UAC1 to call always
      snd_usb_init_sample_rate() in snd_usb_endpoint_configure().
      
      Fixes: bf6313a0 ("ALSA: usb-audio: Refactor endpoint management")
      Link: https://lore.kernel.org/r/20210118075816.25068-3-tiwai@suse.deSigned-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      3784d449
    • Takashi Iwai's avatar
      ALSA: usb-audio: Fix UAC1 rate setup for secondary endpoints · 87cb9af9
      Takashi Iwai authored
      The current sample rate setup function for UAC1 assumes only the first
      endpoint retrieved from the interface:altset pair, but the rate set up
      may be needed also for the secondary endpoint.  Also, retrieving the
      endpoint number from the interface descriptor is redundant; we have
      already the target endpoint in the given audioformat object.
      
      This patch simplifies the code and corrects the target endpoint as
      described in the above.  It simply refers to fmt->endpoint directly.
      
      Also, this patch drops the pioneer_djm_set_format_quirk() that is
      caleld from snd_usb_set_format_quirk(); this function does the sample
      rate setup but for the capture endpoint (0x82), and that's exactly
      what the change above fixes.
      
      Link: https://lore.kernel.org/r/20210118075816.25068-2-tiwai@suse.deSigned-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      87cb9af9
  2. 15 Jan, 2021 2 commits
  3. 14 Jan, 2021 2 commits
  4. 13 Jan, 2021 2 commits
  5. 12 Jan, 2021 6 commits
  6. 08 Jan, 2021 5 commits
    • Takashi Iwai's avatar
      ALSA: usb-audio: Fix implicit feedback sync setup for Pioneer devices · 167c9dc8
      Takashi Iwai authored
      Pioneer devices have both playback and capture streams sharing the
      same iface/altsetting, and those need to be paired as implicit
      feedback.  Instead of a half-baked (and broken) static quirk entry,
      set up more generically for those devices by checking the number of
      endpoints and the attribute of the secondary EP.
      
      Fixes: bf6313a0 ("ALSA: usb-audio: Refactor endpoint management")
      Reported-by: default avatarFrantišek Kučera <konference@frantovo.cz>
      Link: https://lore.kernel.org/r/20210108075219.21463-6-tiwai@suse.deSigned-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      167c9dc8
    • Takashi Iwai's avatar
      ALSA: usb-audio: Annotate the endpoint index in audioformat · eae4d054
      Takashi Iwai authored
      There are devices that have multiple endpoints sharing the same
      iface/altset not only for sync but also for the actual streams, and
      the audioformat for such an endpoint needs to be handled with the
      proper endpoint index; otherwise it confuses the endpoint management.
      
      This patch extends the audioformat to annotate the endpoint index, and
      put the proper ep_idx=1 to Pioneer device quirk entries accordingly.
      
      Fixes: bf6313a0 ("ALSA: usb-audio: Refactor endpoint management")
      Link: https://lore.kernel.org/r/20210108075219.21463-5-tiwai@suse.deSigned-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      eae4d054
    • Takashi Iwai's avatar
      ALSA: usb-audio: Avoid unnecessary interface re-setup · 00272c61
      Takashi Iwai authored
      The current endpoint handling assumed (more or less) a unique 1:1
      relation between the endpoint and the iface/altset.  The exception was
      the sync EP without the implicit feedback which has usually the
      secondary EP of the same altset.  This works fine for most devices,
      but it turned out that some unusual devices like Pinoeer's ones have
      both playback and capture endpoints in the same iface/altsetting and
      use both for the implicit feedback mode.  For handling such a case, we
      need to extend the endpoint management to take the shared interface
      into account.
      
      This patch does that: it adds a new object snd_usb_iface_ref for
      managing the reference counts of the each USB interface that is used
      by each endpoint.  The interface setup is performed only once for the
      (sharing) endpoints, and the doubly initialization is avoided.
      
      Along with this, the resource release of endpoints and interface
      refcounts are put into a single function, snd_usb_endpoint_free_all()
      instead of looping in the caller side.
      
      Fixes: bf6313a0 ("ALSA: usb-audio: Refactor endpoint management")
      Link: https://lore.kernel.org/r/20210108075219.21463-4-tiwai@suse.deSigned-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      00272c61
    • Takashi Iwai's avatar
      ALSA: usb-audio: Choose audioformat of a counter-part substream · 5d15f1eb
      Takashi Iwai authored
      The implicit feedback mode needs to handle two endpoints and the
      choice of the audioformat object for the sync EP is important since
      this determines the compatibility of the hw_params.  The current code
      uses the same audioformat object if both the main EP and the sync EP
      point to the same iface/altsetting.  This was done in consideration of
      the non-implicit-fb sync EP handling, and it doesn't match well with
      the cases where actually to endpoints are defined in the sameiface /
      altsetting like a few Pioneer devices.
      
      Modify snd_usb_find_implicit_fb_sync_format() to pick up the
      audioformat that is assigned in the counter-part substreams primarily,
      so that the actual capture stream can be opened properly.  We keep the
      same audioformat object only as a fallback in case nothing found,
      though.
      
      Fixes: 9fddc15e ("ALSA: usb-audio: Factor out the implicit feedback quirk code")
      Link: https://lore.kernel.org/r/20210108075219.21463-3-tiwai@suse.deSigned-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      5d15f1eb
    • Takashi Iwai's avatar
      ALSA: usb-audio: Fix the missing endpoints creations for quirks · b2345a8a
      Takashi Iwai authored
      The recent change in the endpoint management moved the endpoint object
      creation from the stream open time to the parser of the audio
      descriptor.  It works fine for the standard audio, but it overlooked
      the other places that create audio streams via quirks
      (QUIRK_AUDIO_FIXED_ENDPOINT) like the reported a few Pioneer devices;
      those call snd_usb_add_audio_stream() manually, hence they miss the
      endpoints, eventually resulting in the error at opening streams.
      Moreover, now the sync EP setup was moved to the explicit call of
      snd_usb_audioformat_set_sync_ep(), and this needs to be added for
      those places, too.
      
      This patch addresses those regressions for quirks.  It adds a local
      helper function add_audio_stream_from_fixed_fmt(), which does the all
      needed tasks, and replaces the calls of snd_usb_add_audio_stream()
      with this new function.
      
      Fixes: 54cb3190 ("ALSA: usb-audio: Create endpoint objects at parsing phase")
      Reported-by: default avatarFrantišek Kučera <konference@frantovo.cz>
      Link: https://lore.kernel.org/r/20210108075219.21463-2-tiwai@suse.deSigned-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      b2345a8a
  7. 07 Jan, 2021 2 commits
  8. 04 Jan, 2021 1 commit
    • Takashi Iwai's avatar
      ALSA: hda/via: Fix runtime PM for Clevo W35xSS · 4bfd6247
      Takashi Iwai authored
      Clevo W35xSS_370SS with VIA codec has had the runtime PM problem that
      looses the power state of some nodes after the runtime resume.  This
      was worked around by disabling the default runtime PM via a denylist
      entry.  Since 5.10.x made the runtime PM applied (casually) even
      though it's disabled in the denylist, this problem was revisited.  The
      result was that disabling power_save_node feature suffices for the
      runtime PM problem.
      
      This patch implements the disablement of power_save_node feature in
      VIA codec for the device.  It also drops the former denylist entry,
      too, as the runtime PM should work in the codec side properly now.
      
      Fixes: b529ef24 ("ALSA: hda: Add Clevo W35xSS_370SS to the power_save blacklist")
      Reported-by: default avatarChristian Labisch <clnetbox@gmail.com>
      Cc: <stable@vger.kernel.org>
      Link: https://lore.kernel.org/r/20210104153046.19993-1-tiwai@suse.deSigned-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      4bfd6247
  9. 03 Jan, 2021 1 commit
  10. 01 Jan, 2021 1 commit
  11. 31 Dec, 2020 4 commits
  12. 29 Dec, 2020 1 commit
  13. 28 Dec, 2020 4 commits
  14. 27 Dec, 2020 6 commits