[Bug 996906] Re: periodic audio skips with Intel HDA

2018-08-04 Thread Bug Watch Updater
** Changed in: pulseaudio
   Status: Confirmed => Unknown

-- 
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.launchpad.net/pulseaudio/+bug/996906/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 996906]

2018-08-04 Thread Gitlab-migration
-- 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/503.

-- 
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.launchpad.net/pulseaudio/+bug/996906/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 996906]

2015-04-21 Thread Raymond
hardware pointer should be increased by one period on every
period_update, the driver report lost interrupt when the elasped time is
more than 1.5 period time


https://git.kernel.org/cgit/linux/kernel/git/tiwai/sound.git/tree/sound/core/pcm_lib.c


no_jiffies_check:
if (delta  runtime-period_size + runtime-period_size / 2) {
hw_ptr_error(substream, in_interrupt,
 Lost interrupts?,
 (stream=%i, delta=%ld, new_hw_ptr=%ld, 
old_hw_ptr=%ld)\n,
 substream-stream, (long)delta,
 (long)new_hw_ptr,
 (long)old_hw_ptr);
}

-- 
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.launchpad.net/pulseaudio/+bug/996906/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 996906]

2015-04-21 Thread Rkfg
 
8800948ab400
[  171.815166]  a062e10f 00014080 880235e4b428 
880235e4b3c0
[  171.815168]  810993d3 00ff88023fa14080  
0001000277a3
[  171.815170] Call Trace:
[  171.815172]  IRQ  [8154b50a] ? dump_stack+0x4a/0x74
[  171.815191]  [a062e10f] ? snd_pcm_update_hw_ptr0+0x40f/0x8d0 
[snd_pcm]
[  171.815196]  [810993d3] ? check_preempt_wakeup+0xb3/0x210
[  171.815199]  [815508fc] ? _raw_spin_unlock_irqrestore+0x1c/0x40
[  171.815204]  [a062e63a] ? snd_pcm_period_elapsed+0x6a/0xe0 
[snd_pcm]
[  171.815208]  [a0582f2b] ? azx_interrupt+0x10b/0x1c0 
[snd_hda_controller]
[  171.815212]  [810c7f6d] ? handle_irq_event_percpu+0x2d/0x1e0
[  171.815215]  [810c8159] ? handle_irq_event+0x39/0x60
[  171.815217]  [810cafd1] ? handle_edge_irq+0x91/0x150
[  171.815221]  [81017678] ? handle_irq+0x18/0x30
[  171.815223]  [81016dfd] ? do_IRQ+0x4d/0xf0
[  171.815226]  [81551fed] ? common_interrupt+0x6d/0x6d
[  171.815227]  EOI  [81427f99] ? cpuidle_enter_state+0x59/0x1a0
[  171.815232]  [81427f89] ? cpuidle_enter_state+0x49/0x1a0
[  171.815235]  [810a4599] ? cpu_startup_entry+0x489/0x4f0
[  171.815238]  [818edf69] ? start_kernel+0x47b/0x486
[  171.815240]  [818ed120] ? early_idt_handlers+0x120/0x120
[  171.815242]  [818ed120] ? early_idt_handlers+0x120/0x120
[  171.815244]  [818ed60d] ? x86_64_start_kernel+0x150/0x15f

-- 
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.launchpad.net/pulseaudio/+bug/996906/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 996906]

2015-04-21 Thread Raymond
Also, after I do:
echo 1  /proc/asound/card0/pcm0p/xrun_debug

1 is not enough


http://www.alsa-project.org/main/index.php/XRUN_Debug

you need 11 to find out whether hardware pointer are correct on period
update and how often lost interrupt occur compared with period update ?


# Enable basic debugging and dump stack, check hardware pointer on the period 
update
 # Usefull to just see, if PCM stream is stopped for a reason (usually wrong 
audio process timing from scheduler)
 # And to check the values from driver
 echo 11  /proc/asound/card0/pcm0p/xrun_debu

-- 
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.launchpad.net/pulseaudio/+bug/996906/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 996906]

2015-04-21 Thread Rkfg
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/bugs/996906

Title:
  periodic audio skips with Intel HDA

To manage notifications about this bug go to:
https://bugs.launchpad.net/pulseaudio/+bug/996906/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 996906]

2015-04-21 Thread Raymond
[ 3504.156337] ALSA: PCM: [Q] Lost interrupts?: (stream=0, delta=72,
new_hw_ptr=1489, old_hw_ptr=1417)


do you still get those  ALSA: PCM: [Q] Lost interrupts?:  when you specify 
align_buffer_size=1 ?


MODULE_PARM_DESC(align_buffer_size,
Force buffer and period sizes to be multiple of 128 bytes.);
 

https://git.kernel.org/cgit/linux/kernel/git/tiwai/sound.git/commit/sound/pci/hda?id=7bfe059e38b06a0d813d92b9b3e500455f6a2c99

-- 
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.launchpad.net/pulseaudio/+bug/996906/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 996906]

2015-04-21 Thread Rkfg
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, delta=72, 
new_hw_ptr=1521, old_hw_ptr=1449)
[11966.668090] ALSA: PCM: [Q] Lost interrupts?: (stream=0, delta=72, 
new_hw_ptr=505, old_hw_ptr=433)
[11966.671573] ALSA: PCM: [Q] Lost interrupts?: (stream=0, delta=79, 
new_hw_ptr=672, old_hw_ptr=593)
[11966.676095] ALSA: PCM: [Q] Lost interrupts?: (stream=0, delta=72, 
new_hw_ptr=889, old_hw_ptr=817)
[11966.681435] ALSA: PCM: [Q] Lost interrupts?: (stream=0, delta=56, 
new_hw_ptr=1145, old_hw_ptr=1089)
[11966.686940] ALSA: PCM: [Q] Lost interrupts?: (stream=0, delta=80, 
new_hw_ptr=1409, old_hw_ptr=1329)
[11966.689460] ALSA: PCM: [Q] Lost interrupts?: (stream=0, delta=80, 
new_hw_ptr=1529, old_hw_ptr=1449)
[11966.692775] ALSA: PCM: [Q] Lost interrupts?: (stream=0, delta=80, 
new_hw_ptr=1689, old_hw_ptr=1609)
[11966.696944] ALSA: PCM: [Q] Lost interrupts?: (stream=0, delta=80, 
new_hw_ptr=1889, old_hw_ptr=1809)

# cat /sys/module/snd_hda_intel/parameters/align_buffer_size
1

It has also printed this in the PA's log: http://pastebin.com/jAQx6DEZ

 ALSA woke us up to write new data to the device, but there was
actually nothing to write! Most likely this is a bug in the ALSA driver
'snd_hda_intel'. Please report this issue to the ALSA developers. We
were woken up with POLLOUT set -- however a subsequent snd_pcm_avail()
returned 0 or another value  min_avail.

-- 
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.launchpad.net/pulseaudio/+bug/996906/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 996906]

2015-04-21 Thread Raymond
(In reply to rkfg from comment #35)
 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:   rate 
 : 44100
 Apr 10 09:46:52 work pulseaudio[5161]: [pulseaudio] alsa-util.c:   exact
 rate   : 44100 (44100/1)
 Apr 10 09:46:52 work pulseaudio[5161]: [pulseaudio] alsa-util.c:   msbits   
 : 16
 Apr 10 09:46:52 work pulseaudio[5161]: [pulseaudio] alsa-util.c:  
 buffer_size  : 88192
 Apr 10 09:46:52 work pulseaudio[5161]: [pulseaudio] alsa-util.c:  
 period_size  : 44096
 Apr 10 09:46:52 work pulseaudio[5161]: [pulseaudio] alsa-util.c:  
 period_time  : 09
 Apr 10 09:46:52 work pulseaudio[5161]: [pulseaudio] alsa-util.c:  
 
 
 Why does period size lack 4 bytes to be exactly 1 second long?


https://git.kernel.org/cgit/linux/kernel/git/tiwai/sound.git/commit/sound/pci/hda/hda_intel.c?id=5f1545bc45a33361d6bb2fb44af7c35bcd733b9d


snd_pcm_hw_constraint_step(runtime, 0, SNDRV_PCM_HW_PARAM_BUFFER_BYTES,
+  128);
+   snd_pcm_hw_constraint_step(runtime, 0, SNDRV_PCM_HW_PARAM_PERIOD_BYTES,
+  128);

https://git.kernel.org/cgit/linux/kernel/git/tiwai/sound.git/commit/sound/pci/hda/hda_intel.c?id=103884a351a221553095c509a1dbbbf7d4fd9b05

-- 
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.launchpad.net/pulseaudio/+bug/996906/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 996906]

2015-04-21 Thread Rkfg
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[11059]: [pulseaudio] alsa-util.c: resolution: 
256
Apr 14 13:51:06 work pulseaudio[11059]: [pulseaudio] alsa-util.c: Its setup is:
Apr 14 13:51:06 work pulseaudio[11059]: [pulseaudio] alsa-util.c:   stream  
 : PLAYBACK
Apr 14 13:51:06 work pulseaudio[11059]: [pulseaudio] alsa-util.c:   access  
 : MMAP_INTERLEAVED
Apr 14 13:51:06 work pulseaudio[11059]: [pulseaudio] alsa-util.c:   format  
 : S16_LE
Apr 14 13:51:06 work pulseaudio[11059]: [pulseaudio] alsa-util.c:   subformat   
 : STD
Apr 14 13:51:06 work pulseaudio[11059]: [pulseaudio] alsa-util.c:   channels
 : 2
Apr 14 13:51:06 work pulseaudio[11059]: [pulseaudio] alsa-util.c:   rate
 : 44100
Apr 14 13:51:06 work pulseaudio[11059]: [pulseaudio] alsa-util.c:   exact rate  
 : 44100 (44100/1)
Apr 14 13:51:06 work pulseaudio[11059]: [pulseaudio] alsa-util.c:   msbits  
 : 16
Apr 14 13:51:06 work pulseaudio[11059]: [pulseaudio] alsa-util.c:   buffer_size 
 : 192
Apr 14 13:51:06 work pulseaudio[11059]: [pulseaudio] alsa-util.c:   period_size 
 : 32
Apr 14 13:51:06 work pulseaudio[11059]: [pulseaudio] alsa-util.c:   period_time 
 : 725
Apr 14 13:51:06 work pulseaudio[11059]: [pulseaudio] alsa-util.c:   tstamp_mode 
 : ENABLE
Apr 14 13:51:06 work pulseaudio[11059]: [pulseaudio] alsa-util.c:   period_step 
 : 1
Apr 14 13:51:06 work pulseaudio[11059]: [pulseaudio] alsa-util.c:   avail_min   
 : 32
Apr 14 13:51:06 work pulseaudio[11059]: [pulseaudio] alsa-util.c:   
period_event : 1
Apr 14 13:51:06 work pulseaudio[11059]: [pulseaudio] alsa-util.c:   
start_threshold  : -1
Apr 14 13:51:06 work pulseaudio[11059]: [pulseaudio] alsa-util.c:   
stop_threshold   : 6917529027641081856
Apr 14 13:51:06 work pulseaudio[11059]: [pulseaudio] alsa-util.c:   
silence_threshold: 0
Apr 14 13:51:06 work pulseaudio[11059]: [pulseaudio] alsa-util.c:   
silence_size : 0
Apr 14 13:51:06 work pulseaudio[11059]: [pulseaudio] alsa-util.c:   boundary
 : 6917529027641081856
Apr 14 13:51:06 work pulseaudio[11059]: [pulseaudio] alsa-util.c: Slave: 
Hardware PCM card 0 'HDA Intel PCH' device 0 subdevice 0
Apr 14 13:51:06 work pulseaudio[11059]: [pulseaudio] alsa-util.c: Its setup is:
Apr 14 13:51:06 work pulseaudio[11059]: [pulseaudio] alsa-util.c:   stream  
 : PLAYBACK
Apr 14 13:51:06 work pulseaudio[11059]: [pulseaudio] alsa-util.c:   access  
 : MMAP_INTERLEAVED
Apr 14 13:51:06 work pulseaudio[11059]: [pulseaudio] alsa-util.c:   format  
 : S16_LE
Apr 14 13:51:06 work pulseaudio[11059]: [pulseaudio] alsa-util.c:   subformat   
 : STD
Apr 14 13:51:06 work pulseaudio[11059]: [pulseaudio] alsa-util.c:   channels
 : 2
Apr 14 13:51:06 work pulseaudio[11059]: [pulseaudio] alsa-util.c:   rate
 : 44100
Apr 14 13:51:06 work pulseaudio[11059]: [pulseaudio] alsa-util.c:   exact rate  
 : 44100 (44100/1)
Apr 14 13:51:06 work pulseaudio[11059]: [pulseaudio] alsa-util.c:   msbits  
 : 16
Apr 14 13:51:06 work pulseaudio[11059]: [pulseaudio] alsa-util.c:   buffer_size 
 : 192
Apr 14 13:51:06 work pulseaudio[11059]: [pulseaudio] alsa-util.c:   period_size 
 : 32
Apr 14 13:51:06 work pulseaudio[11059]: [pulseaudio] alsa-util.c:   period_time 
 : 725
Apr 14 13:51:06 work pulseaudio[11059]: [pulseaudio] alsa-util.c:   tstamp_mode 
 : ENABLE
Apr 14 13:51:06 work pulseaudio[11059]: [pulseaudio] alsa-util.c:   period_step 
 : 1
Apr 14 13:51:06 work pulseaudio[11059]: [pulseaudio] alsa-util.c:   avail_min   
 : 32
Apr 14 13:51:06 work pulseaudio[11059]: [pulseaudio] alsa-util.c:   
period_event : 1
Apr 14 13:51:06 work pulseaudio[11059]: [pulseaudio] alsa-util.c:   
start_threshold  : -1
Apr 14 13:51:06 work pulseaudio[11059]: [pulseaudio] alsa-util.c:   
stop_threshold   : 6917529027641081856
Apr 14 13:51:06 work pulseaudio[11059]: [pulseaudio] alsa-util.c:   
silence_threshold: 0
Apr 14 13:51:06 work pulseaudio[11059]: [pulseaudio] alsa-util.c:   
silence_size : 0
Apr 14 13:51:06 work pulseaudio[11059]: [pulseaudio] alsa-util.c:   boundary
 : 6917529027641081856
Apr 14 13:51:06 work pulseaudio[11059]: [pulseaudio] alsa-util.c:   appl_ptr
 : 0
Apr 14 13:51:06 work pulseaudio[11059]: [pulseaudio] alsa-util.c:   hw_ptr  
 : 0

-- 
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.launchpad.net/pulseaudio/+bug/996906/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 996906]

2015-04-21 Thread Rkfg
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 as ALSA does and it heavily relies to the fragments
number and size. Hence it gets ALSA underruns if the app is too slow to
fill the buffer. It happens to my work PC sometime because it isn't too
fast (model name: Intel(R) Pentium(R) CPU G620 @ 2.60GHz) and I mostly
listen to music in Chrome (HTML5 audio). Chrome has the latency of ~65
ms now. It's quite feasible that some program would occupy the CPU for
this much time so I'd have a skip/underrun. In case of tsched=0 there's
nothing we can do as period/buffer size is set up on startup and
basically can't be changed in runtime.

When tsched=1 or not specified (defaults to 1) PA sets up an ALSA buffer
of 2 seconds long with two periods of 1 second each. This way it doesn't
underrun in ALSA but rather underruns in PA itself. This code is
responsible for tweaking the watermark and latency:
https://github.com/pulseaudio/pulseaudio/blob/master/src/modules/alsa
/alsa-sink.c#L326

The problem here is that watermark can go in both directions, up and
down, while latency can only grow until the sink is reset (recreated).
This actually means that if some particular program has chosen too
little latency and had several underruns because of that, THE WHOLE LOT
OF OTHER PROGRAMS now will suffer bad latency as well! And there's no
other way to lower it back other than restarting PA itself together with
all its clients or when PA gets unsuspended (
https://github.com/pulseaudio/pulseaudio/blob/master/src/modules/alsa
/alsa-sink.c#L1021 ).

I haven't found a way to setup a default minimal latency so that if I
know that my system isn't capable to deliver 4 ms, I can set it to 16
instead of having  0.5 ms and several underruns just to let PA get to
that latency by itself. It seems to me that this minimal latency is just
hardcoded (
https://github.com/pulseaudio/pulseaudio/blob/master/src/pulsecore/sink.c#L54
) and there are no tools to call pa_sink_set_latency_range (
https://github.com/pulseaudio/pulseaudio/blob/master/src/pulsecore/sink.c#L3091
)

And also, I repeat, launching pavucontrol for the first time and
sometimes pacmd list-sinks causes stuttering on my work system (works ok
at home but there I have i7-2600 and PCI SB Live 7.1). I don't know how
and why but they seem to block PA somewhere so that Chrome can't sink
its audio to it in time and hence we get an underrun, latency increase
and the bad mood. I dunno, maybe I have to file this pavucontrol bug
separately.

-- 
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.launchpad.net/pulseaudio/+bug/996906/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 996906]

2015-04-21 Thread Raymond
https://git.kernel.org/cgit/linux/kernel/git/tiwai/sound.git/tree/Documentation/sound/alsa/Procfile.txt


http://mailman.alsa-project.org/pipermail/alsa-
devel/2014-November/083495.html


you need to ask the author how to debug your case Lost Interrupt!

-- 
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.launchpad.net/pulseaudio/+bug/996906/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 996906]

2015-04-21 Thread Raymond
pr 14 13:51:06 work pulseaudio[11059]: [pulseaudio] alsa-util.c:   buffer_size  
: 192
Apr 14 13:51:06 work pulseaudio[11059]: [pulseaudio] alsa-util.c:   period_size 
 : 32
Apr 14 13:51:06 work pulseaudio[11059]: [pulseaudio] alsa-util.c:   period_time 
 : 725


the minimum period size of stereo s16le is 32 frames

you cannot get fragment time exactly 1ms ,

at this low latency, the sleep time will be less than 1ms if you are
using two periods

-- 
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.launchpad.net/pulseaudio/+bug/996906/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 996906]

2015-04-21 Thread Rkfg
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_DEBUG enabled so I can't see if it also misses
interrupts. However, on the default stock kernel which has this option
it misses interrupts indeed. I tried various position_fix and enable_msi
values and nothing helped. I had underruns in the log while doing usual
things like opening sites, now on the low-latency kernel it's all good
even on PA's timer-based scheduling.

I can only guess but it could be because the CPU has only two cores and
sometimes it can't schedule an interrupt in time. The low-latency kernel
has 1000 Hz timer compared to 250 Hz in the default one. It also has
various NO_HZ_* options enabled. I'll try two options on Monday with my
own kernel for Debian: one would be using the BFS scheduler and another
one will feature CONFIG_NO_HZ_FULL_ALL and alike options which are
disabled when BFS is used. I'll check if either of them will help with
the missed interrupts.

The problem as I see it is that my work PC and this laptop isn't
powerful enough to server IRQs in time. They both have VIA sound
although a bit different models and 2 core CPUs. My home PC has 4 cores
that are also more powerful. I tried to output some sound via PA to its
Realtek ALC889 card and enabled xrun_debug. There were no messages about
lost interrupts and I'm using the same kernel that's used on the work
PC. So the different behavior is either because of different
codecs/chipsets or CPUs.

-- 
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.launchpad.net/pulseaudio/+bug/996906/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 996906]

2015-04-21 Thread Rkfg
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
Apr 15 12:05:20 work pulseaudio[19799]: [pulseaudio] alsa-util.c: min_dB: -51
Apr 15 12:05:20 work pulseaudio[19799]: [pulseaudio] alsa-util.c: max_dB: 0
Apr 15 12:05:20 work pulseaudio[19799]: [pulseaudio] alsa-util.c: resolution: 
256
Apr 15 12:05:20 work pulseaudio[19799]: [pulseaudio] alsa-util.c: Its setup is:
Apr 15 12:05:20 work pulseaudio[19799]: [pulseaudio] alsa-util.c:   stream  
 : PLAYBACK
Apr 15 12:05:20 work pulseaudio[19799]: [pulseaudio] alsa-util.c:   access  
 : MMAP_INTERLEAVED
Apr 15 12:05:20 work pulseaudio[19799]: [pulseaudio] alsa-util.c:   format  
 : S16_LE
Apr 15 12:05:20 work pulseaudio[19799]: [pulseaudio] alsa-util.c:   subformat   
 : STD
Apr 15 12:05:20 work pulseaudio[19799]: [pulseaudio] alsa-util.c:   channels
 : 2
Apr 15 12:05:20 work pulseaudio[19799]: [pulseaudio] alsa-util.c:   rate
 : 44100
Apr 15 12:05:20 work pulseaudio[19799]: [pulseaudio] alsa-util.c:   exact rate  
 : 44100 (44100/1)
Apr 15 12:05:20 work pulseaudio[19799]: [pulseaudio] alsa-util.c:   msbits  
 : 16
Apr 15 12:05:20 work pulseaudio[19799]: [pulseaudio] alsa-util.c:   buffer_size 
 : 192
Apr 15 12:05:20 work pulseaudio[19799]: [pulseaudio] alsa-util.c:   period_size 
 : 96
Apr 15 12:05:20 work pulseaudio[19799]: [pulseaudio] alsa-util.c:   period_time 
 : 2176
Apr 15 12:05:20 work pulseaudio[19799]: [pulseaudio] alsa-util.c:   tstamp_mode 
 : ENABLE
Apr 15 12:05:20 work pulseaudio[19799]: [pulseaudio] alsa-util.c:   period_step 
 : 1
Apr 15 12:05:20 work pulseaudio[19799]: [pulseaudio] alsa-util.c:   avail_min   
 : 96
Apr 15 12:05:20 work pulseaudio[19799]: [pulseaudio] alsa-util.c:   
period_event : 1
Apr 15 12:05:20 work pulseaudio[19799]: [pulseaudio] alsa-util.c:   
start_threshold  : -1
Apr 15 12:05:20 work pulseaudio[19799]: [pulseaudio] alsa-util.c:   
stop_threshold   : 6917529027641081856
Apr 15 12:05:20 work pulseaudio[19799]: [pulseaudio] alsa-util.c:   
silence_threshold: 0
Apr 15 12:05:20 work pulseaudio[19799]: [pulseaudio] alsa-util.c:   
silence_size : 0
Apr 15 12:05:20 work pulseaudio[19799]: [pulseaudio] alsa-util.c:   boundary
 : 6917529027641081856
Apr 15 12:05:20 work pulseaudio[19799]: [pulseaudio] alsa-util.c: Slave: 
Hardware PCM card 0 'HDA Intel PCH' device 0 subdevice 0
Apr 15 12:05:20 work pulseaudio[19799]: [pulseaudio] alsa-util.c: Its setup is:
Apr 15 12:05:20 work pulseaudio[19799]: [pulseaudio] alsa-util.c:   stream  
 : PLAYBACK
Apr 15 12:05:20 work pulseaudio[19799]: [pulseaudio] alsa-util.c:   access  
 : MMAP_INTERLEAVED
Apr 15 12:05:20 work pulseaudio[19799]: [pulseaudio] alsa-util.c:   format  
 : S16_LE
Apr 15 12:05:20 work pulseaudio[19799]: [pulseaudio] alsa-util.c:   subformat   
 : STD
Apr 15 12:05:20 work pulseaudio[19799]: [pulseaudio] alsa-util.c:   channels
 : 2
Apr 15 12:05:20 work pulseaudio[19799]: [pulseaudio] alsa-util.c:   rate
 : 44100
Apr 15 12:05:20 work pulseaudio[19799]: [pulseaudio] alsa-util.c:   exact rate  
 : 44100 (44100/1)
Apr 15 12:05:20 work pulseaudio[19799]: [pulseaudio] alsa-util.c:   msbits  
 : 16
Apr 15 12:05:20 work pulseaudio[19799]: [pulseaudio] alsa-util.c:   buffer_size 
 : 192
Apr 15 12:05:20 work pulseaudio[19799]: [pulseaudio] alsa-util.c:   period_size 
 : 96
Apr 15 12:05:20 work pulseaudio[19799]: [pulseaudio] alsa-util.c:   period_time 
 : 2176
Apr 15 12:05:20 work pulseaudio[19799]: [pulseaudio] alsa-util.c:   tstamp_mode 
 : ENABLE
Apr 15 12:05:20 work pulseaudio[19799]: [pulseaudio] alsa-util.c:   period_step 
 : 1
Apr 15 12:05:20 work pulseaudio[19799]: [pulseaudio] alsa-util.c:   avail_min   
 : 96
Apr 15 12:05:20 work pulseaudio[19799]: [pulseaudio] alsa-util.c:   
period_event : 1
Apr 15 12:05:20 work pulseaudio[19799]: [pulseaudio] alsa-util.c:   
start_threshold  : -1
Apr 15 12:05:20 work pulseaudio[19799]: [pulseaudio] alsa-util.c:   
stop_threshold   : 6917529027641081856
Apr 15 12:05:20 work pulseaudio[19799]: [pulseaudio] alsa-util.c:   
silence_threshold: 0
Apr 15 12:05:20 work pulseaudio[19799]: [pulseaudio] alsa-util.c:   
silence_size : 0
Apr 15 12:05:20 work pulseaudio[19799]: [pulseaudio] alsa-util.c:   boundary
 : 6917529027641081856
Apr 15 12:05:20 work pulseaudio[19799]: [pulseaudio] alsa-util.c:   appl_ptr
 : 0
Apr 15 12:05:20 work pulseaudio[19799]: [pulseaudio] alsa-util.c:   hw_ptr  
 : 0

-- 
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.launchpad.net/pulseaudio/+bug/996906/+subscriptions

-- 
ubuntu-bugs mailing list

[Bug 996906]

2015-04-21 Thread Rkfg
[6121]: [pulseaudio] alsa-util.c:   appl_ptr 
: 0
Apr 16 19:16:17 homecomp pulseaudio[6121]: [pulseaudio] alsa-util.c:   hw_ptr   
: 0

The point is, while the configuration looks the same the latency is
huge, it's exactly 168 ms and is just unbearable. That's what happens
after some really bad PC slowdowns because of the workload and it
happens for every app and there's no way to make it behave properly
without restarting PA and everything else. So why PA doesn't work as
dmix does? Why dmix has 168ms buffer and responds instantly like there's
no perceptible latency? Why dmix never underruns (at least audibly)
while PA does it pretty often on a range of chipsets? I would be pretty
happy with 21 ms fixed latency that never underruns but I just can't
setup PA to work like this.

Please, Raymond, don't go into the details, like, this particular card
isn't Intel HDA the period size in PA is slightly less (1008 vs 1024)
and so on. I see it clearly, that's not important here. What's important
is the fact that dmix does its job much better than PA in any
configuration (negligible latency + no underruns) and I want to know why
and how to make PA work like dmix in this regard.

-- 
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.launchpad.net/pulseaudio/+bug/996906/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 996906]

2015-04-21 Thread Rkfg
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, delta=153, 
new_hw_ptr=5029073, old_hw_ptr=5028920)
[ 1471.872164] ALSA: PCM: [Q] Lost interrupts?: (stream=0, delta=168, 
new_hw_ptr=5069888, old_hw_ptr=5069720)
[ 1473.533990] ALSA: PCM: [Q] Lost interrupts?: (stream=0, delta=153, 
new_hw_ptr=5143121, old_hw_ptr=5142968)
[ 1475.176618] ALSA: PCM: [Q] Lost interrupts?: (stream=0, delta=176, 
new_hw_ptr=5215520, old_hw_ptr=5215344)
[ 1477.775171] ALSA: PCM: [Q] Lost interrupts?: (stream=0, delta=161, 
new_hw_ptr=5330041, old_hw_ptr=5329880)
[ 1478.241325] ALSA: PCM: [Q] Lost interrupts?: (stream=0, delta=161, 
new_hw_ptr=5350585, old_hw_ptr=5350424)
[ 1479.169273] ALSA: PCM: [Q] Lost interrupts?: (stream=0, delta=161, 
new_hw_ptr=5391481, old_hw_ptr=5391320)
[ 1479.835845] ALSA: PCM: [Q] Lost interrupts?: (stream=0, delta=153, 
new_hw_ptr=5420857, old_hw_ptr=5420704)
[ 1480.471852] ALSA: PCM: [Q] Lost interrupts?: (stream=0, delta=161, 
new_hw_ptr=5448889, old_hw_ptr=5448728)
[ 1480.903183] ALSA: PCM: [Q] Lost interrupts?: (stream=0, delta=161, 
new_hw_ptr=5467897, old_hw_ptr=5467736)
[ 1481.815867] ALSA: PCM: [Q] Lost interrupts?: (stream=0, delta=161, 
new_hw_ptr=5508121, old_hw_ptr=5507960)
[ 1481.931274] ALSA: PCM: [Q] Lost interrupts?: (stream=0, delta=153, 
new_hw_ptr=5513201, old_hw_ptr=5513048)
[ 1482.397507] ALSA: PCM: [Q] Lost interrupts?: (stream=0, delta=153, 
new_hw_ptr=5533753, old_hw_ptr=5533600)
[ 1483.181608] ALSA: PCM: [Q] Lost interrupts?: (stream=0, delta=153, 
new_hw_ptr=5568305, old_hw_ptr=5568152)
[ 1485.830481] ALSA: PCM: [Q] Lost interrupts?: (stream=0, delta=169, 
new_hw_ptr=5685049, old_hw_ptr=5684880)
[ 1486.366331] ALSA: PCM: [Q] Lost interrupts?: (stream=0, delta=161, 
new_hw_ptr=5708665, old_hw_ptr=5708504)
[ 1486.876226] ALSA: PCM: [Q] Lost interrupts?: (stream=0, delta=160, 
new_hw_ptr=5731136, old_hw_ptr=5730976)

# cat /proc/asound/card0/pcm0p/xrun_debug
29

-- 
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.launchpad.net/pulseaudio/+bug/996906/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 996906]

2015-04-21 Thread Raymond
seem dump stack is not useful

just need 1+4+8 = 13


 1   Basic debugging - show xruns in ksyslog interface
 2   Dump stack - dump stack for basic debugging
 4   Jiffies check - compare the position with kernel jiffies (a sort of 
in-kernel monotonic clock),
 show what's changed when basic debugging is enabled
 8   Dump positions on each period update call
 16  Dump positions on each hardware pointer update call
 32  Enable logging of last 10 ring buffer positions
 64  Show the last 10 ring buffer position only once (when first error 
situation occured)

-- 
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.launchpad.net/pulseaudio/+bug/996906/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 996906]

2015-04-21 Thread Raymond
https://www.google.com/patents/US20100131783

FIG. 2 illustrates an exemplary FIFO which has a FIFO size of 192 bytes, and a
threshold value of 128 bytes.

 Taking 48 kHz sample rate, 2 channels each having 16 bits (or 2 bytes)
for example, each frame thus contains 4 bytes of data, wherein each
frame is regarded as a “data unit of transportation.” Whenever the
amount of stream data in the FIFO is less than 128 bytes (i.e., the
threshold), the HDAC 15 will issue a bus mater cycle. As each frame is
transported in an interval time of 20.83 micro second (μs)
(=1/(48×103)), which is regarded as a “time unit of transportation,” the
128 bytes therefore can keep 32 frames (=128/4) of data for about 666
micro second (=32×20.83) without under run.


you need to use 32bits or more channels, higher rate to get 0.5ms latency

-- 
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.launchpad.net/pulseaudio/+bug/996906/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 996906]

2015-04-21 Thread Raymond
Enable basic debugging, do jiffies check and dump position on each period and 
hardware pointer update calls
 # Usefull when the lowlevel (specific) hardware driver is somehow broken
 echo 29  /proc/asound/card0/pcm0p/xrun_debug

-- 
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.launchpad.net/pulseaudio/+bug/996906/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 996906]

2015-04-21 Thread Rkfg
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 interrupts?: (stream=0, delta=161, 
new_hw_ptr=984025, old_hw_ptr=983864)
[14573.145037] ALSA: PCM: [Q] Lost interrupts?: (stream=0, delta=161, 
new_hw_ptr=1301497, old_hw_ptr=1301336)
[14574.635010] ALSA: PCM: [Q] Lost interrupts?: (stream=0, delta=161, 
new_hw_ptr=1367161, old_hw_ptr=1367000)
[14577.096462] ALSA: PCM: [Q] Lost interrupts?: (stream=0, delta=161, 
new_hw_ptr=1475641, old_hw_ptr=1475480)
[14586.796312] ALSA: PCM: [Q] Lost interrupts?: (stream=0, delta=161, 
new_hw_ptr=1903129, old_hw_ptr=1902968)
[14586.992402] ALSA: PCM: [Q] Lost interrupts?: (stream=0, delta=161, 
new_hw_ptr=1911769, old_hw_ptr=1911608)
[14594.026044] ALSA: PCM: [Q] Lost interrupts?: (stream=0, delta=161, 
new_hw_ptr=2221753, old_hw_ptr=2221592)
[14595.953870] ALSA: PCM: [Q] Lost interrupts?: (stream=0, delta=169, 
new_hw_ptr=2306713, old_hw_ptr=2306544)
[14596.659610] ALSA: PCM: [Q] Lost interrupts?: (stream=0, delta=161, 
new_hw_ptr=2337817, old_hw_ptr=2337656)
[14596.685752] ALSA: PCM: [Q] Lost interrupts?: (stream=0, delta=161, 
new_hw_ptr=2338969, old_hw_ptr=2338808)
[14602.107478] ALSA: PCM: [Q] Lost interrupts?: (stream=0, delta=185, 
new_hw_ptr=2577913, old_hw_ptr=2577728)
[14603.678073] ALSA: PCM: [Q] Lost interrupts?: (stream=0, delta=161, 
new_hw_ptr=2647129, old_hw_ptr=2646968)
[14607.444299] ALSA: PCM: [Q] Lost interrupts?: (stream=0, delta=161, 
new_hw_ptr=2813113, old_hw_ptr=2812952)
[14608.614012] ALSA: PCM: [Q] Lost interrupts?: (stream=0, delta=185, 
new_hw_ptr=2864665, old_hw_ptr=2864480)
[14609.178195] ALSA: PCM: [Q] Lost interrupts?: (stream=0, delta=169, 
new_hw_ptr=2889529, old_hw_ptr=2889360)
[14614.619587] ALSA: PCM: [Q] Lost interrupts?: (stream=0, delta=161, 
new_hw_ptr=3129337, old_hw_ptr=3129176)
[14616.410149] ALSA: PCM: [Q] Lost interrupts?: (stream=0, delta=161, 
new_hw_ptr=3208249, old_hw_ptr=3208088)
[14616.593118] ALSA: PCM: [Q] Lost interrupts?: (stream=0, delta=161, 
new_hw_ptr=3216313, old_hw_ptr=3216152)
[14621.289473] ALSA: PCM: [Q] Lost interrupts?: (stream=0, delta=161, 
new_hw_ptr=3423289, old_hw_ptr=3423128)
[14621.315617] ALSA: PCM: [Q] Lost interrupts?: (stream=0, delta=161, 
new_hw_ptr=3424441, old_hw_ptr=3424280)
[14622.783780] ALSA: PCM: [Q] Lost interrupts?: (stream=0, delta=161, 
new_hw_ptr=3489145, old_hw_ptr=3488984)

-- 
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.launchpad.net/pulseaudio/+bug/996906/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 996906]

2015-04-21 Thread Raymond
as pulseaudio use snd_pcm_rewind() which require the sound card report
accurate hwptr position than those sound card which report hwptr
position at period bounary when interrupt occur


the difference between hda-intel and your ca0106 is the granularity of the 
pointer callback 


https://git.kernel.org/cgit/linux/kernel/git/tiwai/sound.git/tree/include/linux/dmaengine.h


/**
 * enum dma_residue_granularity - Granularity of the reported transfer residue
 * @DMA_RESIDUE_GRANULARITY_DESCRIPTOR: Residue reporting is not support. The
 *  DMA channel is only able to tell whether a descriptor has been completed or
 *  not, which means residue reporting is not supported by this channel. The
 *  residue field of the dma_tx_state field will always be 0.
 * @DMA_RESIDUE_GRANULARITY_SEGMENT: Residue is updated after each successfully
 *  completed segment of the transfer (For cyclic transfers this is after each
 *  period). This is typically implemented by having the hardware generate an
 *  interrupt after each transferred segment and then the drivers updates the
 *  outstanding residue by the size of the segment. Another possibility is if
 *  the hardware supports scatter-gather and the segment descriptor has a field
 *  which gets set after the segment has been completed. The driver then counts
 *  the number of segments without the flag set to compute the residue.
 * @DMA_RESIDUE_GRANULARITY_BURST: Residue is updated after each transferred
 *  burst. This is typically only supported if the hardware has a progress
 *  register of some sort (E.g. a register with the current read/write address
 *  or a register with the amount of bursts/beats/bytes that have been
 *  transferred or still need to be transferred).
 */

hda-intel  can report DMA_RESIDUE_GRANULARITY_BURST

seem both read hwptr from hardware register

can your ca0106 report DMA_RESIDUE_GRANULARITY_SEGMENT or
DMA_RESIDUE_GRANULARITY_BURST ?


https://git.kernel.org/cgit/linux/kernel/git/tiwai/sound.git/tree/sound/pci/ca0106/ca0106_main.c


static snd_pcm_uframes_t
snd_ca0106_pcm_pointer_playback(struct snd_pcm_substream *substream)
{
struct snd_ca0106 *emu = snd_pcm_substream_chip(substream);
struct snd_pcm_runtime *runtime = substream-runtime;
struct snd_ca0106_pcm *epcm = runtime-private_data;
unsigned int ptr, prev_ptr;
int channel = epcm-channel_id;
int timeout = 10;

if (!epcm-running)
return 0;

prev_ptr = -1;
do {
ptr = snd_ca0106_ptr_read(emu, PLAYBACK_LIST_PTR, channel);
ptr = (ptr  3) * runtime-period_size;
ptr += bytes_to_frames(runtime,
snd_ca0106_ptr_read(emu, PLAYBACK_POINTER, channel));
if (ptr = runtime-buffer_size)
ptr -= runtime-buffer_size;
if (prev_ptr == ptr)
return ptr;
prev_ptr = ptr;
} while (--timeout);
dev_warn(emu-card-dev, ca0106: unstable DMA pointer!\n);
return 0;
}


https://git.kernel.org/cgit/linux/kernel/git/tiwai/sound.git/tree/sound/pci/hda/hda_controller.c

static snd_pcm_uframes_t azx_pcm_pointer(struct snd_pcm_substream *substream)
{
struct azx_pcm *apcm = snd_pcm_substream_chip(substream);
struct azx *chip = apcm-chip;
struct azx_dev *azx_dev = get_azx_dev(substream);
return bytes_to_frames(substream-runtime,
   azx_get_position(chip, azx_dev));
}

-- 
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.launchpad.net/pulseaudio/+bug/996906/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 996906]

2015-04-21 Thread Raymond
http://mailman.alsa-project.org/pipermail/alsa-
devel/2014-September/081501.html

you need to modify Alexander's pcm_avail.c to find out how accurate
hwptr position can be reported by your ca0106 hw device since his
program hardcode to use 44100Hz which is not supported by your ca0106

-- 
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.launchpad.net/pulseaudio/+bug/996906/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 996906]

2015-04-21 Thread Raymond
if the result if alexander pcm_avail.c show available increment by
period size

this means you need to use more than two fragments and increase
rewind_safeguard


http://cgit.freedesktop.org/pulseaudio/pulseaudio/commit/?id=4df443bbe682055a41e7c2248877dcc7682a69b8


16 19:16:17 homecomp pulseaudio[6121]: [pulseaudio] alsa-util.c:   format   
: S32_LE
Apr 16 19:16:17 homecomp pulseaudio[6121]: [pulseaudio] alsa-util.c:   
subformat: STD
Apr 16 19:16:17 homecomp pulseaudio[6121]: [pulseaudio] alsa-util.c:   channels 
: 2
Apr 16 19:16:17 homecomp pulseaudio[6121]: [pulseaudio] alsa-util.c:   rate 
: 48000
Apr 16 19:16:17 homecomp pulseaudio[6121]: [pulseaudio] alsa-util.c:   exact 
rate   : 48000 (48000/1)
Apr 16 19:16:17 homecomp pulseaudio[6121]: [pulseaudio] alsa-util.c:   msbits   
: 32
Apr 16 19:16:17 homecomp pulseaudio[6121]: [pulseaudio] alsa-util.c:   
buffer_size  : 8064
Apr 16 19:16:17 homecomp pulseaudio[6121]: [pulseaudio] alsa-util.c:   
period_size  : 1008
Apr 16 19:16:17 homecomp pulseaudio[6121]: [pulseaudio] alsa-util.c:   
period_time  : 21000

-- 
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.launchpad.net/pulseaudio/+bug/996906/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 996906]

2015-04-21 Thread Raymond
https://git.kernel.org/cgit/linux/kernel/git/tiwai/sound.git/tree/sound/pci/ca0106/ca0106_main.c

if ((err = snd_pcm_hw_constraint_integer(runtime, 
SNDRV_PCM_HW_PARAM_PERIODS))  0)
return err;
if ((err = snd_pcm_hw_constraint_step(runtime, 0, 
SNDRV_PCM_HW_PARAM_PERIOD_BYTES, 64))  0)
return err;


although ca0106 has smaller minimum period bytes than hda intel


the granularity is not depend on minimum period size but only on how often 
sound card can report hwptr in realtime

-- 
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.launchpad.net/pulseaudio/+bug/996906/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 996906]

2015-04-14 Thread Rkfg
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 --period-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   : PLAYBACK
  access   : RW_INTERLEAVED
  format   : S16_LE
  subformat: STD
  channels : 2
  rate : 44100
  exact rate   : 44100 (44100/1)
  msbits   : 16
  buffer_size  : 768
  period_size  : 192
  period_time  : 4353
  tstamp_mode  : NONE
  period_step  : 1
  avail_min: 192
  period_event : 0
  start_threshold  : 768
  stop_threshold   : 768
  silence_threshold: 0
  silence_size : 0
  boundary : 6917529027641081856
  appl_ptr : 0
  hw_ptr   : 0

16000/2000 is like this:

 aplay -D hw:0,0 -v  --buffer-time=16000 --period-time=2000 /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
  subformat: STD
  channels : 2
  rate : 44100
  exact rate   : 44100 (44100/1)
  msbits   : 16
  buffer_size  : 672
  period_size  : 96
  period_time  : 2176
  tstamp_mode  : NONE
  period_step  : 1
  avail_min: 96
  period_event : 0
  start_threshold  : 672
  stop_threshold   : 672
  silence_threshold: 0
  silence_size : 0
  boundary : 6052837899185946624
  appl_ptr : 0
  hw_ptr   : 0
underrun!!! (at least 2.587 ms long)
Status:
  state   : XRUN
  trigger_time: 4380.16449247
  tstamp  : 4380.19033473
  delay   : 0
  avail   : 761
  avail_max   : 761
^CAborted by signal Interrupt...

-- 
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.launchpad.net/pulseaudio/+bug/996906/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 996906]

2015-04-14 Thread Rkfg
-VT1708S Analog] alsa-util.c:  
 silence_threshold: 0
Apr 09 11:56:10 work pulseaudio[9718]: [alsa-sink-VT1708S Analog] alsa-util.c:  
 silence_size : 0
Apr 09 11:56:10 work pulseaudio[9718]: [alsa-sink-VT1708S Analog] alsa-util.c:  
 boundary : 6341068275337658368
Apr 09 11:56:10 work pulseaudio[9718]: [alsa-sink-VT1708S Analog] alsa-util.c: 
Slave: Hardware PCM card 0 'HDA Intel PCH' device 0 subdevice 0
Apr 09 11:56:10 work pulseaudio[9718]: [alsa-sink-VT1708S Analog] alsa-util.c: 
Its setup is:
Apr 09 11:56:10 work pulseaudio[9718]: [alsa-sink-VT1708S Analog] alsa-util.c:  
 stream   : PLAYBACK
Apr 09 11:56:10 work pulseaudio[9718]: [alsa-sink-VT1708S Analog] alsa-util.c:  
 access   : MMAP_INTERLEAVED
Apr 09 11:56:10 work pulseaudio[9718]: [alsa-sink-VT1708S Analog] alsa-util.c:  
 format   : S16_LE
Apr 09 11:56:10 work pulseaudio[9718]: [alsa-sink-VT1708S Analog] alsa-util.c:  
 subformat: STD
Apr 09 11:56:10 work pulseaudio[9718]: [alsa-sink-VT1708S Analog] alsa-util.c:  
 channels : 2
Apr 09 11:56:10 work pulseaudio[9718]: [alsa-sink-VT1708S Analog] alsa-util.c:  
 rate : 44100
Apr 09 11:56:10 work pulseaudio[9718]: [alsa-sink-VT1708S Analog] alsa-util.c:  
 exact rate   : 44100 (44100/1)
Apr 09 11:56:10 work pulseaudio[9718]: [alsa-sink-VT1708S Analog] alsa-util.c:  
 msbits   : 16
Apr 09 11:56:10 work pulseaudio[9718]: [alsa-sink-VT1708S Analog] alsa-util.c:  
 buffer_size  : 704
Apr 09 11:56:10 work pulseaudio[9718]: [alsa-sink-VT1708S Analog] alsa-util.c:  
 period_size  : 352
Apr 09 11:56:10 work pulseaudio[9718]: [alsa-sink-VT1708S Analog] alsa-util.c:  
 period_time  : 7981
Apr 09 11:56:10 work pulseaudio[9718]: [alsa-sink-VT1708S Analog] alsa-util.c:  
 tstamp_mode  : ENABLE
Apr 09 11:56:10 work pulseaudio[9718]: [alsa-sink-VT1708S Analog] alsa-util.c:  
 period_step  : 1
Apr 09 11:56:10 work pulseaudio[9718]: [alsa-sink-VT1708S Analog] alsa-util.c:  
 avail_min: 352
Apr 09 11:56:10 work pulseaudio[9718]: [alsa-sink-VT1708S Analog] alsa-util.c:  
 period_event : 1
Apr 09 11:56:10 work pulseaudio[9718]: [alsa-sink-VT1708S Analog] alsa-util.c:  
 start_threshold  : -1
Apr 09 11:56:10 work pulseaudio[9718]: [alsa-sink-VT1708S Analog] alsa-util.c:  
 stop_threshold   : 6341068275337658368
Apr 09 11:56:10 work pulseaudio[9718]: [alsa-sink-VT1708S Analog] alsa-util.c:  
 silence_threshold: 0
Apr 09 11:56:10 work pulseaudio[9718]: [alsa-sink-VT1708S Analog] alsa-util.c:  
 silence_size : 0
Apr 09 11:56:10 work pulseaudio[9718]: [alsa-sink-VT1708S Analog] alsa-util.c:  
 boundary : 6341068275337658368
Apr 09 11:56:10 work pulseaudio[9718]: [alsa-sink-VT1708S Analog] alsa-util.c:  
 appl_ptr : 80130832
Apr 09 11:56:10 work pulseaudio[9718]: [alsa-sink-VT1708S Analog] alsa-util.c:  
 hw_ptr   : 80141265
Apr 09 11:56:10 work pulseaudio[9718]: [alsa-sink-VT1708S Analog] ratelimit.c: 
14 events suppressed
Apr 09 11:56:10 work pulseaudio[9718]: [alsa-sink-VT1708S Analog] alsa-sink.c: 
Underrun!
Apr 09 11:56:10 work pulseaudio[9718]: [alsa-sink-VT1708S Analog] 
protocol-native.c: Requesting rewind due to end of underrun.
Apr 09 11:56:10 work pulseaudio[9718]: [alsa-sink-VT1708S Analog] alsa-sink.c: 
Requested to rewind 2816 bytes.
Apr 09 11:56:10 work pulseaudio[9718]: [alsa-sink-VT1708S Analog] alsa-sink.c: 
Limited to 2560 bytes.
Apr 09 11:56:10 work pulseaudio[9718]: [alsa-sink-VT1708S Analog] alsa-sink.c: 
before: 640
Apr 09 11:56:10 work pulseaudio[9718]: [alsa-sink-VT1708S Analog] alsa-sink.c: 
after: 640
Apr 09 11:56:10 work pulseaudio[9718]: [alsa-sink-VT1708S Analog] alsa-sink.c: 
Rewound 2560 bytes.
Apr 09 11:56:10 work pulseaudio[9718]: [alsa-sink-VT1708S Analog] sink.c: 
Processing rewind...
Apr 09 11:56:10 work pulseaudio[9718]: [alsa-sink-VT1708S Analog] sink.c: 
latency = 10117
Apr 09 11:56:10 work pulseaudio[9718]: [alsa-sink-VT1708S Analog] sink-input.c: 
Have to rewind 2560 bytes on render memblockq.
Apr 09 11:56:10 work pulseaudio[9718]: [alsa-sink-VT1708S Analog] source.c: 
Processing rewind...

-- 
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.launchpad.net/pulseaudio/+bug/996906/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 996906]

2015-04-14 Thread Rkfg
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 value of 11 for xrun_debug. Then I set params to 4 fragments of 1
ms each and had errors.

enable_msi=0 didn't help IIRC, neither did position_fix. But I'll try
again.

-- 
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.launchpad.net/pulseaudio/+bug/996906/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 996906]

2015-04-14 Thread Raymond
(In reply to rkfg from comment #26)
 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
 default-fragment-size-msec = 1
 
 The final latency is a product of these numbers, 1*4 == 4 ms which is
 acceptable. The number of fragments should be at least 2 so the least
 latency possible is 2*1 == 2 ms. I don't know if there's a real difference
 between 4 fragments of 1 ms each or 2 fragments of 2 ms each. Try some
 experimenting. At least now I don't have latency increase and sound doesn't
 skip on pavucontrol launch, though it still skips on LMMS launch.
 

are there any difference when using four periods or two periods ?

 1ms at 44100 Hz has 44.1 frames

aplay select buffer size nearest to the selected time


aplay -D hw:0,0 -v --buffer-time=4000 /tmp/fr025.wav 

aplay -D hw:0,0 -v  --period-time=2000 --buffer-time=4000 /tmp/fr025.wav

-- 
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.launchpad.net/pulseaudio/+bug/996906/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 996906]

2015-04-14 Thread Rkfg
: [Q] Lost interrupts?: (stream=0, delta=72, 
new_hw_ptr=1561, old_hw_ptr=1489)
[ 3504.169408] ALSA: PCM: [Q] Lost interrupts?: (stream=0, delta=72, 
new_hw_ptr=2065, old_hw_ptr=1993)
[ 3504.170967] ALSA: PCM: [Q] Lost interrupts?: (stream=0, delta=72, 
new_hw_ptr=2137, old_hw_ptr=2065)
[ 3504.179684] ALSA: PCM: [Q] Lost interrupts?: (stream=0, delta=72, 
new_hw_ptr=2521, old_hw_ptr=2449)
[ 3504.194902] ALSA: PCM: [Q] Lost interrupts?: (stream=0, delta=80, 
new_hw_ptr=121, old_hw_ptr=41)

-- 
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.launchpad.net/pulseaudio/+bug/996906/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 996906]

2015-04-14 Thread Rkfg
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 this bug go to:
https://bugs.launchpad.net/pulseaudio/+bug/996906/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 996906]

2015-04-14 Thread Rkfg
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
default-fragment-size-msec = 1

The final latency is a product of these numbers, 1*4 == 4 ms which is
acceptable. The number of fragments should be at least 2 so the least
latency possible is 2*1 == 2 ms. I don't know if there's a real
difference between 4 fragments of 1 ms each or 2 fragments of 2 ms each.
Try some experimenting. At least now I don't have latency increase and
sound doesn't skip on pavucontrol launch, though it still skips on LMMS
launch.

Based on the comments' content and timestamps here, it looks to me that
no one in PA team really cares about HDA Intel cards which are the most
popular cards. And if PA performs badly with them out of the box it
hurts PA's face, no matter who's to blame actually. Plus, pure ALSA
works fine or doesn't work at all, usually.

-- 
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.launchpad.net/pulseaudio/+bug/996906/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 996906]

2015-04-14 Thread Rkfg
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 least get it fixed. I also have skips when PC is under
load (Java compiling, tabs reloading at the same time etc.). PA says
it's working in realtime mode so these userland processes should not
interfere. It reports in its log that it's the ALSA underrun, not the
application's one. So I don't know who's to blame.

-- 
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.launchpad.net/pulseaudio/+bug/996906/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 996906]

2015-04-14 Thread Rkfg
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: max_dB: 0
Apr 10 09:46:52 work pulseaudio[5161]: [pulseaudio] alsa-util.c: resolution: 256
Apr 10 09:46:52 work pulseaudio[5161]: [pulseaudio] alsa-util.c: Its setup is:
Apr 10 09:46:52 work pulseaudio[5161]: [pulseaudio] alsa-util.c:   stream   
: PLAYBACK
Apr 10 09:46:52 work pulseaudio[5161]: [pulseaudio] alsa-util.c:   access   
: MMAP_INTERLEAVED
Apr 10 09:46:52 work pulseaudio[5161]: [pulseaudio] alsa-util.c:   format   
: S16_LE
Apr 10 09:46:52 work pulseaudio[5161]: [pulseaudio] alsa-util.c:   subformat
: STD
Apr 10 09:46:52 work pulseaudio[5161]: [pulseaudio] alsa-util.c:   channels 
: 2
Apr 10 09:46:52 work pulseaudio[5161]: [pulseaudio] alsa-util.c:   rate 
: 44100
Apr 10 09:46:52 work pulseaudio[5161]: [pulseaudio] alsa-util.c:   exact rate   
: 44100 (44100/1)
Apr 10 09:46:52 work pulseaudio[5161]: [pulseaudio] alsa-util.c:   msbits   
: 16
Apr 10 09:46:52 work pulseaudio[5161]: [pulseaudio] alsa-util.c:   buffer_size  
: 88192
Apr 10 09:46:52 work pulseaudio[5161]: [pulseaudio] alsa-util.c:   period_size  
: 44096
Apr 10 09:46:52 work pulseaudio[5161]: [pulseaudio] alsa-util.c:   period_time  
: 09
Apr 10 09:46:52 work pulseaudio[5161]: [pulseaudio] alsa-util.c:   tstamp_mode  
: ENABLE
Apr 10 09:46:52 work pulseaudio[5161]: [pulseaudio] alsa-util.c:   period_step  
: 1
Apr 10 09:46:52 work pulseaudio[5161]: [pulseaudio] alsa-util.c:   avail_min
: 87310
Apr 10 09:46:52 work pulseaudio[5161]: [pulseaudio] alsa-util.c:   period_event 
: 0
Apr 10 09:46:52 work pulseaudio[5161]: [pulseaudio] alsa-util.c:   
start_threshold  : -1
Apr 10 09:46:52 work pulseaudio[5161]: [pulseaudio] alsa-util.c:   
stop_threshold   : 6205960286516543488
Apr 10 09:46:52 work pulseaudio[5161]: [pulseaudio] alsa-util.c:   
silence_threshold: 0
Apr 10 09:46:52 work pulseaudio[5161]: [pulseaudio] alsa-util.c:   silence_size 
: 0
Apr 10 09:46:52 work pulseaudio[5161]: [pulseaudio] alsa-util.c:   boundary 
: 6205960286516543488
Apr 10 09:46:52 work pulseaudio[5161]: [pulseaudio] alsa-util.c: Slave: 
Hardware PCM card 0 'HDA Intel PCH' device 0 subdevice 0
Apr 10 09:46:52 work pulseaudio[5161]: [pulseaudio] alsa-util.c: Its setup is:
Apr 10 09:46:52 work pulseaudio[5161]: [pulseaudio] alsa-util.c:   stream   
: PLAYBACK
Apr 10 09:46:52 work pulseaudio[5161]: [pulseaudio] alsa-util.c:   access   
: MMAP_INTERLEAVED
Apr 10 09:46:52 work pulseaudio[5161]: [pulseaudio] alsa-util.c:   format   
: S16_LE
Apr 10 09:46:52 work pulseaudio[5161]: [pulseaudio] alsa-util.c:   subformat
: STD
Apr 10 09:46:52 work pulseaudio[5161]: [pulseaudio] alsa-util.c:   channels 
: 2
Apr 10 09:46:52 work pulseaudio[5161]: [pulseaudio] alsa-util.c:   rate 
: 44100
Apr 10 09:46:52 work pulseaudio[5161]: [pulseaudio] alsa-util.c:   exact rate   
: 44100 (44100/1)
Apr 10 09:46:52 work pulseaudio[5161]: [pulseaudio] alsa-util.c:   msbits   
: 16
Apr 10 09:46:52 work pulseaudio[5161]: [pulseaudio] alsa-util.c:   buffer_size  
: 88192
Apr 10 09:46:52 work pulseaudio[5161]: [pulseaudio] alsa-util.c:   period_size  
: 44096
Apr 10 09:46:52 work pulseaudio[5161]: [pulseaudio] alsa-util.c:   period_time  
: 09
Apr 10 09:46:52 work pulseaudio[5161]: [pulseaudio] alsa-util.c:   tstamp_mode  
: ENABLE
Apr 10 09:46:52 work pulseaudio[5161]: [pulseaudio] alsa-util.c:   period_step  
: 1
Apr 10 09:46:52 work pulseaudio[5161]: [pulseaudio] alsa-util.c:   avail_min
: 87310
Apr 10 09:46:52 work pulseaudio[5161]: [pulseaudio] alsa-util.c:   period_event 
: 0
Apr 10 09:46:52 work pulseaudio[5161]: [pulseaudio] alsa-util.c:   
start_threshold  : -1
Apr 10 09:46:52 work pulseaudio[5161]: [pulseaudio] alsa-util.c:   
stop_threshold   : 6205960286516543488
Apr 10 09:46:52 work pulseaudio[5161]: [pulseaudio] alsa-util.c:   
silence_threshold: 0
Apr 10 09:46:52 work pulseaudio[5161]: [pulseaudio] alsa-util.c:   silence_size 
: 0
Apr 10 09:46:52 work pulseaudio[5161]: [pulseaudio] alsa-util.c:   boundary 
: 6205960286516543488
Apr 10 09:46:52 work pulseaudio[5161]: [pulseaudio] alsa-util.c:   appl_ptr 
: 0
Apr 10 09:46:52 work pulseaudio[5161]: [pulseaudio] alsa-util.c:   hw_ptr   
: 0

Why does period size lack 4 bytes to be exactly 1 second long?

-- 
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.launchpad.net/pulseaudio/+bug/996906/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 996906]

2015-04-14 Thread Raymond
(I
 
 Also, after I do:
 echo 1  /proc/asound/card0/pcm0p/xrun_debug
 
 I have lots of this in dmesg:
 [ 3504.140844] ALSA: PCM: [Q] Lost interrupts?: (stream=0, delta=56,
 new_hw_ptr=809, old_hw_ptr=753)
 [ 3504.143264] ALSA: PCM: [Q] Lost interrupts?: (stream=0, delta=72,
 new_hw_ptr=913, old_hw_ptr=841)
 [ 3504.148353] ALSA: PCM: [Q] Lost interrupts?: (stream=0, delta=72,
 new_hw_ptr=1137, old_hw_ptr=1065)
 [ 3504.150102] ALSA: PCM: [Q] Lost interrupts?: (stream=0, delta=80,
 new_hw_ptr=1217, old_hw_ptr=1137)
 [ 3504.156337] ALSA: PCM: [Q] Lost interrupts?: (stream=0, delta=72,
 new_hw_ptr=1489, old_hw_ptr=1417)
 [ 3504.157990] ALSA: PCM: [Q] Lost interrupts?: (stream=0, delta=72,
 new_hw_ptr=1561, old_hw_ptr=1489)
 [ 3504.169408] ALSA: PCM: [Q] Lost interrupts?: (stream=0, delta=72,
 new_hw_ptr=2065, old_hw_ptr=1993)
 [ 3504.170967] ALSA: PCM: [Q] Lost interrupts?: (stream=0, delta=72,
 new_hw_ptr=2137, old_hw_ptr=2065)
 [ 3504.179684] ALSA: PCM: [Q] Lost interrupts?: (stream=0, delta=72,
 new_hw_ptr=2521, old_hw_ptr=2449)
 [ 3504.194902] ALSA: PCM: [Q] Lost interrupts?: (stream=0, delta=80,
 new_hw_ptr=121, old_hw_ptr=41)


http://www.alsa-project.org/main/index.php/XRUN_Debug

you need more debug info to find out what happen


Enable basic debugging and dump stack, check hardware pointer on the period 
update
 


https://git.kernel.org/cgit/linux/kernel/git/tiwai/sound.git/tree/Documentation/sound/alsa/HD-Audio.txt

how about  enable_msi=0   ?

if it don't help, you need to file bug report at

https://bugzilla.kernel.org/enter_bug.cgi?product=Drivers

-- 
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.launchpad.net/pulseaudio/+bug/996906/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 996906]

2015-02-09 Thread Raymond
Feb 03 08:48:16 work pulseaudio[1895]: Maximum hw buffer size is 11888 ms
Feb 03 08:48:16 work pulseaudio[1895]: Set buffer size first (to 4408 samples), 
period size second (to 1102 samples).
Feb 03 08:48:16 work pulseaud


seem support  arbitrary buffer/period sizes since 1102 is not multiple of 32 
bytes

can  aplay use buffer size 1500 or 2000 ?

-- 
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.launchpad.net/pulseaudio/+bug/996906/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 996906]

2015-02-09 Thread Rkfg
# 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
  subformat: STD
  channels : 2
  rate : 44100
  exact rate   : 44100 (44100/1)
  msbits   : 16
  buffer_size  : 1500
  period_size  : 375
  period_time  : 8503
  tstamp_mode  : NONE
  period_step  : 1
  avail_min: 375
  period_event : 0
  start_threshold  : 1500
  stop_threshold   : 1500
  silence_threshold: 0
  silence_size : 0
  boundary : 6755399441055744000
  appl_ptr : 0
  hw_ptr   : 0


# aplay -D hw:0,0 -v --buffer-size=2000 /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
  subformat: STD
  channels : 2
  rate : 44100
  exact rate   : 44100 (44100/1)
  msbits   : 16
  buffer_size  : 2000
  period_size  : 500
  period_time  : 11337
  tstamp_mode  : NONE
  period_step  : 1
  avail_min: 500
  period_event : 0
  start_threshold  : 2000
  stop_threshold   : 2000
  silence_threshold: 0
  silence_size : 0
  boundary : 9007199254740992000
  appl_ptr : 0
  hw_ptr   : 0

-- 
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.launchpad.net/pulseaudio/+bug/996906/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 996906]

2015-02-09 Thread Raymond
 
  aplay -D hw:0,0 -v --buffer-size=1024 
  /usr/share/sounds/alsa/Front_Center.wav 
 Playing WAVE '/usr/share/sounds/alsa/Front_Center.wav' : Signed 16 bit
 Little Endian, Rate 48000 Hz, Mono
 aplay: set_params:1239: Channels count non available
 
 However, device default works fine. The lowest buffer size that doesn't
 underrun is 3072.

you need to use a  stereo wav file since snd-hda-intel support stereo
only

-- 
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.launchpad.net/pulseaudio/+bug/996906/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 996906]

2015-02-09 Thread Rkfg
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   : S16_LE
  subformat: STD
  channels : 2
  rate : 44100
  exact rate   : 44100 (44100/1)
  msbits   : 16
  buffer_size  : 1024
  period_size  : 256
  period_time  : 5804
  tstamp_mode  : NONE
  period_step  : 1
  avail_min: 256
  period_event : 0
  start_threshold  : 1024
  stop_threshold   : 1024
  silence_threshold: 0
  silence_size : 0
  boundary : 4611686018427387904
  appl_ptr : 0
  hw_ptr   : 0
underrun!!! (at least 2.306 ms long)
Status:
  state   : XRUN
  trigger_time: 7298.28726754
  tstamp  : 7298.31029657
  delay   : 0
  avail   : 1177
  avail_max   : 1177

2048 does not:

# aplay -D hw:0,0 -v --buffer-size=2048 /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
  subformat: STD
  channels : 2
  rate : 44100
  exact rate   : 44100 (44100/1)
  msbits   : 16
  buffer_size  : 2048
  period_size  : 512
  period_time  : 11609
  tstamp_mode  : NONE
  period_step  : 1
  avail_min: 512
  period_event : 0
  start_threshold  : 2048
  stop_threshold   : 2048
  silence_threshold: 0
  silence_size : 0
  boundary : 4611686018427387904
  appl_ptr : 0
  hw_ptr   : 0

-- 
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.launchpad.net/pulseaudio/+bug/996906/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 996906]

2015-02-09 Thread Raymond
https://git.kernel.org/cgit/linux/kernel/git/tiwai/sound.git/commit/sound/pci/hda/hda_intel.c?id=2ae66c26550cd94b0e2606a9275eb0ab7070ad0e

seem some hda controller support arbitary period size ,  i.e. periods
size can be not multiple of 32 frames

-- 
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.launchpad.net/pulseaudio/+bug/996906/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 996906]

2015-02-09 Thread Raymond
how low latecy can you get with paplay


paplay -l-latency-msec=5 -v any.wav


what is the smallest buffer size using aplay without underrun (eg. 1024, 512, 
256, 128, 64)


aplay -D hw:0,0 -v --buffer-size=1024 any.wav

-- 
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.launchpad.net/pulseaudio/+bug/996906/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 996906]

2015-02-09 Thread Rkfg
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 clicks are still audible sometimes. PA also seems to
lower latency after an underrun occures as I see in the log latency
increasing like 1-2-4-8-4-8.

The lowest latency I've got with paplay is 8 msec, any less produces
clicks or garbled sound.

 aplay -D hw:0,0 -v --buffer-size=1024 /usr/share/sounds/alsa/Front_Center.wav 
Playing WAVE '/usr/share/sounds/alsa/Front_Center.wav' : Signed 16 bit Little 
Endian, Rate 48000 Hz, Mono
aplay: set_params:1239: Channels count non available

However, device default works fine. The lowest buffer size that
doesn't underrun is 3072.

-- 
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.launchpad.net/pulseaudio/+bug/996906/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 996906]

2015-02-09 Thread Rkfg
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 LMMS is just working in the background not doing anything.

-- 
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.launchpad.net/pulseaudio/+bug/996906/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 996906]

2015-02-03 Thread Rkfg
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 only PA doesn't increase it internally for every
client.

I've got a decent CPU here, G620 @ 2.6 GHz so I may understand skipping
on high CPU load, BUT PulseAudio has very high realtime priority (15)
and if I use pure ALSA there are no skips.

-- 
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.launchpad.net/pulseaudio/+bug/996906/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 996906]

2015-02-03 Thread Rkfg
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 happen with pure ALSA. I already set all priorities to the 
maximum, doesn't seem to help. My kernel is preemptive (not the default 
Debian's one, it's even worse with it):
Linux work 3.18.0-pf0+ #1 SMP PREEMPT Tue Jan 13 09:21:17 MSK 2015 x86_64 
GNU/Linux

I have this enabled in daemon.conf:
high-priority = yes
nice-level = -19
realtime-scheduling = yes
realtime-priority = 15
exit-idle-time = -1
log-level = debug

This doesn't happen with tsched=0, but the resulting latency is horrible
in that case. Pure ALSA has negligible latency and doesn't skip at all.

-- 
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.launchpad.net/pulseaudio/+bug/996906/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 996906]

2015-02-03 Thread Rkfg
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: alsa_output.pci-_00_1b.0.analog-stereo
driver: module-alsa-card.c
flags: HARDWARE HW_MUTE_CTRL HW_VOLUME_CTRL DECIBEL_VOLUME LATENCY 
FLAT_VOLUME DYNAMIC_LATENCY
state: RUNNING
suspend cause: 
priority: 9959
volume: front-left: 65536 / 100% / 0.00 dB,   front-right: 65536 / 100% 
/ 0.00 dB
balance 0.00
base volume: 65536 / 100% / 0.00 dB
volume steps: 65537
muted: no
current latency: 65.83 ms
max request: 11 KiB
max rewind: 344 KiB
monitor source: 0
sample spec: s16le 2ch 44100Hz
channel map: front-left,front-right
 Stereo
used by: 3
linked by: 3
configured latency: 66.00 ms; range is 66.00 .. 2000.00 ms
card: 0 alsa_card.pci-_00_1b.0
module: 6
properties:
alsa.resolution_bits = 16
device.api = alsa
device.class = sound
alsa.class = generic
alsa.subclass = generic-mix
alsa.name = VT1708S Analog
alsa.id = VT1708S Analog
alsa.subdevice = 0
alsa.subdevice_name = subdevice #0
alsa.device = 0
alsa.card = 0
alsa.card_name = HDA Intel PCH
alsa.long_card_name = HDA Intel PCH at 0xfe40 irq 33
alsa.driver_name = snd_hda_intel
device.bus_path = pci-:00:1b.0
sysfs.path = /devices/pci:00/:00:1b.0/sound/card0
device.bus = pci
device.vendor.id = 8086
device.vendor.name = Intel Corporation
device.product.id = 1c20
device.product.name = 6 Series/C200 Series Chipset Family High 
Definition Audio Controller
device.form_factor = internal
device.string = front:0
device.buffering.buffer_size = 352800
device.buffering.fragment_size = 176400
device.access_mode = mmap+timer
device.profile.name = analog-stereo
device.profile.description = Analog Stereo
device.description = Built-in Audio Analog Stereo
alsa.mixer_name = VIA VT1708S
alsa.components = HDA:11060397,10438415,0010
module-udev-detect.discovered = 1
device.icon_name = audio-card-pci
ports:
analog-output: Analog Output (priority 9900, latency offset 0 
usec, available: unknown)
properties:

analog-output-lineout: Line Out (priority 9900, latency offset 
0 usec, available: yes)
properties:

analog-output-headphones: Headphones (priority 9000, latency 
offset 0 usec, available: no)
properties:
device.icon_name = audio-headphones
active port: analog-output


Any suggestions outside of forcing a fixed latency?

-- 
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.launchpad.net/pulseaudio/+bug/996906/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 996906]

2015-02-03 Thread Raymond
(In reply to rkfg from comment #9)
 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 only PA doesn't increase it internally for every client.
 
 I've got a decent CPU here, G620 @ 2.6 GHz so I may understand skipping on
 high CPU load, BUT PulseAudio has very high realtime priority (15) and if I
 use pure ALSA there are no skips.

Refer to src/core/audio/AudioAlsa.cpp, it using 8 periods per buffer,

 how can lmms use 64 frames ?

minimum period bytes of snd-hda-intel and pulse plugin are  128 bytes
(32 frames)

m_periodSize = mixer()-framesPerPeriod();
m_bufferSize = m_periodSize * 8;

-- 
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.launchpad.net/pulseaudio/+bug/996906/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 996906]

2015-02-03 Thread Raymond
which motherboard are you using ?

do this motherboard support internal spdif connector to graphic card ?

it is rare that  it only has internal spdif connector but not
optical/rca digital output

You can also connect the onboard header to an S/PDIF input header
available on some graphics cards using an S/PDIF cable. This connection
routes digital audio to the HDMI output of the graphics card.

http://www.intel.com/support/motherboards/desktop/sb/CS-032871.htm

Node 0x20 [Pin Complex] wcaps 0x400701: Stereo Digital
  Control: name=HDMI Phantom Jack, index=0, device=0
  Pincap 0x0010: OUT
  Pin Default 0x185600f0: [Jack] Digital Out at Int HDMI
Conn = Digital, Color = Unknown
DefAssociation = 0xf, Sequence = 0x0
  Pin-ctls: 0x40: OUT
  Power states:  D0 D1 D2 D3
  Power: setting=D0, actual=D0
  Connection: 1
 0x12



APLAY

 List of PLAYBACK Hardware Devices 
card 0: PCH [HDA Intel PCH], device 0: VT1708S Analog [VT1708S Analog]
  Subdevices: 0/1
  Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 2: VT1708S Alt Analog [VT1708S Alt Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 3: VT1708S Digital [VT1708S Digital]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

-- 
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.launchpad.net/pulseaudio/+bug/996906/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 996906]

2015-02-03 Thread Raymond
08:47:21 work pulseaudio[2333]: Requested tlength=34.83 ms, minreq=5.80 ms
Feb 02 08:47:21 work pulseaudio[2333]: Adjust latency mode enabled, configuring 
sink latency to half of overall latency.
Feb 02 08:47:21 work pulseaudio[2333]: Requested latency=11.61 ms, Received 
latency=11.61 ms
Feb 02 08:47:21 work pulseaudio[2333]: memblockq requested: maxlength=4194304, 
tlength=4096, base=4, prebuf=3076, minreq=1024 maxrewind=0
Feb 02 08:47:21 work pulseaudio[2333]: memblockq sanitized: maxlength=4194304, 
tlength=4096, base=4, prebuf=3076, minreq=1024 maxrewind=0
Feb 02 08:47:21 work pulseaudio[2333]: Final latency 34.83 ms = 11.61 ms + 
2*5.80 ms + 11.61 ms
Feb 02 08:47:21 work pulseaudio[2333]: Latency set to 11.61ms
Feb 02 08:47:21 work pulseaudio[2333]: hwbuf_unused=63488
Feb 02 08:47:21 work pulseaudio[2333]: setting avail_min=16129
Feb 02 08:47:21 work pulseaudio[2333]: Requesting rewind due to latency change.


how did pulseaudio adjust time sched watermark 20ms when client request latency 
11.61 ms ?

-- 
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.launchpad.net/pulseaudio/+bug/996906/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 996906]

2015-02-03 Thread Rkfg
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 Debian/Ubuntu. So it doesn't change the
latency/watermark now this hard. However, I still get Underrun! after
launching LMMS. It also spams the syslog with

Feb 03 08:58:35 work pulseaudio[1895]: Pool full

And there are still clicks in the playback from time to time.

-- 
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.launchpad.net/pulseaudio/+bug/996906/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 996906]

2015-02-03 Thread Raymond
refer to src/core/Audio/AudioPulseAudio.cpp,


buffer_attr.maxlength = (uint32_t)(-1);

// play silence in case of buffer underun instead of 
using default rewind
buffer_attr.prebuf = 0;

buffer_attr.minreq = (uint32_t)(-1);
buffer_attr.fragsize = (uint32_t)(-1);

double latency = (double)( 
Engine::mixer()-framesPerPeriod() ) /

(double)_this-sampleRate();

// ask PulseAudio for the desired latency 
(which might not be approved)
buffer_attr.tlength = pa_usec_to_bytes( latency 
* PA_USEC_PER_MSEC,

_this-m_sampleSpec );

pa_stream_connect_playback( _this-m_s, NULL, 
buffer_attr,

PA_STREAM_ADJUST_LATENCY,

NULL,   // volume

NULL );
break;

-- 
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.launchpad.net/pulseaudio/+bug/996906/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 996906]

2015-02-03 Thread Rkfg
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
jack.

-- 
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.launchpad.net/pulseaudio/+bug/996906/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 996906]

2015-02-03 Thread Rkfg
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 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.launchpad.net/pulseaudio/+bug/996906/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 996906]

2015-02-03 Thread Rkfg
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.
https://bugs.launchpad.net/bugs/996906

Title:
  periodic audio skips with Intel HDA

To manage notifications about this bug go to:
https://bugs.launchpad.net/pulseaudio/+bug/996906/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 996906]

2015-02-03 Thread Raymond
(In reply to rkfg from comment #7)
 Created attachment 113083 [details]
 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 Debian/Ubuntu. So it doesn't change the latency/watermark
 now this hard. However, I still get Underrun! after launching LMMS. It
 also spams the syslog with
 
 Feb 03 08:58:35 work pulseaudio[1895]: Pool full
 
 And there are still clicks in the playback from time to time.

do your lmms using 256 frames buffer 5.80 ms ?

try change audio to alsa and change default to hw:0 if you want low
latency

-- 
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.launchpad.net/pulseaudio/+bug/996906/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 996906]

2015-02-03 Thread Rkfg
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.launchpad.net/pulseaudio/+bug/996906/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 996906] Re: periodic audio skips with Intel HDA

2014-07-30 Thread henry-couannier
I have the same problem : sound stops after undeterministic time: from several 
minutes to more than 12 hours. I'm on a raspberry pi (wheezy raspbian). I tried 
many combinations of parameters for daemon .conf and default.pa. 
I notice that whenever i change the parameters , most of the time the new 
parameters are not taken into account even after pulseaudio -k and pulseaudio 
--start, i have to restart my player which is chromium and sometimes it even 
seemed that the change was only effective after a reboot of the RPi.
By the way pacmd alsa-sinks says that the buffer size and fragment size are 
equal for my RPi sink !! how can that be... so i have no idea what parameter to 
give to the daemon given that puklseaudio does not accept number of fragments = 
1 (?!) 
i'm currently running with : number of fragments =10 and fragment size = 10 ms 
because people adviced to use this on forum but i really dont understand where 
these numbers come from and if these are a good choice

-- 
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.launchpad.net/pulseaudio/+bug/996906/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 996906] Re: periodic audio skips with Intel HDA

2014-07-30 Thread henry-couannier
Let me add that i'm using the RPi as a thin client with x2go and that
the LAN connexion  between the RPi and my PC (Unix Mageia) is on PLC. I
did not configure x2go to transmit the sound. It's only pulseaudio that
does the job (using RTP).

-- 
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.launchpad.net/pulseaudio/+bug/996906/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 996906] Re: periodic audio skips with Intel HDA

2014-07-30 Thread henry-couannier
i meant pacmd list -sinks and not pacmd alsa-sinks in my post number 37

-- 
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.launchpad.net/pulseaudio/+bug/996906/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 996906] Re: periodic audio skips with Intel HDA

2014-07-30 Thread henry-couannier
What is even more puzzling is why i can still have sound for hours with 
periodic underrun messages and many:
 checking for dead streams

-- 
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.launchpad.net/pulseaudio/+bug/996906/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 996906] Re: periodic audio skips with Intel HDA

2014-07-17 Thread Charles Lindsay
New sound card, same issue.  Asus Xonar DX.  Shows up in lspci like
'C-Media Electronics Inc CMI8788 [Oxygen HD Audio]'.  Uses the
snd_virtuoso driver.  The snd_hda_intel module isn't even loaded.  The
skips have slightly changed character with the new card, but they still
happen.  And still, when I use bare Alsa, the issue goes away.  Looks
like the bug is somewhere in how pulse interacts with my machine in
general, not just the sound card/driver.

Raymond: I don't know.  I haven't set any latency myself.  Is there
something else I can try?

-- 
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.launchpad.net/pulseaudio/+bug/996906/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 996906] Re: periodic audio skips with Intel HDA

2014-07-11 Thread Charles Lindsay
I finally upgraded to 14.04; same exact issue.

One coincidence I noticed and am looking into is that I didn't notice
any stuttering when only 64 bit code was running, but when flash or
steam were running (both of which run some 32 bit code, if I'm not
mistaken), the stuttering began immediately.  I'm not 100% sure that's
the only time it stutters now, but it's happened enough times that I'm
not sure it's just coincidence.  Does that ring any bells for anyone?

I'm sick and tired of this issue.  Ubuntu has moved on from Alsa, and
I'd like to too.  I might get a (hopefully cheap) sound card to test out
if that can fix the issue.

-- 
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.launchpad.net/pulseaudio/+bug/996906/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 996906] Re: periodic audio skips with Intel HDA

2014-07-11 Thread Raymond
ANY reason to set latency to 1ms interval when you are using 44100Hz
since 1ms contain 44.1 samples ?

you need at least 10 ms interval

-- 
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.launchpad.net/pulseaudio/+bug/996906/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 996906] Re: periodic audio skips with Intel HDA

2014-04-20 Thread berend
After upgrading to 14.04 pulseaudio is basically stable for me (same
hardware). Although sometimes, after a reboot it isn't: pulseaudio
starts stuttering, and I need to move the mouse to get playing to
continue. But after power-down and restart the issue is fixed, and the
stuttering is over. There was no need to change any of the settings.

-- 
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.launchpad.net/pulseaudio/+bug/996906/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 996906] Re: periodic audio skips with Intel HDA

2013-06-12 Thread berend
Here's my current incantation which seems to work for me:

1. In /etc/modprobe.d/alsa-base.conf have a line:

  options snd-hda-intel enable_msi=0

2. In /etc/pulse/default.pa I have:

.ifexists module-udev-detect.so
load-module module-udev-detect tsched=0
.else
### Use the static hardware detection module (for systems that lack udev/hal 
support)
load-module module-detect tsched=0
.endif

3. Not sure if relevant, but this a change in /etc/pulse/daemon.conf:

default-fragments = 256
default-fragment-size-msec = 4

4. Important, I fire up alsamixer and set Auto-Mute to Disabled.

If one of these steps is missing the problem is bad. With these, the
stuttering is rare.

And no, I won't rant about how playing audio on BeOS was so
unproblematic. And I could even play 16 simultaneous movies as well.

-- 
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.launchpad.net/pulseaudio/+bug/996906/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 996906] Re: periodic audio skips with Intel HDA

2013-06-12 Thread NTolerance
After upgrading to 13.04 I've not been able to reproduce this issue.

-- 
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.launchpad.net/pulseaudio/+bug/996906/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 996906] Re: periodic audio skips with Intel HDA

2013-04-25 Thread Frode Svendsen
I have the exact same problem, but only when using my bluetooth
headsett. Using the headset with cable removes the problem entirely.
ubuntu 12.10.

-- 
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.launchpad.net/pulseaudio/+bug/996906/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 996906] Re: periodic audio skips with Intel HDA

2012-12-14 Thread David Henningsson
 Also, how come this bug is half a year old and it has not even been
assigned to any of the ubuntu developers yet?

Roughly,

 1) There are not enough Ubuntu developers to deal with all bugs.

 2) There can be many root causes to why an underrun happens. I e, there
might be ten different reasons why the audio sometimes skips, fixing one
of them probably does not help.

 3) The problem is difficult.

 I'm pretty sure it affects EVERYONE with HDA

That I don't believe.

 but many people just don't notice it.

That I believe.

-- 
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.launchpad.net/pulseaudio/+bug/996906/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 996906] Re: periodic audio skips with Intel HDA

2012-11-29 Thread haha01haha01
Same problem, both under 12.04 and 12.10 (12.04 used to be worse). Using
Audio device: Intel Corporation 82801JI (ICH10 Family) HD Audio
Controller, the problem seems to occur only with the combination of an
Intel HDA sound card AND pulseaudio. Using a different card works,
turning off pulseaudio also works.

-- 
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.launchpad.net/pulseaudio/+bug/996906/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 996906] Re: periodic audio skips with Intel HDA

2012-11-29 Thread Raymond
at 44100hz  1ms contain 44.1 samples this mean latency must set at interval of 
10 ms
at 48000hz  1ms contain 48 samples

-- 
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.launchpad.net/pulseaudio/+bug/996906/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 996906] Re: periodic audio skips with Intel HDA

2012-11-29 Thread haha01haha01
Raymond: I do not understand your comment, are you suggesting a
solution?

Also, how come this bug is half a year old and it has not even been
assigned to any of the ubuntu developers yet? This is pretty major
seeing how many people using Intel HDA nowadays, and I'm pretty sure it
affects EVERYONE with HDA but many people just don't notice it.

-- 
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.launchpad.net/pulseaudio/+bug/996906/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 996906] Re: periodic audio skips with Intel HDA

2012-11-15 Thread berend
I can confirm this is not a bug with pulseaudio. When I route the audio
to my wireless audio card, no stutters at all. It's purely related to
the intel hda driver.

Here my two audio cards:

# aplay -l
 List of PLAYBACK Hardware Devices 
Home directory /home/berend not ours.
card 0: Intel [HDA Intel], device 0: CONEXANT Analog [CONEXANT Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: Headset [Logitech Wireless Headset], device 0: USB Audio [USB Audio]
  Subdevices: 0/1
  Subdevice #0: subdevice #0

-- 
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.launchpad.net/pulseaudio/+bug/996906/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


Re: [Bug 996906] Re: periodic audio skips with Intel HDA

2012-11-15 Thread DH
'
  Mixer name : 'Realtek ALC889'
  Components : 'HDA:10ec0889,1458a102,0014'
  Controls  : 48
  Simple ctrls  : 22
   Date: Tue May  8 21:45:17 2012
   InstallationMedia: Ubuntu 12.04 LTS Precise Pangolin - Release amd64
 (20120425)
   ProcEnviron:
TERM=xterm
PATH=(custom, user)
LANG=en_US.UTF-8
SHELL=/bin/bash
   SourcePackage: pulseaudio
   UpgradeStatus: No upgrade log present (probably fresh install)
   dmi.bios.date: 12/03/2009
   dmi.bios.vendor: Award Software International, Inc.
   dmi.bios.version: F2
   dmi.board.name: GA-790FXTA-UD5
   dmi.board.vendor: Gigabyte Technology Co., Ltd.
   dmi.board.version: x.x
   dmi.chassis.type: 3
   dmi.chassis.vendor: Gigabyte Technology Co., Ltd.
   dmi.modalias:
 dmi:bvnAwardSoftwareInternational,Inc.:bvrF2:bd12/03/2009:svnGigabyteTechnologyCo.,Ltd.:pnGA-790FXTA-UD5:pvr:rvnGigabyteTechnologyCo.,Ltd.:rnGA-790FXTA-UD5:rvrx.x:cvnGigabyteTechnologyCo.,Ltd.:ct3:cvr:
   dmi.product.name: GA-790FXTA-UD5
   dmi.sys.vendor: Gigabyte Technology Co., Ltd.

 To manage notifications about this bug go to:
 https://bugs.launchpad.net/pulseaudio/+bug/996906/+subscriptions


-- 
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.launchpad.net/pulseaudio/+bug/996906/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 996906] Re: periodic audio skips with Intel HDA

2012-11-15 Thread Charles Lindsay
And I'll reiterate that when I simply uninstall pulse, but use the same
hardware with alsa, the audio doesn't skip.  I don't think it's accurate
to say it's purely the hda driver.

-- 
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.launchpad.net/pulseaudio/+bug/996906/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 996906] Re: periodic audio skips with Intel HDA

2012-11-15 Thread NTolerance
I'm experiencing the same behavior as berend in post #22.  My Bluetooth
headphones work great, but the HDA Intel device in my Lenovo ThinkPad
T420 gives me fits.  My solution for right now is to use an external USB
audio device or Bluetooth headphones to work around the problem.

It's interesting that so many people could potentially be affected by an
issue affecting the HDA Intel hardware, yet this thread is quite small.
There's got to be a specific combination of hardware and software that
causes this issue.  At this point I guess we know that snd-hda-intel and
pulseaudio are required to reproduce the issue.  What other items are
common to the issue?

Here's my audio hardware for reference:

Intel Corporation 6 Series/C200 Series Chipset Family High Definition
Audio Controller (rev 04)

-- 
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.launchpad.net/pulseaudio/+bug/996906/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 996906] Re: periodic audio skips with Intel HDA

2012-11-12 Thread NTolerance
I've tried all of the alsa and pulse config changes as mentioned in this
thread with no luck.  I experienced the same issue with 12.04.

-- 
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.launchpad.net/pulseaudio/+bug/996906/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 996906] Re: periodic audio skips with Intel HDA

2012-11-09 Thread berend
I'm still in 12.04 with this soundcard:

# lspci | grep Audio 
00:1b.0 Audio device: Intel Corporation 82801I (ICH9 Family) HD Audio 
Controller (rev 03)

Bit from /var/log/syslog:

Nov 10 10:20:08 quadrio pulseaudio[19484]: [alsa-sink] alsa-sink.c: setting 
avail_min=11711
Nov 10 10:20:08 quadrio pulseaudio[19484]: [alsa-sink] protocol-native.c: 
max_request changed, trying to update from 59904 to 63744.
Nov 10 10:20:08 quadrio pulseaudio[19484]: [alsa-sink] protocol-native.c: 
Notifying client about increased tlength
Nov 10 10:20:08 quadrio pulseaudio[19484]: [alsa-sink] alsa-sink.c: Latency set 
to 126.00ms
Nov 10 10:20:08 quadrio pulseaudio[19484]: [alsa-sink] alsa-sink.c: 
hwbuf_unused=43312
Nov 10 10:20:08 quadrio pulseaudio[19484]: [alsa-sink] alsa-sink.c: setting 
avail_min=11711
Nov 10 10:20:37 quadrio pulseaudio[19484]: [alsa-sink] alsa-sink.c: Decreasing 
wakeup watermark to 101.00 ms
Nov 10 10:21:06 quadrio pulseaudio[19484]: [alsa-sink] alsa-sink.c: Underrun!
Nov 10 10:21:06 quadrio pulseaudio[19484]: [alsa-sink] alsa-sink.c: Increasing 
wakeup watermark to 111.00 ms
Nov 10 10:21:26 quadrio pulseaudio[19484]: [alsa-sink] alsa-sink.c: Decreasing 
wakeup watermark to 106.01 ms

I'm on a 32-bit system with 8GB of memory, so run PAE.

-- 
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.launchpad.net/pulseaudio/+bug/996906/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 996906] Re: periodic audio skips with Intel HDA

2012-11-03 Thread scottku
I'm also on 12.10 and am experiencing this every couple minutes with:
00:1b.0 Audio device: Intel Corporation 82801JI (ICH10 Family) HD Audio 
Controller

-- 
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.launchpad.net/pulseaudio/+bug/996906/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 996906] Re: periodic audio skips with Intel HDA

2012-10-22 Thread _dan_
I am on 12.10 with

dan@greyskull:~$ lspci|grep Audio
00:1b.0 Audio device: Intel Corporation 7 Series/C210 Series Chipset Family 
High Definition Audio Controller (rev 04)


i have periodic skips aswell.

-- 
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.launchpad.net/pulseaudio/+bug/996906/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 996906] Re: periodic audio skips with Intel HDA

2012-10-17 Thread Raymond
but at 44100Hz the latency is no exactly 8 ms * 4 = 32ms


how do pa get these values 31.85ms and 31.93ms ?

current latency: 31.85 ms
  max request: 5 KiB
  max rewind: 5 KiB
  monitor source: 0
  sample spec: s16le 2ch 44100Hz
  channel map: front-left,front-right
   Stereo
  used by: 1
  linked by: 1
  fixed latency: 31.93 ms
  card: 0 alsa_card.pci-_00_1b.0
  module: 4
  properties:
   alsa.resolution_bits = 16
   device.api = alsa
   device.class = sound
   alsa.class = generic
   alsa.subclass = generic-mix
   alsa.name = ALC889 Analog
   alsa.id = ALC889 Analog
   alsa.subdevice = 0
   alsa.subdevice_name = subdevice #0
   alsa.device = 0
   alsa.card = 0
   alsa.card_name = HDA Intel
   alsa.long_card_name = HDA Intel at 0xf312 irq 50
   alsa.driver_name = snd_hda_intel
   device.bus_path = pci-:00:1b.0
   sysfs.path = /devices/pci:00/:00:1b.0/sound/card0
   device.bus = pci
   device.vendor.id = 8086
   device.vendor.name = Intel Corporation
   device.product.name = 5 Series/3400 Series Chipset High Definition Audio
   device.form_factor = internal
   device.string = front:0
   device.buffering.buffer_size = 5632
   device.buffering.fragment_size = 704

-- 
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.launchpad.net/pulseaudio/+bug/996906/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 996906] Re: periodic audio skips with Intel HDA

2012-10-16 Thread David Henningsson
If it isn't the hardware position, it could be some kernel thread
blocking PulseAudio from running; you can check this using the wakeup_rt
tracer. From there I don't know; because I'm not confident with writing
patches for other subsystems.

Hrm, I think Pulseaudio should try to be a little more helpful here, a
debug message on schedule delays wouldn't hurt e g...

-- 
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.launchpad.net/pulseaudio/+bug/996906/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 996906] Re: periodic audio skips with Intel HDA

2012-10-16 Thread Richard Huddleston
So on ubuntu precise I have spent a ton of time playing with my
pulseaudio settings and system.  I have the skips down to about one
every ten minutes or so, and humorously while I was typing this
sentence.

I have tsched=0 but in regards to Raymond, my 
default-fragment-size-msec = 4
default-fragments = 8

and my flash videos in chrome play great.   My mind is weak in the
morning before coffee, but I remember that chrome was requesting buffers
of size on the order of 64 - 100 ms  , somewhere in there.  I might be
incorrect, but I believe I needed my pulse settings to be LESS than
that.  So 4 * 8 is 32 ms.  Also, you can check ( with  pacmd list-sinks
) that with tsched=1, I noticed that the current latency starts at
like 2 ms, and as it skips, gets larger, mine would get to around 32 -
64 ms .

in /etc/modules i have
options snd_hda_intel bdl_pos_adj=32 power_save=0 power_save_controller=N 
model=6stack-dig
but you'll have to figure out your model if you use that param

here is some of my pulse settings for you to try
cat /etc/pulse/daemon.conf  | grep -v -e ^;  -e ^# | sed '/^$/d'

allow-module-loading = yes
 allow-exit = yes
 high-priority = yes
 nice-level = -20
 realtime-scheduling = yes
 realtime-priority = 99
 exit-idle-time = 1
 scache-idle-time = 1
 log-target = auto
 log-level = error
 resample-method = speex-float-8
 enable-remixing = yes
flat-volumes = no
 rlimit-nofile = -1
 rlimit-nice = -1
 rlimit-rtprio = -1
 rlimit-rttime = -1
 default-sample-rate = 44100
 default-sample-channels = 2
 default-channel-map = front-left,front-right
 default-fragments = 8
 default-fragment-size-msec = 4

and here is some more output
pacmd list-sinks

* index: 0
name: alsa_output.pci-_00_1b.0.analog-stereo
driver: module-alsa-card.c
flags: HARDWARE HW_MUTE_CTRL HW_VOLUME_CTRL DECIBEL_VOLUME LATENCY 
state: RUNNING
suspend cause: 
priority: 9959
volume: 0: 100% 1: 100%
0: 0.00 dB 1: 0.00 dB
balance 0.00
base volume:  93%
 -2.00 dB
volume steps: 65537
muted: no
current latency: 31.85 ms
max request: 5 KiB
max rewind: 5 KiB
monitor source: 0
sample spec: s16le 2ch 44100Hz
channel map: front-left,front-right
 Stereo
used by: 1
linked by: 1
fixed latency: 31.93 ms
card: 0 alsa_card.pci-_00_1b.0
module: 4
properties:
alsa.resolution_bits = 16
device.api = alsa
device.class = sound
alsa.class = generic
alsa.subclass = generic-mix
alsa.name = ALC889 Analog
alsa.id = ALC889 Analog
alsa.subdevice = 0
alsa.subdevice_name = subdevice #0
alsa.device = 0
alsa.card = 0
alsa.card_name = HDA Intel
alsa.long_card_name = HDA Intel at 0xf312 irq 50
alsa.driver_name = snd_hda_intel
device.bus_path = pci-:00:1b.0
sysfs.path = /devices/pci:00/:00:1b.0/sound/card0
device.bus = pci
device.vendor.id = 8086
device.vendor.name = Intel Corporation
device.product.name = 5 Series/3400 Series Chipset High 
Definition Audio
device.form_factor = internal
device.string = front:0
device.buffering.buffer_size = 5632
device.buffering.fragment_size = 704
device.access_mode = mmap
device.profile.name = analog-stereo
device.profile.description = Analog Stereo
device.description = Built-in Audio Analog Stereo
alsa.mixer_name = Realtek ALC889
alsa.components = HDA:10ec0889,80860032,0014
module-udev-detect.discovered = 1
device.icon_name = audio-card-pci
ports:
analog-output: Analog Output (priority 9900, available: unknown)
properties:

active port: analog-output

-- 
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.launchpad.net/pulseaudio/+bug/996906/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 996906] Re: periodic audio skips with Intel HDA

2012-10-16 Thread Charles Lindsay
Like I said above, mine now skips much less frequently than every 10
minutes, so I'm skeptical about tweaking any pulse configs at this
point.  And since all I did to have it skip less frequently was re-
install pulseaudio and update to all the latest precise packages, it
seems like the issue is somewhere in the interaction between pulse and
the kernel or hardware or the system in general.

If there's a way I can test using the wakeup_rt tracer I'm happy to do
so.  Is there any documentation I can read about doing so?  A quick
google search turned up nothing I could decipher.

-- 
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.launchpad.net/pulseaudio/+bug/996906/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 996906] Re: periodic audio skips with Intel HDA

2012-10-16 Thread Charles Lindsay
Results: using options snd-hda-intel position_fix=1 in /etc/modprobe.d
/alsa-base.conf didn't make the problem go away.  Using position_fix=2
made the problem actively worse: the audio literally didn't do anything
but skip.  Using load-module module-udev-detect tsched=0 in
/etc/pulse/default.pa made flash videos unplayable (not just the audio,
but the video would stutter as well).  In short, none of those fixes
solved my problem.

Any other ideas?

-- 
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.launchpad.net/pulseaudio/+bug/996906/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 996906] Re: periodic audio skips with Intel HDA

2012-10-16 Thread Raymond
Regarding latency, when default-fragment-size-msec was 1, I
noticed a line saying

( 124.922| 0.000) D: [alsa-sink] sink.c: latency = 1339

the buffer size of hda in ubuntu 12.04 seem reduced from 4mb back to
64kb

configured latency: 20.00 ms; range is 1.00 .. 371.52 ms
card: 0 alsa_card.pci-_00_14.2
module: 4
properties:
alsa.resolution_bits = 16
device.api = alsa
device.class = sound
alsa.class = generic
alsa.subclass = generic-mix
alsa.name = ALC889 Analog
alsa.id = ALC889 Analog
alsa.subdevice = 0
alsa.subdevice_name = subdevice #0
alsa.device = 0
alsa.card = 0
alsa.card_name = HDA ATI SB
alsa.long_card_name = HDA ATI SB at 0xfe024000 irq 16
alsa.driver_name = snd_hda_intel
device.bus_path = pci-:00:14.2
sysfs.path = /devices/pci:00/:00:14.2/sound/card0
device.bus = pci
device.vendor.id = 1002
device.vendor.name = Advanced Micro Devices [AMD] nee ATI
device.product.name = SBx00 Azalia (Intel HDA)
device.form_factor = internal
device.string = front:0
device.buffering.buffer_size = 65536
device.buffering.fragment_size = 32768

does it mean that pulseaudio server it own buffer 1000ms when the driver
only has 371.52 ms ?

-- 
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.launchpad.net/pulseaudio/+bug/996906/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 996906] Re: periodic audio skips with Intel HDA

2012-10-15 Thread Charles Lindsay
I've been trying to reproduce this issue for the last couple weeks, and
I'm somewhat happy to say it happens much, much less frequently now.
Unfortunately, it still happens.  It's now on the order of once every
few hours on average instead of once every few minutes, but much less
regularly -- only one afternoon has it happened more than once as I've
been listening to music, and that afternoon it happened 3 or 4 times.
I'm on pulseaudio 1:1.1-0ubuntu15.1 and kernel 3.2.0-32-generic now.

Anyway, that's made it much harder to test any fixes.  Now that I've got
a bit better idea of how it behaves lately, I'll turn off timer
scheduling and report back after some time.  I'm assuming the
position_fix hack won't do anything, since my audio is 100% fine under
alsa.

-- 
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.launchpad.net/pulseaudio/+bug/996906/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 996906] Re: periodic audio skips with Intel HDA

2012-10-15 Thread David Henningsson
  I'm assuming the position_fix hack won't do anything, since my audio
is 100% fine under alsa.

This assumption is wrong. PulseAudio relies on hardware positions to be
accurate any time; where as if you use alsa without pulseaudio, you're
very likely only relying on hardware positions to be accurate at period
boundaries.

-- 
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.launchpad.net/pulseaudio/+bug/996906/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 996906] Re: periodic audio skips with Intel HDA

2012-10-15 Thread Charles Lindsay
Ah, ok.  That means I've got even more testing to do.  Thanks for your
help; I'll report back with my results.

-- 
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.launchpad.net/pulseaudio/+bug/996906/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 996906] Re: periodic audio skips with Intel HDA

2012-09-24 Thread David Henningsson
This problem is quite hardware specific, so it's likely more than one root 
cause, but one of the first things to try would be this:
https://wiki.ubuntu.com/Audio/PositionReporting

-- 
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.launchpad.net/pulseaudio/+bug/996906/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 996906] Re: periodic audio skips with Intel HDA

2012-06-11 Thread radsaq
Also seeing this. Incredibly annoying, especially when combined with
http://ubuntuforums.org/showthread.php?p=12009084 :(

-- 
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.launchpad.net/pulseaudio/+bug/996906/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 996906]

2012-05-14 Thread Charles Lindsay
I tried bumping default-fragment-size-msec up to 1000 and then 1.
It continues to skip.

Regarding latency, when default-fragment-size-msec was 1, I
noticed a line saying

( 124.922|   0.000) D: [alsa-sink] sink.c: latency = 1339

in the log during a skip.  After the music was done skipping, I noticed
this:

( 155.288|   0.000) D: [alsa-sink] alsa-sink.c: Latency set to 20.00ms

Not sure which one to believe for latency.

Anyway, the problem persists regardless of the default-fragment-size-
msec config setting.

-- 
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.launchpad.net/pulseaudio/+bug/996906/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 996906] Re: periodic audio skips with Intel HDA

2012-05-14 Thread Launchpad Bug Tracker
Status changed to 'Confirmed' because the bug affects multiple users.

** Changed in: pulseaudio (Ubuntu)
   Status: New = Confirmed

-- 
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.launchpad.net/pulseaudio/+bug/996906/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 996906] [NEW] periodic audio skips with Intel HDA

2012-05-08 Thread Charles Lindsay
 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.launchpad.net/pulseaudio/+bug/996906/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 996906] Re: periodic audio skips with Intel HDA

2012-05-08 Thread Charles Lindsay
** Bug watch added: freedesktop.org Bugzilla #49608
   https://bugs.freedesktop.org/show_bug.cgi?id=49608

** Also affects: pulseaudio via
   https://bugs.freedesktop.org/show_bug.cgi?id=49608
   Importance: Unknown
   Status: Unknown

-- 
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.launchpad.net/pulseaudio/+bug/996906/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 996906] Re: periodic audio skips with Intel HDA

2012-05-08 Thread Bug Watch Updater
Launchpad has imported 3 comments from the remote bug at
https://bugs.freedesktop.org/show_bug.cgi?id=49608.

If you reply to an imported comment from within Launchpad, your comment
will be sent to the remote bug automatically. Read more about
Launchpad's inter-bugtracker facilities at
https://help.launchpad.net/InterBugTracking.


On 2012-05-08T02:54:58+00:00 Charles Lindsay wrote:

When running PulseAudio, if I'm playing music via any source (Exaile,
Totem, Flash in Firefox or Chromium, VLC, etc.) every few minutes the
audio will skip once or twice.  top doesn't show any process eating CPU
any more when it happens.  dmesg doesn't show anything.  Nothing else
seems to be affected.  It doesn't seem to happen regularly.

I just installed Ubuntu 12.04 from scratch (with pulseaudio
1:1.1-0ubuntu15), but the same thing happened in 10.04 on the same
hardware.  Uninstalling the PulseAudio packages and going back to ALSA
gives me no issues whatsoever, which is how I know the issue is with
PulseAudio.  I'm using my onboard audio device:

$ lspci | grep Audio
00:14.2 Audio device: Advanced Micro Devices [AMD] nee ATI SBx00 Azalia (Intel 
HDA)

Following mailing list instructions, pulseaudio - --log-time shows
during a skip:

( 684.030|   5.000) I: [alsa-sink] alsa-sink.c: Underrun!
( 684.030|   0.000) I: [alsa-sink] alsa-sink.c: Increasing minimal latency to 
26.00 ms
( 684.030|   0.000) D: [alsa-sink] alsa-sink.c: Latency set to 26.00ms
( 684.030|   0.000) D: [alsa-sink] alsa-sink.c: hwbuf_unused=60952
( 684.030|   0.000) D: [alsa-sink] alsa-sink.c: setting avail_min=15944
( 684.030|   0.000) D: [alsa-sink] alsa-sink.c: Latency set to 26.00ms
( 684.030|   0.000) D: [alsa-sink] alsa-sink.c: hwbuf_unused=60952
( 684.030|   0.000) D: [alsa-sink] alsa-sink.c: setting avail_min=15944
( 684.031|   0.000) D: [alsa-sink] protocol-native.c: Underrun on 'ALSA 
Playback', 0 bytes in queue.
( 684.036|   0.004) D: [alsa-sink] protocol-native.c: Requesting rewind due to 
end of underrun.
( 684.036|   0.000) D: [alsa-sink] alsa-sink.c: Requested to rewind 10940 bytes.
( 684.036|   0.000) D: [alsa-sink] alsa-sink.c: Limited to 3320 bytes.
( 684.036|   0.000) D: [alsa-sink] alsa-sink.c: before: 830
( 684.036|   0.000) D: [alsa-sink] alsa-sink.c: after: 830
( 684.036|   0.000) D: [alsa-sink] alsa-sink.c: Rewound 3320 bytes.
( 684.036|   0.000) D: [alsa-sink] sink.c: Processing rewind...
( 684.036|   0.000) D: [alsa-sink] sink.c: latency = 1337
( 684.036|   0.000) D: [alsa-sink] sink-input.c: Have to rewind 3320 bytes on 
render memblockq.
( 684.036|   0.000) D: [alsa-sink] source.c: Processing rewind...
( 696.234|  12.197) I: [alsa-sink] alsa-sink.c: Underrun!
( 696.234|   0.000) I: [alsa-sink] alsa-sink.c: Increasing wakeup watermark to 
15.99 ms
( 702.033|   5.799) I: [alsa-sink] alsa-sink.c: Underrun!
( 702.033|   0.000) I: [alsa-sink] alsa-sink.c: Increasing minimal latency to 
36.00 ms
( 702.033|   0.000) D: [alsa-sink] alsa-sink.c: Latency set to 36.00ms
( 702.033|   0.000) D: [alsa-sink] alsa-sink.c: hwbuf_unused=59188
( 702.033|   0.000) D: [alsa-sink] alsa-sink.c: setting avail_min=15680
( 702.033|   0.000) D: [alsa-sink] alsa-sink.c: Latency set to 36.00ms
( 702.034|   0.000) D: [alsa-sink] alsa-sink.c: hwbuf_unused=59188
( 702.034|   0.000) D: [alsa-sink] alsa-sink.c: setting avail_min=15680
( 702.034|   0.000) D: [alsa-sink] protocol-native.c: Underrun on 'ALSA 
Playback', 0 bytes in queue.

...and it goes on.

The Underrun! messages alone happened a few times before, but it
didn't skip.

I'd like to use PulseAudio, but it's pretty annoying having audio skip
all the time.

Reply at: https://bugs.launchpad.net/pulseaudio/+bug/996906/comments/0


On 2012-05-08T08:17:13+00:00 Wangxingchao2011 wrote:


 
 ( 684.030|   5.000) I: [alsa-sink] alsa-sink.c: Underrun!
 ( 684.030|   0.000) I: [alsa-sink] alsa-sink.c: Increasing minimal latency to
 26.00 ms
 ( 684.030|   0.000) D: [alsa-sink] alsa-sink.c: Latency set to 26.00ms

The latency is too small, it will make pulseaudio more busy and could
not read enough data. So would you have a try to tune the default buffer
size and check what will happen?

for me i once met similar case, flood of underrun message caused by too little 
buffer size, it become better by tune default-fragment-size-msec at:
/etc/pulse/daemon.conf 

 
 ...and it goes on.
 
 The Underrun! messages alone happened a few times before, but it didn't 
 skip.
 
 I'd like to use PulseAudio, but it's pretty annoying having audio skip all the
 time.

Reply at: https://bugs.launchpad.net/pulseaudio/+bug/996906/comments/1


On 2012-05-09T05:08:47+00:00 Charles Lindsay wrote:

Changed default-fragment-size-msec from 10 to 100; still happens.

Reply at: https://bugs.launchpad.net/pulseaudio/+bug/996906