1. 28 Aug, 2019 3 commits
  2. 27 Aug, 2019 1 commit
    • Takashi Iwai's avatar
      ALSA: hda - Allow runtime PM for controller if component notifier is used · dd23e1d5
      Takashi Iwai authored
      Currently we disallow the runtime PM of the HD-audio controller if
      it's bound with HDMI/DP on Nvidia / AMD unless it's for dGPU.  This is
      for keeping the link up to get the proper notification for ELD
      hotplug.
      
      As explained in the commit 37a3a98e ("ALSA: hda - Enable runtime
      PM only for discrete GPU"), this keep-power-up behavior is rather a
      stop-gap solution until the ELD notification via audio component.
      And now we finally got the audio component for these graphics drivers
      via commit ade49db3 ("ALSA: hda/hdmi - Allow audio component for
      AMD/ATI and Nvidia HDMI"), so it's time to change.
      
      This patch makes HD-audio controller again runtime-suspendable when
      the device gets bound with audio component in HDMI codec driver.  For
      making it easier to access from the codec driver, move the flag into
      the common hda_bus object instead of hda_intel flag.  Also rename it
      to keep_power, to indicate the actual meaning.
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      dd23e1d5
  3. 26 Aug, 2019 3 commits
  4. 25 Aug, 2019 1 commit
    • Takashi Iwai's avatar
      ALSA: usb-audio: Clean up check_input_term() · e0ccdef9
      Takashi Iwai authored
      The primary changes in this patch are cleanups of __check_input_term()
      and move to a non-nested switch-case block by evaluating the pair of
      UAC version and the unit type, as we've done for parse_audio_unit().
      Also each parser is split into the function for readability.
      
      Now, a slight behavior change by this cleanup is the handling of
      processing and extension units.  Formerly we've dealt with them
      differently between UAC1/2 and UAC3; the latter returns an error if no
      input sources are available, while the former continues to parse.
      
      In this patch, unify the behavior in all cases: when input sources are
      available, it parses recursively, then override the type and the id,
      as well as channel information if not provided yet.
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      e0ccdef9
  5. 22 Aug, 2019 8 commits
  6. 21 Aug, 2019 2 commits
    • Takashi Iwai's avatar
      ALSA: line6: Fix memory leak at line6_init_pcm() error path · 1bc8d18c
      Takashi Iwai authored
      I forgot to release the allocated object at the early error path in
      line6_init_pcm().  For addressing it, slightly shuffle the code so
      that the PCM destructor (pcm->private_free) is assigned properly
      before all error paths.
      
      Fixes: 34501219 ("ALSA: line6: Fix write on zero-sized buffer")
      Cc: <stable@vger.kernel.org>
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      1bc8d18c
    • Takashi Iwai's avatar
      ALSA: usb-audio: Fix invalid NULL check in snd_emuusb_set_samplerate() · 6de3c9e3
      Takashi Iwai authored
      The quirk function snd_emuusb_set_samplerate() has a NULL check for
      the mixer element, but this is useless in the current code.  It used
      to be a check against mixer->id_elems[unitid] but it was changed later
      to the value after mixer_eleme_list_to_info() which is always non-NULL
      due to the container_of() usage.
      
      This patch fixes the check before the conversion.
      
      While we're at it, correct a typo in the comment in the function,
      too.
      
      Fixes: 8c558076 ("ALSA: usb-audio: Clean up mixer element list traverse")
      Cc: <stable@vger.kernel.org>
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      6de3c9e3
  7. 20 Aug, 2019 2 commits
  8. 19 Aug, 2019 1 commit
  9. 16 Aug, 2019 2 commits
  10. 15 Aug, 2019 2 commits
  11. 14 Aug, 2019 8 commits
  12. 13 Aug, 2019 2 commits
  13. 12 Aug, 2019 1 commit
    • Takashi Iwai's avatar
      ALSA: hda: Set fifo_size for both playback and capture streams · 7da20788
      Takashi Iwai authored
      Currently we set hdac_stream.fifo_size field only for the playback
      stream by some odd reason I forgot, while this field isn't referred in
      any places.  Actually this fifo_size field would have been required in
      the position report correction for VIA chipset, but due to the lack of
      the fifo_size set for capture streams, snd-hda-intel driver fetches
      the register by itself.
      
      This patch straightens and simplifies the code by setting the
      fifo_size field for both playback and capture streams, and use it in
      the HD-audio controller driver.
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      7da20788
  14. 10 Aug, 2019 1 commit
    • Wenwen Wang's avatar
      ALSA: hda - Fix a memory leak bug · cfef67f0
      Wenwen Wang authored
      In snd_hda_parse_generic_codec(), 'spec' is allocated through kzalloc().
      Then, the pin widgets in 'codec' are parsed. However, if the parsing
      process fails, 'spec' is not deallocated, leading to a memory leak.
      
      To fix the above issue, free 'spec' before returning the error.
      
      Fixes: 352f7f91 ("ALSA: hda - Merge Realtek parser code to generic parser")
      Signed-off-by: default avatarWenwen Wang <wenwen@cs.uga.edu>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      cfef67f0
  15. 09 Aug, 2019 3 commits
    • Tomas Espeleta's avatar
      ALSA: hda - Add a quirk model for fixing Huawei Matebook X right speaker · a2ef03fe
      Tomas Espeleta authored
      [ This is rather a revival of the patch Tomas sent in months ago, but
        applying only with the quirk model option -- tiwai ]
      
      Hard coded coefficients to make Huawuei Matebook X right speaker
      work. The Matebook X has a ALC298, please refer to bug 197801 on
      how these numbers were reverse engineered from the Windows driver
      
      The reversed engineered sequence represents a repeating pattern
      of verbs, and the only values that are changing periodically are
      written on indexes 0x23 and 0x25:
      
      0x500, 0x23
      0x400, VALUE1
      0x500, 0x25
      0x400, VALUE2
      
      * skipped reading sequences (0x500 - 0xc00 sequences are ignored)
      * static values from reverse engineering are used
      
      NOTE: since a significant risk is still considered, this is provided
      as an experimental fix that isn't applied as default for now.  For
      enabling the fix, you'll have to choose huawei-mbx-stereo via model
      option of snd-hda-intel module.
      
      If we get feedback from users that this works stably, we may apply it
      per default.
      
      [ Some coding style fixes and replacement with AC_VERB_* by tiwai ]
      
      BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=197801Signed-off-by: default avatarTomas Espeleta <tomas.espeleta@gmail.com>
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      a2ef03fe
    • Takashi Iwai's avatar
      ALSA: hda - Inform too slow responses · f43ec25a
      Takashi Iwai authored
      For the sake of debugging, show each response that took too long time
      and its corresponding last verb.  Since such an error happens in
      series once when started, use the ratelimited variant for suppressing
      the flood.
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      f43ec25a
    • Takashi Iwai's avatar
      Merge branch 'topic/hda-bus-ops-cleanup' into for-next · 533d7647
      Takashi Iwai authored
      Pull yet another compile error fix in the previous HD-audio patchset.
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      533d7647