[OpenSmalltalk/opensmalltalk-vm] No sound on Linux (#489)

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
13 messages Options
Reply | Threaded
Open this post in threaded view
|

[OpenSmalltalk/opensmalltalk-vm] No sound on Linux (#489)

David T Lewis
 

Apologies if this should have been a part of #360.

Running e.g. AbstractSound bachFugue play resulted in no sound. Other sound-playing applications on the system were working fine.

The VM said sound: /dev/dsp: No such file or directory

--help mentioned the following -

vm-sound-ALSA tryLoading cogspur/lib/squeak/5.0-202003021730/vm-sound-ALSA.so: dlopen: cogspur/lib/squeak/5.0-202003021730/vm-sound-ALSA.so: undefined symbol: snd_mixer_selem_is_active
vm-sound-ALSA tryLoading /home/anon/git/Cuis-Smalltalk/cogspur/lib/squeak/5.0-202003021730/vm-sound-ALSA.so: dlopen: /home/anon/git/Cuis-Smalltalk/cogspur/lib/squeak/5.0-202003021730/vm-sound-ALSA.so: undefined symbol: snd_mixer_selem_is_active

Running with -vm-sound-pulse gave no errors but I still got no sound.

OS - Linux 5.5.0-1-686 #1 SMP Debian 5.5.13-2 (2020-03-30) i686 GNU/Linux

$ cogspur/squeak --version
5.0-202003021730  Tue Mar  3 08:28:29 UTC 2020 gcc 5.4.0 [Production Spur VM]
CoInterpreter VMMaker.oscog-nice.2712 uuid: da64ef0b-fb0a-4770-ac16-f9b448234615 Mar  3 2020
StackToRegisterMappingCogit VMMaker.oscog-eem.2719 uuid: e40f3e94-3a54-411b-9613-5d19114ea131 Mar  3 2020
VM: 202003021730 https://github.com/OpenSmalltalk/opensmalltalk-vm.git
Date: Mon Mar 2 18:30:55 2020 CommitHash: 6a0bc96
Plugins: 202003021730 https://github.com/OpenSmalltalk/opensmalltalk-vm.git
Linux travis-job-56ef6ed6-a99c-4420-b3aa-37bf991d063a 4.15.0-1028-gcp #29~16.04.1-Ubuntu SMP Tue Feb 12 16:31:10 UTC 2019 i686 i686 i686 GNU/Linux
plugin path: cogspur/lib/squeak/5.0-202003021730 [default: /home/anon/git/Cuis-Smalltalk/cogspur/lib/squeak/5.0-202003021730/]

Cuis5.0-4112-32.image


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.

<script type="application/ld+json">[ { "@context": "http://schema.org", "@type": "EmailMessage", "potentialAction": { "@type": "ViewAction", "target": "https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/489", "url": "https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/489", "name": "View Issue" }, "description": "View this Issue on GitHub", "publisher": { "@type": "Organization", "name": "GitHub", "url": "https://github.com" } } ]</script>
Reply | Threaded
Open this post in threaded view
|

Re: [OpenSmalltalk/opensmalltalk-vm] No sound on Linux (#489)

David T Lewis
 

The VM is trying to drive sound through a broken ALSA driver. Can you try these options:
$ squeak -vm-sound-pulse
$ squeak -vm-sound-oss
$ padsp squeak -vm-sound-oss
$ aoss squeak -vm-sound-oss

In each of these sessions, you can do "Beeper beep" to test sound.


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.

<script type="application/ld+json">[ { "@context": "http://schema.org", "@type": "EmailMessage", "potentialAction": { "@type": "ViewAction", "target": "https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/489#issuecomment-617924728", "url": "https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/489#issuecomment-617924728", "name": "View Issue" }, "description": "View this Issue on GitHub", "publisher": { "@type": "Organization", "name": "GitHub", "url": "https://github.com" } } ]</script>
Reply | Threaded
Open this post in threaded view
|

Re: [OpenSmalltalk/opensmalltalk-vm] No sound on Linux (#489)

David T Lewis
In reply to this post by David T Lewis
 

@kksubbu Sorry, I think that was some sound issue on this particular system. It works with -vm-sound-pulse on both this system (needed to restart PA, for some reason) and another Debian Testing system.

On a related note...does the VM try to detect which sound backend it should be using? It seems to use OSS by default, which doesn't seem to be a good choice for modern Linux systems 🤔


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.

<script type="application/ld+json">[ { "@context": "http://schema.org", "@type": "EmailMessage", "potentialAction": { "@type": "ViewAction", "target": "https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/489#issuecomment-618575913", "url": "https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/489#issuecomment-618575913", "name": "View Issue" }, "description": "View this Issue on GitHub", "publisher": { "@type": "Organization", "name": "GitHub", "url": "https://github.com" } } ]</script>
Reply | Threaded
Open this post in threaded view
|

Re: [OpenSmalltalk/opensmalltalk-vm] No sound on Linux (#489)

David T Lewis
In reply to this post by David T Lewis
 

"does the VM try to detect which sound backend it should be using?" not as far as I'm aware. Having such a system would be great. Look at platforms/unix/vm/sqUnixMain.c and the soundModule there-in.


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.

<script type="application/ld+json">[ { "@context": "http://schema.org", "@type": "EmailMessage", "potentialAction": { "@type": "ViewAction", "target": "https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/489#issuecomment-618681280", "url": "https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/489#issuecomment-618681280", "name": "View Issue" }, "description": "View this Issue on GitHub", "publisher": { "@type": "Organization", "name": "GitHub", "url": "https://github.com" } } ]</script>
Reply | Threaded
Open this post in threaded view
|

Re: [OpenSmalltalk/opensmalltalk-vm] No sound on Linux (#489)

David T Lewis
In reply to this post by David T Lewis
 

You might find you have to add a function to struct Sound, such as isModulePreferred or some such to allow sqUnixMain to query the available sound modules so that they do the determination, not sqUnixMain.


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.

<script type="application/ld+json">[ { "@context": "http://schema.org", "@type": "EmailMessage", "potentialAction": { "@type": "ViewAction", "target": "https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/489#issuecomment-618681960", "url": "https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/489#issuecomment-618681960", "name": "View Issue" }, "description": "View this Issue on GitHub", "publisher": { "@type": "Organization", "name": "GitHub", "url": "https://github.com" } } ]</script>
Reply | Threaded
Open this post in threaded view
|

Re: [OpenSmalltalk/opensmalltalk-vm] No sound on Linux (#489)

timrowledge
 


> On 2020-04-23, at 2:29 PM, Eliot Miranda <[hidden email]> wrote:
>
>
> You might find you have to add a function to struct Sound, such as isModulePreferred or some such to allow sqUnixMain to query the available sound modules so that they do the determination, not sqUnixMain.

Perhaps even better, move that stuff out of the core vm code entirely and into the platform specific sound plugin code. If you don't load the plugin (because webserver, or otherwise not needing to make noises) you shouldn't even run this code. And clearly in the image, if no noise is made no plugin should be loaded to make noises.

The only bit that should be in the core vm code is to record any preference about the sound set by the command line; the plugin code should query that and do the right thing.


tim
--
tim Rowledge; [hidden email]; http://www.rowledge.org/tim
User: A harmless drudge.


Reply | Threaded
Open this post in threaded view
|

Re: [OpenSmalltalk/opensmalltalk-vm] No sound on Linux (#489)

K K Subbu
In reply to this post by David T Lewis
 
On 24/04/20 12:02 AM, contrapunctus-1 wrote:
> On a related note...does the VM try to detect which sound backend it
> should be using? It seems to use OSS by default, which doesn't seem to
> be a good choice for modern Linux systems 🤔

It is difficult for the (Linux) VM to guess the sound module to be used
on startup because preferred audio servers differ across distros and is
user-configurable. OSS is a common denominator emulated even by modern
audio servers but is getting long in the tooth, indeed. Pulse server is
widely used today but there is also the ALSA server on Linux distros
like Raspbian. Squeak VM also has to accommodate systems like RPi or
OLPC apart from Linux, FreeBSD or Solaris (x86) laptops.

There are currently two changes being discussed.

* I have proposed a patch [1] to launch script, squeak.sh, that will
detect the currently active server being used and launch the VM with the
right sound module. The VM code itself will not change. This is
expedient and easy to test and deploy on released VMs.
* Tobias and Dave Stes have proposed changing the probing order of sound
modules to pulse->alsa->oss->nas->sun so that modern servers are
preferred over legacy emulation. This is a good fix for upcoming releases.

[1] https://github.com/squeak-smalltalk/squeak-app/pull/17

Regards .. Subbu
Reply | Threaded
Open this post in threaded view
|

Re: [OpenSmalltalk/opensmalltalk-vm] No sound on Linux (#489)

stes
 
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256


Another possibility would be :

configure --without-vm-sound-ALSA --without-vm-sound-Sun
--without-vm-sound-OSS

so in my case (on Solaris) only the pulseaudio vm-sound-pulse would be
built.

Then the current selection code automatically will choose "pulse".

So in that case, which is also fine by me, pulse is choosen,
without need to change the current order.

All roads lead to Rome ...

David Stes

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQEcBAEBCAAGBQJeou3ZAAoJEAwpOKXMq1Mapm0H/RA1zJ+h1xSMSEGOENOMV22P
Jazre+KMBpFfwVp51qHceTr55vVTuZ3SzLO5OMmldE+FSJ5EEUPIKURrLOUQncX2
opR8vOdiyN1mYtJLo6ug+d0Gv5lVQoe6tphxBSK4gdjHUezXSH75yq2uSPZWrHkF
VEIX52UEFNf6eh53C/BCw2dqdWMPIUdtIVsk1q65TMjszcra3UdelrpsgSuVSs9D
df+3/ih7RZHLsE0dpndeWNOXDPUbSURVj4pLKRtg9yPAOaOUGKoE1WSVOh9MlnZI
ZNBo3O66Ang/1rqU8KK4EbBd4vD1VuTVrHisrrAnLSlILhr5+OnM8c4vm1ZIr9E=
=+6c5
-----END PGP SIGNATURE-----




--
Sent from: http://forum.world.st/Squeak-VM-f104410.html
Reply | Threaded
Open this post in threaded view
|

Re: [OpenSmalltalk/opensmalltalk-vm] No sound on Linux (#489)

David T Lewis
In reply to this post by David T Lewis
 

I was able to get sound to play with the following code in Cuis (with padsp cogspur/squeak ...):

Feature  require:  #'Sound'.

SoundPlayer boinkScale.

Although it seems to lock the VM up with an hourglass cursor, so I can't do anything else.

Running AbstractSound bachfugue play produces no sound for me and CPU usage seems to go to nearly 100% for a while.


You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or unsubscribe.

<script type="application/ld+json">[ { "@context": "http://schema.org", "@type": "EmailMessage", "potentialAction": { "@type": "ViewAction", "target": "https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/489#issuecomment-626091295", "url": "https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/489#issuecomment-626091295", "name": "View Issue" }, "description": "View this Issue on GitHub", "publisher": { "@type": "Organization", "name": "GitHub", "url": "https://github.com" } } ]</script>
Reply | Threaded
Open this post in threaded view
|

Re: [OpenSmalltalk/opensmalltalk-vm] No sound on Linux (#489)

David T Lewis
In reply to this post by David T Lewis
 

Oh, Beeper beep works and doesn't freeze the UI, so I guess that was somehow specific to how SoundPlayer works?


You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or unsubscribe.

<script type="application/ld+json">[ { "@context": "http://schema.org", "@type": "EmailMessage", "potentialAction": { "@type": "ViewAction", "target": "https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/489#issuecomment-626092328", "url": "https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/489#issuecomment-626092328", "name": "View Issue" }, "description": "View this Issue on GitHub", "publisher": { "@type": "Organization", "name": "GitHub", "url": "https://github.com" } } ]</script>
Reply | Threaded
Open this post in threaded view
|

Re: [OpenSmalltalk/opensmalltalk-vm] No sound on Linux (#489)

Tobias Pape
In reply to this post by David T Lewis
 

> On 23.04.2020, at 23:27, Eliot Miranda <[hidden email]> wrote:
>
>
> "does the VM try to detect which sound backend it should be using?" not as far as I'm aware. Having such a system would be great. Look at platforms/unix/vm/sqUnixMain.c and the soundModule there-in.


It tries to use the first one that loads.
And this may be well OSS. (see my mail regarding default ordering).

We might need a two-stage selection here. should not be too hard.

Best regards
        -Tobias
Reply | Threaded
Open this post in threaded view
|

Re: [OpenSmalltalk/opensmalltalk-vm] No sound on Linux (#489)

K K Subbu
In reply to this post by David T Lewis
 
On 09/05/20 8:00 am, Oisín wrote:
> I was able to get sound to play with the following code in Cuis (with
> |padsp cogspur/squeak ...|):
>
> |Feature require: #'Sound'. SoundPlayer boinkScale. |
>
> Although it seems to lock the VM up with an hourglass cursor, so I can't
> do anything else.

> Running |AbstractSound bachfugue play| produces no sound for me and CPU
> usage seems to go to nearly 100% for a while.
Does the sound work when using Squeak 5.3 image under padsp?

Perhaps, sound player primitive is failing for some reason and sound is
being generated in interpreted code. You could use the interrupt key
while the CPU is maxed and trace the function.

Regards .. Subbu
Reply | Threaded
Open this post in threaded view
|

Re: [OpenSmalltalk/opensmalltalk-vm] No sound on Linux (#489)

K K Subbu
In reply to this post by David T Lewis
 
On 09/05/20 8:00 am, Oisín wrote:
> I was able to get sound to play with the following code in Cuis (with
> |padsp cogspur/squeak ...|):
>
> |Feature require: #'Sound'. SoundPlayer boinkScale. |
>
> Although it seems to lock the VM up with an hourglass cursor, so I can't
> do anything else.

I just cloned Cuis repo and tested it with 5.3 Linux VM (Ubuntu Linux
16.04 64b).

The first send loads packages required to produce sound while displaying
the cursor. If your network is slow, this may take  some time.

> Running |AbstractSound bachfugue play| produces no sound for me and CPU
> usage seems to go to nearly 100% for a while.

Beeper beep  "worked fine for me"
SoundPlayer boinkScale "also played fine"
PluckedSound bachFugue play "a bit loud and drove others nuts :-)"
SoundPlayer stopPlayerProcess. "had to stop sound to restore peace"

HTH .. Subbu