Bug 474313 - X-lite Softphone doesn't work with padsp
Summary: X-lite Softphone doesn't work with padsp
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Fedora
Classification: Fedora
Component: pulseaudio
Version: 10
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Lennart Poettering
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2008-12-03 09:51 UTC by Erik van Pienbroek
Modified: 2008-12-18 14:25 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2008-12-18 14:25:57 UTC
Type: ---
Embargoed:


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

Description Erik van Pienbroek 2008-12-03 09:51:17 UTC
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 14:25:57 UTC
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.