Debian Bug report logs - #147532
esound: is not multi-user friendly

version graph

Package: esound; Maintainer for esound is Josselin Mouette <joss@debian.org>;

Reported by: Andrea Mennucc <debdev@Tonelli.sns.it>

Date: Mon, 20 May 2002 12:48:10 UTC

Severity: wishlist

Found in version 0.2.23-3

Fixed in version esound/0.2.40-1

Done: Josselin Mouette <joss@debian.org>

Bug is archived. No further changes may be made.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, Ryan Murray <rmurray@debian.org>, esound@packages.qa.debian.org:
Bug#147532; Package esound. (full text, mbox, link).


Acknowledgement sent to Andrea Mennucc <debdev@Tonelli.sns.it>:
New Bug report received and forwarded. Copy sent to Ryan Murray <rmurray@debian.org>, esound@packages.qa.debian.org. (full text, mbox, link).


Message #5 received at submit@bugs.debian.org (full text, mbox, reply):

From: Andrea Mennucc <debdev@Tonelli.sns.it>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: esound: is not multi-user friendly
Date: Mon, 20 May 2002 14:40:12 +0200
Package: esound
Version: 0.2.23-3
Severity: important

hi

 ---first, the history of my problem

I have here in this office a big PC , with a good athlon, and some
X terminals; so we are 3 people using this PC (often we use it
all together at the same time)

this PC has a poor on-board audio card (managed by ALSA module
snd-card-via8233), and only one program at a time can use /dev/dsp (if
a second program tries to open /dev/dsp, it hangs): this is very
annoying
(e.g.: when I am using xmms to listen to mp3s, then the flash plugin
hangs in galeon, and the whole galeon hangs with it: I posted a bug
146827: I was (rightly) told to "use esd or other mixer")

It would seem that esd is a good solution for our problem...

but unfortunately it isn't. I have enabled the use of ESD in the gnome
settings; but here is what happens:
1) when user Foo logs in, a esd process is started;
2) but this process does not accept access to /tmp/.esd/socket from other
  users, so only Foo can use the soundcard
3) moreover, when Foo logs out, esd is not stopped, so other users are
 forever (=until the next reboot) denied access to the soundcard 

to solve the problem, I have manually copied the same .esd_auth in all the
accounts; but this is not a very nice solution....

  --- secondly, a proposed solution

afaict, in Debian at large, if an user is part of group 'audio', then
the user has access to the audio;

I think that esd should have a switch to enable that kind of
behaviour: somethink like 
 esd --authorize-group audio
and then that esd process will accept any connection through 
/tmp/.esd/socket  from an user who is in group audio

and, the esound package may have a debconf question to enable that behaviour


btw: I have marked this bug as 'important' because 'esd' is not
currently usable in multi-user systems 


a.

-- System Information
Debian Release: 3.0
Architecture: i386
Kernel: Linux tonelli 2.4.18 #2 SMP ven apr 26 13:02:44 CEST 2002 i686
Locale: LANG=en_US, LC_CTYPE=en_US

Versions of packages esound depends on:
ii  esound-common                 0.2.23-3   Enlightened Sound Daemon - Common 
ii  libaudiofile0                 0.2.3-4    The Audiofile Library
ii  libc6                         2.2.5-6    GNU C Library: Shared libraries an
ii  libesd0                       0.2.23-3   Enlightened Sound Daemon - Shared 
ii  libwrap0                      7.6-9      Wietse Venema's TCP wrappers libra

-- 
Andrea Mennucc
 "E' un mondo difficile. Che vita intensa!" (Renato Carotone)



Information forwarded to debian-bugs-dist@lists.debian.org, Ryan Murray <rmurray@debian.org>, esound@packages.qa.debian.org:
Bug#147532; Package esound. (full text, mbox, link).


Acknowledgement sent to Steve Fosdick <fozzy@pelvoux.demon.co.uk>:
Extra info received and forwarded to list. Copy sent to Ryan Murray <rmurray@debian.org>, esound@packages.qa.debian.org. (full text, mbox, link).


Message #10 received at 147532@bugs.debian.org (full text, mbox, reply):

From: Steve Fosdick <fozzy@pelvoux.demon.co.uk>
To: Debian Bug Tracking System <147532@bugs.debian.org>
Subject: esound: Multi-User esound - Further Thoughts
Date: Mon, 27 May 2002 10:37:39 +0100
Package: esound
Version: 0.2.23-3
Followup-For: Bug #147532

I have also faced the problem of logging in to find that sound doesn't
work because someone has logged in via an X terminal and grabbed the
/tmp/.esd directory so that my session can't start an instance of esd.

I have a ideas for the solution to this though.  To me it only makes
sense for someone who logs in on the console, i.e. sat at the machine
concerned and not coming in over the network, to send sound to the PC
sound hardware by default.  For anyone else sound data should be
forwarded to the X terminal which is then expected to send it to it's
own sound hardware. So...

*   If esd can cope with X terminals and forwarding sound to them then
    perhaps changing the namespace used for communicating with esd
    (/tmp/.esd and the socket thereunder) to allow multiple instances
    would be the best solution.

*   If esd can't cope with X terminals then it would be sensible to only
    start esd if the user is logged on to the console - perhaps this
    check should be in one of the Gnome packets rather than esound.

Steve.

-- System Information
Debian Release: 3.0
Architecture: i386
Kernel: Linux tuborg 2.4.18 #1 Tue Mar 19 12:01:10 GMT 2002 i686
Locale: LANG=en_GB, LC_CTYPE=en_GB

Versions of packages esound depends on:
ii  esound-common                 0.2.23-3   Enlightened Sound Daemon - Common 
ii  libaudiofile0                 0.2.3-4    The Audiofile Library
ii  libc6                         2.2.5-6    GNU C Library: Shared libraries an
ii  libesd0                       0.2.23-3   Enlightened Sound Daemon - Shared 
ii  libwrap0                      7.6-9      Wietse Venema's TCP wrappers libra




Information forwarded to debian-bugs-dist@lists.debian.org, Ryan Murray <rmurray@debian.org>, esound@packages.qa.debian.org:
Bug#147532; Package esound. (full text, mbox, link).


Acknowledgement sent to Johan Walles <d92-jwa@nada.kth.se>:
Extra info received and forwarded to list. Copy sent to Ryan Murray <rmurray@debian.org>, esound@packages.qa.debian.org. (full text, mbox, link).


Message #15 received at 147532@bugs.debian.org (full text, mbox, reply):

From: Johan Walles <d92-jwa@nada.kth.se>
To: 147532@bugs.debian.org
Subject: Solution for half of the problem
Date: Fri, 14 Jun 2002 13:28:37 +0200
I reported the second half of the problem (esd not terminating on 
logout) at "http://bugzilla.gnome.org/show_bug.cgi?id=58406" and got the 
following solution:

Edit your /etc/esound/esd.conf to contain:

"
auto_spawn=1
spawn_options=-terminate -nobeeps -as 2
spawn_wait_ms=100
"

Then, esound will terminate (?) after two secs of inactivity (line two), 
but get launched again on demand (line one?).

  HTH //Johan




Information forwarded to debian-bugs-dist@lists.debian.org, Ryan Murray <rmurray@debian.org>, esound@packages.qa.debian.org:
Bug#147532; Package esound. (full text, mbox, link).


Acknowledgement sent to Johan Walles <d92-jwa@nada.kth.se>:
Extra info received and forwarded to list. Copy sent to Ryan Murray <rmurray@debian.org>, esound@packages.qa.debian.org. (full text, mbox, link).


Message #20 received at 147532@bugs.debian.org (full text, mbox, reply):

From: Johan Walles <d92-jwa@nada.kth.se>
To: 147532@bugs.debian.org
Subject: Oops
Date: Sun, 16 Jun 2002 21:02:57 +0200 (CEST)
While it may sound nice in theory, my suggested "fix" is no good in
practice.  The changes doesn't make esound terminate; it just releases the
sound card.  While this is kind of nice when using apps with no esound
support, it does not solve the esound-is-left-running-after-logout
problem.





Information forwarded to debian-bugs-dist@lists.debian.org, Ryan Murray <rmurray@debian.org>, esound@packages.qa.debian.org:
Bug#147532; Package esound. (full text, mbox, link).


Acknowledgement sent to Ryan Murray <rmurray@cyberhqz.com>:
Extra info received and forwarded to list. Copy sent to Ryan Murray <rmurray@debian.org>, esound@packages.qa.debian.org. (full text, mbox, link).


Message #25 received at 147532@bugs.debian.org (full text, mbox, reply):

From: Ryan Murray <rmurray@cyberhqz.com>
To: Johan Walles <d92-jwa@nada.kth.se>, 147532@bugs.debian.org
Subject: Re: Bug#147532: Oops
Date: Sat, 29 Jun 2002 19:56:29 -0700
On Sun, Jun 16, 2002 at 09:02:57PM +0200, Johan Walles wrote:
> While it may sound nice in theory, my suggested "fix" is no good in
> practice.  The changes doesn't make esound terminate; it just releases the
> sound card.  While this is kind of nice when using apps with no esound
> support, it does not solve the esound-is-left-running-after-logout
> problem.

The "fix" is to disable auto spawning, enable startup in gnome settings, and
only use esound sound applications.  esound is then correctly started at login
and stopped at logout.  A non-Gnome related setup would need to do this itself
in some way.

-- 
Ryan Murray, Debian Developer (rmurray@cyberhqz.com, rmurray@debian.org)
The opinions expressed here are my own.



Information forwarded to debian-bugs-dist@lists.debian.org, Ryan Murray <rmurray@debian.org>, esound@packages.qa.debian.org:
Bug#147532; Package esound. (full text, mbox, link).


Acknowledgement sent to Johan Walles <d92-jwa@nada.kth.se>:
Extra info received and forwarded to list. Copy sent to Ryan Murray <rmurray@debian.org>, esound@packages.qa.debian.org. (full text, mbox, link).


Message #30 received at 147532@bugs.debian.org (full text, mbox, reply):

From: Johan Walles <d92-jwa@nada.kth.se>
To: Ryan Murray <rmurray@cyberhqz.com>
Cc: Johan Walles <d92-jwa@nada.kth.se>, <147532@bugs.debian.org>
Subject: Re: Bug#147532: Oops
Date: Sun, 30 Jun 2002 17:00:56 +0200 (CEST)
That does indeed seem to make (that half of) the problem go away.  Thanks
:-).

  Cheers //Johan

On Sat, 29 Jun 2002, Ryan Murray wrote:

> The "fix" is to disable auto spawning, enable startup in gnome settings, and
> only use esound sound applications.  esound is then correctly started at login
> and stopped at logout.  A non-Gnome related setup would need to do this itself
> in some way.





Severity set to `wishlist'. Request was from rmurray@cyberhqz.com (Ryan Murray) to control@bugs.debian.org. (full text, mbox, link).


Severity set to `important'. Request was from Thomas Hood <jdthood@aglu.demon.nl> to control@bugs.debian.org. (full text, mbox, link).


Merged 147532 187730. Request was from Thomas Hood <jdthood@aglu.demon.nl> to control@bugs.debian.org. (full text, mbox, link).


Merged 147532 187730 212567. Request was from Thomas Hood <jdthood@aglu.demon.nl> to control@bugs.debian.org. (full text, mbox, link).


Disconnected #147532 from all other report(s). Request was from Ryan Murray <rmurray@debian.org> to control@bugs.debian.org. (full text, mbox, link).


Severity set to `wishlist'. Request was from Ryan Murray <rmurray@debian.org> to control@bugs.debian.org. (full text, mbox, link).


Information forwarded to debian-bugs-dist@lists.debian.org, Ryan Murray <rmurray@debian.org>:
Bug#147532; Package esound. (full text, mbox, link).


Acknowledgement sent to Martin Pitt <mpitt@debian.org>:
Extra info received and forwarded to list. Copy sent to Ryan Murray <rmurray@debian.org>. (full text, mbox, link).


Message #47 received at 147532@bugs.debian.org (full text, mbox, reply):

From: Martin Pitt <mpitt@debian.org>
To: 147532@bugs.debian.org
Cc: control@bugs.debian.org
Subject: Patch for making esd work with multiple parallel users
Date: Thu, 18 Aug 2005 23:23:19 +0200
[Message part 1 (text/plain, inline)]
Hi!

I patched esound to work with several parallel instances, so that
several logged in users can get sound:

 esound (0.2.36-1ubuntu4) breezy; urgency=low
 .
   * Make esd work for several users in parallel (Ubuntu #3671, Debian
     #147532):
     - util.c, esd_get_socket_dirname(): Append the user id to the socket
       name so that socket names for multiple users don't collide.
     - esd.conf: Add default option "-as 5" to release the soundcard after 5
       seconds of inactivity. That way, other users can actually use it, too.
   * util.c, esd_get_socket_dirname(): Some code cleanup to fix some potential
     crashers.

You can get the Ubuntu patch at

  http://patches.ubuntu.com/patches/esound.multiuser.diff

BTW, Ryan, do you consider to add a proper patch system to esound? The
package is already quite messy, and it won't get better...

Thanks for considering and have a nice day!

Martin
-- 
Martin Pitt        http://www.piware.de
Ubuntu Developer   http://www.ubuntu.com
Debian Developer   http://www.debian.org
[signature.asc (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org:
Bug#147532; Package esound. (full text, mbox, link).


Acknowledgement sent to Ryan Murray <rmurray@debian.org>:
Extra info received and forwarded to list. (full text, mbox, link).


Message #52 received at 147532@bugs.debian.org (full text, mbox, reply):

From: Ryan Murray <rmurray@debian.org>
To: Martin Pitt <mpitt@debian.org>, 147532@bugs.debian.org
Subject: Re: Bug#147532: Patch for making esd work with multiple parallel users
Date: Thu, 18 Aug 2005 15:13:41 -0700
On Thu, Aug 18, 2005 at 11:23:19PM +0200, Martin Pitt wrote:
> I patched esound to work with several parallel instances, so that
> several logged in users can get sound:

This breaks third party commercial applications.  I have no intention of doing
this.  The socket name really can't be changed.  (Did you read the changelog
before making this change?)

>    * Make esd work for several users in parallel (Ubuntu #3671, Debian
>      #147532):
>      - util.c, esd_get_socket_dirname(): Append the user id to the socket
>        name so that socket names for multiple users don't collide.
>      - esd.conf: Add default option "-as 5" to release the soundcard after 5
>        seconds of inactivity. That way, other users can actually use it, too.

What might be better for the default Debian permissions setup is to
make the socket for public use by anyone in the audio group.  But with
esound properly being killed when a user logs out these days, I don't
really see the need.  There's only one sound output device so multiple
esd processes doesn't make any sense.  Using -as also opens some nasty
race conditions depending on the exact sound drivers in use.

> BTW, Ryan, do you consider to add a proper patch system to esound? The
> package is already quite messy, and it won't get better...

I have no interest in using any of the various hacks around dpkg's lack of
multiple patch support.  dpkg has such support now, but it can't be used with
the archive yet.



Information forwarded to debian-bugs-dist@lists.debian.org, Ryan Murray <rmurray@debian.org>:
Bug#147532; Package esound. (full text, mbox, link).


Acknowledgement sent to Matt Zimmerman <mdz@debian.org>:
Extra info received and forwarded to list. Copy sent to Ryan Murray <rmurray@debian.org>. (full text, mbox, link).


Message #57 received at 147532@bugs.debian.org (full text, mbox, reply):

From: Matt Zimmerman <mdz@debian.org>
To: Ryan Murray <rmurray@debian.org>, 147532@bugs.debian.org
Cc: Martin Pitt <mpitt@debian.org>
Subject: Re: Bug#147532: Patch for making esd work with multiple parallel users
Date: Thu, 18 Aug 2005 15:32:34 -0700
On Thu, Aug 18, 2005 at 03:13:41PM -0700, Ryan Murray wrote:
> On Thu, Aug 18, 2005 at 11:23:19PM +0200, Martin Pitt wrote:
> > I patched esound to work with several parallel instances, so that
> > several logged in users can get sound:
> 
> This breaks third party commercial applications.  I have no intention of doing
> this.  The socket name really can't be changed.  (Did you read the changelog
> before making this change?)

Perhaps the first socket could be named in the traditional way, and
additional ones named using the uid.  This way, non-free applications
continue to work as well as can be expected, and we still solve the problem.

> >    * Make esd work for several users in parallel (Ubuntu #3671, Debian
> >      #147532):
> >      - util.c, esd_get_socket_dirname(): Append the user id to the socket
> >        name so that socket names for multiple users don't collide.
> >      - esd.conf: Add default option "-as 5" to release the soundcard after 5
> >        seconds of inactivity. That way, other users can actually use it, too.
> 
> What might be better for the default Debian permissions setup is to
> make the socket for public use by anyone in the audio group.  But with
> esound properly being killed when a user logs out these days, I don't
> really see the need.  There's only one sound output device so multiple
> esd processes doesn't make any sense.  Using -as also opens some nasty
> race conditions depending on the exact sound drivers in use.

With modern GNOME, it's quite convenient to have multiple users logged in at
the console and switch between them, as in Windows XP, and that is the
scenario that we would like to provide for.

Do you know of a better way to make this work with esd?

-- 
 - mdz



Information forwarded to debian-bugs-dist@lists.debian.org:
Bug#147532; Package esound. (full text, mbox, link).


Acknowledgement sent to Ryan Murray <rmurray@debian.org>:
Extra info received and forwarded to list. (full text, mbox, link).


Message #62 received at 147532@bugs.debian.org (full text, mbox, reply):

From: Ryan Murray <rmurray@debian.org>
To: Matt Zimmerman <mdz@debian.org>
Cc: 147532@bugs.debian.org, Martin Pitt <mpitt@debian.org>
Subject: Re: Bug#147532: Patch for making esd work with multiple parallel users
Date: Thu, 18 Aug 2005 15:55:27 -0700
[Message part 1 (text/plain, inline)]
On Thu, Aug 18, 2005 at 03:32:34PM -0700, Matt Zimmerman wrote:
> With modern GNOME, it's quite convenient to have multiple users logged in at
> the console and switch between them, as in Windows XP, and that is the
> scenario that we would like to provide for.
> 
> Do you know of a better way to make this work with esd?

Yes, as I said:

> > What might be better for the default Debian permissions setup is to
> > make the socket for public use by anyone in the audio group.

With your solution, if the first user leaves anything playing sound (game,
music player, etc) running, additional users won't be able to get any sound.
Also, even with your modified proposal on the socket name, only the first
user to login can use third party applications.

If the socket is available to all of group audio, both of these problems go
away.  (Although you still have to hear whatever the first user left playing,
at least your alert sounds will play).

[signature.asc (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, Ryan Murray <rmurray@debian.org>:
Bug#147532; Package esound. (full text, mbox, link).


Acknowledgement sent to Matt Zimmerman <mdz@debian.org>:
Extra info received and forwarded to list. Copy sent to Ryan Murray <rmurray@debian.org>. (full text, mbox, link).


Message #67 received at 147532@bugs.debian.org (full text, mbox, reply):

From: Matt Zimmerman <mdz@debian.org>
To: Ryan Murray <rmurray@debian.org>
Cc: 147532@bugs.debian.org, Martin Pitt <mpitt@debian.org>
Subject: Re: Bug#147532: Patch for making esd work with multiple parallel users
Date: Thu, 18 Aug 2005 16:02:37 -0700
On Thu, Aug 18, 2005 at 03:55:27PM -0700, Ryan Murray wrote:
> On Thu, Aug 18, 2005 at 03:32:34PM -0700, Matt Zimmerman wrote:
> > With modern GNOME, it's quite convenient to have multiple users logged in at
> > the console and switch between them, as in Windows XP, and that is the
> > scenario that we would like to provide for.
> > 
> > Do you know of a better way to make this work with esd?
> 
> Yes, as I said:
> 
> > > What might be better for the default Debian permissions setup is to
> > > make the socket for public use by anyone in the audio group.

I don't think that addresses all of the issues.  If the first user logs out,
it shouldn't cause the second user's apps to have esd yanked out from under
them, they should be able to have independent audio preferences, etc.

> With your solution, if the first user leaves anything playing sound (game,
> music player, etc) running, additional users won't be able to get any sound.

That isn't true with dmix.

> Also, even with your modified proposal on the socket name, only the first
> user to login can use third party applications.

I'm willing to accept that tradeoff, given that it's more important to me
for free software to be robust than for commercial software to be robust.
It doesn't break it outright, and it still works in the cases where it works
today (with only one user running esd).

-- 
 - mdz



Information forwarded to debian-bugs-dist@lists.debian.org:
Bug#147532; Package esound. (full text, mbox, link).


Acknowledgement sent to Ryan Murray <rmurray@debian.org>:
Extra info received and forwarded to list. (full text, mbox, link).


Message #72 received at 147532@bugs.debian.org (full text, mbox, reply):

From: Ryan Murray <rmurray@debian.org>
To: Matt Zimmerman <mdz@debian.org>
Cc: 147532@bugs.debian.org, Martin Pitt <mpitt@debian.org>
Subject: Re: Bug#147532: Patch for making esd work with multiple parallel users
Date: Thu, 18 Aug 2005 16:29:23 -0700
On Thu, Aug 18, 2005 at 04:02:37PM -0700, Matt Zimmerman wrote:
> > Yes, as I said:
> > 
> > > > What might be better for the default Debian permissions setup is to
> > > > make the socket for public use by anyone in the audio group.
> 
> I don't think that addresses all of the issues.  If the first user logs out,
> it shouldn't cause the second user's apps to have esd yanked out from under
> them, they should be able to have independent audio preferences, etc.

Starting esd as daemon:audio would resolve the first part.  Audio preferences
(at least the ones esound offers) are hardware-specific settings, that wouldn't
change per user.

> > With your solution, if the first user leaves anything playing sound (game,
> > music player, etc) running, additional users won't be able to get any sound.
> 
> That isn't true with dmix.

The supplied patch has a comment about how -as is used by default so
that other users can actually use the device.  If it's not true with
dmix, then why the change?  ALSA (and therefore dmix) aren't setup by
default by d-i, anyways.  I've also yet to see dmix do what it claims
to.  I'm guessing there's some sort of restriction on using OSS
emulation.  While that restriction is there, the user gets
a better "don't need to think about low level sound details"
experience by routing everything through a sound daemon.

> > Also, even with your modified proposal on the socket name, only the first
> > user to login can use third party applications.
> 
> I'm willing to accept that tradeoff, given that it's more important to me
> for free software to be robust than for commercial software to be robust.
> It doesn't break it outright, and it still works in the cases where it works
> today (with only one user running esd).

The experience for the user in this case is horrible, however.  Either the
program refuses to start, or it just doesn't have sound without any sort of
message.



Information forwarded to debian-bugs-dist@lists.debian.org, Ryan Murray <rmurray@debian.org>:
Bug#147532; Package esound. (full text, mbox, link).


Acknowledgement sent to Matt Zimmerman <mdz@debian.org>:
Extra info received and forwarded to list. Copy sent to Ryan Murray <rmurray@debian.org>. (full text, mbox, link).


Message #77 received at 147532@bugs.debian.org (full text, mbox, reply):

From: Matt Zimmerman <mdz@debian.org>
To: Ryan Murray <rmurray@debian.org>
Cc: 147532@bugs.debian.org, Martin Pitt <mpitt@debian.org>
Subject: Re: Bug#147532: Patch for making esd work with multiple parallel users
Date: Thu, 18 Aug 2005 16:59:21 -0700
On Thu, Aug 18, 2005 at 04:29:23PM -0700, Ryan Murray wrote:
> On Thu, Aug 18, 2005 at 04:02:37PM -0700, Matt Zimmerman wrote:
> > > Yes, as I said:
> > > 
> > > > > What might be better for the default Debian permissions setup is to
> > > > > make the socket for public use by anyone in the audio group.
> > 
> > I don't think that addresses all of the issues.  If the first user logs out,
> > it shouldn't cause the second user's apps to have esd yanked out from under
> > them, they should be able to have independent audio preferences, etc.
> 
> Starting esd as daemon:audio would resolve the first part.  Audio preferences
> (at least the ones esound offers) are hardware-specific settings, that wouldn't
> change per user.

One user might use a USB headset, while another uses the onboard sound, for
example.

> > That isn't true with dmix.
> 
> The supplied patch has a comment about how -as is used by default so that
> other users can actually use the device.  If it's not true with dmix, then
> why the change?

Because dmix doesn't work for everyone yet.

> ALSA (and therefore dmix) aren't setup by default by d-i, anyways.  I've
> also yet to see dmix do what it claims to.

It works nicely for me.

-- 
 - mdz



Information forwarded to debian-bugs-dist@lists.debian.org:
Bug#147532; Package esound. (full text, mbox, link).


Acknowledgement sent to Ryan Murray <rmurray@debian.org>:
Extra info received and forwarded to list. (full text, mbox, link).


Message #82 received at 147532@bugs.debian.org (full text, mbox, reply):

From: Ryan Murray <rmurray@debian.org>
To: Matt Zimmerman <mdz@debian.org>
Cc: 147532@bugs.debian.org, Martin Pitt <mpitt@debian.org>
Subject: Re: Bug#147532: Patch for making esd work with multiple parallel users
Date: Thu, 18 Aug 2005 17:16:41 -0700
On Thu, Aug 18, 2005 at 04:59:21PM -0700, Matt Zimmerman wrote:
> > The supplied patch has a comment about how -as is used by default so that
> > other users can actually use the device.  If it's not true with dmix, then
> > why the change?
> 
> Because dmix doesn't work for everyone yet.

I think the best solution looks like this:
	- fix dmix to work for everyone
	- change libesd to play directly to the sound device (the code is
	  already there for the fallback case).
	- stop starting/using the esound daemon.



Information forwarded to debian-bugs-dist@lists.debian.org, Ryan Murray <rmurray@debian.org>:
Bug#147532; Package esound. (full text, mbox, link).


Acknowledgement sent to Martin Pitt <mpitt@debian.org>:
Extra info received and forwarded to list. Copy sent to Ryan Murray <rmurray@debian.org>. (full text, mbox, link).


Message #87 received at 147532@bugs.debian.org (full text, mbox, reply):

From: Martin Pitt <mpitt@debian.org>
To: Ryan Murray <rmurray@debian.org>
Cc: Matt Zimmerman <mdz@debian.org>, 147532@bugs.debian.org
Subject: Re: Bug#147532: Patch for making esd work with multiple parallel users
Date: Fri, 19 Aug 2005 08:55:29 +0200
[Message part 1 (text/plain, inline)]
Hi Ryan, hi Matt!

I read your discussion. I thought quite a while about possible
options, so here are my thoughts:

(1) Start a global system esd.

 - esound was designed as a per-user process, not system-wide. Every
   user can and should be able to use her own default device, which is
   not possible with one instance.

 - Users cannot send signals to processes they don't own, so they
   cannot change the default device by sending SIGUSR1 (see the
   previous patch I sent you), nor restart the daemon, at least if
   you don't use some nasty setuid wrapper tricks.
  
 - This completely prohibits working with multiple sound cards.

(2) Reuse an already existing esd.

 - First, the socket permissions are already 777, esd checks the owner
   of the file. With the -trust parameter this check can be disabled.

 - However, this breaks if the first user suddenly logs off and/or
   kills his esd.

 - Same problems as in (1), so this is even more nasty.

(3) Don't use esd at all.
 
 - That's what Ryan suggested:
   Ryan Murray [2005-08-18 17:16 -0700]:
   > I think the best solution looks like this:
   > 	- fix dmix to work for everyone
   > 	- change libesd to play directly to the sound device (the code is
   > 	  already there for the fallback case).
   > 	- stop starting/using the esound daemon.
  
 - We did this change for a while, we didn't use esd at all and had
   gstreamer output to ALSA directly. Nowadays, dmix is enabled by
   default on most cards, but it still breaks on too many cards. Also,
   dmix' mixing quality is way below what esd/polypaudio offer. We
   want to provide a working sound environment for everybody, so
   currently we cannot do without a sound daemon yet.
  
 - ALSA does not allow different users to open the sound device
   simultaneously. So you need to check every application that it
   releases the sound device if it doesn't need it.

(4) Allow multiple esds with per-user sockets.

 - This is the solution I proposed in the patch I sent, and which is
   currently in Ubuntu. It is symmetric, every user has her own
   private esd instance, can signal, kill, and configure it.

 - Ryan said it may break commercial apps. I'm really not too worried
   about that. First, if an app uses the socket directly instead of
   using libesd, it is broken by design. Second, most commercial apps
   I know use OSS and/or ALSA; I doubt that there are many commercial
   apps which can *only* output to esd's raw socket; frankly, I don't
   care about them in Ubuntu.
 
 - The biggest disadvantage of this approach is the same mentioned in
   (3) (ALSA does not allow different users to open the sound device
   simultaneously). (1) and (2) solve this, but are differently
   broken. To mitigate this, I added the -as 5 parameter; if several
   users use the same default card, only one can use the soundcard at
   any given time, but -as 5 will make sure that the card is not
   blocked unnecessarily.
 
 - This works flawlessly if several users use different sound cards,
   which is not supported by (1) and (2).

So after considering all the pros and cons, I decided for (4) since it
adds some benefits without breaking anything existing. Your choice for
Debian of course, I only want to offer what we have. :-)

Thanks,

Martin

-- 
Martin Pitt        http://www.piware.de
Ubuntu Developer   http://www.ubuntu.com
Debian Developer   http://www.debian.org
[signature.asc (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, Ryan Murray <rmurray@debian.org>:
Bug#147532; Package esound. (full text, mbox, link).


Acknowledgement sent to Martin Pitt <mpitt@debian.org>:
Extra info received and forwarded to list. Copy sent to Ryan Murray <rmurray@debian.org>. (full text, mbox, link).


Message #92 received at 147532@bugs.debian.org (full text, mbox, reply):

From: Martin Pitt <mpitt@debian.org>
To: Matt Zimmerman <mdz@debian.org>
Cc: Ryan Murray <rmurray@debian.org>, 147532@bugs.debian.org
Subject: Re: Bug#147532: Patch for making esd work with multiple parallel users
Date: Fri, 19 Aug 2005 09:00:23 +0200
[Message part 1 (text/plain, inline)]
Hi Matt!

Matt Zimmerman [2005-08-18 15:32 -0700]:
> On Thu, Aug 18, 2005 at 03:13:41PM -0700, Ryan Murray wrote:
> > On Thu, Aug 18, 2005 at 11:23:19PM +0200, Martin Pitt wrote:
> > > I patched esound to work with several parallel instances, so that
> > > several logged in users can get sound:
> > 
> > This breaks third party commercial applications.  I have no intention of doing
> > this.  The socket name really can't be changed.  (Did you read the changelog
> > before making this change?)
> 
> Perhaps the first socket could be named in the traditional way, and
> additional ones named using the uid.  This way, non-free applications
> continue to work as well as can be expected, and we still solve the problem.

This is indeed a compromise that would mitigate this problem without
breaking other stuff. Ryan, compared to Debian's status quo this would
not create any regression AFAICS. What would you think about this?

Martin

-- 
Martin Pitt        http://www.piware.de
Ubuntu Developer   http://www.ubuntu.com
Debian Developer   http://www.debian.org
[signature.asc (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, Ryan Murray <rmurray@debian.org>:
Bug#147532; Package esound. (full text, mbox, link).


Acknowledgement sent to Martin Pitt <mpitt@debian.org>:
Extra info received and forwarded to list. Copy sent to Ryan Murray <rmurray@debian.org>. (full text, mbox, link).


Message #97 received at 147532@bugs.debian.org (full text, mbox, reply):

From: Martin Pitt <mpitt@debian.org>
To: Matt Zimmerman <mdz@debian.org>
Cc: Ryan Murray <rmurray@debian.org>, 147532@bugs.debian.org
Subject: Re: Bug#147532: Patch for making esd work with multiple parallel users
Date: Fri, 19 Aug 2005 09:03:29 +0200
[Message part 1 (text/plain, inline)]
Hi Matt!

Matt Zimmerman [2005-08-18 16:02 -0700]:
> > With your solution, if the first user leaves anything playing sound (game,
> > music player, etc) running, additional users won't be able to get any sound.
> 
> That isn't true with dmix.

It is, unfortunately:

$ sudo -u joe aplay /usr/share/sounds/login.wav &
Playing WAVE '/usr/share/sounds/login.wav' : Signed 16 bit Little Endian, Rate 44100 Hz, Stereo
[1] 7448
$ aplay /usr/share/sounds/login.wav
ALSA lib pcm_dmix.c:802:(snd_pcm_dmix_open) unable to open slave
aplay: main:533: audio open error: Device or resource busy

Once this works, and dmix works for everybody, we can completely
drop this sound daemon stuff, but until then we are nailed to them...

Martin
-- 
Martin Pitt        http://www.piware.de
Ubuntu Developer   http://www.ubuntu.com
Debian Developer   http://www.debian.org
[signature.asc (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, Ryan Murray <rmurray@debian.org>:
Bug#147532; Package esound. (full text, mbox, link).


Acknowledgement sent to Matt Zimmerman <mdz@debian.org>:
Extra info received and forwarded to list. Copy sent to Ryan Murray <rmurray@debian.org>. (full text, mbox, link).


Message #102 received at 147532@bugs.debian.org (full text, mbox, reply):

From: Matt Zimmerman <mdz@debian.org>
To: Martin Pitt <mpitt@debian.org>
Cc: Ryan Murray <rmurray@debian.org>, 147532@bugs.debian.org
Subject: Re: Bug#147532: Patch for making esd work with multiple parallel users
Date: Fri, 19 Aug 2005 09:50:24 -0700
On Fri, Aug 19, 2005 at 08:55:29AM +0200, Martin Pitt wrote:

>  - Ryan said it may break commercial apps. I'm really not too worried
>    about that. First, if an app uses the socket directly instead of
>    using libesd, it is broken by design. Second, most commercial apps
>    I know use OSS and/or ALSA; I doubt that there are many commercial
>    apps which can *only* output to esd's raw socket; frankly, I don't
>    care about them in Ubuntu.

Commercial apps are often linked statically; they are using the library,
only not the system version of it.  I agree that this is probably the best
tradeoff that we can offer with the existing software available to us, and
it will improve in time.

-- 
 - mdz



Reply sent to Josselin Mouette <joss@debian.org>:
You have taken responsibility. (Mon, 17 Nov 2008 21:39:00 GMT) (full text, mbox, link).


Notification sent to Andrea Mennucc <debdev@Tonelli.sns.it>:
Bug acknowledged by developer. (Mon, 17 Nov 2008 21:39:47 GMT) (full text, mbox, link).


Message #107 received at 147532-close@bugs.debian.org (full text, mbox, reply):

From: Josselin Mouette <joss@debian.org>
To: 147532-close@bugs.debian.org
Subject: Bug#147532: fixed in esound 0.2.40-1
Date: Mon, 17 Nov 2008 21:02:04 +0000
Source: esound
Source-Version: 0.2.40-1

We believe that the bug you reported is fixed in the latest version of
esound, which is due to be installed in the Debian FTP archive:

esound-clients_0.2.40-1_amd64.deb
  to pool/main/e/esound/esound-clients_0.2.40-1_amd64.deb
esound-common_0.2.40-1_all.deb
  to pool/main/e/esound/esound-common_0.2.40-1_all.deb
esound_0.2.40-1.diff.gz
  to pool/main/e/esound/esound_0.2.40-1.diff.gz
esound_0.2.40-1.dsc
  to pool/main/e/esound/esound_0.2.40-1.dsc
esound_0.2.40-1_amd64.deb
  to pool/main/e/esound/esound_0.2.40-1_amd64.deb
esound_0.2.40.orig.tar.gz
  to pool/main/e/esound/esound_0.2.40.orig.tar.gz
libesd-alsa0_0.2.40-1_amd64.deb
  to pool/main/e/esound/libesd-alsa0_0.2.40-1_amd64.deb
libesd0-dev_0.2.40-1_amd64.deb
  to pool/main/e/esound/libesd0-dev_0.2.40-1_amd64.deb
libesd0_0.2.40-1_amd64.deb
  to pool/main/e/esound/libesd0_0.2.40-1_amd64.deb



A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 147532@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Josselin Mouette <joss@debian.org> (supplier of updated esound package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.8
Date: Mon, 17 Nov 2008 20:32:29 +0100
Source: esound
Binary: esound esound-clients esound-common libesd0 libesd0-dev libesd-alsa0
Architecture: source all amd64
Version: 0.2.40-1
Distribution: experimental
Urgency: low
Maintainer: Josselin Mouette <joss@debian.org>
Changed-By: Josselin Mouette <joss@debian.org>
Description: 
 esound     - Enlightened Sound Daemon - Support binaries
 esound-clients - Enlightened Sound Daemon - clients
 esound-common - Enlightened Sound Daemon - Common files
 libesd-alsa0 - Enlightened Sound Daemon (ALSA) - Shared libraries
 libesd0    - Enlightened Sound Daemon - Shared libraries
 libesd0-dev - Enlightened Sound Daemon - Development files
Closes: 147532 248118 257354 286406 288903 347751 348019 375804 385014 415216 415713 422590 452720 465092 469860 486374 504694
Changes: 
 esound (0.2.40-1) experimental; urgency=low
 .
   * New maintainer.
   * New upstream release. Closes: #422590, #452720.
     + Exits with GNOME logout. Closes: #504694, #415216.
   * Convert to cdbs. Incidentally closes: #465092.
   * Enable IPv6 support.
   * Update copyright information.
   * Generate architectures list with type-handling.
     Closes: #288903, #469860.
   * Add documentation (and associated doc-base registration) to
     esound-common.
   * Move libesddsp to esound-clients (it’s only used by esddsp).
   * Split the patches that were not merged upstream into a quilt
     series.
   * Update watch.
   * Import patches from Ubuntu:
     + 17_check_esd.patch: do not bother starting esd if it doesn’t
       exist.
     + 18_multiple_instances.patch: allow multiple instances of esd per
       user. Closes: #147532
     + 19_esddsp_mutex.patch: protect dsp_init against multiple calls
       with a mutex. Closes: #347751, #348019, #257354.
   * 20_manpage_errors.patch: new patch. Add standard pod2man header to
     esdcat.1.in.
   * 21_requires.private: new patch. Use Requires.private for audiofile
     in the pkg-config file. Closes: #375804.
   * 12_esddsp_mmap64.patch: replace the mmap64 implementation by one
     that accepts off64_t. Closes: #415713.
   * 50_alsa_drain.patch: disabled for now, it should be fixed in ALSA.
   * Set libesd-alsa0 to be the default in shlibs.
     Closes: #286406, #385014.
   * Only suggest esound-clients. Closes: #486374.
   * Mention the two versions of the library in README.Debian.
     Closes: #248118.
Checksums-Sha1: 
 d81323f8353be6bc3b1364bc7a22f3b4698d7983 1212 esound_0.2.40-1.dsc
 b87eb039960d4ede6a3b125786244300565ae5b2 523203 esound_0.2.40.orig.tar.gz
 86ff64a7a74e89655a605e895d6725fd48093cac 31860 esound_0.2.40-1.diff.gz
 3f8a36cc2e3fb709ba2158bc85c524ea83474c79 55316 esound-common_0.2.40-1_all.deb
 9f0e85ca03d809178c208a4761d75fcc281a32db 24466 esound_0.2.40-1_amd64.deb
 b5093c9e75a06d32f24d1077ee2bd6d259501040 39234 esound-clients_0.2.40-1_amd64.deb
 42fccceeb282ee151e1d3056af9d50b04e313338 16834 libesd0_0.2.40-1_amd64.deb
 2a88360663eb6ceba7f36166f58083e8d8fb2dfa 26394 libesd0-dev_0.2.40-1_amd64.deb
 ad55f48692f70ba9b8d90219fa0050fc2c6d3177 19696 libesd-alsa0_0.2.40-1_amd64.deb
Checksums-Sha256: 
 dc4c3fb1c098862ba835231b743069f33fff04050377ba07b6c4080fe0e7b6d1 1212 esound_0.2.40-1.dsc
 0612188b493251a842eb671abb8653e2cbe62dec5ac189e88018250932da58d6 523203 esound_0.2.40.orig.tar.gz
 ae3f761e4ec587bd4aff650b6238dc0ac7f78b2d746cdebadd805a80a84663a1 31860 esound_0.2.40-1.diff.gz
 ee9e48766c7af0114124bd559bbe5a60172efef006ec40da886fbd93099f4dd7 55316 esound-common_0.2.40-1_all.deb
 98b27164f2f7028ee4fc16909a3f0368260f060b29336de99834b240ae056d32 24466 esound_0.2.40-1_amd64.deb
 ae54d7de57c480f6e6c61d542a933591329e3434172efcd211029a2f3e93923f 39234 esound-clients_0.2.40-1_amd64.deb
 559dbd2ca1f369bac08f7625a1f4d47481a4a89ed79db673ee53e313979d0412 16834 libesd0_0.2.40-1_amd64.deb
 03a8c3300e5928ed219b1ab0f3b73755726409c259dca57b91cb5e4b16d792c7 26394 libesd0-dev_0.2.40-1_amd64.deb
 6c88d8eca87733e47058b5aa9be655c624609bbc2a895548f14387140981408c 19696 libesd-alsa0_0.2.40-1_amd64.deb
Files: 
 ec97b5e547aa4bdbb851d09f1fec4da2 1212 sound optional esound_0.2.40-1.dsc
 8ca6d400ab6b938a8618d274893aad1e 523203 sound optional esound_0.2.40.orig.tar.gz
 1e5f27bf0f52f19f0c570b4a8531a72b 31860 sound optional esound_0.2.40-1.diff.gz
 a633a7a6e4af279d866b2a8dc283602f 55316 sound optional esound-common_0.2.40-1_all.deb
 e3f9e1104b13f4cff62d5fc62194c3f9 24466 sound optional esound_0.2.40-1_amd64.deb
 a25dcafa38ebe26aef016a7c606c2ddc 39234 sound optional esound-clients_0.2.40-1_amd64.deb
 4ca024e761703d73d40c21224f573712 16834 libs optional libesd0_0.2.40-1_amd64.deb
 66bd0f4e5dd3bd07bf7828b3ede742ab 26394 libdevel optional libesd0-dev_0.2.40-1_amd64.deb
 2a263e2c196209133f5fe905d2e19995 19696 libs extra libesd-alsa0_0.2.40-1_amd64.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)

iD8DBQFJIcwMrSla4ddfhTMRApTyAJ4ymL4QuL0Ux5FR98R55LRjuotqqACg3z+W
EjDkmq8oKed2hy55JeZyQCk=
=W4Ox
-----END PGP SIGNATURE-----





Bug archived. Request was from Debbugs Internal Request <owner@bugs.debian.org> to internal_control@bugs.debian.org. (Mon, 22 Mar 2010 07:42:33 GMT) (full text, mbox, link).


Bug unarchived. Request was from Stefano Zacchiroli <zack@debian.org> to control@bugs.debian.org. (Sun, 10 Apr 2011 08:42:45 GMT) (full text, mbox, link).


Bug archived. Request was from Debbugs Internal Request <owner@bugs.debian.org> to internal_control@bugs.debian.org. (Mon, 09 May 2011 07:38:11 GMT) (full text, mbox, link).


Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Wed Oct 11 12:08:33 2017; Machine Name: buxtehude

Debian Bug tracking system

Debbugs is free software and licensed under the terms of the GNU Public License version 2. The current version can be obtained from https://bugs.debian.org/debbugs-source/.

Copyright © 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson, 2005-2017 Don Armstrong, and many other contributors.