Bug 76328 - Very bad static following audio input.
Summary: Very bad static following audio input.
Status: RESOLVED MOVED
Alias: None
Product: PulseAudio
Classification: Unclassified
Component: daemon (show other bugs)
Version: unspecified
Hardware: x86-64 (AMD64) Linux (All)
: highest critical
Assignee: pulseaudio-bugs
QA Contact: pulseaudio-bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-03-18 18:06 UTC by Dhaval
Modified: 2018-07-30 10:05 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
Output of pulseaudio -vvvvv while recording in audacity. (735.21 KB, text/plain)
2014-03-18 18:06 UTC, Dhaval
Details

Description Dhaval 2014-03-18 18:06:56 UTC
Created attachment 96017 [details]
Output of pulseaudio -vvvvv while recording in audacity.

I'm using Fedora 20/KDE with 3.13.5-200 and pulseaudio version 4.0. Whenever I record something or use the mic for Mumble there's a really bad static following the audio in the recording which prevents me from using the mic in a proper manner to talk to people or to record. This has been an issue for a while and I have not been able to resolve this. The funny part is if I'm using the pulseaudio daemon the static follows after a few seconds and if I'm not running the audio, it follows almost immediately. It lasts the same length of time as how long I speak so it seems like some sort of echo. 

See Here: http://i.imgur.com/qwav7pn.png

Steps to reproduce:

1. Use microphone or record

2. Audio stream will have really bad static.

Attached is the output of pulseaudio -vvvvv while recording in Audacity.  audiospawn was set to "no" in ~/.pulse/client
Comment 1 Dhaval 2014-03-18 19:16:26 UTC
I have filed this bug since this problem seems unique to my installation. My sister's laptop also running the same OS and kernel and my Windows install on the same machine don't seem to have this issue.
Comment 2 Raymond 2014-03-19 15:56:10 UTC
if you want low latency for real-time voice/video chat, there is no point to use a two seconds of capture and playback buffer

sleeping for 1.98 seconds and wake up to capture


: [alsa-source-VT1708S Analog] alsa-util.c: Set buffer size first (to 88192 samples), period size second (to 44096 samples).
I: [alsa-source-VT1708S Analog] alsa-util.c: ALSA period wakeups disabled
D: [alsa-source-VT1708S Analog] alsa-source.c: hwbuf_unused=0
D: [alsa-source-VT1708S Analog] alsa-source.c: setting avail_min=87650
D: [alsa-source-VT1708S Analog] alsa-source.c: hwbuf_unused=0
D: [alsa-source-VT1708S Analog] alsa-source.c: setting avail_min=87310
I: [alsa-source-VT1708S Analog] alsa-source.c: Time scheduling watermark is 20.00ms
I: [alsa-source-VT1708S Analog] alsa-source.c: Resumed successfully...
I: [alsa-source-VT1708S Analog] alsa-source.c: Starting capture.
D: [pulseaudio] module-suspend-on-idle.c: Source alsa_input.pci-0000_00_14.2.analog-stereo becomes idle, timeout in 5 seconds.
D: [pulseaudio] core-subscribe.c: Dropped redundant event due to change event.
I: [pulseaudio] source-output.c: Rate changed to 44100 Hz
D: [pulseaudio] module-suspend-on-idle.c: Source alsa_input.pci-0000_00_14.2.analog-stereo becomes busy, resuming.
D: [pulseaudio] resampler.c: Channel matrix:
D: [pulseaudio] resampler.c:        I00   I01 
D: [pulseaudio] resampler.c:     +------------
D: [pulseaudio] resampler.c: O00 | 0.500 0.500
I: [pulseaudio] remap.c: Using generic matrix remapping
I: [pulseaudio] resampler.c: Using resampler 'speex-float-1'
I: [pulseaudio] resampler.c: Using float32le as working format.
I: [pulseaudio] resampler.c: Choosing speex quality setting 1.
D: [pulseaudio] memblockq.c: memblockq requested: maxlength=33554432, tlength=0, base=4, prebuf=0, minreq=1 maxrewind=0
D: [pulseaudio] memblockq.c: memblockq sanitized: maxlength=33554432, tlength=33554432, base=4, prebuf=0, minreq=4 maxrewind=0
I: [pulseaudio] source-output.c: Created output 11 "ALSA Capture" on alsa_input.pci-0000_00_14.2.analog-stereo with sample spec float32le 1ch 88200Hz and channel map mono
I: [pulseaudio] source-output.c:     media.name = "ALSA Capture"
I: [pulseaudio] source-output.c:     application.name = "ALSA plug-in [audacity]"
I: [pulseaudio] source-output.c:     native-protocol.peer = "UNIX socket client"
I: [pulseaudio] source-output.c:     native-protocol.version = "29"
I: [pulseaudio] source-output.c:     application.process.id = "18069"
I: [pulseaudio] source-output.c:     application.process.user = "dhaval"
I: [pulseaudio] source-output.c:     application.process.host = "dhaval"
I: [pulseaudio] source-output.c:     application.process.binary = "audacity"
I: [pulseaudio] source-output.c:     application.language = "en_US.UTF-8"
I: [pulseaudio] source-output.c:     window.x11.display = ":0"
I: [pulseaudio] source-output.c:     application.process.machine_id = "fbb0c4896a9c0f680475c0a07edd2c5a"
I: [pulseaudio] source-output.c:     application.process.session_id = "1"
I: [pulseaudio] source-output.c:     application.icon_name = "audacity"
I: [pulseaudio] source-output.c:     module-stream-restore.id = "source-output-by-application-name:ALSA plug-in [audacity]"
D: [pulseaudio] memblockq.c: memblockq requested: maxlength=4194304, tlength=0, base=4, prebuf=1, minreq=0 maxrewind=0
D: [pulseaudio] memblockq.c: memblockq sanitized: maxlength=4194304, tlength=4194304, base=4, prebuf=4, minreq=4 maxrewind=0
I: [pulseaudio] protocol-native.c: Final latency 23.22 ms = 11.61 ms + 11.61 ms
D: [alsa-source-VT1708S Analog] alsa-source.c: latency set to 11.61ms
D: [alsa-source-VT1708S Analog] alsa-source.c: hwbuf_unused=350724
D: [alsa-source-VT1708S Analog] alsa-source.c: setting avail_min=257
D: [alsa-source-VT1708S Analog] alsa-source.c: latency set to 11.61ms
D: [alsa-source-VT1708S Analog] alsa-source.c: hwbuf_unused=350724
D: [alsa-source-VT1708S Analog] alsa-source.c: setting avail_min=257
Comment 3 Dhaval 2014-03-19 16:23:25 UTC
(In reply to comment #2)
> if you want low latency for real-time voice/video chat, there is no point to
> use a two seconds of capture and playback buffer
> 
> sleeping for 1.98 seconds and wake up to capture
> 
> 
> : [alsa-source-VT1708S Analog] alsa-util.c: Set buffer size first (to 88192
> samples), period size second (to 44096 samples).
> I: [alsa-source-VT1708S Analog] alsa-util.c: ALSA period wakeups disabled
> D: [alsa-source-VT1708S Analog] alsa-source.c: hwbuf_unused=0
> D: [alsa-source-VT1708S Analog] alsa-source.c: setting avail_min=87650
> D: [alsa-source-VT1708S Analog] alsa-source.c: hwbuf_unused=0
> D: [alsa-source-VT1708S Analog] alsa-source.c: setting avail_min=87310
> I: [alsa-source-VT1708S Analog] alsa-source.c: Time scheduling watermark is
> 20.00ms
> I: [alsa-source-VT1708S Analog] alsa-source.c: Resumed successfully...
> I: [alsa-source-VT1708S Analog] alsa-source.c: Starting capture.
> D: [pulseaudio] module-suspend-on-idle.c: Source
> alsa_input.pci-0000_00_14.2.analog-stereo becomes idle, timeout in 5 seconds.
> D: [pulseaudio] core-subscribe.c: Dropped redundant event due to change
> event.
> I: [pulseaudio] source-output.c: Rate changed to 44100 Hz
> D: [pulseaudio] module-suspend-on-idle.c: Source
> alsa_input.pci-0000_00_14.2.analog-stereo becomes busy, resuming.
> D: [pulseaudio] resampler.c: Channel matrix:
> D: [pulseaudio] resampler.c:        I00   I01 
> D: [pulseaudio] resampler.c:     +------------
> D: [pulseaudio] resampler.c: O00 | 0.500 0.500
> I: [pulseaudio] remap.c: Using generic matrix remapping
> I: [pulseaudio] resampler.c: Using resampler 'speex-float-1'
> I: [pulseaudio] resampler.c: Using float32le as working format.
> I: [pulseaudio] resampler.c: Choosing speex quality setting 1.
> D: [pulseaudio] memblockq.c: memblockq requested: maxlength=33554432,
> tlength=0, base=4, prebuf=0, minreq=1 maxrewind=0
> D: [pulseaudio] memblockq.c: memblockq sanitized: maxlength=33554432,
> tlength=33554432, base=4, prebuf=0, minreq=4 maxrewind=0
> I: [pulseaudio] source-output.c: Created output 11 "ALSA Capture" on
> alsa_input.pci-0000_00_14.2.analog-stereo with sample spec float32le 1ch
> 88200Hz and channel map mono
> I: [pulseaudio] source-output.c:     media.name = "ALSA Capture"
> I: [pulseaudio] source-output.c:     application.name = "ALSA plug-in
> [audacity]"
> I: [pulseaudio] source-output.c:     native-protocol.peer = "UNIX socket
> client"
> I: [pulseaudio] source-output.c:     native-protocol.version = "29"
> I: [pulseaudio] source-output.c:     application.process.id = "18069"
> I: [pulseaudio] source-output.c:     application.process.user = "dhaval"
> I: [pulseaudio] source-output.c:     application.process.host = "dhaval"
> I: [pulseaudio] source-output.c:     application.process.binary = "audacity"
> I: [pulseaudio] source-output.c:     application.language = "en_US.UTF-8"
> I: [pulseaudio] source-output.c:     window.x11.display = ":0"
> I: [pulseaudio] source-output.c:     application.process.machine_id =
> "fbb0c4896a9c0f680475c0a07edd2c5a"
> I: [pulseaudio] source-output.c:     application.process.session_id = "1"
> I: [pulseaudio] source-output.c:     application.icon_name = "audacity"
> I: [pulseaudio] source-output.c:     module-stream-restore.id =
> "source-output-by-application-name:ALSA plug-in [audacity]"
> D: [pulseaudio] memblockq.c: memblockq requested: maxlength=4194304,
> tlength=0, base=4, prebuf=1, minreq=0 maxrewind=0
> D: [pulseaudio] memblockq.c: memblockq sanitized: maxlength=4194304,
> tlength=4194304, base=4, prebuf=4, minreq=4 maxrewind=0
> I: [pulseaudio] protocol-native.c: Final latency 23.22 ms = 11.61 ms + 11.61
> ms
> D: [alsa-source-VT1708S Analog] alsa-source.c: latency set to 11.61ms
> D: [alsa-source-VT1708S Analog] alsa-source.c: hwbuf_unused=350724
> D: [alsa-source-VT1708S Analog] alsa-source.c: setting avail_min=257
> D: [alsa-source-VT1708S Analog] alsa-source.c: latency set to 11.61ms
> D: [alsa-source-VT1708S Analog] alsa-source.c: hwbuf_unused=350724
> D: [alsa-source-VT1708S Analog] alsa-source.c: setting avail_min=257

So how exactly do I change it? I mean is there a configuration file or do I have to recompile pulseaudio with certain options? I'm sorry but I'm not as familiar with pulseaudio as I should be.
Comment 4 Raymond 2014-03-30 07:20:33 UTC
even your distribution configure snd-hda-intel with 4Mb buffer (about 23 seconds of stereo 44100Hz)


cat /proc/asound/card0/pcm0p/sub0/prealloc

cat /proc/asound/card0/pcm0c/sub0/prealloc


you still can restrict  prealloc to 64 Kbytes  (0.37 seconds )


echo 64 >  /proc/asound/card0/pcm0p/sub0/prealloc


echo 64 >  /proc/asound/card0/pcm0c/sub0/prealloc
Comment 5 Dhaval 2014-03-30 10:14:23 UTC
(In reply to comment #4)
> even your distribution configure snd-hda-intel with 4Mb buffer (about 23
> seconds of stereo 44100Hz)
> 
> 
> cat /proc/asound/card0/pcm0p/sub0/prealloc
> 
> cat /proc/asound/card0/pcm0c/sub0/prealloc
> 
> 
> you still can restrict  prealloc to 64 Kbytes  (0.37 seconds )
> 
> 
> echo 64 >  /proc/asound/card0/pcm0p/sub0/prealloc
> 
> 
> echo 64 >  /proc/asound/card0/pcm0c/sub0/prealloc

I tried that and even as root and with permissions set to 777 I can't seem to set it. cat /proc/asound/card0/pcm0c/sub0/prealloc still shows 4096.
Comment 6 GitLab Migration User 2018-07-30 10:05:18 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/202.


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.