Bug 73945 - Pulseaudio makes loud buzzing with skype notificaitons
Summary: Pulseaudio makes loud buzzing with skype notificaitons
Status: RESOLVED MOVED
Alias: None
Product: PulseAudio
Classification: Unclassified
Component: alsa (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: pulseaudio-bugs
QA Contact: pulseaudio-bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-01-22 19:41 UTC by Jeremy Sanders
Modified: 2018-07-30 10:20 UTC (History)
2 users (show)

See Also:
i915 platform:
i915 features:


Attachments
Start and end 50 lines from log from alsa-time-test (4.09 KB, text/plain)
2014-01-22 19:41 UTC, Jeremy Sanders
Details
2nd log (4.09 KB, text/plain)
2014-01-22 19:48 UTC, Jeremy Sanders
Details

Description Jeremy Sanders 2014-01-22 19:41:25 UTC
Created attachment 92609 [details]
Start and end 50 lines from log from alsa-time-test

When a notification is played by skype, the speaker starts a loud buzzing and does not finish. I've run the alsa-time-test.c program, from http://www.freedesktop.org/wiki/Software/PulseAudio/Backends/ALSA/BrokenDrivers/, which fails with:

[jss@serv tmp]$ ./alsa-time-test hw:0 > log
alsa-time-test: alsa-time-test.c:237: main: Assertion `(unsigned) avail <= buffer_size' failed.
Aborted (core dumped)

Log start and end are attached. Hardware is:

00:1b.0 Audio device: Intel Corporation NM10/ICH7 Family High Definition Audio Controller (rev 01)
        Subsystem: ASUSTeK Computer Inc. Device 8345
        Flags: bus master, fast devsel, latency 0, IRQ 42
        Memory at fe9fc000 (64-bit, non-prefetchable) [size=16K]
        Capabilities: [50] Power Management version 2
        Capabilities: [60] MSI: Enable+ Count=1/1 Maskable- 64bit+
        Capabilities: [70] Express Root Complex Integrated Endpoint, MSI 00
        Capabilities: [100] Virtual Channel
        Capabilities: [130] Root Complex Link
        Kernel driver in use: snd_hda_intel

This is Ubuntu saucy,
Linux jss-desktop 3.11.0-15-generic #23-Ubuntu SMP Mon Dec 9 18:16:27 UTC 2013 i686 i686 i686 GNU/Linux

Pulseaudio version is 1:4.0-0ubuntu6
Comment 1 Jeremy Sanders 2014-01-22 19:48:15 UTC
Created attachment 92610 [details]
2nd log

The previous log may have had PA running. This 2nd one should be PA free.
Comment 2 Raymond 2014-01-24 02:14:25 UTC
Are your CPU and Disk fast enough for the program to output 44100 lines to the disk per second ?
Comment 3 Raymond 2014-01-24 02:18:17 UTC
if you suspect your audio driver is broken

http://www.alsa-project.org/main/index.php/XRUN_Debug

# Enable basic debugging and dump stack, check hardware pointer on the period update
 # Usefull to just see, if PCM stream is stopped for a reason (usually wrong audio process timing from scheduler)
 # And to check the values from driver
 echo 11 > /proc/asound/card0/pcm0p/xrun_debug
Comment 4 Raymond 2014-01-24 02:56:20 UTC
/** PCM state */
typedef enum _snd_pcm_state {
      /** Open */
      SND_PCM_STATE_OPEN = 0,
      /** Setup installed */ 
      SND_PCM_STATE_SETUP,
      /** Ready to start */
      SND_PCM_STATE_PREPARED,
      /** Running */
      SND_PCM_STATE_RUNNING,
      /** Stopped: underrun (playback) or overrun (capture) detected */
      SND_PCM_STATE_XRUN,
      /** Draining: running (playback) or stopped (capture) */
      SND_PCM_STATE_DRAINING,
      /** Paused */
      SND_PCM_STATE_PAUSED,
      /** Hardware is suspended */
      SND_PCM_STATE_SUSPENDED,
      /** Hardware is disconnected */
00258       SND_PCM_STATE_DISCONNECTED,
      SND_PCM_STATE_LAST = SND_PCM_STATE_DISCONNECTED
} snd_pcm_state_t;

your log miss the most important part when state change from (2) SND_PCM_STATE_PREPARED to (3) SND_PCM_STATE_RUNNING

the program alsa-time-test.c set the startthreshold to buffer size, and snd_pcm_start is only called if you specify capture

the program write data one frame by one frame 

the driver start playing until reach the start threshold (buffer is full)
Comment 5 Raymond 2014-01-27 14:58:38 UTC
refer to your log, it is quite clear that the program cannot keepup to maintain at least one period of audio in soundcard (even less than the rewind safe guard)  the value of avail become zero

as the program set the stop threshold to boundary which force the driver to continue playback when underrun occur (i.e. hwptr become larger than the application pointer)

it is the bug of alsa-time-test.c rather than the driver is broken
Comment 6 AnAkkk 2014-03-25 13:11:35 UTC
That's a very annoying problem with skype. I have it on both of my computers.
Comment 7 GitLab Migration User 2018-07-30 10:20:14 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/issues/354.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.