Bug 749335

Summary: Sound garbled due to underruns with certain sound cards
Product: Red Hat Enterprise Linux 6 Reporter: Dmitry Torokhov <dmitry.torokhov>
Component: alsa-pluginsAssignee: Jaroslav Kysela <jkysela>
Status: CLOSED ERRATA QA Contact: Desktop QE <desktop-qa-list>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.1CC: jkoten, jshortt, tpelka
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-05-11 00:41:27 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On:    
Bug Blocks: 1269638, 1270066    

Description Dmitry Torokhov 2011-10-26 18:20:15 UTC
Description of problem:
Certain sound cards when configured in surround sound mode produce garbled sound when used with PulseAudio and ALSA PulseAudio plugin.

Version-Release number of selected component (if applicable):
alsa-plugins-pulseaudio 1.0.21

How reproducible:
Always

Steps to Reproduce:
1. Use card driven by snd-ca0106 driver
2. Configure sound card to work in 4.0, 5.1 or 7.1 mode
3. "aplay -B 100000 <Sound.wav>"
  
Actual results:
Sound is mangled beyond recognition; both aplay and pulseaudio report high number of underruns.

Expected results:
Song played properly.

Additional info:
Updating to alsa-plugins-pulseaudio 1.0.24 or simply back-porting following commit fixes the problem:

commit c20d516e229620129ee20175d8fee8511cc3a4bd
Author: Takashi Iwai <tiwai>
Date:   Fri Jul 9 14:05:03 2010 +0200

    pulse: Add handle_underrun option
    
    Added a config option "handle_underrun" to specify whether pulse plugin
    handles the underrun reported from PA.  The default value is now set to
    false, i.e. it will ignore underruns in PA (for good reasons below).
    You can take back to the old behavior by setting handle_underrun true.
    
    The original idea was brought by David Henningsson <diwic>,
    while this patch is simplified and makes the behavior configurable.
    
    The reasons for avoiding underruns (cited from David's original patch):
    
     Reporting underruns to ALSA seems to do more bad than good, for these reasons:
     * If pulseaudio gets an underrun, the normal way to end that underrun is to
       feed it with more buffers. This is different from the ALSA way of dealing
       with underruns, which requires hardware buffer pointers to be reset.
     * In addition, underrun signals are delivered asynchronously from pulseaudio.
       This means that there might be more buffers on the way to pulseaudio when
       the underrun is reported, making the underrun obsolete. Unfortunately,
       there is currently no known way to determine whether this is the case or
       not.
    
    Signed-off-by: Takashi Iwai <tiwai>

Comment 2 RHEL Program Management 2011-10-26 18:49:17 UTC
This request was evaluated by Red Hat Product Management for
inclusion in the current release of Red Hat Enterprise Linux.
Because the affected component is not scheduled to be updated
in the current release, Red Hat is unfortunately unable to
address this request at this time. Red Hat invites you to
ask your support representative to propose this request, if
appropriate and relevant, in the next release of Red Hat
Enterprise Linux. If you would like it considered as an
exception in the current release, please ask your support
representative.

Comment 5 Suzanne Logcher 2012-05-14 19:02:19 UTC
This request was not resolved in time for the current release.
Red Hat invites you to ask your support representative to
propose this request, if still desired, for consideration in
the next release of Red Hat Enterprise Linux.

Comment 12 errata-xmlrpc 2016-05-11 00:41:27 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHBA-2016-0924.html