Bug 474313 - X-lite Softphone doesn't work with padsp
X-lite Softphone doesn't work with padsp
Status: CLOSED UPSTREAM
Product: Fedora
Classification: Fedora
Component: pulseaudio (Show other bugs)
10
All Linux
low Severity medium
: ---
: ---
Assigned To: Lennart Poettering
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2008-12-03 04:51 EST by Erik van Pienbroek
Modified: 2008-12-18 09:25 EST (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2008-12-18 09:25:57 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Proposed patch (387 bytes, patch)
2008-12-03 04:51 EST, Erik van Pienbroek
no flags Details | Diff

  None (edit)
Description Erik van Pienbroek 2008-12-03 04:51:17 EST
Created attachment 325505 [details]
Proposed patch

Hi,

X-lite is an closed source softphone application which still uses OSS. It can be downloaded from http://storage.counterpath.com/downloads/X-Lite_Install.tar.gz?platform=linux&product=xlite

To make this work with pulseaudio, it needs to be started using the padsp wrapper. However, with the pulseaudio from F10, it fails to open the /dev/dsp device:

$ padsp -d ./xtensoftphone 

(xtensoftphone:8195): Gtk-WARNING **: Kan themamodule in modulepad: ‘nodoka’ niet vinden,

(xtensoftphone:8195): Gtk-WARNING **: Kan themamodule in modulepad: ‘nodoka’ niet vinden,
Gtk-Message: Failed to load module "gnomebreakpad": libgnomebreakpad.so: kan gedeeld objectbestand niet openen: Bestand of map bestaat niet
Gtk-Message: Failed to load module "canberra-gtk-module": libcanberra-gtk-module.so: kan gedeeld objectbestand niet openen: Bestand of map bestaat niet
utils/padsp.c: sndstat_open()
utils/padsp.c: access(/dev/dsp, 0) = OK
utils/padsp.c: access(/dev/dsp, 6) = EACCESS

The program itself also reports that the soundcard could not be opened

According to http://git.0pointer.de/?p=pulseaudio.git;a=blob;f=src/utils/padsp.c;h=2e6e557586bb2de60a1e230d1428f9e67ca19d6e;hb=HEAD#l2380 the EACCESS is caused by this code:

if (mode & (W_OK | X_OK)) {
    debug(DEBUG_LEVEL_NORMAL, __FILE__": access(%s, %x) = EACCESS\n", pathname, mode);
    errno = EACCES;
    return -1;
}

I think this test is wrong. For /dev/dsp (and related /dev entries) the access function should only return EACCESS when the mode is X_OK (The executable bit doesn't need to be set for /dev/dsp, but it needs to be writeable and readable). I've created a patch which does this. After applying this patch, X-lite works fine using pulseaudio
Comment 1 Lennart Poettering 2008-12-18 09:25:57 EST
Fixed in upstream commit r63fc26e. 

I will shortly backport this into F10 and Rawhide.

Note You need to log in before you can comment on or make changes to this bug.