Xoscope doesn't work on soundcard (No valid data sources found... exiting)

Bug #881695 reported by Angelo Compagnucci
14
This bug affects 1 person
Affects Status Importance Assigned to Milestone
xoscope (Ubuntu)
Fix Released
Undecided
Unassigned
Oneiric
Fix Released
Medium
Unassigned

Bug Description

Starting xoscope gives always the error.

 No valid data sources found... exiting

I think the problem is located in the changed behavior in /dev/dsp. Launching with padsp -d shows:

utils/padsp.c: dsp_open()
utils/padsp.c: fd_info_new()
utils/padsp.c: dsp_open() succeeded, fd=8
utils/padsp.c: unknown ioctl 0xffffffffc0045006
utils/padsp.c: freeing fd info (fd=8)
utils/padsp.c: Draining.
No valid data sources found... exiting

xoscope version is 2.0-3.1ubuntu1 on ubuntu 11.10

[Impact]
Xoscope doesn't work at all on 64 bit architecture. The only way to make it work, is to execute on 32 bit arch only with padsp (raw dsp device was disabled in Ubuntu). The software was conceived to use raw dsp audio as fallback mechanism, but in this case, it is the only way to make it work whit a soundcard. On 64 bit arch, due to the wrong ioctl parameter, it does not work at all, nor with esd (disabled at compile time) nor with padsp.

[Development Fix]
The fix use unsigned integer to call the ioctl, calling it the right way. This solve the padsp bug. Patch enables also the esd support by adding libesd0-dev to the compiler dependency. In this way, xoscope can work as it was conceived, using the soundcard via libraries instead accessing the raw device (/dev/dsp). The patch also set the defaut client mode to record, instead of monitor, it works better in pulseaudio. This change is not desruptive because the option could be changed at runtime using a menu inside the software. The only modified package is xoscope upgraded to version 2.0-3.1ubuntu2.

[Stable Fix]
Patch accepted for the development fix it applicabile also at the stable one, because the package was at the same version number before the patch was accepted.

[Test Case]
To reproduce the bug (32 and 64 bits arch):
1) Open xoscope from the commandline.
2) the software cannot find nor the /dev/dsp nor the esd soundcard so it fails whit the error: "No valid data sources found... exiting"

On 32 bits arch:
1) Open the software from commandline with "padsp xoscope"
2) the software works as expected using the virtual /dev/dsp provided by padsp

On 64 bits arch:
1) Open the software from commandline with "padsp xoscope"
2) Software doesn't work and prints the output "No valid data sources found... exiting"
3) starting the software with "padsp -d xoscope" prints the output:
utils/padsp.c: dsp_open()
utils/padsp.c: fd_info_new()
utils/padsp.c: dsp_open() succeeded, fd=8
utils/padsp.c: unknown ioctl 0xffffffffc0045006
utils/padsp.c: freeing fd info (fd=8)
utils/padsp.c: Draining.
No valid data sources found... exiting

Please note the wrong ioctl integer (0xffffffffc0045006, it should be 0xc0045006) .

[Regression Potential]
I think there are no regressions here because the patch changes only an unisigned integer.

Related branches

Revision history for this message
Angelo Compagnucci (angeloc) wrote :

Ok, I found the bug, I attached the solutive patch. With this patch, xoscope could be invoked with aoss or padsp without errors.

Problem araises when ioctl value is passed on 64 bit via a signed integer in method check_status_ioctl in sc_linux.c .

I found what I think could be a second bug, xoscope is not compiled with esound support.

There is a bug on the stock Ubuntu oneiric that prevents major esound compatibility (https://bugs.launchpad.net/ubuntu/+source/pulseaudio/+bug/864071) and also after upgrading the package to oneiric-proposed, xoscope could not work with esound compatibility.

So I recompiled the ubuntu package (from apt-get source xoscope) enabling esound (it suffices to install the esound libesd0-dev package) and ensured that the proper configure flags was set.
After the recopilation process finished, I installed the package and it worked!

So I think the package should be recompiled with esound support (so setting the HAVE_LIBESD flag).

Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "uiioctl.patch" of this bug report has been identified as being a patch. The ubuntu-reviewers team has been subscribed to the bug report so that they can review the patch. In the event that this is in fact not a patch you can resolve this situation by removing the tag 'patch' from the bug report and editing the attachment so that it is not flagged as a patch. Additionally, if you are member of the ubuntu-sponsors please also unsubscribe the team from this bug report.

[This is an automated message performed by a Launchpad user owned by Brian Murray. Please contact him regarding any issues with the action taken in this bug report.]

tags: added: patch
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package xoscope - 2.0-3.1ubuntu2

---------------
xoscope (2.0-3.1ubuntu2) precise; urgency=low

  * debian/patches/99-esd_pa_fixes.patch:
    - Fix padsp ioctl type mismatch, and use esd record mode by default.
  * Update build-depends to include libesd-dev.
  * The above changes combined fix LP: #881695.
 -- Angelo Compagnucci <email address hidden> Wed, 09 Nov 2011 00:21:22 +0100

Changed in xoscope (Ubuntu):
status: New → Fix Released
Revision history for this message
Angelo Compagnucci (angeloc) wrote :

[Impact]
Xoscope doesn't work at all on 64 bit architecture. The only way to make it work, is to execute on 32 bit arch only with padsp (raw dsp device was disabled in Ubuntu). The software was conceived to use raw dsp audio as fallback mechanism, but in this case, it is the only way to make it work whit a soundcard. On 64 bit arch, due to the wrong ioctl parameter, it does not work at all, nor with esd (disabled at compile time) nor with padsp.

[Development Fix]
The fix use unsigned integer to call the ioctl, calling it the right way. This solve the padsp bug. Patch enables also the esd support by adding libesd0-dev to the compiler dependency. In this way, xoscope can work as it was conceived, using the soundcard via libraries instead accessing the raw device (/dev/dsp). The patch also set the defaut client mode to record, instead of monitor, it works better in pulseaudio. This change is not desruptive because the option could be changed at runtime using a menu inside the software. The only modified package is xoscope upgraded to version 2.0-3.1ubuntu2.

[Stable Fix]
Patch accepted for the development fix it applicabile also at the stable one, because the package was at the same version number before the patch was accepted.

[Test Case]
To reproduce the bug (32 and 64 bits arch):
1) Open xoscope from the commandline.
2) the software cannot find nor the /dev/dsp nor the esd soundcard so it fails whit the error: "No valid data sources found... exiting"

On 32 bits arch:
1) Open the software from commandline with "padsp xoscope"
2) the software works as expected using the virtual /dev/dsp provided by padsp

On 64 bits arch:
1) Open the software from commandline with "padsp xoscope"
2) Software doesn't work and prints the output "No valid data sources found... exiting"
3) starting the software with "padsp -d xoscope" prints the output:
utils/padsp.c: dsp_open()
utils/padsp.c: fd_info_new()
utils/padsp.c: dsp_open() succeeded, fd=8
utils/padsp.c: unknown ioctl 0xffffffffc0045006
utils/padsp.c: freeing fd info (fd=8)
utils/padsp.c: Draining.
No valid data sources found... exiting

Please note the wrong ioctl integer (0xffffffffc0045006, it should be 0xc0045006) .

[Regression Potential]
I think there are no regressions here because the patch changes only an unisigned integer.

Steve Langasek (vorlon)
Changed in xoscope (Ubuntu Oneiric):
status: New → Triaged
importance: Undecided → Medium
description: updated
Revision history for this message
Adam Conrad (adconrad) wrote :

Upload to oneiric-proposed sponsored (identical to the precise upload, modulo the version number), waiting in the unapproved queue.

Changed in xoscope (Ubuntu Oneiric):
status: Triaged → Fix Committed
Revision history for this message
Angelo Compagnucci (angeloc) wrote :

Tested the package 2.0-3.1ubuntu2 on Precise 12.04, it works like a charm. I'm really happy!

Revision history for this message
Martin Pitt (pitti) wrote : Please test proposed package

Hello Angelo, or anyone else affected,

Accepted xoscope into oneiric-proposed, the package will build now and be available in a few hours. Please test and give feedback here. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

tags: added: verification-needed
Revision history for this message
Angelo Compagnucci (angeloc) wrote :

I tested the package 2.0-3.1ubuntu1.0.11.10 in proposed both 32 and 64 bits, and ... it works!!!

Yes, it works!!! It works like a charm, I'm reeeeeeally happy!

Proud to be an ubuntu memeber!

tags: added: verification-done
removed: verification-needed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package xoscope - 2.0-3.1ubuntu1.0.11.10

---------------
xoscope (2.0-3.1ubuntu1.0.11.10) oneiric-proposed; urgency=low

  * debian/patches/99-esd_pa_fixes.patch:
    - Fix padsp ioctl type mismatch, and use esd record mode by default.
  * Update build-depends to include libesd-dev.
  * The above changes combined fix LP: #881695.
 -- Angelo Compagnucci <email address hidden> Wed, 09 Nov 2011 00:21:22 +0100

Changed in xoscope (Ubuntu Oneiric):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.