Bug 1126212 - ALSA lib pcm.c:7843:(snd_pcm_recover) underrun occurs during playback from praat
Summary: ALSA lib pcm.c:7843:(snd_pcm_recover) underrun occurs during playback from praat
Keywords:
Status: CLOSED EOL
Alias: None
Product: Fedora
Classification: Fedora
Component: alsa-lib
Version: 22
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Jaroslav Kysela
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-08-03 16:04 UTC by Peter H. Jones
Modified: 2016-07-19 11:59 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-07-19 11:59:31 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
dmesg output (251.07 KB, text/plain)
2014-08-03 16:04 UTC, Peter H. Jones
no flags Details

Description Peter H. Jones 2014-08-03 16:04:28 UTC
Created attachment 923637 [details]
dmesg output

Description of problem:
"ALSA lib pcm.c:7843:(snd_pcm_recover) underrun occurred"
repeatedly during playback using a freeware program called praat

Version-Release number of selected component (if applicable):
alsa-utils-1.0.28-1.fc21.x86_64
alsa-lib-1.0.28-1.fc21.x86_64
alsa-plugins-pulseaudio-1.0.28-2.fc21.x86_64


How reproducible:
Every time

Steps to Reproduce:
1. Start pratt and try to record and play back a sound sample

Actual results:
Very raspy sound. Desired signal can be heard faintly in background.

Expected results:
Good sound

Additional info:
Information on praat is available at
http://www.fon.hum.uva.nl/praat/ .
Source code is available.

I downloaded, un-tarred and ran:
http://www.fon.hum.uva.nl/praat/praat5382_linux64.tar.gz

See also bug 1003996 .

Comment 1 Peter H. Jones 2014-08-10 23:01:48 UTC
I have found it possible possible to save recordings as WAV files. This means I can check the sound quality of recordings. The waveforms look as expected (I was using finger snaps as a signal), but the sound level is very low, so it's hard for me to check sound quality. I'd presume it's OK, and focus effort on getting playback to work.

I seemed to get the best results by running
pasuspender -- /praat , as suggested in the documentation. For convenience in testing, I've located the praat binary file at /, because it will from from anywhere.

Comment 2 Peter H. Jones 2014-09-02 23:52:27 UTC
http://www.fon.hum.uva.nl/praat/praat5383_linux64.tar.gz is available. I am able to record, as evidenced by viewing the waveforms and also by saving as wav and playing with another program, such as parole. So the problem is really with playback.

Comment 3 Raymond 2014-09-03 07:46:48 UTC
is it normal since you enable systemd log too many information to the system log ?

Comment 4 tas_cc 2014-10-28 00:03:45 UTC
Just for your information, it seems that Gentoo is also affected. ALSA 1.0.28.

ALSA lib /var/tmp/portage/media-libs/alsa-lib-1.0.28/work/alsa-lib-1.0.28/src/pcm/pcm.c:7843:(snd_pcm_recover) underrun occurred
ALSA lib /var/tmp/portage/media-libs/alsa-lib-1.0.28/work/alsa-lib-1.0.28/src/pcm/pcm.c:7843:(snd_pcm_recover) underrun occurred
ALSA lib /var/tmp/portage/media-libs/alsa-lib-1.0.28/work/alsa-lib-1.0.28/src/pcm/pcm.c:7843:(snd_pcm_recover) underrun occurred
ALSA lib /var/tmp/portage/media-libs/alsa-lib-1.0.28/work/alsa-lib-1.0.28/src/pcm/pcm.c:7843:(snd_pcm_recover) underrun occurred
ALSA lib /var/tmp/portage/media-libs/alsa-lib-1.0.28/work/alsa-lib-1.0.28/src/pcm/pcm.c:7843:(snd_pcm_recover) underrun occurred
Sound_Handler closing times 1, freq 22050, format 32784, chan 2
SDL_AUDIODRIVER alsa

What is interesting here, everything works like a harm when I use built in Intel card. The problem starts when I change to Audiotrack (USB one) using pavucontrol. In my case there are two applications that are affected: Chromium and Widelands. Everything else works great. The problem didn't occur until I've updated to 1.0.28 (but I used a quite old version for pretty long time, I even don't remember which version it was).

I've observed one interesting problem related to the issue. When pavucontrol is opened on its Playback tab and Wayland is running, the Wayland's ALSA plug-in box is flickering like the application was loosing the connection with the ALSA and was trying to make a new one again, over and over.

Hardware:

**** List of PLAYBACK Hardware Devices ****
card 0: MID [HDA Intel MID], device 0: ALC662 rev1 Analog [ALC662 rev1 Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: MID [HDA Intel MID], device 3: HDMI 0 [HDMI 0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: CUBE [Audiotrak ProDigy CUBE], device 0: USB Audio [USB Audio]
  Subdevices: 0/1
  Subdevice #0: subdevice #0
card 1: CUBE [Audiotrak ProDigy CUBE], device 1: USB Audio [USB Audio #1]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

Comment 5 tas_cc 2014-10-28 00:26:13 UTC
It's a bit non-deterministic. I can run Widelands with the correct sound running it few times in a row.

Comment 6 John5788 2015-01-11 07:59:08 UTC
(In reply to tas_cc from comment #4)
> Just for your information, it seems that Gentoo is also affected. ALSA
> 1.0.28.
> 
> ALSA lib
> /var/tmp/portage/media-libs/alsa-lib-1.0.28/work/alsa-lib-1.0.28/src/pcm/pcm.
> c:7843:(snd_pcm_recover) underrun occurred
> ALSA lib
> /var/tmp/portage/media-libs/alsa-lib-1.0.28/work/alsa-lib-1.0.28/src/pcm/pcm.
> c:7843:(snd_pcm_recover) underrun occurred
> ALSA lib
> /var/tmp/portage/media-libs/alsa-lib-1.0.28/work/alsa-lib-1.0.28/src/pcm/pcm.
> c:7843:(snd_pcm_recover) underrun occurred
> ALSA lib
> /var/tmp/portage/media-libs/alsa-lib-1.0.28/work/alsa-lib-1.0.28/src/pcm/pcm.
> c:7843:(snd_pcm_recover) underrun occurred
> ALSA lib
> /var/tmp/portage/media-libs/alsa-lib-1.0.28/work/alsa-lib-1.0.28/src/pcm/pcm.
> c:7843:(snd_pcm_recover) underrun occurred
> Sound_Handler closing times 1, freq 22050, format 32784, chan 2
> SDL_AUDIODRIVER alsa
> 
> What is interesting here, everything works like a harm when I use built in
> Intel card. The problem starts when I change to Audiotrack (USB one) using
> pavucontrol. In my case there are two applications that are affected:
> Chromium and Widelands. Everything else works great. The problem didn't
> occur until I've updated to 1.0.28 (but I used a quite old version for
> pretty long time, I even don't remember which version it was).
> 
> I've observed one interesting problem related to the issue. When pavucontrol
> is opened on its Playback tab and Wayland is running, the Wayland's ALSA
> plug-in box is flickering like the application was loosing the connection
> with the ALSA and was trying to make a new one again, over and over.
> 
> Hardware:
> 
> **** List of PLAYBACK Hardware Devices ****
> card 0: MID [HDA Intel MID], device 0: ALC662 rev1 Analog [ALC662 rev1
> Analog]
>   Subdevices: 1/1
>   Subdevice #0: subdevice #0
> card 0: MID [HDA Intel MID], device 3: HDMI 0 [HDMI 0]
>   Subdevices: 1/1
>   Subdevice #0: subdevice #0
> card 1: CUBE [Audiotrak ProDigy CUBE], device 0: USB Audio [USB Audio]
>   Subdevices: 0/1
>   Subdevice #0: subdevice #0
> card 1: CUBE [Audiotrak ProDigy CUBE], device 1: USB Audio [USB Audio #1]
>   Subdevices: 1/1
>   Subdevice #0: subdevice #0

I don't know if you have fixed this issue or not, but I had this same exact problem with switching to a USB audio device. I discovered that if I set these two parameters in /etc/pulse/daemon.conf

default-fragments = 5
default-fragment-size-msec = 2

and restarted pulseaudio with pulseaudio -k, the problem disappeared.

Comment 7 tas_cc 2015-01-11 18:32:06 UTC
(In reply to John5788 from comment #6)
> (In reply to tas_cc from comment #4)
> > Just for your information, it seems that Gentoo is also affected. ALSA
> > 1.0.28.
> > 
> > ALSA lib
> > /var/tmp/portage/media-libs/alsa-lib-1.0.28/work/alsa-lib-1.0.28/src/pcm/pcm.
> > c:7843:(snd_pcm_recover) underrun occurred
> > ALSA lib
> > /var/tmp/portage/media-libs/alsa-lib-1.0.28/work/alsa-lib-1.0.28/src/pcm/pcm.
> > c:7843:(snd_pcm_recover) underrun occurred
> > ALSA lib
> > /var/tmp/portage/media-libs/alsa-lib-1.0.28/work/alsa-lib-1.0.28/src/pcm/pcm.
> > c:7843:(snd_pcm_recover) underrun occurred
> > ALSA lib
> > /var/tmp/portage/media-libs/alsa-lib-1.0.28/work/alsa-lib-1.0.28/src/pcm/pcm.
> > c:7843:(snd_pcm_recover) underrun occurred
> > ALSA lib
> > /var/tmp/portage/media-libs/alsa-lib-1.0.28/work/alsa-lib-1.0.28/src/pcm/pcm.
> > c:7843:(snd_pcm_recover) underrun occurred
> > Sound_Handler closing times 1, freq 22050, format 32784, chan 2
> > SDL_AUDIODRIVER alsa
> > 
> > What is interesting here, everything works like a harm when I use built in
> > Intel card. The problem starts when I change to Audiotrack (USB one) using
> > pavucontrol. In my case there are two applications that are affected:
> > Chromium and Widelands. Everything else works great. The problem didn't
> > occur until I've updated to 1.0.28 (but I used a quite old version for
> > pretty long time, I even don't remember which version it was).
> > 
> > I've observed one interesting problem related to the issue. When pavucontrol
> > is opened on its Playback tab and Wayland is running, the Wayland's ALSA
> > plug-in box is flickering like the application was loosing the connection
> > with the ALSA and was trying to make a new one again, over and over.
> > 
> > Hardware:
> > 
> > **** List of PLAYBACK Hardware Devices ****
> > card 0: MID [HDA Intel MID], device 0: ALC662 rev1 Analog [ALC662 rev1
> > Analog]
> >   Subdevices: 1/1
> >   Subdevice #0: subdevice #0
> > card 0: MID [HDA Intel MID], device 3: HDMI 0 [HDMI 0]
> >   Subdevices: 1/1
> >   Subdevice #0: subdevice #0
> > card 1: CUBE [Audiotrak ProDigy CUBE], device 0: USB Audio [USB Audio]
> >   Subdevices: 0/1
> >   Subdevice #0: subdevice #0
> > card 1: CUBE [Audiotrak ProDigy CUBE], device 1: USB Audio [USB Audio #1]
> >   Subdevices: 1/1
> >   Subdevice #0: subdevice #0
> 
> I don't know if you have fixed this issue or not, but I had this same exact
> problem with switching to a USB audio device. I discovered that if I set
> these two parameters in /etc/pulse/daemon.conf
> 
> default-fragments = 5
> default-fragment-size-msec = 2
> 
> and restarted pulseaudio with pulseaudio -k, the problem disappeared.

Fortunately after changing hardware to a new one (but not the sound card) everything seems to work as expected. The only difference is that my driver is loaded as a module currently, but I don't think it makes any difference. Anyway, thanks you very much for the hint. I'll write it down just in case the problem appears in the future.

Ahh I also moved to systemd, maybe it's the case.

Comment 8 Jaroslav Reznik 2015-03-03 16:10:39 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 22 development cycle.
Changing version to '22'.

More information and reason for this action is here:
https://fedoraproject.org/wiki/Fedora_Program_Management/HouseKeeping/Fedora22

Comment 9 Fedora End Of Life 2016-07-19 11:59:31 UTC
Fedora 22 changed to end-of-life (EOL) status on 2016-07-19. Fedora 22 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.


Note You need to log in before you can comment on or make changes to this bug.