1. 15 Dec, 2015 3 commits
    • Takashi Sakamoto's avatar
      ALSA: oxfw: rename a file for control elements so that it's for model-specific · f3a0e32a
      Takashi Sakamoto authored
      In ALSA firewire stack, drivers basically has no control elements. This
      is due to the fact that each model has own functionality even if they use
      the same communication chipset. Implementing all of the functionalities in
      kernel space unreasonably increases our efforts to maintain the stack. In
      most case, these functionalities can be implemented in userspace via Linux
      fw character devices.
      
      However, ALSA OXFW driver has control elements comes from old
      firewire-speakers driver. Adding the elements is in a file names as
      'oxfw-control.c', while the elements are really model-specific. The
      name is confusing because it gives an idea to handle control elements
      for all of OXFW-based models.
      
      This commit renames the file so that it's just for models supported by
      old firewire-speakers driver.
      Signed-off-by: default avatarTakashi Sakamoto <o-takashi@sakamocchi.jp>
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      f3a0e32a
    • Takashi Iwai's avatar
      ALSA: hda - Increase default bdl_pos_adj for Baytrail/Braswell · 2cf721db
      Takashi Iwai authored
      Intel Atom processors seem to have a problem at recording when
      bdl_pos_adj is set to an odd value.  When a value like 1 is used, it
      may drop the samples unexpectedly.  Actually, for the old Atoms, we
      used to set AZX_DRIVER_SCH type, and this assigns 32 as default.
      Meanwhile the newer chips, Baytrail and Braswell, are set as
      AZX_DRIVER_PCH, and the lower default value, 1, is assigned.
      
      This patch changes the default values for these chipsets to a safer
      default, 32, again.  Since changing the driver type (AZX_DRIVER_XXX)
      leads to the rename of the driver string, it would result in a
      possible regression.  So, we can't change the type.  Instead, in this
      patch, manual (ugly) PCI ID checks are added on top.
      
      A drawback by this increase is the slight increase of the latency, but
      it's a sub-ms order in normal situations, so mostly negligible.
      Reported-and-tested-by: default avatarJochen Henneberg <jh@henneberg-systemdesign.com>
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      2cf721db
    • Takashi Iwai's avatar
      ALSA: hda - Clean up the code to check bdl_pos_adj option · 4f0189be
      Takashi Iwai authored
      Just a minor cleanup; instead of passing an array, pass the assigned
      bdl_pos_adj option value directory in struct azx.  Also split the code
      to get the default bdl_pos_adj value for the change that will follow
      after this.
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      4f0189be
  2. 11 Dec, 2015 1 commit
  3. 10 Dec, 2015 3 commits
    • Takashi Iwai's avatar
      ALSA: hda - Fix superfluous HDMI jack repoll · 9a5e5234
      Takashi Iwai authored
      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: default avatarDavid Henningsson <david.henningsson@canonical.com>
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      9a5e5234
    • Takashi Iwai's avatar
      ALSA: hda - Allow i915 binding later in codec driver · 55913110
      Takashi Iwai authored
      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: default avatarTakashi Iwai <tiwai@suse.de>
      55913110
    • Takashi Iwai's avatar
      ALSA: hda - Optimize audio component check in patch_hdmi.c · f4e3040b
      Takashi Iwai authored
      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: default avatarTakashi Iwai <tiwai@suse.de>
      f4e3040b
  4. 09 Dec, 2015 3 commits
    • Arnd Bergmann's avatar
      sound/oss: remove VIRT_TO_BUS dependency · c83d1b37
      Arnd Bergmann authored
      The OSS sound drivers used to rely on virt_to_bus(), but don't any more,
      so we can remove the Kconfig dependency.
      
      As a lot of architectures don't provide VIRT_TO_BUS any more, removing
      the dependency in sounds/oss/ would make the deprecated drivers appear
      there, which we probably don't want. Instead I'm replacing the
      simple dependency with 'VIRT_TO_BUS || RPC || NETWINDER' so we can
      still build these sound drivers for the platforms that need them,
      but don't change anything on other architectures.
      
      As a follow-up, we can remove the virt_to_bus() implementation
      and Kconfig symbol in the ARM architecture.
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      c83d1b37
    • Takashi Iwai's avatar
      ALSA: hda - Don't try to bind i915 unless CONFIG_SND_HDA_I915 is set · fbaf9f9f
      Takashi Iwai authored
      snd-hda-intel driver tries to bind with i915 audio component always
      when AZX_DCAPS_I915_POWERWELL is set in the driver caps.  This was
      mostly OK in the past, as the flag was applied only to a limited set
      of devices, namely, Haswell and Broadwell.  On these machines, i915
      graphics is almost mandatory as long as HDMI/DP is concerned.
      
      Recently the application of i915 binding was widened to more Intel
      chips.  On these chips, the chance of a kernel without i915 graphics
      is much higher, and such user would hit an error like:
      
       snd_hda_intel 0000:00:1b.0: failed to add i915 component master (-19)
      
      Although the error itself is harmless, it's certainly superfluous even
      to try binding with i915, if we already know that there isn't any.
      
      This patch fixes it by simply defining AZX_DCAPS_I915_POWERWELL as 0
      in the case without i915.  Then all codes referring to this flag will
      be optimized out by the compiler.
      
      Fixes: 6603249d ('ALSA: hda - Enable audio component for old Intel PCH devices')
      Reported-by: default avatarkernel test robot <ying.huang@linux.intel.com>
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      fbaf9f9f
    • Takashi Iwai's avatar
      ALSA: hda - Less grumbling about lack of i915 binding · 6ee8eeb4
      Takashi Iwai authored
      The recent commit [6603249d: ALSA: hda - Enable audio component
      for old Intel PCH devices] enabled the i915 binding for HDMI/DP on old
      Intel PCHs.  But many boards are without HDMI/DP, and they actually
      don't need i915 binding, and yet the driver has a check of i915
      binding and complains like
      	Haswell must be built with CONFIG_SND_HDA_I915
      This error is false-positive, and it should be put only for HSW/BDW,
      instead of all devices that may be bound with i915.
      
      This patch fixes the condition to check, as well as rephrasing the
      message specific to HSW/BDW HDMI/DP.
      
      Fixes: 6603249d ('ALSA: hda - Enable audio component for old Intel PCH devices')
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      6ee8eeb4
  5. 08 Dec, 2015 3 commits
    • Takashi Iwai's avatar
      ALSA: hda - Implement loopback control switch for Realtek and other codecs · e7fdd527
      Takashi Iwai authored
      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: default avatarTakashi Iwai <tiwai@suse.de>
      e7fdd527
    • Takashi Iwai's avatar
      ALSA: hda - Make snd_hda_parse_nid_path() local · c4a58c30
      Takashi Iwai authored
      An exported function snd_hda_parse_nid_path() is used only inside
      hda_generic.c.  Let's make it a static local function for a better
      code optimization.
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      c4a58c30
    • Takashi Iwai's avatar
      ALSA: hda - Remove unused snd_hda_get_nid_path() · 1e73bf78
      Takashi Iwai authored
      An exported helper function snd_hda_get_nid_path() is nowhere used.
      Let's remove it.
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      1e73bf78
  6. 07 Dec, 2015 1 commit
  7. 04 Dec, 2015 3 commits
    • Takashi Iwai's avatar
      ALSA: hda - Enable audio component for old Intel PCH devices · 6603249d
      Takashi Iwai authored
      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: default avatarTakashi Iwai <tiwai@suse.de>
      6603249d
    • Takashi Iwai's avatar
      ALSA: hda - Split ELD update code from hdmi_present_sense() · e90247f9
      Takashi Iwai authored
      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: default avatarTakashi Iwai <tiwai@suse.de>
      e90247f9
    • Takashi Iwai's avatar
      ALSA: hda - Do zero-clear in snd_hdmi_parse_eld() itself · 18014fd7
      Takashi Iwai authored
      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: default avatarTakashi Iwai <tiwai@suse.de>
      18014fd7
  8. 03 Dec, 2015 4 commits
  9. 02 Dec, 2015 1 commit
  10. 01 Dec, 2015 2 commits
  11. 30 Nov, 2015 4 commits
  12. 27 Nov, 2015 3 commits
    • Takashi Iwai's avatar
      ALSA: hda - Skip ELD notification during system suspend · 8ae743e8
      Takashi Iwai authored
      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: default avatar"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: default avatarTakashi Iwai <tiwai@suse.de>
      8ae743e8
    • Takashi Iwai's avatar
      Merge branch 'for-linus' into for-next · 3fb42daa
      Takashi Iwai authored
      3fb42daa
    • Takashi Iwai's avatar
      Merge tag 'asoc-fix-v4.4-rc2' of... · 06a691e6
      Takashi Iwai authored
      Merge tag 'asoc-fix-v4.4-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus
      
      ASoC: Fixes for v4.4
      
      Quite a large batch of fixes have come in since the merge window, mainly
      driver specific ones but there's a couple of core ones:
      
       - A fix for DAPM resume on active streams to ensure everything ends up
         cleanly in the right state.
       - Reset the DAPM cache when freeing widgets to fix a crash on driver
         remove and reload.
      
      The PM functions for nau8825 are new code which fix crashes on resume.
      06a691e6
  13. 25 Nov, 2015 9 commits