Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Pulseaudio, audio beginning garbled.
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Multimedia
View previous topic :: View next topic  
Author Message
Letharion
Veteran
Veteran


Joined: 13 Jun 2005
Posts: 1342
Location: Sweden

PostPosted: Thu Nov 08, 2012 6:43 pm    Post subject: Pulseaudio, audio beginning garbled. Reply with quote

Almost universially, the beginnig seconds of any audio stream is severely garbled.

Short sounds, like notifications, are entirely garbled, and longer sounds like music just sound horrible in the beginning, only to clear up after 5-10 seconds.

According to The FAQ
Quote:
There are two possible solutions: run PulseAudio with argument --high-priority=1 and make yourself member of the group pulse-rt, or increase the fragment sizes of the audio drivers. The former will allow PulseAudio to activate SCHED_FIFO high priority scheduling (root rights are dropped immediately after this). Keep in mind that this is a potential security hole!


I would like to avoid the high-priority solution if possible, so I tried number two.
Code:
# cd /etc/pulse
# grep -r fragment *
daemon.conf:; default-fragments = 4
daemon.conf:; default-fragment-size-msec = 25


So I changed it:
Code:
# grep -r fragment *
daemon.conf:; default-fragments = 4
daemon.conf:default-fragment-size-msec = 250

and restarted PA (and later the system) but I notice no difference or improvement at all.

The problem exists in both PA1 and PA2 but it's worse with PA2.


Last edited by Letharion on Fri Nov 16, 2012 1:16 pm; edited 1 time in total
Back to top
View user's profile Send private message
Letharion
Veteran
Veteran


Joined: 13 Jun 2005
Posts: 1342
Location: Sweden

PostPosted: Fri Nov 16, 2012 1:16 pm    Post subject: Reply with quote

Adding
Code:
tsched=0
to the udev module loading line in the config solves the problem, but makes PA a bit more powerhungry.
Back to top
View user's profile Send private message
hedmo
Veteran
Veteran


Joined: 29 Aug 2009
Posts: 1305
Location: sweden

PostPosted: Sun Nov 18, 2012 6:47 am    Post subject: Reply with quote

Letharion wrote:
Adding
Code:
tsched=0
to the udev module loading line in the config solves the problem, but makes PA a bit more powerhungry.


Letharion

Thanks.that worked for me to.
Back to top
View user's profile Send private message
Letharion
Veteran
Veteran


Joined: 13 Jun 2005
Posts: 1342
Location: Sweden

PostPosted: Sun Nov 18, 2012 9:50 am    Post subject: Reply with quote

Glad it worked. I got some help from two PA devs in the IRC channel, and I figured it was worth posting back. I provided them with as much info as I coud, but they unfortunately didn't entirely know if it was a driver or PA issue, so for now I believe the tsched workaround will remain in place.

In case it helps anyone else, here's it is again in more detailed, in /etc/pulse/default.pa
Code:
.ifexists module-udev-detect.so
load-module module-udev-detect tsched=0
.else


For reasons that weren't entirely clear to me, the pavucontrol application also forces down latency while it's running, possibly so it will have more up to date data-access for rendering the UI. So simply having it in the background is one workaround aswell.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Multimedia All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum