1. 25 8月, 2019 1 次提交
    • T
      ALSA: usb-audio: Clean up check_input_term() · e0ccdef9
      Takashi Iwai 提交于
      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: NTakashi Iwai <tiwai@suse.de>
      e0ccdef9
  2. 22 8月, 2019 9 次提交
  3. 21 8月, 2019 1 次提交
    • T
      ALSA: usb-audio: Fix invalid NULL check in snd_emuusb_set_samplerate() · 6de3c9e3
      Takashi Iwai 提交于
      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: NTakashi Iwai <tiwai@suse.de>
      6de3c9e3
  4. 20 8月, 2019 3 次提交
  5. 16 8月, 2019 4 次提交
  6. 15 8月, 2019 5 次提交
  7. 14 8月, 2019 3 次提交
  8. 13 8月, 2019 3 次提交
  9. 10 8月, 2019 1 次提交
    • W
      ALSA: hda - Fix a memory leak bug · cfef67f0
      Wenwen Wang 提交于
      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: NWenwen Wang <wenwen@cs.uga.edu>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      cfef67f0
  10. 09 8月, 2019 9 次提交
  11. 08 8月, 2019 1 次提交
    • T
      ASoC: SOF: Intel: Initialize hdaudio bus properly · d4ff1b39
      Takashi Iwai 提交于
      The SOF HD-audio bus has its house-made initialization code.  It's
      supposedly for making the code independent from HD-audio bus drivers.
      However, this is error-prone, and above all, the SOF driver has
      already dependency on HD-audio bus driver when CONFIG_SND_SOF_HDA is
      set.  That is, if this Kconfig is set, there is no reason to avoid the
      call to the proper bus init function.
      
      Also, the ext_ops that is set at bus initialization can be better
      handled inside sof_hda_bus_init().  We don't need to refer this
      outside the bus initialization.
      
      So this patch addresses these issues:
      - sof_hda_bus_init() calls nothing but snd_hdac_ext_bus_init()
        when CONFIG_SND_SOF_HDA is set.  Otherwise some fields are
        initialized locally like before for avoiding the dependency.
      - ext_ops is referred inside sof_hda_bus_init().  The ext_ops argument
        of snd_hda_bus_init() is dropped.
      Acked-by: NMark Brown <broonie@kernel.org>
      Reviewed-by: NPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      d4ff1b39