Skip to content
  1. Nov 20, 2019
  2. Nov 19, 2019
    • Nikhil Mahale's avatar
      ALSA: hda - Add DP-MST support for NVIDIA codecs · 5398e94f
      Nikhil Mahale authored
      
      
      This patch adds DP-MST support for GK104+ NVIDIA codecs.
      
      GK104+ NVIDIA codecs support DP-MST audio. These codecs have 4
      output converters and 4 pin widgets, with 4 device entries per pin
      widget for a total of 16 device entries.
      
      This patch moves the existing patch_nvhdmi() definition to
      patch_nvhdmi_legacy(), used by pre-GK104 NVIDIA codecs. Redefine
      patch_nvhdmi() to enable DP-MST support by setting codec->dp_mst and
      spec->dyn_pcm_assign.
      
      Introduce fresh logic for dynamic pcm assignment, making
      sure that new pcm assignments are compatible with the legacy static
      per_pin-pmc assignment that existed in the days before DP-MST.
      
      Signed-off-by: default avatarNikhil Mahale <nmahale@nvidia.com>
      Reviewed-by: default avatarAaron Plattner <aplattner@nvidia.com>
      Link: https://lore.kernel.org/r/20191119084710.29267-5-nmahale@nvidia.com
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      5398e94f
    • Nikhil Mahale's avatar
      ALSA: hda - Add DP-MST support for non-acomp codecs · 9c32fea8
      Nikhil Mahale authored
      
      
      This patch make it possible for non-acomp codecs to set
      dyn_pcm_assign/dp_mst and get DP-MST audio support.
      
      Document change notification HDA040-A for the Intel High Definition
      Audio 1.0a specification introduces a Device Select verb for Digital
      Display Pin Widgets that are multi-stream capable. This verb selects
      a Device Entry that is used by subsequent Pin Widget verbs.
      Once the Device Entry is selected, all subsequent Pin Widget verbs
      controlling the sink device will be directed to the selected Device
      Entry until the Device Select verb is updated with a new value.
      
      These Pin Widget verbs include:
      
        * Connection Select
        * Get Connection List Entry
        * Amplifier Gain/Mute
        * Power State
        * Pin Widget Control
        * ELD Data
        * DIP-Size
        * DIP-Index
        * DIP-Data
        * DIP-XmitCtrl
        * Content Protection Control
        * ASP Channel Mapping
      
      This patch adds calls to snd_hda_set_dev_select() to direct each of
      these Pin Widget control verbs to the correct Device Entry.
      
      snd_hda_get_connections() does not return per-device connection
      list, therefore make use snd_hda_get_raw_connections() instead of
      snd_hda_get_connections().
      
      Signed-off-by: default avatarNikhil Mahale <nmahale@nvidia.com>
      Reviewed-by: default avatarAaron Plattner <aplattner@nvidia.com>
      Link: https://lore.kernel.org/r/20191119084710.29267-4-nmahale@nvidia.com
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      9c32fea8
    • Nikhil Mahale's avatar
      ALSA: hda - Add DP-MST jack support · 5204a05d
      Nikhil Mahale authored
      
      
      This patch adds DP-MST jack support which will be used on NVIDIA
      platforms. Today, DP-MST audio is supported only if the codec has
      acomp support. This patch makes it possible to add DP-MST support
      for non-acomp codecs.
      
      For the codecs supporting DP-MST audio, each pin can contain several
      device entries. Each device entry is a virtual pin, described by
      pin_nid and dev_id in struct hdmi_spec_per_pin. For monitor hotplug
      event handling, non-acomp codecs enable and register jack-detection
      for every hdmi_spec_per_pin.
      
      This patch updates every relevant function in hda_jack.h and its
      implementation in hda_jack.c, to consider dev_id along with pin_nid.
      
      Changes to the HD Audio specification to support DP-MST audio are
      described in the Intel Document Change Notification (DCN) number
      HDA040-A.
      
      From HDA040-A, "For the case of multi stream capable Digital Display
      Pin Widget, [the Get Pin Sense verb] can be used to read a specific
      Device Entry state as reported in Get Device List Entry verb." This
      patch updates the read_pin_sense() function to take the dev_id as an
      argument and pass it as a parameter to the Get Pin Sense verb.
      
      Bits 15 through 20 from the Unsolicited Response for intrinsic
      events contain the index of the Device Entry that generated the
      event. This patch updates the Unsolicited Response event handlers to
      extract the device entry index from the response and pass it to
      snd_hda_jack_tbl_get_from_tag().
      
      This patch updates snd_hda_jack_tbl_new() to take a dev_id argument
      and store it in the jack structure, and to make sure not to generate
      a different tag when called more than once for the same nid.
      
      Signed-off-by: default avatarNikhil Mahale <nmahale@nvidia.com>
      Link: https://lore.kernel.org/r/20191119084710.29267-3-nmahale@nvidia.com
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      5204a05d
    • Nikhil Mahale's avatar
      ALSA: hda - Rename snd_hda_pin_sense to snd_hda_jack_pin_sense · 80b917a8
      Nikhil Mahale authored
      
      
      s/snd_hda_pin_sense/snd_hda_jack_pin_sense/g
      
      This aligns the snd_hda_pin_sense function name with the names of
      other functions in hda_jack.h.
      
      Signed-off-by: default avatarNikhil Mahale <nmahale@nvidia.com>
      Reviewed-by: default avatarAaron Plattner <aplattner@nvidia.com>
      Link: https://lore.kernel.org/r/20191119084710.29267-2-nmahale@nvidia.com
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      80b917a8
  3. Nov 15, 2019
  4. Nov 14, 2019
  5. Nov 13, 2019
    • paulhsia's avatar
      ALSA: pcm: Fix stream lock usage in snd_pcm_period_elapsed() · f5cdc9d4
      paulhsia authored
      
      
      If the nullity check for `substream->runtime` is outside of the lock
      region, it is possible to have a null runtime in the critical section
      if snd_pcm_detach_substream is called right before the lock.
      
      Signed-off-by: default avatarpaulhsia <paulhsia@chromium.org>
      Link: https://lore.kernel.org/r/20191112171715.128727-2-paulhsia@chromium.org
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      f5cdc9d4
    • Henry Lin's avatar
      ALSA: usb-audio: not submit urb for stopped endpoint · 52869931
      Henry Lin authored
      
      
      While output urb's snd_complete_urb() is executing, calling
      prepare_outbound_urb() may cause endpoint stopped before
      prepare_outbound_urb() returns and result in next urb submitted
      to stopped endpoint. usb-audio driver cannot re-use it afterwards as
      the urb is still hold by usb stack.
      
      This change checks EP_FLAG_RUNNING flag after prepare_outbound_urb() again
      to let snd_complete_urb() know the endpoint already stopped and does not
      submit next urb. Below kind of error will be fixed:
      
      [  213.153103] usb 1-2: timeout: still 1 active urbs on EP #1
      [  213.164121] usb 1-2: cannot submit urb 0, error -16: unknown error
      
      Signed-off-by: default avatarHenry Lin <henryl@nvidia.com>
      Cc: <stable@vger.kernel.org>
      Link: https://lore.kernel.org/r/20191113021420.13377-1-henryl@nvidia.com
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      52869931
  6. Nov 12, 2019
  7. Nov 11, 2019
  8. Nov 10, 2019
  9. Nov 08, 2019
    • Takashi Iwai's avatar
      ALSA: timer: Fix possible race at assigning a timer instance · 6a34367e
      Takashi Iwai authored
      
      
      When a new timer instance is created and assigned to the active link
      in snd_timer_open(), the caller still doesn't (can't) set its callback
      and callback data.  In both the user-timer and the sequencer-timer
      code, they do manually set up the callbacks after calling
      snd_timer_open().  This has a potential risk of race when the timer
      instance is added to the already running timer target, as the callback
      might get triggered during setting up the callback itself.
      
      This patch tries to address it by changing the API usage slightly:
      
      - An empty timer instance is created at first via the new function
        snd_timer_instance_new().  This object isn't linked to the timer
        list yet.
      - The caller sets up the callbacks and others stuff for the new timer
        instance.
      - The caller invokes snd_timer_open() with this instance, so that it's
        linked to the target timer.
      
      For closing, do similarly:
      
      - Call snd_timer_close().  This unlinks the timer instance from the
        timer list.
      - Free the timer instance via snd_timer_instance_free() after that.
      
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      Link: https://lore.kernel.org/r/20191107192008.32331-4-tiwai@suse.de
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      6a34367e
    • Takashi Iwai's avatar
      ALSA: timer: Make snd_timer_close() returning void · 33bbb8a0
      Takashi Iwai authored
      
      
      The function doesn't return any useful value, so let's make it void to
      be clearer.
      
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      Link: https://lore.kernel.org/r/20191107192008.32331-3-tiwai@suse.de
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      33bbb8a0
    • Takashi Iwai's avatar
      ALSA: timer: Unify master/slave linking code · ebfc6de2
      Takashi Iwai authored
      
      
      The code in both snd_timer_check_master() and snd_timer_check_slave()
      are almost identical, both check whether the master/slave link and
      does linkage.  Factor out the common code and call it from both
      functions for readability.
      
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      Link: https://lore.kernel.org/r/20191107192008.32331-2-tiwai@suse.de
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      ebfc6de2
  10. Nov 07, 2019
    • Takashi Iwai's avatar
      Merge branch 'for-linus' into for-next · 66a8966a
      Takashi Iwai authored
      
      
      Merge 5.4-devel branch for applying the further ALSA timer fixes.
      
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      66a8966a
    • Takashi Iwai's avatar
      Merge tag 'asoc-v5.5' of... · 9ff77597
      Takashi Iwai authored
      Merge tag 'asoc-v5.5' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-next
      
      ASoC: Updates for v5.5
      
      Some big changes in the core but more about cleanps and refactorings
      than new features, plus a collection of new drivers and lots of small
      fixes and improvements to existing ones.
      
       - Lots more cleanups from Morimoto-san.  Now that everything is a
         component this is mostly about refactorings to clarify and simplify
         the core, a combination of things that are no longer required due to
         refactorings and spotting similarities.
       - Many fixes to the Sound Open Firmware code.
       - Wake on voice support for Chromebooks.
       - SPI support for RT5677.
       - New drivers for Analog Devices ADAU7118, Intel Cannonlake systems
         with RT1011 and RT5682, Texas Instruments TAS2562 and TAS2770.
      9ff77597
    • Takashi Iwai's avatar
      Merge tag 'asoc-fix-v5.4-rc6' of... · df37d941
      Takashi Iwai authored
      Merge tag 'asoc-fix-v5.4-rc6' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus
      
      ASoC: Fixes for v5.4
      
      These are a collection of fixes since v5.4-rc4 that have accumilated,
      they're all driver specific and there's nothing major in here so it's
      probably not essential to actually send them but I'll leave that call to
      you.
      df37d941