1. 16 8月, 2019 1 次提交
    • T
      ALSA: hda - Workaround for crackled sound on AMD controller (1022:1457) · af9d64f8
      Takashi Iwai 提交于
      commit c02f77d32d2c45cfb1b2bb99eabd8a78f5ecc7db upstream.
      
      A long-time problem on the recent AMD chip (X370, X470, B450, etc with
      PCI ID 1022:1457) with Realtek codecs is the crackled or distorted
      sound for capture streams, as well as occasional playback hiccups.
      After lengthy debugging sessions, the workarounds we've found are like
      the following:
      
      - Set up the proper driver caps for this controller, similar as the
        other AMD controller.
      
      - Correct the DMA position reporting with the fixed FIFO size, which
        is similar like as workaround used for VIA chip set.
      
      - Even after the position correction, PulseAudio still shows
        mysterious stalls of playback streams when a capture is triggered in
        timer-scheduled mode.  Since we have no clear way to eliminate the
        stall, pass the BATCH PCM flag for PA to suppress the tsched mode as
        a temporary workaround.
      
      This patch implements the workarounds.  For the driver caps, it
      defines a new preset, AXZ_DCAPS_PRESET_AMD_SB.  It enables the FIFO-
      corrected position reporting (corresponding to the new position_fix=6)
      and enforces the SNDRV_PCM_INFO_BATCH flag.
      
      Note that the current implementation is merely a workaround.
      Hopefully we'll find a better alternative in future, especially about
      removing the BATCH flag hack again.
      
      BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=195303
      Cc: <stable@vger.kernel.org>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      af9d64f8
  2. 14 11月, 2018 1 次提交
  3. 30 6月, 2017 1 次提交
    • T
      ALSA: hda - Fix doubly initialization of i915 component · dba9b7b6
      Takashi Iwai 提交于
      In the commit fcc88d91 ("ALSA: hda - Bind with i915 component
      before codec binding"), the binding with i915 audio component is moved
      to be performed always at probing the controller.  This fixed the
      potential problems on IVB, but now it brought another issue on HSW and
      BDW.  These two platforms give two individual HD-audio controllers,
      one for the analog codec on PCH and another for HDMI over gfx.  Since
      I decided to take a lazy path to check only AZX_DRIVER_PCH type in the
      commit above, now both controllers try to bind with i915, and you see
      a kernel WARNING.
      
      This patch tries to address it again properly.  Now a new DCAPS bit,
      AZX_DCAPS_I915_COMPONENT, is introduced for indicating the binding
      with i915 component in addition to the existing I915_POWERWELL bit
      flag.  Each PCI entry has to give this new flag if it requires the
      binding with i915 component.  For HSW/BDW PCH (i.e. the ones defined
      by AZX_DCAPS_INTEL_PCH) doesn't contain AZX_DCAPS_I915_COMPONENT bit
      while others have it.
      
      While we're at it, add parentheses around the bit flag check for
      avoiding possible compiler warnings, too.
      
      The bug was spotted by Intel CI tests.
      
      Fixes: fcc88d91 ("ALSA: hda - Bind with i915 component before codec binding")
      Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=196219Reported-by: NMartin Peres <martin.peres@free.fr>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      dba9b7b6
  4. 15 1月, 2017 1 次提交
    • T
      ALSA: hda - Make single_cmd option to stop the fallback mechanism · 41438f13
      Takashi Iwai 提交于
      HD-audio driver has a mechanism to fall back to the single cmd mode as
      a last resort if the CORB/RIRB communication goes wrong even after
      switching to the polling mode.  The switching has worked in the past
      well, but Enrico Mioso reported that his system crashes when this
      happens.
      
      Although the actual cause of the crash isn't still fully analyzed yet,
      it'd be in anyway good to provide an option to turn off the fallback
      mode.  Now this patch extends the behavior of the existing single_cmd
      option for that.  Namely,
      
      - The option is changed from bool to bint.
      - As default, it is the mode allowing the fallback to single cmd.
      - Once when either true/false value is given to the option, the driver
        explicitly turns on/off the single cmd mode, but without the
        fallback.
      
      That is, if you want to disable the fallback, just pass single_cmd=0
      option.  Passing single_cmd=1 will keep working like before.
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      41438f13
  5. 09 8月, 2016 1 次提交
  6. 17 12月, 2015 4 次提交
  7. 15 12月, 2015 1 次提交
  8. 09 12月, 2015 1 次提交
    • T
      ALSA: hda - Don't try to bind i915 unless CONFIG_SND_HDA_I915 is set · fbaf9f9f
      Takashi Iwai 提交于
      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: Nkernel test robot <ying.huang@linux.intel.com>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      fbaf9f9f
  9. 19 10月, 2015 1 次提交
  10. 29 4月, 2015 1 次提交
  11. 17 4月, 2015 1 次提交
  12. 16 4月, 2015 6 次提交
  13. 13 3月, 2015 1 次提交
  14. 26 2月, 2015 2 次提交
    • T
      ALSA: hda - Clear pcm pointer assigned to hda_pcm at device removal · 820cc6cf
      Takashi Iwai 提交于
      We leave the pcm field of struct hda_pcm at removal of each device, so
      far.  This hasn't been a problem since unbinding the codec driver
      isn't supposed to happen and another route via snd_hda_codec_reset()
      clears all the once.  However, for a proper unbind implementation, we
      need to care about it.
      
      This patch does the thing above properly:
      
      - Include struct hda_pcm pointer instead of struct hda_pcm_stream
        pointers in struct azx_dev.  This allows us to point the hda_pcm
        object at dev_free callback.
      
      - Introduce to_hda_pcm_stream() macro for better readability.
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      820cc6cf
    • T
      ALSA: hda - Drop power_save value indirection in hda_bus · bb573928
      Takashi Iwai 提交于
      We used to pass the power_save option value to hda_bus via a given
      pointer.  This was needed to refer to the value from the HD-audio core
      side.  However, after the transition to the runtime PM, this is no
      longer needed.
      
      This patch drops the power_save value indirection in hda_bus above,
      and let the controller driver reprograms the autosuspend value
      explicitly by a new helper, snd_hda_set_power_save().  Without this
      call, the HD-audio core doesn't set up the autosuspend and flip the
      runtime PM.  (User may still be able to set up via sysfs, though.)
      
      Along with this change, the pointer argument of azx_bus_create() is
      dropped as well.
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      bb573928
  15. 20 2月, 2015 3 次提交
  16. 27 6月, 2014 2 次提交
  17. 09 4月, 2014 1 次提交
  18. 01 3月, 2014 8 次提交