[pulseaudio-discuss] Input sound random detection.
Tanu Kaskinen
tanuk at iki.fi
Wed Aug 10 17:20:29 UTC 2016
On Wed, 2016-08-10 at 13:05 -0300, Gustavo Duarte wrote:
> Hi,
>
> I did the test suggested, parecord worked, however pasuspender not.
>
> I saw after run pasuspender, all the sound stop working, the input (mic)
> and output (speaker).
>
> So i repeat the test and got two pactl output as following:
>
> 1) Boot the laptop.
>
> 2) run parecord --device=alsa_input.pci-0000_00_1b.0.analog-stereo
> test.wav
>
> 3) aplay test.wav, sounds was recorded, works fine.
>
> 4) Open gnome-settings, audio meter show activity.
So if you start parecord before opening the settings, it's working. But
if the first thing you do is to open the settings, then the audio meter
doesn't show any activity? What if you after boot record a bit with
parecord, but stop it before opening the sound settings, does the audio
meter show activity in that case?
Next I'd like to see "pactl list" output while the sound settings are
open, but there's no audio meter activity.
> 5) Run pactl list > without-pasuspender.pactl
>
> 6) Run pasuspender -- arecord --device=plughw:0 test1.wav
>
> 7) aplay test1.wav, sounds wasn't recorded.
>
> 8) Open gnome-settings, audio meters doesn't show activity.
>
> 9) Run pactl list > with-pasuspender.pactl
It's expected that nothing works while pasuspender is running. The
point of pasuspender was to stop pulseaudio from using the hardware
while arecord is using it. Without pasuspender, arecord might fail to
open the device if pulseaudio still has it open. If pulseaudio doesn't
have it open (pulseaudio will auto-suspend after five seconds of
inactivity), pulseaudio might get confused if it tries to open the
device while arecord is still running. With pasuspender, everything
happens in controlled fashion - pulseaudio will stop using the hardware
before arecord starts, and won't try to use it before arecord stops.
Anyway, if arecord didn't manage to record anything, then that
indicates that the system was in a state where alsa didn't produce any
audio, so not really a pulseaudio problem. Did arecord capture
anything, even silence? (If the file length is 44 bytes, that counts as
"nothing", because it's just the wav header).
To verify that the mixer settings are fine, run "amixer -c0" while
recording with arecord unsuccessfully (of course, you can verify the
non-success only afterwards). Try not to change any volume settings,
and record with parecord and again run "amixer -c0" while recording. If
the parecord recording is successful, compare the two "amixer -c0"
outputs to see if there's any difference. If there's no difference, but
arecord doesn't work while parecord works, then the mixer settings have
nothing to do with the problem.
--
Tanu
More information about the pulseaudio-discuss
mailing list