1. 07 3月, 2016 5 次提交
  2. 04 3月, 2016 2 次提交
  3. 01 3月, 2016 1 次提交
  4. 23 2月, 2016 1 次提交
  5. 19 2月, 2016 1 次提交
  6. 09 2月, 2016 1 次提交
    • T
      ALSA: hda - Fix bad dereference of jack object · 2ebab40e
      Takashi Iwai 提交于
      The hda_jack_tbl entries are managed by snd_array for allowing
      multiple jacks.  It's good per se, but the problem is that struct
      hda_jack_callback keeps the hda_jack_tbl pointer.  Since snd_array
      doesn't preserve each pointer at resizing the array, we can't keep the
      original pointer but have to deduce the pointer at each time via
      snd_array_entry() instead.  Actually, this resulted in the deference
      to the wrong pointer on codecs that have many pins such as CS4208.
      
      This patch replaces the pointer to the NID value as the search key.
      As an unexpected good side effect, this even simplifies the code, as
      only NID is needed in most cases.
      
      Cc: <stable@vger.kernel.org>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      2ebab40e
  7. 05 2月, 2016 1 次提交
  8. 03 2月, 2016 1 次提交
  9. 29 1月, 2016 9 次提交
  10. 14 1月, 2016 1 次提交
  11. 10 12月, 2015 5 次提交
    • T
      ALSA: hda - Move audio component accesses to hdac_i915.c · e2dc7d7d
      Takashi Iwai 提交于
      A couple of i915_audio_component ops have been added and accessed
      directly from patch_hdmi.c.  Ideally all these should be factored out
      into hdac_i915.c.
      
      This patch does it, adds two new helper functions for setting N/CTS
      and fetching ELD bytes.  One bonus is that the hackish widget vs port
      mapping is also moved to hdac_i915.c, so that it can be fixed /
      enhanced more cleanly.
      Reviewed-by: NVinod Koul <vinod.koul@intel.com>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      e2dc7d7d
    • T
      ALSA: hda - Use component ops for i915 HDMI/DP audio jack handling · 788d441a
      Takashi Iwai 提交于
      Since we have a new audio component ops to fetch the current ELD and
      state now, we can reduce the usage of unsol event of HDMI/DP pins.
      The unsol event isn't only unreliable, but it also needs the power
      up/down of the codec and link at each time, which is a significant
      power and time loss.
      
      In this patch, the jack creation and unsol/jack event handling are
      modified to use the audio component for the dedicated Intel chips.
      
      The jack handling got slightly more codes than a simple usage of
      hda_jack layer since we need to deal directly with snd_jack object;
      the hda_jack layer is basically designed for the pin sense read and
      unsol events, both of which aren't used any longer in our case.
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      788d441a
    • T
      ALSA: hda - Fix superfluous HDMI jack repoll · 9a5e5234
      Takashi Iwai 提交于
      The recent commit [e90247f9: ALSA: hda - Split ELD update code
      from hdmi_present_sense()] rewrote the HDMI jack handling code, but a
      slight behavior change sneaked in unexpectedly.  When the jack isn't
      connected, it tries repoll unnecessarily.
      
      This patch addresses the flaw, to the right behavior as before.
      
      Fixes: e90247f9 ('ALSA: hda - Split ELD update code from hdmi_present_sense()')
      Reported-and-tested-by: NDavid Henningsson <david.henningsson@canonical.com>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      9a5e5234
    • T
      ALSA: hda - Allow i915 binding later in codec driver · 55913110
      Takashi Iwai 提交于
      Due to the recent change, HDA controller driver for Intel PCH tries to
      bind i915 audio component always at the probe time no matter whether
      HDMI/DP codec is found.  This is, however, superflulous for old
      chipsets (e.g. on IVB) where they don't have always the HDMI/DP codecs
      but  often have only a discrete GPU instead.
      
      For the newer chipsets, we need already the i915 binding from the
      beginning due to power well control.  Meanwhile, for older chipsets
      where we don't need power well, we don't need the i915 binding at the
      controller level.
      
      This patch removes again the i915 binding in the HDA controller driver
      for old Intel PCHs, but adds the binding in HDMI/DP codec driver
      instead.  This allows still the use of the direct notification from
      the graphics driver while we can avoid the unnecessary load of i915
      driver for machines only with another GPU.
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      55913110
    • T
      ALSA: hda - Optimize audio component check in patch_hdmi.c · f4e3040b
      Takashi Iwai 提交于
      The audio component is enabled only when CONFIG_SND_HDA_I915 is set.
      Give a dummy macro for allowing the compiler optimize out the relevant
      codes when this Kconfig isn't set.
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      f4e3040b
  12. 04 12月, 2015 4 次提交
    • T
      ALSA: hda - Enable audio component for old Intel PCH devices · 6603249d
      Takashi Iwai 提交于
      As i915 graphics driver provides the notification via audio component,
      not only the currently implemented HSW+ and VLV+ platforms but also
      all other PCH-based platforms (e.g. Cougar Point, Panther  Point, etc)
      can use this infrastructure.  It'll improve the reliability and the
      power consumption significantly, especially once when we implement the
      ELD notification via component.  As a preliminary, this patch enables
      the usage of audio component for all PCH platforms.
      
      The HDA controller just needs to set AZX_DCAPS_I915_POWERWELL flag
      appropriately.  The name of the flag is a bit confusing, but this
      actually works even on the chips without the powerwell but accesses
      only the other component ops.
      
      In the HDMI/DP codec driver side, we just need to register/unregister
      the notifier for such chips.  This can be identified by checking the
      audio_component field in the assigned hdac_bus.
      
      One caveat is that PCH for Haswell and Broadwell must not be bound
      with i915 audio component, as there are dedicated HD-audio HDMI
      controllers on these platforms.  Ditto for Poulsbo and Oaktrail as
      they use gma500 graphics, not i915.
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      6603249d
    • T
      ALSA: hda - Split ELD update code from hdmi_present_sense() · e90247f9
      Takashi Iwai 提交于
      This is a preliminary patch for the later change to support ELD/jack
      handling with i915 audio component.  This splits the ELD update code
      from hdmi_present_sense() so that it can be called from other places.
      
      Just a code refactoring, no functional change.
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      e90247f9
    • T
      ALSA: hda - Do zero-clear in snd_hdmi_parse_eld() itself · 18014fd7
      Takashi Iwai 提交于
      Instead of doing in each caller side, snd_hdmi_parse_eld() does
      zero-clear of the parsed data by itself.  This is safer and simplifies
      the upcoming code changes.
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      18014fd7
    • T
      ALSA: hda - Skip ELD notification during PM process · eb399d3c
      Takashi Iwai 提交于
      The ELD notification can be received asynchronously from the graphics
      side, and this may happen just at the moment the sound driver is
      processing the suspend or the resume, and it would confuse the whole
      procedure.  Since the ELD and connection states are updated in anyway
      at the end of the resume, we can skip it when received during PM
      process.
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      eb399d3c
  13. 27 11月, 2015 1 次提交
    • T
      ALSA: hda - Skip ELD notification during system suspend · 8ae743e8
      Takashi Iwai 提交于
      The recent addition of ELD notifier for Intel HDMI/DP codec may lead
      the bad codec connection found as kernel messages like below:
       Suspending console(s) (use no_console_suspend to debug)
       hdmi_present_sense: snd_hda_codec_hdmi hdaudioC0D2: HDMI status: Codec=2 Pin=6 Presence_Detect=1 ELD_Valid=1
       snd_hda_intel 0000:00:1f.3: spurious response 0x0:0x2, last cmd=0x206f2e08
       snd_hda_intel 0000:00:1f.3: spurious response 0x0:0x2, last cmd=0x206f2e08
       ....
        snd_hda_codec_hdmi hdaudioC0D2: HDMI: ELD buf size is 0, force 128
        snd_hda_intel 0000:00:1f.3: azx_get_response timeout, switching to polling mode: last cmd=0x206f2f00
       snd_hda_intel 0000:00:1f.3: No response from codec, disabling MSI: last cmd=0x206f2f00
       snd_hda_intel 0000:00:1f.3: azx_get_response timeout, switching to single_cmd mode: last cmd=0x206f2f00
       azx_single_wait_for_response: 42 callbacks suppressed
      
      This seems appearing when the sound driver went to suspend before i915
      driver.  Then i915 driver disables HDMI/DP audio bit and calls the
      registered notifier, and the HDA codec tries to handle it as a
      hot(un)plug.  But since the driver is already in the suspended state,
      it fails miserably.
      
      As this is a sort of spurious wakeup, it can be ignored safely, as
      long as it's delivered during the system suspend.  OTOH, if a
      notification comes during the runtime suspend, the situation is
      different: we need to wake up.  But during the system suspend, such a
      notification can't be the reason for a wakeup.
      
      This patch addresses it by a simple check of the current sound card
      status.  The skipped notification doesn't matter because the HDA
      driver will check the plugged status forcibly at the resume in
      return.
      
      Then, why the card status, not a runtime PM status or else?  The HDA
      controller driver is supposed to set the card status to D3 at the
      system suspend but not at the runtime suspend.  So we can see it as a
      flag that is set only for the system suspend.  Admittedly, it's a bit
      ugly, but it should work well for now.
      Reported-and-tested-by: N"Zhang, Xiong Y" <xiong.y.zhang@intel.com>
      Fixes: 25adc137 ('ALSA: hda - Wake the codec up on pin/ELD notify events')
      Cc: <stable@vger.kernel.org> # v4.3+
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      8ae743e8
  14. 19 11月, 2015 1 次提交
  15. 12 11月, 2015 1 次提交
    • T
      ALSA: hda - Simplify phantom jack handling for HDMI/DP · 909cadc6
      Takashi Iwai 提交于
      The HDMI codec parser may create a phantom jack, but the helper
      function snd_hda_jack_add_kctl() treats always as a normal jack.  This
      is superfluous as the jack query is executed at each time the jack
      sync is performed.
      
      Since the HDMI codec parser is the only caller of this function, it's
      easier to change back this directly calling the original
      __snd_hda_jack_add_kctl() with phantom_jack parameter.
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      909cadc6
  16. 11 11月, 2015 1 次提交
  17. 20 10月, 2015 1 次提交
    • T
      ALSA: hda - convert to hda_device_id · b9a94a9c
      Takashi Iwai 提交于
      Finally we have a proper infrastructure to generate the modaliases
      automatically, let's move to hda_device_id from the legacy
      hda_codec_preset that contains basically the same information.
      
      The patch function hook is stored in driver_data field, which is long,
      and we need an explicit cast.  Other than that, the conversion is
      mostly straightforward.  Each entry is even simplified using a macro,
      and the lengthy (and error-prone) manual modaliases got removed.
      
      As a result, we achieved a quite good diet:
       14 files changed, 407 insertions(+), 595 deletions(-)
      Reviewed-by: NVinod Koul <vinod.koul@intel.com>
      Tested-by: NSubhransu S Prusty <subhransu.s.prusty@intel.com>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      b9a94a9c
  18. 25 9月, 2015 1 次提交
  19. 03 9月, 2015 1 次提交
  20. 02 9月, 2015 1 次提交