1. 22 12月, 2017 1 次提交
    • T
      ALSA: hda: Drop useless WARN_ON() · a36c2638
      Takashi Iwai 提交于
      Since the commit 97cc2ed2 ("ALSA: hda - Fix yet another i915
      pointer leftover in error path") cleared hdac_acomp pointer, the
      WARN_ON() non-NULL check in snd_hdac_i915_register_notifier() may give
      a false-positive warning, as the function gets called no matter
      whether the component is registered or not.  For fixing it, let's get
      rid of the spurious WARN_ON().
      
      Fixes: 97cc2ed2 ("ALSA: hda - Fix yet another i915 pointer leftover in error path")
      Cc: <stable@vger.kernel.org>
      Reported-by: NKouta Okamoto <kouta.okamoto@toshiba.co.jp>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      a36c2638
  2. 19 7月, 2017 1 次提交
    • A
      ALSA: hda: constify pci_device_id. · 6c5a2660
      Arvind Yadav 提交于
      pci_device_id are not supposed to change at runtime. All functions
      working with pci_device_id provided by <linux/pci.h> work with
      const pci_device_id. So mark the non-const structs as const.
      
      File size before:
         text	   data	    bss	    dec	    hex	filename
         2610	    304	      8	   2922	    b6a	sound/hda/hdac_i915.o
      
      File size After adding 'const':
         text	   data	    bss	    dec	    hex	filename
         2674	    240	      8	   2922	    b6a	sound/hda/hdac_i915.o
      Signed-off-by: NArvind Yadav <arvind.yadav.cs@gmail.com>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      6c5a2660
  3. 23 9月, 2016 1 次提交
    • P
      drm/i915/dp: DP audio API changes for MST · f9318941
      Pandiyan, Dhinakaran 提交于
      DP MST provides the capability to send multiple video and audio streams
      through a single port. This requires the API's between i915 and audio
      drivers to distinguish between multiple audio capable displays that can be
      connected to a port. Currently only the port identity is shared in the
      APIs. This patch adds support for MST with an additional parameter
      'int pipe'. The existing parameter 'port' does not change it's meaning.
      
      pipe =
      	MST	: display pipe that the stream originates from
      	Non-MST	: -1
      
      Affected APIs:
      struct i915_audio_component_ops
      -       int (*sync_audio_rate)(struct device *, int port, int rate);
      +	int (*sync_audio_rate)(struct device *, int port, int pipe,
      +	     int rate);
      
      -       int (*get_eld)(struct device *, int port, bool *enabled,
      -                       unsigned char *buf, int max_bytes);
      +       int (*get_eld)(struct device *, int port, int pipe,
      +		       bool *enabled, unsigned char *buf, int max_bytes);
      
      struct i915_audio_component_audio_ops
      -       void (*pin_eld_notify)(void *audio_ptr, int port);
      +       void (*pin_eld_notify)(void *audio_ptr, int port, int pipe);
      
      This patch makes dummy changes in the audio drivers (thanks Libin) for
      build to succeed. The audio side drivers will send the right 'pipe' values
      for MST in patches that will follow.
      
      v2:
      Renamed the new API parameter from 'dev_id' to 'pipe'. (Jim, Ville)
      Included Asoc driver API compatibility changes from Jeeja.
      Added WARN_ON() for invalid pipe in get_saved_encoder(). (Takashi)
      Added comment for av_enc_map[] definition. (Takashi)
      
      v3:
      Fixed logic error introduced while renaming 'dev_id' as 'pipe' (Ville)
      Renamed get_saved_encoder() to get_saved_enc() to reduce line length
      
      v4:
      Rebased.
      Parameter check for pipe < -1 values in get_saved_enc() (Ville)
      Switched to for_each_pipe() in get_saved_enc() (Ville)
      Renamed 'pipe' to 'dev_id' in audio side code (Takashi)
      
      v5:
      Included a comment for the dev_id arg. (Libin)
      Signed-off-by: NDhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
      Reviewed-by: NTakashi Iwai <tiwai@suse.de>
      Reviewed-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Signed-off-by: NRodrigo Vivi <rodrigo.vivi@intel.com>
      Link: http://patchwork.freedesktop.org/patch/msgid/1474488168-2343-1-git-send-email-dhinakaran.pandiyan@intel.com
      f9318941
  4. 26 4月, 2016 1 次提交
    • T
      ALSA: hda - Update BCLK also at hotplug for i915 HSW/BDW · bb03ed21
      Takashi Iwai 提交于
      The recent bug report suggests that BCLK setup for i915 HSW/BDW needs
      to be updated at each HDMI hotplug, not only at initialization and
      resume.  That is, we need to update HSW_EM4 and HSW_EM5 registers at
      ELD notification, too.  Otherwise the HDMI audio may be out of sync
      and played in a wrong pitch.
      
      However, the HDA codec driver has no access to the controller
      registers, and currently the code managing these registers is in
      hda_intel.c, i.e. local to the controller driver.  For allowing the
      explicit BCLK update from the codec driver, as in this patch, the
      former haswell_set_bclk() in hda_intel.c is moved to hdac_i915.c and
      exposed as snd_hdac_i915_set_bclk().  This is called from both the HDA
      controller driver and intel_pin_eld_notify() in HDMI codec driver.
      
      Along with this change, snd_hdac_get_display_clk() gets dropped as
      it's no longer used.
      
      Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=91410
      Cc: <stable@vger.kernel.org> # v4.5+
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      bb03ed21
  5. 04 4月, 2016 1 次提交
    • T
      ALSA: hda - Bind with i915 only when Intel graphics is present · bfa5fb14
      Takashi Iwai 提交于
      On Skylake and onwards, the HD-audio controller driver needs to bind
      with i915 for having the control of power well audio domain before
      actually probing the codec.  This leads to the load of i915 driver
      from the audio driver side.  But, there are systems that have no Intel
      graphics but Nvidia or AMD GPU, although they still use HD-audio bus
      for the onboard audio codecs.  On these, loading the i915 driver is
      nothing but a useless memory and CPU consumption.
      
      A simple way to avoid it is just to look for the Intel graphics PCI
      entry beforehand, and try to bind with i915 only when such an entry is
      found.  Currently, it assumes the PCI display class.  If another class
      appears, this needs to be extended (although it's very unlikely).
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      bfa5fb14
  6. 30 3月, 2016 1 次提交
  7. 29 3月, 2016 1 次提交
  8. 28 3月, 2016 1 次提交
    • T
      ALSA: hda - Add the pin / port mapping on Intel ILK and VLV · d745f5e7
      Takashi Iwai 提交于
      Intel IronLake and ValleyView platforms have different HDMI widget pin
      and digital port mapping from other newer ones.  The recent ones
      (HSW+) have NID 0x05 to 0x07 for port B to port D, while these chips
      have NID 0x04 to 0x06.
      
      For adapting this mapping, pass the codec object instead of the bus
      object to snd_hdac_sync_audio_rate() and snd_hdac_acomp_get_eld() so
      that they can check the codec ID and calculate the mapping properly.
      
      The changes in the HDMI codec driver side will follow in the later
      patch.
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      d745f5e7
  9. 10 3月, 2016 1 次提交
  10. 20 1月, 2016 1 次提交
    • T
      ALSA: hda - Degrade i915 binding failure message · bed2e98e
      Takashi Iwai 提交于
      Currently HD-audio driver on Intel Skylake or Broxteon gives an error
      message when binding with i915 audio component fails.  However, this
      isn't any serious error on a system without Intel graphics.  Indeed
      there are such systems, where a third-party codec (e.g. Creative) is
      put on the mobo while using other discrete GPU (e.g. Nvidia).
      Printing a kernel "error" message is overreaction in such a case.
      
      This patch downgrades the print level for that message.  For systems
      that mandate the i915 binding (e.g. Haswell or Broadwell HDMI/DP),
      another kernel error message is shown in addition to make clear what
      went wrong.
      
      Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=111021Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      bed2e98e
  11. 10 12月, 2015 1 次提交
  12. 28 10月, 2015 1 次提交
  13. 02 9月, 2015 1 次提交
  14. 20 7月, 2015 1 次提交
    • D
      ALSA: hda - Fix Skylake codec timeout · 033ea349
      David Henningsson 提交于
      When the controller is powered up but the HDMI codec is powered down
      on Skylake, the power well is turned off. When the codec is then
      powered up again, we need to poke the codec a little extra to make
      sure it wakes up. Otherwise we'll get sad "no response from codec"
      messages and broken audio.
      
      This also changes azx_runtime_resume to actually call
      snd_hdac_set_codec_wakeup for Skylake (before STATETS read).
      (Otherwise it would only have been called for Haswell and Broadwell,
      which both do not need it, so this probably was not the author's
      intention.)
      Signed-off-by: NDavid Henningsson <david.henningsson@canonical.com>
      Reviewed-by: NLibin Yang <libin.yang@intel.com>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      033ea349
  15. 10 6月, 2015 1 次提交
  16. 20 5月, 2015 1 次提交
    • M
      ALSA: hda - Move hda_i915.c from sound/pci/hda to sound/hda · 98d8fc6c
      Mengdong Lin 提交于
      The file is moved to hda core and renamed to hdac_i915.c, so can be used
      by both legacy HDA driver and new Skylake audio driver.
      
      - Add snd_hdac_ prefix to the public APIs.
      - The i915 audio component is moved to core bus and dynamically allocated.
      - A static pointer hdac_acomp is used to help bind/unbind callbacks to get
        this component, because the sound card's private_data is used by the azx
        chip pointer, which is a legacy structure. It could be removed if private
        _data changes to some core structure which can be extended to find the
        bus.
      - snd_hdac_get_display_clk() is added to get the display core clock for
        HSW/BDW.
      - haswell_set_bclk() is moved to hda_intel.c because it needs to write the
        controller registers EM4/EM5, and only legacy HD-A needs it for HSW/BDW.
      - Move definition of HSW/BDW-specific registers EM4/EM5 to hda_register.h
        and rename them to HSW_EM4/HSW_EM5, because other HD-A controllers have
        different layout for the extended mode registers.
      Signed-off-by: NMengdong Lin <mengdong.lin@intel.com>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      98d8fc6c