slmodemd 64bit fix (was: Help with D-Link DPH 50U (SGS Thomson 56k SoftModem?))

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Marv,

> ... What fixes did you have to do to the slmodem package?

I made two changes.

============== Change 1 unsupported codec ========

The first is because the DPH-50U uses an unsupported codec.  As I don't need the modem functionality, this wasn't a big concern for me.
I don't recommend taking this change.

// drivers/st7554.c, Line 1270
       if (val&GPIO_MONOLITHINC) { /* st75951/2 silicon DAA codec */
                USB_ERR("st7554 probe: unsupported codec st75951/2.\n");
                s->codec.name = "stlc75971/2";
#if HACK_FORCE_SUCCESS_NOT_RECOMMENDED
                USB_ERR("**hack**, codec not recognised, be prepared to crash soon **hack**\n");
                s->codec.set_srate  = stlc7550_set_srate ;
                s->codec.set_format = stlc7550_set_format;
#else
              goto error;
#endif
        }
    

============== Change 2  (linking alsa on 64bit) ========

On Ubuntu 8.0.4 with an AMD 64 bit machine, the 64bit version of libasound.so is being passed to the linker when building (32bit) slmodemd with ALSA_SUPPORT=1.

// Makefile, Line 55
%-sub-dirs:
        $(foreach dir,$(sub-dirs),$(MAKE) -C $(dir) $(patsubst %-sub-dirs,%,$@) && ) echo "done."

// modem/Makefile, Line 41
slmodemd modem_test:
	$(CC) -lasound $(LFLAGS) -o $@  $^

//modem/Makefile, Line 34
#SUPPORT_ALSA:=1
ifdef SUPPORT_ALSA
slmodemd: -lasound
CFLAGS+= -DSUPPORT_ALSA=1
LFLAGS+= -lasound
endif

It seems the top-level makefile is expanding "-lasound" to "/usr/lib/libasound.so" instead of the 32bit version, "/usr/lib32/libasound.so"


Actually, I'm not sure of the proper fix here, as my makefile-fu is weak.

I have a fix which works locally but is incompatible with IA-32 machines.  I'm happy to test an updated version if someone is willing to suggest a better fix.

Cheers,
  --Chris



============ Original Message ==================

Chris,

RE: trying to do: Get ALSA to identify my DPH-50U as an *audio*
capture&playback device:
----------
To the  best of my knowledge, /dev/ttySL0 virtual ports are not  Sound
competent yet, though it is planned for the future.

What fixes did you have to do to the slmodem package?
It they are generally needed, the package should be updated.

The compile is OK on my system:

/slmodem-2.9.11-20080817$ ls drivers/*.ko
drivers/slamr.ko  drivers/slusb.ko

MarvS

On Thu, Sep 11, 2008 at 5:18 PM, Chris B <striek5@xxxxxxxx> wrote:
> Hi Marv,
>
> Thanks for your help!
>
> root@here# uname -a
> Linux here 2.6.24-19-generic #1 SMP Wed Aug 20 17:53:40 UTC 2008 
> x86_64 GNU/Linux
>
> Distro: Ubuntu 8.0.4 (up-to-date as of this morning)
>
> slmodem: 
> http://linmodems.technion.ac.il/packages/smartlink/slusb64bit-2.9.11-20070813.tar.gz
> (compiled locally, some minor tweaks for 64bit and missing codecs)
>
> root@here# wvdialconf
> Editing `/etc/wvdial.conf'.
>
> Scanning your serial ports for a modem.
>
> Modem Port Scan<*1>: S0   S1   S2   S3
> WvModem<*1>: Cannot get information for serial port.
> ttySL0<*1>: ATQ0 V1 E1 -- OK
> ttySL0<*1>: ATQ0 V1 E1 Z -- OK
> ttySL0<*1>: ATQ0 V1 E1 S0=0 -- OK
> ttySL0<*1>: ATQ0 V1 E1 S0=0 &C1 -- OK
> ttySL0<*1>: ATQ0 V1 E1 S0=0 &C1 &D2 -- OK
> ttySL0<*1>: ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0 -- OK
> ttySL0<*1>: Modem Identifier: ATI -- SmartLink Soft Modem
> ttySL0<*1>: Speed 4800: AT -- OK
> ttySL0<*1>: Speed 9600: AT -- OK
> ttySL0<*1>: Speed 19200: AT -- OK
> ttySL0<*1>: Speed 38400: AT -- OK
> ttySL0<*1>: Speed 57600: AT -- OK
> ttySL0<*1>: Speed 115200: AT -- OK
> ttySL0<*1>: Speed 230400: AT -- OK
> ttySL0<*1>: Speed 460800: AT -- OK
> ttySL0<*1>: Max speed is 460800; that should be safe.
> ttySL0<*1>: ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0 -- OK
>
> Found a modem on /dev/ttySL0.
> Modem configuration written to /etc/wvdial.conf.
> ttySL0<Info>: Speed 460800; init "ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0"
>
>
> And here's what I'm trying to do: Get ALSA to identify my DPH-50U 
> as an *audio* capture&playback device:
>
> root@here# arecord -l
> **** List of CAPTURE Hardware Devices ****
> card 0: IXP [ATI IXP], device 0: ATI IXP AC97 [ATI IXP AC97]
>  Subdevices: 1/1
>  Subdevice #0: subdevice #0
> {...I need the DPH-50U device listed here too...}
>
> That is, I'm trying to use my generic RJ11 phone with VOIP.
>
> Thanks,
>  --Chris
>
> ========= Original Message ===============
>
> Chris,
>
> Please what it your kernel version
> #  uname -r
> and Linux Distro.
>
> Under Linux, slusb.ko will not compile after 2.6.24 kernels.
> What slmodem package are you using?
>
> after the
> slmodemd -c USA /dev/slusb0
>
> open a 2nd console and try
> # wvdialconf  /etc/wvdial.conf
>
> MarvS
>
> On Wed, Sep 10, 2008 at 10:26 AM, Chris B <striek5@xxxxxxxx> wrote:
>> Hi!
>>
>> I recently acquired a D-Link DPH 50U Skype adapter and have been
>> trying to get it working with skype on linux, but I'm a little
>> unsure how to proceed.
>>
>> So why am I on the linmodem list?  My current understanding is that
>> I can use some combination of slusb.ko, ALSA and slmodemd to get
>> the audio working first, then see if I can get keypad/DTMF working
>> later.
>>
>> The unit is a USB <=> RJ11 converter, and I've confirmed the
>> hardware functions correctly on windows:
>> http://www.dlink.com/products/?pid=466
>>
>> root@here$ lsusb -v
>> Bus 001 Device 002: ID 0483:7554 SGS Thomson Microelectronics 56k SoftModem
>>  idVendor           0x0483 SGS Thomson Microelectronics
>>  idProduct          0x7554 56k SoftModem
>>
>> Running scanModem/Modem/ModemData.txt reveals:
>> "The modem is supported by the Smartlink slusb"
>>
>> So I installed 32bit libs, 32bit alsa, 32bit skype, and compiled
>> slusb.ko and slmodemd with alsa support, using this link:
>> http://linmodems.technion.ac.il/packages/smartlink/slusb64bit-2.9.11-20070813.tar.gz
>> (For anyone reading this later in the archive, that .tgz, using
>> SUPPORT_ALSA=1, causes linking errors on AMD64.  You need to fiddle
>> with modem/Makefile to get it linking correctly.)
>>
>> Now when I load the kernel module slusb.ko, I get an unsupported 
>> codec error:
>>
>> root@here: modprobe slusb
>> root@here: dmesg
>> [33800.101765] ST7554 USB Modem.
>> [33800.103091] st7554 probe: unsupported codec st75951/2.
>>
>> ok, so I hack up the driver and recompile (!!!), and now I get:
>> [33800.101765] ST7554 USB Modem.
>> [33800.103091] st7554 probe: unsupported codec st75951/2.
>> [33800.103096] **hack** ignoring unsupported codec **hack**
>> [33800.117899] <6>slusb: slusb0 is found.
>> [33800.117921] usbcore: registered new interface driver ST7554 USB Modem
>>
>> Great!
>>
>> root@here# slmodemd /dev/slusb0
>> SmartLink Soft Modem: version 2.9.11 Sep  9 2008 22:32:22
>> symbolic link `/dev/ttySL0' -> `/dev/pts/1' created.
>> modem `slusb0' created. TTY is `/dev/pts/1'
>> Use `/dev/ttySL0' as modem device, Ctrl+C for termination.
>>
>> (I haven't tried actually using the modem to dial out yet as I
>> expect the missing codec will cause it to fail.)
>>
>>
>>
>> ...Okay, so now I'm stuck, no matter what arguments I pass to
>> slmodemd, I can't get ALSA to recognize /dev/slusb0 or the ST7554...
>>
>>
>> root@here: slmodemd --alsa
>> error: mixer setup: attach hw:1 error: No such file or directory
>> ALSA lib ../../src/conf.c:3952:(snd_config_expand) Unknown parameters 1
>> ALSA lib ../../../src/pcm/pcm.c:2145:(snd_pcm_open_noupdate)
>> Unknown PCM modem:1
>> error: alsa setup: cannot open playback device 'modem:1': Invalid argument
>> error: cannot setup device `modem:1'
>>
>>
>> I don't mind debugging / writing code / stripping binary blobs /
>> whatever, but at this point, I just don't know what path I need to
>> follow to get this device recording and playing audio...  Do I use
>> slusb.ko? ALSA? should I follow up the MC'97 leads?
>>
>> Any help would be greatly appreciated.
>>
>> D-Link DPH 50U Skype(TM) USB Phone Adapter
>> Ubuntu 8.0.4, AMD64, 2.6.24-19-generic
>> gcc version 4.2.3 (Ubuntu 4.2.3-2ubuntu7)
>> Bus 001 Device 002: ID 0483:7554 SGS Thomson Microelectronics 56k SoftModem
>> Skype 2.0.0.68
>> SmartLink Soft Modem: version 2.9.11 (hacked version to ignore
>> unsupported codec, compiled locally)
>> slusb vermagic: 2.6.24-19-generic SMP mod_unload
>>
>> Thanks in advance,
>>  --Chris


-- 
Be Yourself @ mail.com!
Choose From 200+ Email Addresses
Get a Free Account at www.mail.com



[Index of Archives]     [Linux Media Development]     [Asterisk]     [DCCP]     [Netdev]     [X.org]     [Xfree86]     [Fedora Women]     [Linux USB]

  Powered by Linux