Bug 94763

Summary: ALSA module: tsched=0 causes skipping on nVidia HDMI output under QEMU-KVM
Product: PulseAudio Reporter: Daniel Edgecumbe <dan>
Component: pavucontrolAssignee: pulseaudio-bugs
Status: RESOLVED MOVED QA Contact: pulseaudio-bugs
Severity: normal    
Priority: medium CC: lennart
Version: unspecified   
Hardware: x86-64 (AMD64)   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:

Description Daniel Edgecumbe 2016-03-31 02:15:21 UTC
bool pa_alsa_may_tsched [modules/alsa/alsa-util.c] disables tsched if PA determines that it is running within a VM.

This causes awful skipping audio on my system.
Removing the check enables the use of tsched and PA functions without a hitch.

Details
-------
Guest VM running under QEMU-KVM.
Arch Linux current 4.4.5-1-ARCH as of 2016/03/31
pulseaudio-git
commit 0f48b7c82378c32194b625d1fd886eee7f1e5928
Date:   Sun Mar 13 23:56:54 2016 +0200
NVIDIA proprietary driver on nVidia GeForce 960GTX - using nVidia HDMI audio.

git blame appears to stem from 2009 - has support for tsched improved since then?

53b046d5 src/modules/alsa/alsa-util.c (Lennart Poettering   2009-11-05 03:23:08 +0100 1482)         /* We cannot depend on being woken up when we ask for in a VM,
53b046d5 src/modules/alsa/alsa-util.c (Lennart Poettering   2009-11-05 03:23:08 +0100 1483)          * so let's fallback to classic IO based playback then. */

I would go ahead and submit a pull request to disable this check but I'm unsure of the ramifications across different virtualization solutions.
Comment 1 Raymond 2016-03-31 03:06:40 UTC
the patch was intended for the emulated intel8x0 sound card inside VM

do you mean nvidia hdmi using pci pass through ?

since only emulated sb16, intel8x0 and hda-intel
Comment 3 Daniel Edgecumbe 2016-03-31 03:50:39 UTC
Yes, that's correct, I am using the nVidia HDMI audio directly using pci passthrough.

Does enabling tsched break support for the emulated cards? I can test this when I have time.
Comment 4 Raymond 2016-03-31 07:17:35 UTC
do it really work since hdmi require graphic driver to request EDID from your HDMI monitor/receiver ?

can you post the output of alsa-info.sh inside VM and pactl list sinks
Comment 5 Raymond 2016-03-31 07:22:21 UTC
http://mailman.alsa-project.org/pipermail/alsa-devel/2014-September/081501.html

you can run pcm_avail.c with the emulated sound card intel8x0, hda-intel and your nvidia HDMI pci passthrough
Comment 6 GitLab Migration User 2018-07-30 09:30:34 UTC
-- 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/pavucontrol/issues/34.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.