Bug 501524

Summary: Pysol has no sound and should be ported to use the alsa interface.
Product: [Fedora] Fedora Reporter: Eddie Lania <eddie>
Component: PySolFCAssignee: Stewart Adam <s.adam>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 12CC: s.adam
Target Milestone: ---Keywords: Triaged
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: PySolFC-2.0-2.fc11 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-03-01 01:39:31 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Eddie Lania 2009-05-19 15:12:06 UTC
Description of problem: Pysol does not have sound because there is no
/dev/dsp.

pysol
/usr/lib/python2.6/site-packages/pysollib/init.py:156: DeprecationWarning:
os.popen3 is deprecated.  Use the subprocess module.
  pin, pout, perr = os.popen3(settings.FCS_COMMAND+' --help')
Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/pysollib/pysolaudio.py", line 349, in
playLoop
    audiodev = ossaudiodev.open('w')
IOError: [Errno 2] No such file or directory: '/dev/dsp'

I can launch "MAKEDEV /dev/dsp" and enable /dev/dsp, but after a reboot it is
removed again.



Version-Release number of selected component (if applicable):

PySolFC-1.1-8.fc11.noarch


How reproducible: Allways.


Steps to Reproduce:
1.Instal PySOL
2.Launch it and make sure sound is enabled in pysol's options
3.Launch it again from a command prompt in a terminal, there is no sound and a
message like above is being generated.

Actual results: No sound because no /dev/dsp


Expected results: Sound working


Additional info:  

------- Comment #1 From Lennart Poettering (lpoetter) 2009-05-18 17:23:04 EDT (-) [reply] -------

This has nothing to do with PulseAudio.

For F11 we decided to disable the OSS API since it is has been obsolete since
quite some time.

Please port your application to ALSA!

Dirty hacks to make those apps work without porting are using "padsp" or
reenabling those kernel modules by patching around in the modprobe
configuration.

Comment 1 Stewart Adam 2009-05-23 22:54:19 UTC
Thanks for the report. I don't have the time to take a look at this immediately, but in the short term I will try to wrap PySol around padsp.

Comment 2 Bug Zapper 2009-06-09 16:06:47 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 11 development cycle.
Changing version to '11'.

More information and reason for this action is here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 3 Stewart Adam 2009-07-21 19:18:09 UTC
An update on this issue: padsp doesn't work on pysol since it's a Python application which uses the "ossaudiodev" module... I did some (quick) research and at a first glance it seems that there aren't any actively developed modules available for making Python work with PA or alsa.

I'm short on time and I don't know how to use ctypes+pulseaudio to fix this, so for now, patches are welcome :)

Comment 4 Eddie Lania 2009-10-11 17:09:48 UTC
(In reply to comment #3)
> An update on this issue: padsp doesn't work on pysol since it's a Python
> application which uses the "ossaudiodev" module... I did some (quick) research
> and at a first glance it seems that there aren't any actively developed modules
> available for making Python work with PA or alsa.
> 
> I'm short on time and I don't know how to use ctypes+pulseaudio to fix this, so
> for now, patches are welcome :)  

Nobody is on a hurry here man. I'm sure, given time, that you will come up with a solution yourself. Just continue.

Regards,

Eddie.

Comment 5 Eddie Lania 2009-10-21 20:16:26 UTC
I found this on the pulseaudio-discuss list:

http://www.mail-archive.com/pulseaudio-discuss@mail.0pointer.de/msg01067.html

> please, I just want to ask if there is some Python programming interface
> to PulseAudio or some bindings for the C library that one could use?

With the ctypes module you should be able to access any of the
PulseAudio shared libraries from Python:

http://docs.python.org/lib/module-ctypes.html

And perhaps this also is of interest:

https://tango.0pointer.de/pipermail/pulseaudio-commits/2009-January/003001.html

regards,

Eddie.

Comment 6 Eddie Lania 2010-02-20 11:40:28 UTC
Just updated to PySolFC-2.0-1.fc12.noarch

I am still getting no sound.

When run from console this is what I get on the screen:

pysol 
PySolFC: WARNING: config file: validation error: section: "general", key: "statusbar_stuck"
PySolFC: WARNING: config file: validation error: section: "general", key: "shisen_show_matching"
PySolFC: WARNING: config file: validation error: section: "general", key: "sound_sample_buffer_size"
Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/pysollib/pysolaudio.py", line 337, in playLoop
    audiodev = ossaudiodev.open('w')
IOError: [Errno 2] No such file or directory: '/dev/dsp'
Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/pysollib/pysolaudio.py", line 357, in play
    audiodev = ossaudiodev.open('w')
IOError: [Errno 2] No such file or directory: '/dev/dsp'
Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/pysollib/pysolaudio.py", line 357, in play
    audiodev = ossaudiodev.open('w')
IOError: [Errno 2] No such file or directory: '/dev/dsp'


Isn't it time this gets fixed?

Regards,

Eddie.

Comment 7 Fedora Update System 2010-02-23 04:59:50 UTC
PySolFC-2.0-2.fc13 has been submitted as an update for Fedora 13.
http://admin.fedoraproject.org/updates/PySolFC-2.0-2.fc13

Comment 8 Fedora Update System 2010-02-23 04:59:55 UTC
PySolFC-2.0-2.fc11 has been submitted as an update for Fedora 11.
http://admin.fedoraproject.org/updates/PySolFC-2.0-2.fc11

Comment 9 Fedora Update System 2010-02-23 04:59:59 UTC
PySolFC-2.0-2.fc12 has been submitted as an update for Fedora 12.
http://admin.fedoraproject.org/updates/PySolFC-2.0-2.fc12

Comment 10 Fedora Update System 2010-02-23 16:11:00 UTC
PySolFC-2.0-2.fc13 has been pushed to the Fedora 13 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update PySolFC'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F13/FEDORA-2010-2713

Comment 11 Fedora Update System 2010-02-24 06:14:10 UTC
PySolFC-2.0-2.fc12 has been pushed to the Fedora 12 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update PySolFC'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F12/FEDORA-2010-2764

Comment 12 Fedora Update System 2010-02-24 06:15:02 UTC
PySolFC-2.0-2.fc11 has been pushed to the Fedora 11 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update PySolFC'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F11/FEDORA-2010-2774

Comment 13 Eddie Lania 2010-02-28 14:40:41 UTC
Is working now, thank you, great improvement!

Comment 14 Stewart Adam 2010-02-28 18:46:58 UTC
Thanks for the feedback, I'll push the updates to stable.

Comment 15 Fedora Update System 2010-03-01 01:39:26 UTC
PySolFC-2.0-2.fc13 has been pushed to the Fedora 13 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 16 Fedora Update System 2010-03-02 00:54:17 UTC
PySolFC-2.0-2.fc12 has been pushed to the Fedora 12 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 17 Fedora Update System 2010-03-02 00:58:21 UTC
PySolFC-2.0-2.fc11 has been pushed to the Fedora 11 stable repository.  If problems still persist, please make note of it in this bug report.