Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 455370 - dev-tcltk/snack-2.2.10-r6 does not see sound devices
Summary: dev-tcltk/snack-2.2.10-r6 does not see sound devices
Status: RESOLVED WORKSFORME
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: TCL/TK Project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 593144
  Show dependency tree
 
Reported: 2013-02-03 23:32 UTC by Vladimir
Modified: 2019-07-19 13:07 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Vladimir 2013-02-03 23:32:01 UTC
After a recent udev upgrade dev-tcltk/snack-2.2.10-r6 does not see the sound devices any more.
For example, in my Python application I can do the following (an example from snack documentation):

>>> from Tkinter import *
>>> root = Tk()
>>> import tkSnack
>>> tkSnack.initializeSnack(root)
>>> tkSnack.audio.inputDevices()
()

And as one can see, the list of available devices is empty, although I installed  the Snack with 'alsa' USE-flag turned on. Other applications installed on my system are still able to produce sound through the ALSA device.
  This bug also affects net-im/coccinella-0.96.21 which is why I actually noticed it. I do not know Tcl to test the Snack from the Tcl program, but the list of available sound devices in Coccinella's settings is also empty.

Reproducible: Always
Comment 1 Justin Lecher (RETIRED) gentoo-dev 2013-02-05 13:26:59 UTC
Could you guys comment on that?
Comment 2 Justin Lecher (RETIRED) gentoo-dev 2013-02-05 13:33:32 UTC
In [4]: tkSnack.initializeSnack(root)
Unable to open mixer /dev/mixer
Comment 3 Justin Lecher (RETIRED) gentoo-dev 2013-02-05 13:44:45 UTC
(In reply to comment #2)
> In [4]: tkSnack.initializeSnack(root)
> Unable to open mixer /dev/mixer

okay, this seems to be a problem due to new kernel.
Comment 4 Samuli Suominen (RETIRED) gentoo-dev 2013-02-05 13:48:58 UTC
I don't have /dev/mixer, I guess that's from OSS-only setup
Everything ALSA related in /dev/snd is root:audio as they should be
Not sure what you are looking for us (udev-bugs@) to comment?
Comment 5 Justin Lecher (RETIRED) gentoo-dev 2013-02-05 13:53:29 UTC
(In reply to comment #4)
> I don't have /dev/mixer, I guess that's from OSS-only setup
> Everything ALSA related in /dev/snd is root:audio as they should be
> Not sure what you are looking for us (udev-bugs@) to comment?

you are right, /dev/mixer is not the problem.
Why udev-bugs@, because the OR stated that it is because of recent udev bumps.
Comment 6 Samuli Suominen (RETIRED) gentoo-dev 2013-02-05 13:57:13 UTC
(In reply to comment #5)
> (In reply to comment #4)
> > I don't have /dev/mixer, I guess that's from OSS-only setup
> > Everything ALSA related in /dev/snd is root:audio as they should be
> > Not sure what you are looking for us (udev-bugs@) to comment?
> 
> you are right, /dev/mixer is not the problem.
> Why udev-bugs@, because the OR stated that it is because of recent udev
> bumps.

ConsoleKit's ooold udev-acl rules might have allowed sound access without belonging to group audio with the old udev
Those rules are no longer compatible with new udev, and beloging to audio group is mandatory (like we have always documented)
Can't think of anything else that would have changed b/c of udev upgrade
Comment 7 Justin Lecher (RETIRED) gentoo-dev 2013-02-05 14:08:09 UTC
I can reproduce this with
# id justin
uid=2069(justin) gid=2069(justin) groups=2069(justin),10(wheel),18(audio),19(cdrom),27(video),80(cdrw),85(usb),100(users),250(portage),439(ldap),12(mail),994(libvirt),101(vboxusers),16(cron),999(fcron),997(kvm),990(wireshark)


Interestingly, alsaconf can't detect any device although my gnome has sound.
Comment 8 Samuli Suominen (RETIRED) gentoo-dev 2013-02-05 14:22:28 UTC
(In reply to comment #7)
> Interestingly, alsaconf can't detect any device although my gnome has sound.

alsaconf is not reliable, it has never been -- it works only on a binary-only distribution shipped kernels where all of the ALSA drivers are built as
modules

that's why we document editing the alsa conf file in modprobe.d directory instead of running it
Comment 9 Justin Lecher (RETIRED) gentoo-dev 2013-02-06 07:46:31 UTC
(In reply to comment #8)
> (In reply to comment #7)
> > Interestingly, alsaconf can't detect any device although my gnome has sound.
> 
> alsaconf is not reliable, it has never been -- it works only on a
> binary-only distribution shipped kernels where all of the ALSA drivers are
> built as
> modules

Our official docs still tell you to run alsaconf

"To configure your sound card just type alsaconf in a shell as root."
Comment 10 Samuli Suominen (RETIRED) gentoo-dev 2013-02-08 19:47:12 UTC
(In reply to comment #9)
> (In reply to comment #8)
> > (In reply to comment #7)
> > > Interestingly, alsaconf can't detect any device although my gnome has sound.
> > 
> > alsaconf is not reliable, it has never been -- it works only on a
> > binary-only distribution shipped kernels where all of the ALSA drivers are
> > built as
> > modules
> 
> Our official docs still tell you to run alsaconf
> 
> "To configure your sound card just type alsaconf in a shell as root."

That is bad. I filed bug 456214 to get rid of alsaconf. Is only useful for ISA/PCMCIA cards.
Comment 11 zlg (RETIRED) gentoo-dev 2016-11-21 05:56:00 UTC
I was unable to reproduce the events in your Python feedback:

$ python2
Python 2.7.12 (default, Sep 29 2016, 22:26:24)
[GCC 5.4.0] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from Tkinter import *
>>> root = Tk()
>>> import tkSnack
>>> tkSnack.initializeSnack(root)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib64/python2.7/site-packages/tkSnack.py", line 21, in initializeSnack
    Tkroot.tk.call('eval', 'package require snack')
_tkinter.TclError: couldn't load file "/usr/lib64/snack2.2/libsnack.so": /usr/lib64/snack2.2/libsnack.so: undefined symbol: Tcl_SeekOld

The tcl version appears to work as far as I'm able to test it (it wants access to /dev/sound/dsp and I use PA, so I don't know which path or device argument to feed to it).

The following tcl script is a quick way to test it:

#!/usr/bin/env tclsh
package require snack
snack::sound s
s read /usr/share/sounds/alsa/Front_Center.wav
s play
snack::audio outputDevices
s play -device /dev/dsp
s play -device /dev/audio
s destroy

I couldn't get sound to play on any of the devices that were listed by 'outputDevices', but that may be because of PA. (In fact, it seems the last time Snack was updated was before PA existed [0]) Someone on plain ALSA should test it so we can figure out what to do with this.

[0]: http://www.speech.kth.se/snack/download.html : "Source release for all platforms 1.7M (December 14, 2005)"
Comment 12 zlg (RETIRED) gentoo-dev 2016-12-30 01:25:59 UTC
Adding a blocker since this bug isn't yet resolved and the package is being considered for stabilization.
Comment 13 Larry the Git Cow gentoo-dev 2018-10-04 07:10:21 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a44b54f8614f3cf31561c049d2a1385833fcc490

commit a44b54f8614f3cf31561c049d2a1385833fcc490
Author:     Tupone Alfredo <tupone@gentoo.org>
AuthorDate: 2018-10-04 07:10:01 +0000
Commit:     Tupone Alfredo <tupone@gentoo.org>
CommitDate: 2018-10-04 07:10:01 +0000

    dev-tcltk/snack: EAPI 6, maybe fix bug #455370
    
    Bug: https://bugs.gentoo.org/455370
    Signed-off-by: Alfredo Tupone <tupone@gentoo.org>
    Package-Manager: Portage-2.3.49, Repoman-2.3.10

 dev-tcltk/snack/files/alsa-undef-sym.patch |  6 +-
 dev-tcltk/snack/snack-2.2.10-r7.ebuild     | 96 ++++++++++++++++++++++++++++++
 2 files changed, 99 insertions(+), 3 deletions(-)
Comment 14 Tupone Alfredo gentoo-dev 2018-10-04 07:11:42 UTC
Please test dev-tcltk/snack-2.2.10-r7