Opened 16 years ago
Closed 8 years ago
#1908 closed enhancement (obsolete)
VirtualBox mute on alsa/dmix configuration
Reported by: | Clemens Fruhwirth | Owned by: | |
---|---|---|---|
Component: | audio | Version: | VirtualBox 1.6.4 |
Keywords: | Cc: | ||
Guest type: | other | Host type: | other |
Description (last modified by )
dmix is an alsa plugin for user space sound stream mixing. The problem is that when the "default" alsa audio device is routed through dmix, then applications that try to open "default" for recording fail as dmix is only an output plugin. In general, the trick is to set the input device to something besides from "default" for these applications ("null"/"hw:0,0" is an option). This is possible with VirtualBox by setting the VBOX_ALSA_ADC_DEV=".." variable.
First suggestion: Replacing the error message
00:00:08.982 ALSA: Failed to open 'default' as ADC
with something like
00:00:08.982 ALSA: Failed to open 'default' as ADC, set VBOX_ALSA_ADC_DEV environment variable.
in alsaaudio.c. I had to read "audio_process_options/audio_get_conf_in" in audio.c closely to understand what the code is actually doing.
Second suggestion: If the input device is unavailable, complain but don't go mute completely. I presume the user rarely cares about a working input stream but will most certainly care about a working output stream. The strategy for alsaaudio.c in alsa_init_in could be: call alsa_open for a second time but with "null" set as conf.pcm_name_in.
Change History (4)
follow-ups: 2 3 comment:1 by , 15 years ago
comment:2 by , 15 years ago
Well, that sure was gross. Let me try again.
00:00:01.195 Audio: Trying driver 'alsa'. 00:00:01.196 Audio: set_record_source ars=0 als=0 (not implemented) 00:00:01.209 ALSA: ADC frequency 44100Hz, period size 0, buffer size -1209028620 00:00:01.289 ALSA: ADC frequency 44100Hz, period size 0, buffer size -1209028620 00:00:01.411 ALSA: Failed to apply audio parameters 00:00:01.534 ALSA: Failed to apply audio parameters 00:00:01.609 ALSA: ADC frequency 44100Hz, period size 0, buffer size -1296204370 00:00:01.689 ALSA: ADC frequency 44100Hz, period size 0, buffer size -1296204370 00:00:01.749 AC97: WARNING: Unable to open PCM IN! 00:00:01.749 AC97: WARNING: Unable to open PCM MC! 00:00:01.749 AC97: WARNING: Unable to open PCM OUT! 00:00:01.749 Audio: Using NULL audio driver 00:00:01.749 Audio: set_record_source ars=0 als=0 (not implemented) 00:00:01.750 VM: Raising runtime error 'HostAudioNotResponding' (fFlags=0x0)
comment:3 by , 14 years ago
Dmix support for the alsa backend is also my biggest feature request. However, with the trick provided above (exporting VBOX_ALSA_ADC_DEV="null") solves the issue for me.
I would therefore recommend the developers to take this workaround into consideration and to make the alsa output dmix compatible.
Replying to lex:
Can you give more detail on how to implement your suggested workaround?
I tried this:
$ export VBOX_ALSA_ADC_DEV="null" $ VirtualBox
But I still get this in my log and I get the same audio open failure:
00:00:01.195 Audio: Trying driver 'alsa'. 00:00:01.196 Audio: set_record_source ars=0 als=0 (not implemented) 00:00:01.209 ALSA: ADC frequency 44100Hz, period size 0, buffer size -1209028620 00:00:01.289 ALSA: ADC frequency 44100Hz, period size 0, buffer size -1209028620 00:00:01.411 ALSA: Failed to apply audio parameters 00:00:01.534 ALSA: Failed to apply audio parameters 00:00:01.609 ALSA: ADC frequency 44100Hz, period size 0, buffer size -1296204370 00:00:01.689 ALSA: ADC frequency 44100Hz, period size 0, buffer size -1296204370 00:00:01.749 AC97: WARNING: Unable to open PCM IN! 00:00:01.749 AC97: WARNING: Unable to open PCM MC! 00:00:01.749 AC97: WARNING: Unable to open PCM OUT! 00:00:01.749 Audio: Using NULL audio driver 00:00:01.749 Audio: set_record_source ars=0 als=0 (not implemented) 00:00:01.750 VM: Raising runtime error 'HostAudioNotResponding' (fFlags=0x0)
What am I doing wrong?
comment:4 by , 8 years ago
Description: | modified (diff) |
---|---|
Resolution: | → obsolete |
Status: | new → closed |
Please reopen if still relevant with a recent VirtualBox release.
Can you give more detail on how to implement your suggested workaround?
I tried this:
$ export VBOX_ALSA_ADC_DEV="null" $ VirtualBox
But I still get this in my log and I get the same audio open failure:
00:00:01.195 Audio: Trying driver 'alsa'. 00:00:01.196 Audio: set_record_source ars=0 als=0 (not implemented) 00:00:01.209 ALSA: ADC frequency 44100Hz, period size 0, buffer size -1209028620 00:00:01.289 ALSA: ADC frequency 44100Hz, period size 0, buffer size -1209028620 00:00:01.411 ALSA: Failed to apply audio parameters 00:00:01.534 ALSA: Failed to apply audio parameters 00:00:01.609 ALSA: ADC frequency 44100Hz, period size 0, buffer size -1296204370 00:00:01.689 ALSA: ADC frequency 44100Hz, period size 0, buffer size -1296204370 00:00:01.749 AC97: WARNING: Unable to open PCM IN! 00:00:01.749 AC97: WARNING: Unable to open PCM MC! 00:00:01.749 AC97: WARNING: Unable to open PCM OUT! 00:00:01.749 Audio: Using NULL audio driver 00:00:01.749 Audio: set_record_source ars=0 als=0 (not implemented) 00:00:01.750 VM: Raising runtime error 'HostAudioNotResponding' (fFlags=0x0)
What am I doing wrong?