On Wednesday, 19 February 2020 17:32:46 GMT n952162 wrote:
> On 2020-02-19 15:37, n952162 wrote:
> > On 2020-02-19 10:48, Adam Carter wrote:
> >> On Wed, Feb 19, 2020 at 8:06 PM <n952...@web.de
> >> 
> >> <mailto:n952...@web.de>> wrote:
> >>     I can't play audio from my VBox.  The host system only plays
> >>     audio through the second sound card (1).  The VBox offers me OSS
> >>     or the null driver.  The Alsa and pulseaudio pages  say OSS is
> >>     "deprecated".   Is Oracle out of the picture?  I can't find the
> >>     straight dope.
> >>     
> >>     Do I have to convince VBox to talk to a different sound card?
> >> 
> >> Which vbox version and what are your use flags?
> >> 
> >> FWIW, for me;
> >> app-emulation/virtualbox-6.1.2::gentoo was built with the following:
> >> USE="alsa opengl opus pam pulseaudio qt5 sdk udev -debug -doc -dtrace
> >> -headless -java -libressl -lvm -pax_kernel -python -vboxwebsrv -vnc"
> >> ABI_X86="(64)" PYTHON_SINGLE_TARGET="python3_6 -python2_7 -python3_7
> >> -python3_8" PYTHON_TARGETS="python2_7 python3_6 -python3_7 -python3_8"
> >> 
> >> So i can use ALSA or pulse.
> > 
> > Okay, that's a good tip.  I'll try those use flags - I have none set.
> > 
> > I'm at virtualbox-5.2.32, which I just emerged in the last couple of
> > days, using this profile:
> > 
> >     [16]  default/linux/amd64/17.1 (stable) *
> 
> I added alsa and pulseaudio and it didn't help.  Then I noticed that
> opus has something to do with the soundcard so I emerged that with -vU
> but nothing needed to be done.
> 
> It seems like VBox is interfacing directly with "the" sound card and
> even working correctly (e.g. aplay some-file takes about the right
> amount of time until it ends error-free), but unfortunately, I have 2
> sound cards and the first doesn't work.
> 
> Perhaps I could map the one to the other soundcard using .asoundrc? 
> Unfortunately, I can find no grammar for that file.

Two outputs, one HDMI, the other analogue on this laptop:

$ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: HDMI [HDA ATI HDMI], device 3: Generic Digital [Generic Digital]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: Generic [HD-Audio Generic], device 0: CX20757 Analog [CX20757 Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

This syntax swaps them over, so I can get sound out of the speakers:

$ cat /etc/asound.conf 
#pcm_slave.slave_rate48000Hz {
#        pcm "hw:1,0"
##      This is the rate the sound card does.
##      Any random input rates are resampled to this. 
#        rate 48000
#}
#pcm.rate44100Hz {
#        type plug
#        slave slave_rate48000Hz
#}

defaults.pcm.card 1
defaults.pcm.device 0
defaults.ctl.card 1

-- 
Regards,

Mick

Attachment: signature.asc
Description: This is a digitally signed message part.

Reply via email to