VirtualBox

Opened 2 years ago

Closed 8 months ago

Last modified 8 months ago

#20723 closed defect (duplicate)

Guest can't pick-up/use Host audio device (like BT or USB headset) after the device was physically reconnected/re-plugged (LOGS, STEPS)

Reported by: PavloUnn Owned by:
Component: audio Version: VirtualBox 6.1.30
Keywords: audio lost bluetooth bt usb disconnect reconnect Cc: boxer01
Guest type: Windows Host type: Windows

Description

Pls advise on temporary workaround (if any), as it blocks from using some of audio devices with VirtualBox (greate solution, btw, thank you so much!)

Steps: 1 Choose some pluggable audio device on Host. It can be any - USB or Bluetooth/BT headset/headphones, behavior is the same 2 Play audio in Guest 3 Disconnect/unplug audio device physically from Host 4 Audio playback falls back properly to the newly selected Host audio device (like speakers of a laptop) 5 Plug-in/reconnect disconnected USB or BT audio device, ensure it's selected as default in Host and audio plays just fine from Host 6 Try to play audio from Guest RESULT: silence, nothing audible I've expected audio to play normally, but it can be done only if I restart Guest

What's interesting is that if after step 6 I switch Host's audio device to the fallback device (like laptop's speakers), I start to hear Guest's audio. So the audio itself is not broken in Guest.

What I've tried to do to get it back:

  • Disable/enable Audio Out/In in VB's toolbar
  • Mute/unmute, ensure that all is unmuted after reconnections
  • Stop/Start audiosrv and AudioEndpointBuilder on both Host and Guest

The only uncertain thing here is that after some sequence of Stop/Starts I think audio started to go out to proper device, but then I couldn't reproduce/restore exact sequence of starts/stops so I'm no longer shure it wasn't a misinterpretation.

Pls note that if to change audio device back and forth without disconnecting/unplugging it, all works fine as expected. Just in case, speaking of BT device - it's connected to the Host's bluetooth not to the Guest bypassing Host (if to pass-through BT device "Intel Corp. [0002]" to Guest)

Please help to solve it and if possible, suggest temporary workaround for the issue (through CLI), so I can restore audio without a need to restart Guest.

I've attached two set of verbose logs, "Audio issue - NOT OK unplugging" represents the issue. "Audio issue - OK changing without unplugging" is for the simple change without unplugging (just in case).

Logs contains AUDCLNT_E_DEVICE_INVALIDATED and VERR_AUDIO_STREAM_NOT_READY

00:02:55.763182 WasAPI: GetCurrentPadding failed on '[WasAPI] Front:0': AUDCLNT_E_DEVICE_INVALIDATED
00:02:55.763232 WasAPI: GetCurrentPadding([WasAPI] Front:0) failed during playback: AUDCLNT_E_DEVICE_INVALIDATED (@0x0)
00:02:55.763265 Audio: @0x6fa0: Stream '[WasAPI] Front:0' pre-buffering commit problem: wrote 0x0 out of 0x6fa0 + 0x0 - rc=VERR_AUDIO_STREAM_NOT_READY *pcbWritten=0x20 PREBUF_COMMITTING -> PREBUF_COMMITTING

VB version is 6.1.30 r148432 (Qt5.6.2) but I've seen it on previous versions as well.

It looks like others experience similar issues, but they were primarily referring to Bluetooth devices, but the issue seems to be more generic and affects all detachable audio devices. Just in case, other tickets are #20630, #20431

I've seen references to function drvHostAudioWasHA_StreamPlay():

else
{
    LogRelMax(64, ("WasAPI: GetCurrentPadding(%s) failed during playback: %Rhrc (@%#RX64)\n",
    pStreamWas->Cfg.szName, hrc, pStreamWas->offInternal));
    /** @todo reinit on AUDCLNT_E_DEVICEINVALIDATED? */
    rc = VERR_AUDIO_STREAM_NOT_READY;
    break;
}

Attachments (2)

Audio issue - NOT OK unplugging.zip (84.9 KB ) - added by PavloUnn 2 years ago.
Logs with errors
Audio issue - OK changing without unplugging.zip (69.7 KB ) - added by PavloUnn 2 years ago.
Logs for OK non-problematic case when I don't unplug and just change audio output on Host (just in case)

Download all attachments as: .zip

Change History (4)

by PavloUnn, 2 years ago

Logs with errors

by PavloUnn, 2 years ago

Logs for OK non-problematic case when I don't unplug and just change audio output on Host (just in case)

comment:1 by pentagonik, 8 months ago

Resolution: duplicate
Status: newclosed

Duplicate of #20431.

comment:2 by pentagonik, 8 months ago

Uploaded a new Windows test build 158794 which should contain a fix here [1].

Please let me know if this fixes the issue for you.

[1] https://www.virtualbox.org/download/testcase/VirtualBox-7.0.11-158794-Win.exe

Note: See TracTickets for help on using tickets.

© 2023 Oracle
ContactPrivacy policyTerms of Use