1. 09 12月, 2015 1 次提交
    • T
      ALSA: hda - Implement loopback control switch for Realtek and other codecs · e7fdd527
      Takashi Iwai 提交于
      Many codecs, typically found on Realtek codecs, have the analog
      loopback path merged to the secondary input of the middle of the
      output paths.  Currently, we don't offer the dynamic switching in such
      configuration but let each loopback path mute by itself.
      
      This should work well in theory, but in reality, we often see that
      such a dead loopback path causes some background noises even if all
      the elements get muted.  Such a problem has been fixed by adding the
      quirk accordingly to disable aamix, and it's the right fix, per se.
      The only problem is that it's not so trivial to achieve it; user needs
      to pass a hint string via patch module option or sysfs.
      
      This patch gives a bit improvement on the situation: it adds "Loopback
      Mixing" control element for such codecs like other codecs (e.g. IDT or
      VIA codecs) with the individual loopback paths.  User can turn on/off
      the loopback path simply via a mixer app.
      
      For keeping the compatibility, the loopback is still enabled on these
      codecs.  But user can try to turn it off if experiencing a suspicious
      background or click noise on the fly, then build a static fixup later
      once after the problem is addressed.
      
      Other than the addition of the loopback enable/disablement control,
      there should be no changes.
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      e7fdd527
  2. 08 12月, 2015 2 次提交
  3. 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
  4. 03 12月, 2015 1 次提交
  5. 01 12月, 2015 2 次提交
  6. 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
  7. 25 11月, 2015 1 次提交
  8. 24 11月, 2015 1 次提交
  9. 21 11月, 2015 1 次提交
  10. 19 11月, 2015 3 次提交
  11. 15 11月, 2015 1 次提交
  12. 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
  13. 11 11月, 2015 1 次提交
  14. 05 11月, 2015 2 次提交
  15. 03 11月, 2015 1 次提交
    • T
      ALSA: hda - Fix lost 4k BDL boundary workaround · de1ab6af
      Takashi Iwai 提交于
      During the migration to HDA core code, we lost the workaround for 4k
      BDL boundary.  The flag exists in the new hdac_bus, but it's never
      set.  This resulted in the sudden sound stall on some controllers that
      require this workaround like Creative Recon3D.
      
      This patch fixes the issue by setting the flag for such controllers
      properly.
      
      Fixes: ccc98865 ('ALSA: hda - Migrate more hdac_stream codes')
      Cc: <stable@vger.kernel.org> # v4.2+
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      de1ab6af
  16. 27 10月, 2015 2 次提交
  17. 26 10月, 2015 1 次提交
  18. 20 10月, 2015 2 次提交
    • T
      ALSA: hda - Fix deadlock at error in building PCM · d289619a
      Takashi Iwai 提交于
      The HDA codec driver issues snd_hda_codec_reset() at the error path of
      PCM build.  This was needed in the earlier code base, but the recent
      rewrite to use the standard bus binding made this a deadlock:
       modprobe        D 0000000000000005     0   720    716 0x00000080
       Call Trace:
        [<ffffffff816a5dbe>] schedule+0x3e/0x90
        [<ffffffff816a61a5>] schedule_preempt_disabled+0x15/0x20
        [<ffffffff816a7ae5>] __mutex_lock_slowpath+0xb5/0x120
        [<ffffffff816a7b6b>] mutex_lock+0x1b/0x30
        [<ffffffff8148656b>] device_release_driver+0x1b/0x30
        [<ffffffff81485c15>] bus_remove_device+0x105/0x180
        [<ffffffff814822b9>] device_del+0x139/0x260
        [<ffffffffa05e0ec5>] snd_hdac_device_unregister+0x25/0x30 [snd_hda_core]
        [<ffffffffa074fa6a>] snd_hda_codec_reset+0x2a/0x70 [snd_hda_codec]
        [<ffffffffa075007b>] snd_hda_codec_build_pcms+0x18b/0x1b0 [snd_hda_codec]
        [<ffffffffa074a44e>] hda_codec_driver_probe+0xbe/0x140 [snd_hda_codec]
        [<ffffffff81486ac4>] driver_probe_device+0x1f4/0x460
        [<ffffffff81486dc0>] __driver_attach+0x90/0xa0
        [<ffffffff81484844>] bus_for_each_dev+0x64/0xa0
        [<ffffffff814862de>] driver_attach+0x1e/0x20
        [<ffffffff81485e7b>] bus_add_driver+0x1eb/0x280
        [<ffffffff81487680>] driver_register+0x60/0xe0
        [<ffffffffa074a0da>] __hda_codec_driver_register+0x5a/0x60 [snd_hda_codec]
        [<ffffffffa070a01e>] realtek_driver_init+0x1e/0x1000 [snd_hda_codec_realtek]
        [<ffffffff810002f3>] do_one_initcall+0xb3/0x200
        [<ffffffff816a1fc5>] do_init_module+0x60/0x1f8
        [<ffffffff810ee5c3>] load_module+0x1653/0x1bd0
        [<ffffffff810eed48>] SYSC_finit_module+0x98/0xc0
        [<ffffffff810eed8e>] SyS_finit_module+0xe/0x10
        [<ffffffff816aa032>] entry_SYSCALL_64_fastpath+0x16/0x75
      
      The simple fix is just to remove this call, since we don't need to
      think about unbinding at there any longer.
      
      Bugzilla: https://bugzilla.suse.com/show_bug.cgi?id=948758
      Cc: <stable@vger.kernel.org> # v4.1+
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      d289619a
    • 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
  19. 19 10月, 2015 1 次提交
  20. 18 10月, 2015 2 次提交
  21. 15 10月, 2015 3 次提交
    • T
      ALSA: hda - Update mixer name for the lower codec address · 7fbe824a
      Takashi Iwai 提交于
      In most cases, we prefer the onboard codec as the primary device, thus
      it's better to set it as the mixer name.  Currently, however, the
      mixer name is updated per the device instantiation order, and user
      gets often HDMI/DP or other seen as a mixer chip name.  Also, if a
      codec name is renamed by the driver, the old chip name might be left
      still as the mixer name.
      
      This patch addresses these issues by remembering the chip address that
      was referred as the mixer name.  When a codec with the same or lower
      address gives its name, renew the mixer name accordingly, as it's
      either the update of the codec name or we get likely the more
      appropriate chip as the reference.
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      7fbe824a
    • T
      ALSA: hda - consolidate chip rename functions · ded255be
      Takashi Iwai 提交于
      A few multiple codec drivers do renaming the chip_name string but all
      these are open-coded and some of them have even no error check.  Let's
      make common helpers to do it properly.
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      ded255be
    • T
      ALSA: hda - Enable widget power saving for Cirrus codecs · 3e19fec3
      Takashi Iwai 提交于
      Cirrus codecs have also fine power controls on each widget, thus it
      gets benefit from the recent widget power-saving feature.  As we
      haven't seen any obvious regressions with tests on some MacBooks,
      let's try to enable it.
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      3e19fec3
  22. 13 10月, 2015 1 次提交
  23. 09 10月, 2015 1 次提交
  24. 05 10月, 2015 1 次提交
  25. 03 10月, 2015 2 次提交
  26. 25 9月, 2015 1 次提交