Page 1 of 1

Headless Vbox - Chopping Audio issue

Posted: 6. Nov 2020, 12:35
by myhobby
Update 9nov20

Running ClearOS 3.10.0-1127.19.1.el7.x86_64 #1 SMP Tue Aug 25 17:23:54 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
Audio is working 100% via hardware
Uninstalled alsa-utils and reinstalled these.

Added

/etc/asound.conf
#
# Place your global alsa-lib configuration here...
#
defaults.pcm.card 0 # or better "PCH"
defaults.pcm.device 0
defaults.ctl.card 0


It more and more feels like a missing link somewhere.
a) Can someone confirm that ClearOS 7 and a headless guest(s) setup has no audio issues via RDP
b) What can I analyse more...


lsmod | grep snd
snd_usb_audio 247682 1
snd_usbmidi_lib 30262 1 snd_usb_audio
snd_hwdep 13608 1 snd_usb_audio
snd_rawmidi 31553 1 snd_usbmidi_lib
snd_seq 62774 0
snd_seq_device 14356 2 snd_seq,snd_rawmidi
snd_pcm 101339 1 snd_usb_audio
snd_timer 34110 2 snd_pcm,snd_seq
snd 83987 10 snd_usb_audio,snd_hwdep,snd_timer,snd_pcm,snd_seq,snd_rawmidi,snd_usbmidi_lib,snd_seq_device
soundcore 15047 1 snd


Update 8nov20

Change the audiocard in the win10 guest to AC97. Checked audio again -> not resolved. Looking in the Vbox log I ran into "virtualbox VRDE: Capturing audio data lost 8820 bytes"so I installed the last VB Extension. Ran again a test on this guest but no improvements. Checked log again and Is still have issues with my audio part

00:00:12.164563 AC97: Reset
00:00:12.164594 AC97: Mixer reset (EAID=0x809, EACS=0x9)
00:00:12.164599 AC97: Record select to left=Microphone In, right=Microphone In
00:00:12.165832 ALSA: Using output device "default"
00:00:12.168633 ALSA: Failed to open "default" as output device: Permission denied
00:00:12.168999 ALSA: Using input device "default"
00:00:12.175870 Audio: Enabling input for driver 'AudioVRDE'
00:00:12.175900 Mixer: Setting recording source of sink '[Recording] Line In' to 'Line-In'
00:00:12.176403 Audio: Disabling input for driver 'AudioVRDE'
00:00:12.176431 Mixer: Setting recording source of sink '[Recording] Line In' to '<None>'
00:00:12.176487 ALSA: Using input device "default"
00:00:12.178803 Audio: Enabling input for driver 'AudioVRDE'
00:00:12.178818 Mixer: Setting recording source of sink '[Recording] Line In' to 'Line-In'
00:00:12.188874 AC97: Record select to left=Microphone In, right=Microphone In
00:00:12.202916 OHCI: Software reset
00:00:12.203134 OHCI: USB Reset
00:00:12.212937 AC97: Record select to left=Phone, right=Phone
00:00:12.221638 AC97: Record select to left=Phone, right=Phone
00:00:12.223925 ALSA: Using output device "default"
00:00:12.225077 ALSA: Failed to open "default" as output device: Permission denied
00:00:12.225196 ALSA: Using output device "default"
00:00:12.226217 ALSA: Failed to open "default" as output device: Permission denied
00:00:12.226326 ALSA: Using input device "default"
00:00:12.227777 Mixer: Setting recording source of sink '[Recording] Microphone In' to 'Mic-In'
00:00:12.228236 Audio: Disabling input for driver 'AudioVRDE'
00:00:12.228275 Mixer: Setting recording source of sink '[Recording] Microphone In' to '<None>'
00:00:12.228317 ALSA: Using input device "default"
00:00:12.229746 Audio: Enabling input for driver 'AudioVRDE'
00:00:12.229759 Mixer: Setting recording source of sink '[Recording] Microphone In' to 'Mic-In'
00:00:12.229827 Audio: Disabling input for driver 'AudioVRDE'
00:00:12.229861 Mixer: Setting recording source of sink '[Recording] Microphone In' to '<None>'
00:00:12.229895 ALSA: Using input device "default"
00:00:12.231327 Audio: Enabling input for driver 'AudioVRDE'
00:00:12.231339 Mixer: Setting recording source of sink '[Recording] Microphone In' to 'Mic-In'
00:00:12.231421 Audio: Disabling input for driver 'AudioVRDE'
00:00:12.231455 Mixer: Setting recording source of sink '[Recording] Microphone In' to '<None>'
00:00:12.231488 ALSA: Using input device "default"
00:00:12.232928 Audio: Enabling input for driver 'AudioVRDE'
00:00:12.232940 Mixer: Setting recording source of sink '[Recording] Microphone In' to 'Mic-In'
00:00:12.233103 ALSA: Using output device "default"
00:00:12.234141 ALSA: Failed to open "default" as output device: Permission denied
00:00:12.234230 Audio: Disabling input for driver 'AudioVRDE'
00:00:12.234264 Mixer: Setting recording source of sink '[Recording] Line In' to '<None>'
00:00:12.234298 ALSA: Using input device "default"
00:00:12.235703 Audio: Enabling input for driver 'AudioVRDE'
00:00:12.235715 Mixer: Setting recording source of sink '[Recording] Line In' to 'Line-In'
00:00:12.235784 Audio: Disabling input for driver 'AudioVRDE'
00:00:12.235817 Mixer: Setting recording source of sink '[Recording] Microphone In' to '<None>'
00:00:12.235863 ALSA: Using input device "default"
00:00:12.237268 Audio: Enabling input for driver 'AudioVRDE'
00:00:12.237280 Mixer: Setting recording source of sink '[Recording] Microphone In' to 'Mic-In'

No idea what is causing this.

Update 7nov20:

Just installed mpg123 on this linux host and I can play/hear the audio without an issue. It is not clear which part (host/guest) is causing my problem. Can someone advise ?

Original issue:

Running the latest VirtualBox on a Linux host combined with a Windows 10 guest. Running all guest headless.
When playing any sound in the guest, it is chopping and higher pitched. It is not related to the computer running the RDP client, because several computers produce the same audio problem.

The linux host has an USB audio card connected, because it defaults does not have any audio.

Some details

./amixer controls
numid=10,iface=CARD,name='Keep Interface'
numid=3,iface=MIXER,name='Mic Playback Switch'
numid=4,iface=MIXER,name='Mic Playback Volume'
numid=7,iface=MIXER,name='Mic Capture Switch'
numid=8,iface=MIXER,name='Mic Capture Volume'
numid=9,iface=MIXER,name='Auto Gain Control'
numid=5,iface=MIXER,name='Speaker Playback Switch'
numid=6,iface=MIXER,name='Speaker Playback Volume'
numid=2,iface=PCM,name='Capture Channel Map'
numid=1,iface=PCM,name='Playback Channel Map'

cat /proc/asound/cards
0 [Device ]: USB-Audio - USB Audio Device
GeneralPlus USB Audio Device at usb-0000:00:1d.0-1, full speed

ps -edf | grep pulseaudio
root 25739 22511 0 09:27 pts/0 00:00:00 grep --color=auto pulseaudio

Hopefully this can be resolved... would be nice to know why this is happening

Update 7nov20:

Just installed mpg123 on this linux host and I can play/hear the audio without an issue. It is not clear which part (host/guest) is causing my problem. Can someone advise ?

Re: Chopping Audio issue only via Vbox

Posted: 10. Nov 2020, 21:11
by myhobby
I can use some help on https://www.virtualbox.org/wiki/AudioDebug

Can't get VBoxManage to find my Machine.... Clearos 7 and Directories with spaces in the directory name....

[root@Windows 10 x64 Radio]# VBoxManage showvminfo Windows\ 10\ x64\ Radio
VBoxManage: error: Could not find a registered machine named 'Windows 10 x64 Radio'

Is this a known limitation/issue/bug ?

Re: Chopping Audio issue only via Vbox

Posted: 10. Nov 2020, 22:44
by fth0
The global VirtualBox configuration folder, which contains the VM registry, is user dependent (root != vbox). ;)

Re: Chopping Audio issue only via Vbox

Posted: 11. Nov 2020, 17:18
by myhobby
fth0 wrote:The global VirtualBox configuration folder, which contains the VM registry, is user dependent (root != vbox). ;)
That did the job ! Thank you for helping

Re: Chopping Audio issue only via Vbox

Posted: 11. Nov 2020, 17:28
by myhobby
I was able to turn on the audio logging as describe above... DebugAudioOut-0.wav provides a normal sound. The rest of the files are silent
Analysis
Analysis
2020-11-11_16-16-58.jpg (28.45 KiB) Viewed 2113 times
Alsa driver seems to be OK though...... What can be a next step to analyse ? As said, audio is playing fine via the USB audio card on this computer in Clearos 7

Re: Headless Vbox - Chopping Audio issue

Posted: 16. Nov 2020, 21:33
by myhobby
Before logging an issue/bug, just a question to the forum. Are there users that have a linux host, running Windows 10 Headless and DON'T have audio issues via RDP ? This answer would help me a lot with analyzing. Thanks for your confirmation