1. 09 8月, 2018 5 次提交
  2. 06 8月, 2018 1 次提交
  3. 29 7月, 2018 3 次提交
  4. 26 7月, 2018 2 次提交
    • T
      ALSA: hda - Fix a sparse warning about snd_ctl_elem_iface_t · ebd836ed
      Takashi Iwai 提交于
      The knew->iface field is in snd_ctl_elem_iface_t, which is with
      __bitwise, hence it can't be converted implicitly from integer.
      Give an explicit cast for the invalid type.
      
      Spotted by sparse:
        sound/pci/hda/hda_codec.c:3280:25: warning: restricted snd_ctl_elem_iface_t degrades to integer
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      ebd836ed
    • T
      ALSA: hda/ca0132 - Use NULL instead of 0 · bb86124c
      Takashi Iwai 提交于
      Use NULL for initializing the snd_kcontrol_new.tlv field, instead of
      0, as warned by sparse:
        sound/pci/hda/patch_ca0132.c:5519:22: warning: Using plain integer as NULL pointer
      
      Also, the driver does the same initialization twice, once for
      knew.tlv.c and another for knew.tlv.p while both point to the same
      address (these are union).  Drop the latter superfluous one.
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      bb86124c
  5. 18 7月, 2018 4 次提交
    • T
      ALSA: hda/realtek - Yet another Clevo P950 quirk entry · f3d737b6
      Takashi Iwai 提交于
      The PCI SSID 1558:95e1 needs the same quirk for other Clevo P950
      models, too.  Otherwise no sound comes out of speakers.
      
      Bugzilla: https://bugzilla.opensuse.org/show_bug.cgi?id=1101143
      Cc: <stable@vger.kernel.org>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      f3d737b6
    • T
      ALSA: hda: Make audio component support more generic · a57942bf
      Takashi Iwai 提交于
      This is the final step for more generic support of DRM audio
      component.  The generic audio component code is now moved to its own
      file, and the symbols are renamed from snd_hac_i915_* to
      snd_hdac_acomp_*, respectively.  The generic code is enabled via the
      new kconfig, CONFIG_SND_HDA_COMPONENT, while CONFIG_SND_HDA_I915 is
      kept as the super-class.
      
      Along with the split, three new callbacks are added to audio_ops:
      pin2port is for providing the conversion between the pin number and
      the widget id, and master_bind/master_unbin are called at binding /
      unbinding the master component, respectively.  All these are optional,
      but used in i915 implementation and also other later implementations.
      
      A note about the new snd_hdac_acomp_init() function: there is a slight
      difference between this and the old snd_hdac_i915_init().  The latter
      (still) synchronizes with the master component binding, i.e. it
      assures that the relevant DRM component gets bound when it returns, or
      gives a negative error.  Meanwhile the new function doesn't
      synchronize but just leaves as is.  It's the responsibility by the
      caller's side to synchronize, or the caller may accept the
      asynchronous binding on the fly.
      
      v1->v2: Fix missing NULL check in master_bind/unbind
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      a57942bf
    • T
      ALSA: hda/i915: Associate audio component with devres · 82887c0b
      Takashi Iwai 提交于
      The HD-audio i915 binding code contains a single pointer, hdac_acomp,
      for allowing the access to audio component from the master bind/unbind
      callbacks.  This was needed because the callbacks pass only the device
      pointer and we can't guarantee the object type assigned to the drvdata
      (which is free for each controller driver implementation).
      And this implementation will be a problem if we support multiple
      components for different DRM drivers, not only i915.
      
      As a solution, allocate the audio component object via devres and
      associate it with the given device, so that the component callbacks
      can refer to it via devres_find().
      
      The removal of the object is still done half-manually via
      devres_destroy() to make the code consistent (although it may work
      without the explicit call).
      
      Also, the snd_hda_i915_register_notifier() had the reference to
      hdac_acomp as well.  In this patch, the corresponding code is removed
      by passing hdac_bus object to the function, too.
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      82887c0b
    • T
      drm/i915: Split audio component to a generic type · ae891abe
      Takashi Iwai 提交于
      For allowing other drivers to use the DRM audio component, rename the
      i915_audio_component_* with drm_audio_component_*, and split the
      generic part into drm_audio_component.h.  The i915 specific stuff
      remains in struct i915_audio_component, which contains
      drm_audio_component as the base.
      
      The license of drm_audio_component.h is kept to MIT as same as the the
      original i915_component.h.
      
      This is a preliminary change for further development, and no
      functional changes by this patch itself, merely code-split and
      renames.
      
      v1->v2: Use SPDX for drm_audio_component.h, fix remaining i915
              argument in drm_audio_component.h
      Reviewed-by: NRodrigo Vivi <rodrigo.vivi@intel.com>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      ae891abe
  6. 17 7月, 2018 1 次提交
    • J
      vga_switcheroo: set audio client id according to bound GPU id · 4aaf448f
      Jim Qu 提交于
      On modern laptop, there are more and more platforms
      have two GPUs, and each of them maybe have audio codec
      for HDMP/DP output. For some dGPU which is no output,
      audio codec usually is disabled.
      
      In currect HDA audio driver, it will set all codec as
      VGA_SWITCHEROO_DIS, the audio which is binded to UMA
      will be suspended if user use debugfs to contorl power
      
      In HDA driver side, it is difficult to know which GPU
      the audio has binded to. So set the bound gpu pci dev
      to vga_switcheroo.
      
      if the audio client is not the third registration, audio
      id will set in vga_switcheroo enable function. if the
      audio client is the last registration when vga_switcheroo
      _ready() get true, we should get audio client id from bound
      GPU directly.
      Signed-off-by: NJim Qu <Jim.Qu@amd.com>
      Reviewed-by: NLukas Wunner <lukas@wunner.de>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      4aaf448f
  7. 16 7月, 2018 3 次提交
  8. 12 7月, 2018 2 次提交
  9. 06 7月, 2018 1 次提交
  10. 02 7月, 2018 1 次提交
    • C
      ALSA: hda - Handle pm failure during hotplug · aaa23f86
      Chris Wilson 提交于
      Obtaining the runtime pm wakeref can fail, especially in a hotplug
      scenario where i915.ko has been unloaded. If we do not catch the
      failure, we end up with an unbalanced pm.
      
      v2 additions by tiwai:
      hdmi_present_sense() checks the return value and handle only a
      negative error case and bails out only if it's really still suspended.
      Also, snd_hda_power_down() is called at the error path so that the
      refcount is balanced.
      
      Along with it, the spec->pcm_lock is taken outside
      hdmi_present_sense() in the caller side, so that it won't cause
      deadlock at reentrace via runtime resume.
      
      v3 fix by tiwai:
      Missing linux/pm_runtime.h is included.
      
      References: 222bde03 ("ALSA: hda - Fix mutex deadlock at HDMI/DP hotplug")
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      aaa23f86
  11. 28 6月, 2018 4 次提交
  12. 27 6月, 2018 6 次提交
  13. 25 6月, 2018 7 次提交
    • T
      ALSA: hda/realtek - Apply PRE_PROBE fixup after ALC269 codec variant setups · efe55732
      Takashi Iwai 提交于
      Currently patch_alc269() calls the fixup with HDA_FIXUP_ACT_PRE_PROBE
      before setting up the codec model-specific setups (e.g. setting
      codec_variant or mixer_nid setup).  This is rather confusing as others
      do call the *_PRE_PROBE fixup after such a setup.  Due to this
      disorder, we have to override spec->shutup not at the usual
      HDA_FIXUP_ACT_PRE_PROBE but the unusual HDA_FIXUP_ACT_PROBE time.
      
      This patch corrects the fixup call orders in patch_alc269(), and also
      corrects the action to set up spec->shutup accordingly.
      
      No functional changes but just refactoring.
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      efe55732
    • T
      ALSA: hda/via - Use standard verb containers · f8bfc628
      Takashi Iwai 提交于
      In this patch, the remaining static init verbs in VIA codec driver are
      converted to the standard snd_hda_add_verbs() calls.  The conversion
      is straightforward, but one change to be noted is the place of calls:
      since these verbs are supposed to be executed at the beginning of the
      init / resume procedure, we need to add snd_hda_add_verbs() calls
      before calling the other parsers.
      
      This is merely a cleanup, no functional changes.
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      f8bfc628
    • T
      ALSA: hda/via - Simplify control management · 0e8f9862
      Takashi Iwai 提交于
      This patch replaces the control element creations in VIA codec driver
      with the standard snd_hda_gen_add_kctl() calls as a cleanup.  There
      are two major fields targeted by this patch: the beep controls and
      static init controls.
      
      The former is converted just like other codec drivers do.  The
      spec->beep_amp field can be eliminated by this change as well.
      
      The latter, static init controls, are replaced simply with explicit
      snd_hda_gen_add_kctl() calls.
      
      After these conversions, via_build_controls() becomes superfluous and
      replaced with snd_hda_gen_build_controls(), too.
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      0e8f9862
    • T
      ALSA: hda/via - Rewrite with error goto · fcbdcc1a
      Takashi Iwai 提交于
      Currently VIA codec driver invokes via_free() at each place of the
      error path.  Move the error handling to the end of each function
      commonly and do goto-error as a standard idiom.
      
      This is a preliminary patch for the further cleanups, and no
      functional changes.
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      fcbdcc1a
    • T
      ALSA: hda/cirrus - Simplify creation of new controls · 0785b0ec
      Takashi Iwai 提交于
      This patch moves the mixer creation code in Cirrus codec driver from
      its own build_controls callback to snd_hda_gen_add_kctl() for
      simplification.
      
      As a bonus, this allows us to remove the cs421x_build_controls as it
      becomes identical with snd_hda_gen_build_controls().
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      0785b0ec
    • T
      ALSA: hda/conexant - Clean up beep code · 51e19ca5
      Takashi Iwai 提交于
      Like the previous commit for Realtek codec, the similar cleanup work
      can be applied to Conexant codec, too.  A slight difference is that
      the call of cx_auto_parse_beep() is moved after
      snd_hda_gen_parse_auto_config().  It's not strictly needed, but it'd
      be good to make the creation of such beep mixers at the end, which
      matches with the former situation.
      
      Along with this conversion, cx_auto_build_controls() becomes just
      calling snd_hda_gen_build_controls(), so it's simply replaced with
      snd_hda_gen_build_controls.
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      51e19ca5
    • T
      ALSA: hda/realtek - Use common helper for creating beep controls · fea80fae
      Takashi Iwai 提交于
      In the Realtek codec driver, we used to build kctl elements for beep
      mixer in the own build_controls callback.  This is an open-code and
      can be covered by the standard feature of the generic parser with
      snd_hda_gen_add_kctl() instead.
      
      Also, after the conversion, spec->beep_amp becomes superfluous; hence
      it's removed along with the conversion.
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      fea80fae