AsahiLinux / muvm

muvm - run programs from your system in a microVM
60 stars 12 forks source link

sound sequencer is missing inside fexbash #21

Open kocou-yTko opened 4 months ago

kocou-yTko commented 4 months ago

Followed this guide and managed to install ableton live

After successful install I'm trying to run ableton, splash screen shows, init starts and then it fails due to error:

info:    Image count:  4
info:    Exclusive FS: 2
00e0:err:alsa:get_device_name_from_guid No devices found in registry?
00e0:err:alsa:get_device_name_from_guid No devices found in registry?
00e0:err:alsa:get_device_name_from_guid No devices found in registry?
ALSA lib pulse.c:242:(pulse_connect) PulseAudio: Unable to connect: Connection refused
ALSA lib pulse.c:242:(pulse_connect) PulseAudio: Unable to connect: Connection refused
ALSA lib seq_hw.c:528:(snd_seq_hw_open) open /dev/snd/seq failed: No such file or directory
00e0:err:winediag:MIDIMAP_drvOpen No software synthesizer midi port found, Midi sound output probably won't work.

I see that if I run aplaymidi -l inside vm I get

 Port    Client name                      Port name
 14:0    Midi Through                     Midi Through Port-0

But if I run it inside FEXBash I get same error when ableton fails

ALSA lib seq_hw.c:528:(snd_seq_hw_open) open /dev/snd/seq failed: No such file or directory
Cannot open sequencer - No such file or directory
slp commented 4 months ago

That PulseAudio: Unable to connect: Connection refused makes me thing you're running a version of krun that doesn't include #9

kocou-yTko commented 4 months ago

That PulseAudio: Unable to connect: Connection refused makes me thing you're running a version of krun that doesn't include #9

built it from main branch 1h ago :)

kocou-yTko commented 4 months ago

but according to pull desc, ls $XDG_RUNTIME_DIR/pulse ls: cannot access '/tmp/krun-run-1000-OfDgwQ/pulse': No such file or directory

slp commented 4 months ago

Perhaps you don't have the socat package installed on your system?

kocou-yTko commented 4 months ago

yep, installed it, same error like before about snd/seq

ALSA lib seq_hw.c:528:(snd_seq_hw_open) open /dev/snd/seq failed: No such file or directory
00e0:err:winediag:MIDIMAP_drvOpen No software synthesizer midi port found, Midi sound output probably won't work.
slp commented 4 months ago

yep, installed it, same error like before about snd/seq

ALSA lib seq_hw.c:528:(snd_seq_hw_open) open /dev/snd/seq failed: No such file or directory
00e0:err:winediag:MIDIMAP_drvOpen No software synthesizer midi port found, Midi sound output probably won't work.

Looks like, within the FEXBash context,aplaymidiis not even trying to use pulseaudio. @teohhanhui does your guide instruct users to installalsa-plugins-pulseaudio` in the FEX root?

teohhanhui commented 4 months ago

@slp Oh yeah, it's actually necessary to remove pipewire in the FEX RootFS now.

EDIT: Updated my guide.

@kocou-yTko Do let us know if it works now.

kocou-yTko commented 4 months ago

@teohhanhui seems not but i'll try from the scratch a bit later because i'm not sure my previous tries before posting reddit doesn't affect anything

kocou-yTko commented 4 months ago

@teohhanhui yep, same. removed asahi-krun container, rootfs, etc and started from zero - now /dev/snd has the timer only, seq is missing, pcm devices missing too in FEXBash (pcms were present when issue was started)

asahilina commented 2 days ago

@slp we need to enable CONFIG_SND_SEQ_DEVICE and CONFIG_SND_SEQUENCER if we want /dev/snd/seq to work inside the VM (even if just for local loopback purposes).

However, note that MIDI passthrough is not supported anyway, so don't expect to be able to use your MIDI devices in the VM right now.

slp commented 2 days ago

@slp we need to enable CONFIG_SND_SEQ_DEVICE and CONFIG_SND_SEQUENCER if we want /dev/snd/seq to work inside the VM (even if just for local loopback purposes).

I'm fine enabling it in libkrunfw.

However, note that MIDI passthrough is not supported anyway, so don't expect to be able to use your MIDI devices in the VM right now.

Now I'm a bit lost. Do we gain anything by enabling SEQ?

asahilina commented 2 days ago

You could use the loopback device along with a software synth in the VM to enable legacy MIDI playback, or in general have MIDI apps talking to each other within the VM (and potentially some day have a software passthrough just like we're planning for HID). You just won't get physical MIDI devices directly in the VM.

In particular the softsynth approach (e.g. with timidity) I think is necessary to properly run really old Windows games that have MIDI music under wine, though I haven't looked into that in a long time.