pulse audio default is not suitable for PI package

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

pulse audio default is not suitable for PI package

timrowledge
 
The recent change to default pulseaudio for linux VM packages may not be a very good idea for the Raspbian Pi system. I know we've some ... issues... with ALSA that have made for very unhappy people at times but at least in the Pi world pusleaudio is not considered any improvement. So much so that it is not included in the distro.

See https://www.raspberrypi.org/forums/viewtopic.php?t=256225#p1562939 for a more or less official comment.

Given that, I'd urge not setting that default for the linuxARM packages.

tim
--
tim Rowledge; [hidden email]; http://www.rowledge.org/tim
Programmers do it bit by bit.


Reply | Threaded
Open this post in threaded view
|

Re: pulse audio default is not suitable for PI package

Eliot Miranda-2
 
Hi Tim, Hi All,

On Tue, Apr 21, 2020 at 2:02 PM tim Rowledge <[hidden email]> wrote:
 
The recent change to default pulseaudio for linux VM packages may not be a very good idea for the Raspbian Pi system. I know we've some ... issues... with ALSA that have made for very unhappy people at times but at least in the Pi world pusleaudio is not considered any improvement. So much so that it is not included in the distro.

See https://www.raspberrypi.org/forums/viewtopic.php?t=256225#p1562939 for a more or less official comment.

Given that, I'd urge not setting that default for the linuxARM packages.

So we'd do that by editing the mvm files right?
 

tim
--
tim Rowledge; [hidden email]; http://www.rowledge.org/tim
Programmers do it bit by bit.




--
_,,,^..^,,,_
best, Eliot
Reply | Threaded
Open this post in threaded view
|

Re: pulse audio default is not suitable for PI package

K K Subbu
In reply to this post by timrowledge
 
On 22/04/20 2:32 AM, tim Rowledge wrote:
>  
> The recent change to default pulseaudio for linux VM packages may not be a very good idea for the Raspbian Pi system. I know we've some ... issues... with ALSA that have made for very unhappy people at times but at least in the Pi world pusleaudio is not considered any improvement. So much so that it is not included in the distro.
>
> See https://www.raspberrypi.org/forums/viewtopic.php?t=256225#p1562939 for a more or less official comment.
>
> Given that, I'd urge not setting that default for the linuxARM packages.
Tim,

Audio services on Linux can be quite complex and can vary depending on
the active modules loaded and the sound servers running. Therefore it is
better to detect this at VM launch time than hard-code it in VM.

I just posted a PR [1] to auto-detect pulseaudio if it is installed and
running or fallback to OSS service if not. This should work on RPi
without any VM change (or perhaps the aoss wrapper).

Could you please check and revert if it works for you? Thanks.

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

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

Re: pulse audio default is not suitable for PI package

Levente Uzonyi
 
On Wed, 22 Apr 2020, K K Subbu wrote:

>
> On 22/04/20 2:32 AM, tim Rowledge wrote:
>>
>> The recent change to default pulseaudio for linux VM packages may not be a
> very good idea for the Raspbian Pi system. I know we've some ... issues...
> with ALSA that have made for very unhappy people at times but at least in the
> Pi world pusleaudio is not considered any improvement. So much so that it is
> not included in the distro.
>>
>> See https://www.raspberrypi.org/forums/viewtopic.php?t=256225#p1562939 for
> a more or less official comment.
>>
>> Given that, I'd urge not setting that default for the linuxARM packages.
> Tim,
>
> Audio services on Linux can be quite complex and can vary depending on
> the active modules loaded and the sound servers running. Therefore it is
> better to detect this at VM launch time than hard-code it in VM.
>
> I just posted a PR [1] to auto-detect pulseaudio if it is installed and
> running or fallback to OSS service if not. This should work on RPi
> without any VM change (or perhaps the aoss wrapper).
>
> Could you please check and revert if it works for you? Thanks.

It won't help, because that is not the problem.
The problem is that some recent change messed up the depencencies and
added the dependencies of all possible binaries (vm and plugins) to
everything (vm and plugins).
So, the VM binary depends on pulseaudio, alsa, uuid, libutil even though
it doesn't actually use any of those, but it won't start unless those
dependencies are satisfied.
It's described the thread: http://lists.squeakfoundation.org/pipermail/vm-dev/2020-April/033404.html


Levente

>
> [1] https://github.com/squeak-smalltalk/squeak-app/pull/17
>
> Regards .. Subbu
>
Reply | Threaded
Open this post in threaded view
|

Re: pulse audio default is not suitable for PI package

Tobias Pape
 

> On 22.04.2020, at 12:07, Levente Uzonyi <[hidden email]> wrote:
>
> On Wed, 22 Apr 2020, K K Subbu wrote:
>
>>
>> On 22/04/20 2:32 AM, tim Rowledge wrote:
>>> The recent change to default pulseaudio for linux VM packages may not be a
>> very good idea for the Raspbian Pi system. I know we've some ... issues... with ALSA that have made for very unhappy people at times but at least in the Pi world pusleaudio is not considered any improvement. So much so that it is not included in the distro.
>>> See https://www.raspberrypi.org/forums/viewtopic.php?t=256225#p1562939 for
>> a more or less official comment.
>>> Given that, I'd urge not setting that default for the linuxARM packages.
>> Tim,
>>
>> Audio services on Linux can be quite complex and can vary depending on the active modules loaded and the sound servers running. Therefore it is better to detect this at VM launch time than hard-code it in VM.
>>
>> I just posted a PR [1] to auto-detect pulseaudio if it is installed and running or fallback to OSS service if not. This should work on RPi without any VM change (or perhaps the aoss wrapper).
>>
>> Could you please check and revert if it works for you? Thanks.
>
> It won't help, because that is not the problem.
> The problem is that some recent change messed up the depencencies and added the dependencies of all possible binaries (vm and plugins) to everything (vm and plugins).
> So, the VM binary depends on pulseaudio, alsa, uuid, libutil even though it doesn't actually use any of those, but it won't start unless those dependencies are satisfied.
> It's described the thread: http://lists.squeakfoundation.org/pipermail/vm-dev/2020-April/033404.html
>

Ack.
-t

>
> Levente
>
>>
>> [1] https://github.com/squeak-smalltalk/squeak-app/pull/17
>>
>> Regards .. Subbu


Reply | Threaded
Open this post in threaded view
|

Re: pulse audio default is not suitable for PI package

K K Subbu
In reply to this post by Levente Uzonyi
 
On 22/04/20 3:37 PM, Levente Uzonyi wrote:
> The problem is that some recent change messed up the depencencies and
> added the dependencies of all possible binaries (vm and plugins) to
> everything (vm and plugins).
> So, the VM binary depends on pulseaudio, alsa, uuid, libutil even though
> it doesn't actually use any of those, but it won't start unless those
> dependencies are satisfied.
> It's described the thread:
> http://lists.squeakfoundation.org/pipermail/vm-dev/2020-April/033404.html

These are two different problems.

Tim reported a potential problem on Raspberry Pi if the default sound
module in the Unix VM code is switched from oss to pulse. Linux sound
servers and drivers depend on the distro. Ubuntu uses pulse server while
Raspbian uses ALSA. Both have wrappers (padsp and aoss/oss kernel
module) to support apps like Squeak VM that use OSS (but with
compromises on quality of sound).

My proposal to handle these variants detect these servers at VM launch
time and use the command line options to pick the right driver instead
of depending on default modules in VM. This detection does not depend VM
but on audio servers currently running on the host and is unaffected by
the linker bug. The detection should work even for 5.3 release which
currently does not work on Ubuntu.

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

Re: pulse audio default is not suitable for PI package

Tobias Pape
 

> apps like Squeak VM that use OSS

Squeak does not  "use" OSS as such; it has several sound plugins; Alsa, Pulse, OSS, NAS etc.
It probes which plugins are available.
To be quite clear:
        Squeak Can use  Pulse natively.
no padsp necessary.

However, we have to see if the vm does the right thing if a plugin _can_ load but the environment
does not fit.

In this case: vm-sound-oss loads but /dev/dsp0 is not there. in this case, continue trying or so…

best regards
        -tobias
Reply | Threaded
Open this post in threaded view
|

Re: pulse audio default is not suitable for PI package

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


I think it's incorrect to say that there has been a:

"recent change to default pulseaudio for linux VM"

Also as Tobias Pape points out, "Linux" is not just one OS,
you have various distributions, versions and variants, with different
setups.

I tested making the pulseaudio change for Solaris.

Which is a different UNIX system.

This test was done in an unrelated branch of the code.

But this is completely different thing as the main "Cog" branch,
which as far as I know did not make this change.

It's true that this proposal to change was made, but from there to say,
that there has been such a change, is a different thing ...

Also from looking at the code, it may very well be that the VM on your
system is trying to load other modules that are not applicable to your OS,
so I'm not sure it would even matter if for example no vm-sound-pulse is
built.

In the case of Solaris I like the default choice of pulseaudio,
compared to the default of OSS (current default in the Solaris case).

David Stes

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

iQEcBAEBCAAGBQJeoGT6AAoJEAwpOKXMq1MaAx0IAK3r59aHQYGYFlbGaGXukKle
lXn34EWhDerggQkE4buMObYKaP3jeHZrYoE+9+C7owi5F71/mFhmO8BHffLmapy6
UBGW1wpkBZGGinRqFacvcePOg5cz7EESCg97lU8BHam0tIgFSbvIkhOLJP85Onxt
k1l/17ls7PYlWbsAk7dUVocXRJeAlotr9p60OullkvEz7rpHs1ppWNAQv/qmI5n8
FWiD207Lm9AY5n9NWHM1AaZLpfmdgmjbufO8NugbZAm8b2q0c8TsAz/39LTPWTQD
8taYpHCaJEKBrQvslqq1IdZdP8+3TOT5Fq/qYgTmyq0aLLwG+KV5Il8SordDluQ=
=bdIs
-----END PGP SIGNATURE-----




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

Re: pulse audio default is not suitable for PI package

K K Subbu
In reply to this post by Tobias Pape
 
On 22/04/20 8:19 PM, Tobias Pape wrote:
> Squeak does not  "use" OSS as such; it has several sound plugins; Alsa, Pulse, OSS, NAS etc.
> It probes which plugins are available.

I was using general terms. Mea culpa. Yes, it is the plugins which use
the APIs.

> To be quite clear:
> Squeak Can use  Pulse natively.
> no padsp necessary.True, but that is true only if the pulse driver is chosen by the VM.

> However, we have to see if the vm does the right thing if a plugin_can_  load but the environment
> does not fit > In this case: vm-sound-oss loads but /dev/dsp0 is not there. in this
case, continue trying or so…

That is because OSS PCM devices are emulated these days. Its pcm device
path can differ from distro to distro and even within a distro.

I would try:
    $ padsp squeak
or
    $ aoss squeak

as a workaround. Detecting failures in VM can be tricky. The OSS pcm
device path can differ from distro to distro and even within a distro.
Even if vm-sound-oss module loads successfully but the audio may be of
poor quality. The code in VM can quickly become complex.

BTW, OSS was replaced in Linux by ALSA way back in 2002! Audio has
advanced a lot since then (USB, BT, HD Audio, ..). ALSA supports OSS
through kernel modules (snd-pcm-oss, for those with root permissions) or
wrapper (aoss). It is specific to Linux while Pulse also works on
Unix-like platforms, is network-ready, works with multiple back-ends
like ALSA or Jack and supports OSS through padsp wrapper.

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

Re: pulse audio default is not suitable for PI package

Phil B
In reply to this post by Tobias Pape
 
Tobias,

On Wed, Apr 22, 2020 at 10:49 AM Tobias Pape <[hidden email]> wrote:
 

> apps like Squeak VM that use OSS

Squeak does not  "use" OSS as such; it has several sound plugins; Alsa, Pulse, OSS, NAS etc.
It probes which plugins are available.
To be quite clear:
        Squeak Can use  Pulse natively.
no padsp necessary.

Not accurate, in my experience.  I've had numerous problems with the VM and Pulse over the years (reported at least a couple of times here on the list, never resolved for any length of time) and so I've fallen back to using padsp to reliably get audio support for Squeak.  I'm currently running Debian 10 and it has been a combination of various VM builds (needed to fix issues) not including Pulse Audio support to sometimes the build includes it but it just doesn't work.
 

However, we have to see if the vm does the right thing if a plugin _can_ load but the environment
does not fit.

In this case: vm-sound-oss loads but /dev/dsp0 is not there. in this case, continue trying or so…

best regards
        -tobias

Thanks,
Phil 
Reply | Threaded
Open this post in threaded view
|

Re: pulse audio default is not suitable for PI package

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


Although that I think it is incorrect to say that there has been a recent
change to default to pulseaudio for the Linux VM,

I can understand Tim Rowledge' concern that he does not want or cannot
support
such a change for the Raspbian Pi system.

Perhaps the configure script could be enhanced as in the :

   platforms/unix/vm-sound-OSS/acinclude.m4

which has an option --without-vm-sound-OSS.

Assuming similar options would be added for the other vm-sound directories,
it would then be possible to configure in the "mvm" script:

   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".

The downside is that no Sun, or OSS module will be built, but that's not
necessarily a problem for me ...   the vm-sound-pulse is sufficient.

For me "Beeper beep" or "PluckedSound stereoBachFugue play" seem to work
fine with the pulseaudio module of Squeak (both Squeak V4 and V5).

And somebody who wishes to use the other modules can still compile
and use different "configure" options.

David Stes

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

iQEcBAEBCAAGBQJeoUa1AAoJEAwpOKXMq1MakSwH/2Eh08nQdmBhVQLitGIznQVW
R4ZAIiIoqoLE7Q5ghrhqO14OBOkSwfEniVctlYQJQkNmBPw5QJTPWy03REydP1JZ
bmf/HYhghB2mpnbj/4Ih4Ut9UB8ccgTFHA5oEUZkt9haBuwvobusLJdGCzRFAR6b
zUM+W2OrZYvPJvGvbPpfTlfN/gO+krO4oQxKTb/owIScOzqdBdpTOXEtErqb9NeG
MYxLLjTuocmDHqVFwfNmpFfRLz9RzKAHpwoQIBkxWgb3rZDGNRxgw6+XiyRnFY+N
stIdSgqtsIotk8hzetABQymqQVRuGE7RIifJ6Ti/Qg4VX99YxinyuQS3oW9RIfo=
=AAPk
-----END PGP SIGNATURE-----




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

Re: pulse audio default is not suitable for PI package

Tobias Pape
In reply to this post by timrowledge
 
Hi  tim

> On 21.04.2020, at 23:02, tim Rowledge <[hidden email]> wrote:
>
>
> The recent change to default pulseaudio for linux VM packages may not be a very good idea for the Raspbian Pi system. I know we've some ... issues... with ALSA that have made for very unhappy people at times but at least in the Pi world pusleaudio is not considered any improvement. So much so that it is not included in the distro.
>
> See https://www.raspberrypi.org/forums/viewtopic.php?t=256225#p1562939 for a more or less official comment.
>
> Given that, I'd urge not setting that default for the linuxARM packages.


Coming back to the original thing here,
When the VM and the plugins are complied correctly, using default Raspbian should not be a problem.
Because when Pulseaudio is not installed, the VM will skip loading it...

Can someone please check that?

BTW: Pulseaudio is currently _not_ the "default" sound plugin. The list goes as follows:

  { &displayModule, "display", "Quartz" }, /* defaults... */
  { &soundModule,   "sound",   "OSS"    },
  { &soundModule,   "sound",   "MacOSX" },
  { &soundModule,   "sound",   "Sun"    },
  { &soundModule,   "sound",   "pulse"  },
  { &soundModule,   "sound",   "ALSA"   },
  { &soundModule,   "sound",   "null"   },


Ie, OSS -> MacOSX -> Sun -> pulseaudio -> Alsa -> no audio

Under the assumption that a plugin is skipped when its system is not available[1]
I would like to propose the following now:
        pulse -> alsa -> oss -> sndio -> macos -> sun -> no audio.

Best regards
        -Tobias

[1]: I have a hunch that this is not completely the case. Rather
     plugins are skipped when the sound system _libraries_ are not available.
     For example, if you do not have pulseaudio installed _but_ you have libpulse installed
     I think the vm will pick pulse regardless but will fail to play.
     Do I see this right?




Reply | Threaded
Open this post in threaded view
|

Re: pulse audio default is not suitable for PI package

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


Another idea or possibility could be to put a file in the mvm build
directory
that could be specify a list of which vm-sound modules have to be built.

I can see that there plugins.ext and plugins.int files which define
INTERNAL_PLUGINS and EXTERNAL_PLUGINS.

On the other hand the Makefile for the configure script seems to be
created by the 'mkacinc' script which is including

"`echo ../vm*/acinclude.m4 ../plugins/*/acinclude.m4`

so perhaps this list could be limited to the sound modules that are
relevant for the particular build.

for example instead of "vm*" which includes vm-sound-ALSA, vm-sound-Sun etc.
 only a specific list of vm-sound-pulse, but this would then need
a rebuild of the 'configure' script.

Anyway those are ideas,   it would be incorrect to think that this
has been changed now.

David Stes

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

iQEcBAEBCAAGBQJeoVh5AAoJEAwpOKXMq1Ma7OkH/RG+vS4NtvzwZqpfPvzXAuLz
5kYB68bGfmo2wBEJkiP4mOJ6eo1zxeWI+452qg+CB2Pxf0QMjN6c/EHvHp7t9VTw
YildZlAZPrOkbOXuKiZl9s3HW+lsryVUTuYexALMfIUS5Gv3nvKtuT6nxqLoM3J5
B2REtoni4HHsyHAk3/JpYeS5ZxsQ68dBDlWTZThSEbIYf38eIRPxvt/uJVXqamdq
oP0tGMJQk+sZ0c4Yg/EqNR4C9L0SLfQlv1OjPZH/elKskPZWMmrAsCePkmS6UnBX
DwfKGxUWtQkd9gQHLO9+Q/3AupLfhOPKqJi2S0VqJlL2Zq6ihqxP7SaQKWg6dk0=
=B2AS
-----END PGP SIGNATURE-----




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

Re: pulse audio default is not suitable for PI package

Tobias Pape
 

> On 23.04.2020, at 10:59, stes <[hidden email]> wrote:
>
>
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA256
>
>
> Another idea or possibility could be to put a file in the mvm build
> directory
> that could be specify a list of which vm-sound modules have to be built.
>
> I can see that there plugins.ext and plugins.int files which define
> INTERNAL_PLUGINS and EXTERNAL_PLUGINS.
>
> On the other hand the Makefile for the configure script seems to be
> created by the 'mkacinc' script which is including
>
> "`echo ../vm*/acinclude.m4 ../plugins/*/acinclude.m4`
>
> so perhaps this list could be limited to the sound modules that are
> relevant for the particular build.
>
> for example instead of "vm*" which includes vm-sound-ALSA, vm-sound-Sun etc.
> only a specific list of vm-sound-pulse, but this would then need
> a rebuild of the 'configure' script.
>

I would like to avoid that, actually :/

Best regards
        -Tobias

> Anyway those are ideas,   it would be incorrect to think that this
> has been changed now.
>
> David Stes
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v2
>
> iQEcBAEBCAAGBQJeoVh5AAoJEAwpOKXMq1Ma7OkH/RG+vS4NtvzwZqpfPvzXAuLz
> 5kYB68bGfmo2wBEJkiP4mOJ6eo1zxeWI+452qg+CB2Pxf0QMjN6c/EHvHp7t9VTw
> YildZlAZPrOkbOXuKiZl9s3HW+lsryVUTuYexALMfIUS5Gv3nvKtuT6nxqLoM3J5
> B2REtoni4HHsyHAk3/JpYeS5ZxsQ68dBDlWTZThSEbIYf38eIRPxvt/uJVXqamdq
> oP0tGMJQk+sZ0c4Yg/EqNR4C9L0SLfQlv1OjPZH/elKskPZWMmrAsCePkmS6UnBX
> DwfKGxUWtQkd9gQHLO9+Q/3AupLfhOPKqJi2S0VqJlL2Zq6ihqxP7SaQKWg6dk0=
> =B2AS
> -----END PGP SIGNATURE-----