1 |
On 2020-02-19 19:49, Mick wrote: |
2 |
> On Wednesday, 19 February 2020 17:32:46 GMT n952162 wrote: |
3 |
>> On 2020-02-19 15:37, n952162 wrote: |
4 |
>>> On 2020-02-19 10:48, Adam Carter wrote: |
5 |
>>>> On Wed, Feb 19, 2020 at 8:06 PM <n952162@×××.de |
6 |
>>>> |
7 |
>>>> <mailto:n952162@×××.de>> wrote: |
8 |
>>>> I can't play audio from my VBox. The host system only plays |
9 |
>>>> audio through the second sound card (1). The VBox offers me OSS |
10 |
>>>> or the null driver. The Alsa and pulseaudio pages say OSS is |
11 |
>>>> "deprecated". Is Oracle out of the picture? I can't find the |
12 |
>>>> straight dope. |
13 |
>>>> |
14 |
>>>> Do I have to convince VBox to talk to a different sound card? |
15 |
>>>> |
16 |
>>>> Which vbox version and what are your use flags? |
17 |
>>>> |
18 |
>>>> FWIW, for me; |
19 |
>>>> app-emulation/virtualbox-6.1.2::gentoo was built with the following: |
20 |
>>>> USE="alsa opengl opus pam pulseaudio qt5 sdk udev -debug -doc -dtrace |
21 |
>>>> -headless -java -libressl -lvm -pax_kernel -python -vboxwebsrv -vnc" |
22 |
>>>> ABI_X86="(64)" PYTHON_SINGLE_TARGET="python3_6 -python2_7 -python3_7 |
23 |
>>>> -python3_8" PYTHON_TARGETS="python2_7 python3_6 -python3_7 -python3_8" |
24 |
>>>> |
25 |
>>>> So i can use ALSA or pulse. |
26 |
>>> Okay, that's a good tip. I'll try those use flags - I have none set. |
27 |
>>> |
28 |
>>> I'm at virtualbox-5.2.32, which I just emerged in the last couple of |
29 |
>>> days, using this profile: |
30 |
>>> |
31 |
>>> [16] default/linux/amd64/17.1 (stable) * |
32 |
>> I added alsa and pulseaudio and it didn't help. Then I noticed that |
33 |
>> opus has something to do with the soundcard so I emerged that with -vU |
34 |
>> but nothing needed to be done. |
35 |
>> |
36 |
>> It seems like VBox is interfacing directly with "the" sound card and |
37 |
>> even working correctly (e.g. aplay some-file takes about the right |
38 |
>> amount of time until it ends error-free), but unfortunately, I have 2 |
39 |
>> sound cards and the first doesn't work. |
40 |
>> |
41 |
>> Perhaps I could map the one to the other soundcard using .asoundrc? |
42 |
>> Unfortunately, I can find no grammar for that file. |
43 |
> Two outputs, one HDMI, the other analogue on this laptop: |
44 |
> |
45 |
> $ aplay -l |
46 |
> **** List of PLAYBACK Hardware Devices **** |
47 |
> card 0: HDMI [HDA ATI HDMI], device 3: Generic Digital [Generic Digital] |
48 |
> Subdevices: 1/1 |
49 |
> Subdevice #0: subdevice #0 |
50 |
> card 1: Generic [HD-Audio Generic], device 0: CX20757 Analog [CX20757 Analog] |
51 |
> Subdevices: 1/1 |
52 |
> Subdevice #0: subdevice #0 |
53 |
> |
54 |
> This syntax swaps them over, so I can get sound out of the speakers: |
55 |
> |
56 |
> $ cat /etc/asound.conf |
57 |
> #pcm_slave.slave_rate48000Hz { |
58 |
> # pcm "hw:1,0" |
59 |
> ## This is the rate the sound card does. |
60 |
> ## Any random input rates are resampled to this. |
61 |
> # rate 48000 |
62 |
> #} |
63 |
> #pcm.rate44100Hz { |
64 |
> # type plug |
65 |
> # slave slave_rate48000Hz |
66 |
> #} |
67 |
> |
68 |
> defaults.pcm.card 1 |
69 |
> defaults.pcm.device 0 |
70 |
> defaults.ctl.card 1 |
71 |
> |
72 |
Perhaps coincidentally, that's almost identical to what I have on the host: |
73 |
|
74 |
01~>cat .asoundrc |
75 |
defaults.pcm.!card 1 |
76 |
defaults.pcm.!device 0 |
77 |
defaults.pcm.!ctl 1 |
78 |
#pcm.!default { |
79 |
# type hw |
80 |
# card 1 |
81 |
#} |
82 |
#ctl.!default { |
83 |
# type hw |
84 |
# card 1 |
85 |
#} |
86 |
|
87 |
That works fine there, but aplay in the guest vbox is silent. |
88 |
|
89 |
But that gave me an idea - I tried deleting the host .asoundrc - but it |
90 |
didn't help |
91 |
|
92 |
Putting that .asoundrc in the guest won't work, because vbox only |
93 |
reports seeing one sound card - there is no card 1 (i.e. second card). |
94 |
|
95 |
The documentation that I could find about .asoundrc implies that you can |
96 |
do things like mapping channels but I'm not succeeding with that. |