So I've done some research. This article describes the timer model and
how ALSA works in regards of periods/fragments and software/hardware
buffers: http://0pointer.de/blog/projects/pulse-glitch-free.html
According to the article, PA works in two modes, with tsched=0 it's the
old IRQ-driven mode a
Some more info. On my new laptop that also has a VIA sound chipset I
managed to greatly leverage the problem by installing the low-latency
Ubuntu kernel. I have Ubuntu MATE 14.04 on it so it was effortless.
Unfortunately, for (presumably) performance reasons it doesn't have
CONFIG_SND_PCM_XRUN_DEBU
Created attachment 115078
Kernel log
Here's the log. I've set tsched=0 and set 2 fragments, 2 ms each.
ALSA setup:
Apr 15 12:05:20 work pulseaudio[19799]: [pulseaudio] alsa-util.c: Soft volume
PCM
Apr 15 12:05:20 work pulseaudio[19799]: [pulseaudio] alsa-util.c: Control: PCM
Playback Volume
Ap
Nothing seems to be printed with debug = 13:
[14559.554693] ALSA: PCM: [Q] Lost interrupts?: (stream=0, delta=161,
new_hw_ptr=702553, old_hw_ptr=702392)
[14564.895847] ALSA: PCM: [Q] Lost interrupts?: (stream=0, delta=161,
new_hw_ptr=937945, old_hw_ptr=937784)
[14565.941444] ALSA: PCM: [Q] Lost i
0.5 ms is just what PA reports as the minimal latency. I don't need it
to be this small, I just don't want it to grow up to 100 ms without the
possibility to automatically drop it back to normal. I suppose it's not
possible to make PA work with fragments as ALSA does. As I understand
from the Lenna
Still nothing:
[ 1469.264611] ALSA: PCM: [Q] Lost interrupts?: (stream=0, delta=161,
new_hw_ptr=4954969, old_hw_ptr=4954808)
[ 1469.340845] ALSA: PCM: [Q] Lost interrupts?: (stream=0, delta=169,
new_hw_ptr=4958329, old_hw_ptr=4958160)
[ 1470.946188] ALSA: PCM: [Q] Lost interrupts?: (stream=0, de
Updated my EFI, PA has the same settings:
[ 156.151092] ALSA: PCM: [Q] Lost interrupts?: (stream=0, delta=161,
new_hw_ptr=2517145, old_hw_ptr=2516984)
[ 156.151099] CPU: 0 PID: 2399 Comm: chrome Not tainted 3.19.0-pf2+ #1
[ 156.151100] Hardware name: System manufacturer System Product Name/P8H
ALSA setup:
Apr 14 13:51:06 work pulseaudio[11059]: [pulseaudio] alsa-util.c: Control: PCM
Playback Volume
Apr 14 13:51:06 work pulseaudio[11059]: [pulseaudio] alsa-util.c: min_dB: -51
Apr 14 13:51:06 work pulseaudio[11059]: [pulseaudio] alsa-util.c: max_dB: 0
Apr 14 13:51:06 work pulseaudio[1105
I've tried 11, it's all spammed with messages to the level it gets
suppressed. I'll give it a try tomorrow then. I just don't know which
traces are relevant.
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bu
I have them with 4 fragments of 1 ms each. tsched=0,
device.buffering.buffer_size = "768", device.buffering.fragment_size =
"128":
[11966.628405] ALSA: PCM: [Q] Lost interrupts?: (stream=0, delta=72,
new_hw_ptr=1177, old_hw_ptr=1105)
[11966.636364] ALSA: PCM: [Q] Lost interrupts?: (stream=0, delt
enable_msi=0 doesn't change anything, still the same errors in the log.
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/996906
Title:
periodic audio skips with Intel HDA
To manage notifications about
Both commands produce underruns at large, audible and visible in the
output.
> aplay -D hw:0,0 -v --buffer-time=4000 /tmp/fr025.wav
Playing WAVE '/tmp/fr025.wav' : Signed 16 bit Little Endian, Rate 44100 Hz,
Stereo
Hardware PCM card 0 'HDA Intel PCH' device 0 subdevice 0
Its setup is:
stream
Created attachment 115003
Syslog with debug info
Here's my full syslog. First I started PA with:
default-fragments = 9
default-fragment-size-msec = 2
So the buffer was 800 frames, I couldn't get it to be 768 to have
exactly 16 ms latency. So it was 18 ms. I had no errors in dmesg while
using valu
I don't know if it's related but there's no error messages in dmesg if I
run PA without tsched=0. Though in this case skips are pretty audible
and the fragment size and their number aren't respected. Even worse,
latency grows over time with each skip and becomes unbearable. With
tsched=0 I can at l
When I start PA without tsched=0, it's ALSA setup is weird:
Apr 10 09:46:52 work pulseaudio[5161]: [pulseaudio] alsa-util.c: Control: PCM
Playback Volume
Apr 10 09:46:52 work pulseaudio[5161]: [pulseaudio] alsa-util.c: min_dB: -51
Apr 10 09:46:52 work pulseaudio[5161]: [pulseaudio] alsa-util.c: m
So I've bought a laptop with VIA sound as well and it also have
skips/stutters. I worked around it on both systems with these steps:
1) in /etc/pulse/default.pa added tsched=0:
load-module module-udev-detect tsched=0
2) to reduce latency set in /etc/pulse/daemon.conf:
default-fragments = 4
defaul
I've found that 16000 buffer time with 4000 period time doesn't underrun
while if I change the period time to 1000 or 2000 it underruns pretty
quickly. Lower buffer times underrun regardless of the period time it
seems.
16000/4000 shows these params:
> aplay -D hw:0,0 -v --buffer-time=16000 --pe
Also, when CPU is loaded for any reason I sometimes get this:
Apr 09 11:56:10 work pulseaudio[9718]: [alsa-sink-VT1708S Analog]
protocol-native.c: Implicit underrun of 'Playback'
Apr 09 11:56:10 work pulseaudio[9718]: [alsa-sink-VT1708S Analog] sink.c: Found
underrun 1380 bytes ago (1436 bytes a
# aplay -D hw:0,0 -v --buffer-size=1500 /tmp/fr025.wav
Playing WAVE '/tmp/fr025.wav' : Signed 16 bit Little Endian, Rate 44100 Hz,
Stereo
Hardware PCM card 0 'HDA Intel PCH' device 0 subdevice 0
Its setup is:
stream : PLAYBACK
access : RW_INTERLEAVED
format : S16_LE
subfo
Ok, so 1024 overruns:
# aplay -D hw:0,0 -v --buffer-size=1024 /tmp/fr025.wav
Playing WAVE '/tmp/fr025.wav' : Signed 16 bit Little Endian, Rate 44100 Hz,
Stereo
Hardware PCM card 0 'HDA Intel PCH' device 0 subdevice 0
Its setup is:
stream : PLAYBACK
access : RW_INTERLEAVED
format
It turned out that garbled sound in LMMS with alsa output was because of
"options snd-hda-intel position_fix=1" I used in module options. Tried
to fix this skips but it didn't work. After removing this option and
reloading the snd_hda_intel module, LMMS sounds much better with alsa
output but that
I was too fast coming to conclusions. ALSA plugin in LMMS still croaks
after PA worked several hours and gained latency of 36.00ms currently.
It may go down if I disconnect all its clients but I'm listening to
music all the day while working so it's not an option. Underruns happen
more often if LMM
Created attachment 113112
High latency because of underruns
Nah, after all prealloc is just snake oil. I now have latency of 66 ms
which is unacceptable.
1 sink(s) available.
* index: 0
name:
driver:
flags: HARDWARE HW_MUTE_CTRL HW_VOLUME_CTRL DECIBEL_VOLUME LATENCY
F
Created attachment 113034
Underruns in the log
Same with VIA VT1708S. When I start pavucontrol it skips hardly and almost
stops sometimes. Because of that latency increases and may get up to 80 ms
which is unacceptable as PulseAudio's goal is to provide low latency audio. Of
course, it doesn't
Created attachment 113083
Underruns with prealloc=2048
I was able to leverage the "Underrun!" issue by setting prealloc to 2048
in kernel options (recompiled it). It can also be achieved via echo 2048
> /proc/asound/card0/pcm0p/sub0/prealloc without recompiling. Wonder why
64 is still default in D
Base Board Information
Manufacturer: ASUSTeK Computer INC.
Product Name: P8H61-M LX2
> You can also connect the onboard header to an S/PDIF input header
available on some graphics cards using an S/PDIF cable.
I don't have any digital audio equipment, only headphones with a regular
LMMS uses 64 frames, 1.5 ms but actually it has latency of 30-35 ms as
"pacmd list-sink-inputs" says. Setting its output to ALSA results in
extremely garbled sound, the only two options that actually produce
reasonable sound is PulseAudio (bad latency) and SDL. Actually, latency
isn't that bad if o
To elaborate: I get garbled sound in LMMS when I use PulseAudio and set
LMMS to use ALSA so it's intercepted. Everything is fine if I use pure
ALSA everywhere but it's not the point here if we try to debug PA.
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is
I don't know, it's what I set in the LMMS settings:
http://i.imgur.com/MRYJC4J.png
Anyway, no matter what I set in one particular program, other clients
should not skip because of that.
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
Created attachment 113035
alsa-info
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/996906
Title:
periodic audio skips with Intel HDA
To manage notifications about this bug go to:
https://bugs.launch
Interesting. I've converted that file to 44100 Hz and now it reveals a
strange behavior. When I play it with buffer size of 64 it sounds like
the pitch is lower than it should be (even if it doesn't overrun though
it does from time to time). When the size is 128 it sounds fine.
# aplay -D plughw:C
Tried with a stereo 48k file (converted
/usr/share/sounds/KDE-Im-Cant-Connect.ogg to wav, tested with ffprobe that it's
truly 48k/2chan) and 64 bytes buffer size:
# aplay -D plughw:CARD=CA0106 -v --buffer-size=64 /tmp/kde.wav
Playing WAVE '/tmp/kde.wav' : Signed 16 bit Little Endian, Rate 48000 H
# aplay -D plughw:CARD=CA0106 -v --buffer-size=128
/usr/share/sounds/alsa/Side_Left.wav
Playing WAVE '/usr/share/sounds/alsa/Side_Left.wav' : Signed 16 bit Little
Endian, Rate 48000 Hz, Mono
Plug PCM: Route conversion PCM (sformat=S16_LE)
Transformation table:
0 <- 0
1 <- 0
Its setup is
This command doesn't work, it says "aplay: set_params:1239: Channels
count non available". The -D default:CARD=CA0106 variant works and it
does not overrun. I only had overruns on recording (at least, explicit).
That said, I've made a huge improvement in my system, I compiled a pf-
kernel and set C
(In reply to Raymond from comment #57)
> Do surround21 , surround41 appear in
>
> aplay -L
null
Discard all samples (playback) or generate zero samples (capture)
pulse
PulseAudio Sound Server
default:CARD=CA0106
CA0106, CA0106
Default Audio Device
sysdefault:CARD=CA0106
CA010
(In reply to Raymond from comment #49)
> did your sb0410 have these two chips ?
>
> ADC: WM8775EDS (4 Channel)
> DAC: CS4382
>
My card looks exactly like this:
http://www.ixbt.com/multimedia/creative-live!24bit/card-big.jpg
Probably, it has all these chips.
--
You received this bug notifica
It does:
> arecord -f dat -D hw:CARD=CA0106 -t wav -d 5 test.wav
Recording WAVE 'test.wav' : Signed 16 bit Little Endian, Rate 48000 Hz, Stereo
overrun!!! (at least 0.084 ms long)
^CAborted by signal Interrupt...
--
You received this bug notification because you are a member of Ubuntu
Bugs, which
It happens more likely with small buffers and sometimes doesn't happen with
larger buffer. However, this behavior is not consistent:
%[homecomp]:[/tmp/test]> arecord -f dat -D hw:CARD=CA0106 -t wav -d 5
--buffer-size=2048 test.wav
Recording WAVE 'test.wav' : Signed 16 bit Little Endian, Rate 48
BTW, my mic is connected to the blue jack, not the usual pink one. This
is the only configuration I've found to be working, others result in
noise or silence. The mic is a bit more quiet (not _almost silent_ as if
it's connected to a Line-In jack, just not comfortable enough) than it
was on the ALC
Recording WAVE 'test.wav' : Signed 16 bit Little Endian, Rate 48000 Hz, Stereo
HW Params of device "iec958:CARD=CA0106":
ACCESS: MMAP_INTERLEAVED RW_INTERLEAVED
FORMAT: S16_LE S32_LE
SUBFORMAT: STD
SAMPLE_BITS: [16 32]
FRAME_BITS: [32 64]
CHANNELS: 2
RATE: [48000 192000]
PER
Created attachment 111663
pactl list log
Log of pactl list.
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1315212
Title:
[CA0106 - CA0106, playback] Playback problem - Surround dies, no valid
out
Created attachment 111662
Pulse log
(In reply to Raymond from comment #35)
> can you specify device 0
>
> + capture.pcm {
> +type hw
> +card $CARD
> + device 0
> +
Added this, here's the startup log.
--
You received this bug notification be
Created attachment 111616
pcm_avail log
Here's the output of pcm_avail.c program.
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1315212
Title:
[CA0106 - CA0106, playback] Playback problem - Surroun
(In reply to Raymond from comment #25)
> seem default sample 16 bits has no effect on format , pulseaudio prefer 32
> bits
No, it does. I have these options uncommented in my daemon.conf:
default-sample-format = s32le
default-sample-rate = 48000
I have them enabled for some time and PA startup l
Created attachment 111649
ALSA info
Here's the output of alsa-info.sh. The speaker test works, all three
commands without errors. However, I only have 2 speakers so I hear
"front left" and "front right".
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subs
Created attachment 111615
Fixed PA log
It now doesn't report "Cannot lock ctl elem".
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1315212
Title:
[CA0106 - CA0106, playback] Playback problem - Surr
Created attachment 111585
ALSA test log
I've applied those changes for the ALSA config. I ran the test as
./a.out front:0 0 4 > alsa-test.log and here's the output. I stopped it
with Ctrl-C. When I set the fillrate less than 4, it stops with the
assertion failure like before. Setting the fillrate
Good, the file is there and it has those lines you mentioned in #10. Now
how should I modify them? Could you provide a diff to apply? I don't
really get what "to put the current ca0106 iec958 slave pcm and hook
into playback slave and create capture slave of asym plugin" means. If
the alternative m
(In reply to Raymond from comment #14)
> you need to put the current ca0106 iec958 slave pcm and hook into playback
> slave and create capture slave of asym plugin
Sorry, I don't understand. I'm not that familiar with low-level ALSA configs, I
only did some basic operations with ~/.asoundrc
What
(In reply to Raymond from comment #8)
>
> how did you run the program ?
>
> the program is hardcoded to use 44100Hz , it should run continously without
> any error if fillrate is equal to period size
>
> if sound card can report hw_ptr with better grannularity, the program can
> still run contin
50 matches
Mail list logo