• Takashi Iwai's avatar
    ALSA: hda - Workaround for crackled sound on AMD controller (1022:1457) · b5fe41c2
    Takashi Iwai authored
    commit c02f77d3 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: 's avatarTakashi Iwai <tiwai@suse.de>
    Signed-off-by: 's avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
    b5fe41c2
Name
Last commit
Last update
..
ac97 Loading commit data...
aoa Loading commit data...
arm Loading commit data...
atmel Loading commit data...
core Loading commit data...
drivers Loading commit data...
firewire Loading commit data...
hda Loading commit data...
i2c Loading commit data...
isa Loading commit data...
mips Loading commit data...
oss Loading commit data...
parisc Loading commit data...
pci Loading commit data...
pcmcia Loading commit data...
ppc Loading commit data...
sh Loading commit data...
soc Loading commit data...
sparc Loading commit data...
spi Loading commit data...
synth Loading commit data...
usb Loading commit data...
x86 Loading commit data...
xen Loading commit data...
Kconfig Loading commit data...
Makefile Loading commit data...
ac97_bus.c Loading commit data...
last.c Loading commit data...
sound_core.c Loading commit data...