Jockey does not find modems as ALSA subdevices

Bug #295158 reported by Pēteris Krišjānis
4
Affects Status Importance Assigned to Milestone
Jockey
Invalid
Wishlist
Unassigned
jockey (Ubuntu)
Fix Released
Medium
Martin Pitt

Bug Description

Hi there!

I have Hewlett Packard Compaq nw8440 laptop, which has built-in modem. From Linux POV, it can be seen as part of ALSA sound card device. So I read that Jockey, previously known as Restricted Drivers Manager, support some classes of Winmodems. Poke at code and discovered that it verifies is there a modem on ALSA chip wrongly (or kernel has changed way of doing this), as it looks in /proc/asound/cards for string "modem". Now you should do aplay -l and you get something like this:
pecisk@pecisk-laptop:~$ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: Intel [HDA Intel], device 0: AD198x Analog [AD198x Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: Intel [HDA Intel], device 6: Si3054 Modem [Si3054 Modem]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: Headset [Logitech USB Headset], device 0: USB Audio [USB Audio]
  Subdevices: 0/1
  Subdevice #0: subdevice #0

you get address and indication that device is a modem. In Multiverse there is sl-modem-daemon, which provides driver for this device. You should provide modem's hw address - hw:0,6 - and put it into /etc/default/sl-modem-daemon as value for SL_DEVICE.

Revision history for this message
Pēteris Krišjānis (pecisk-gmail) wrote :

Sorry, variable is SLMODEMD_DEVICE.

Revision history for this message
Martin Pitt (pitti) wrote :

Thanks for your report. Can you please give me the contents of /proc/asound/cards for this?

What is the exact contents of /etc/default/sl-modem-daemon? This is the first report which says that this file is needed for sl-modem-daemon, usually it should "just work". The reason may be that sl-modem-daemon looks in to /proc/asound/cards itself, can't find it, and thus needs to be told which device to talk to.

Changed in jockey:
importance: Undecided → Wishlist
status: New → Triaged
assignee: nobody → pitti
importance: Undecided → Medium
status: New → Triaged
Revision history for this message
Pēteris Krišjānis (pecisk-gmail) wrote :

my /proc/asound/cards is:
pecisk@pecisk-laptop:~$ cat /proc/asound/cards
 0 [Intel ]: HDA-Intel - HDA Intel
                      HDA Intel at 0xf4700000 irq 16

About /etc/default/sl-modem-daemon - yes, it is strange. By default, this file has such look:

# NOTE: settings in /etc/defautls/slmodemd are used too

# set this to 1 to never run the daemon from the init script
# you can set it if you have an USB device, than the init script won't
# be started at boot (but when the USB device is plugged on)
DONTSTART=0

# This is the default configuration for the slmodem driver daemon
# running on Debian systems.
#
# Edit device node and country code here ...
#
# possible country codes are:
#
# USA
# GERMANY
# BELGIUM
# etc.
#
# use 'slmodemd --countrylist' to check out other countries
#
#
#SLMODEMD_DEVICE=slamr0
#SLMODEMD_COUNTRY=GERMANY

SLMODEMD_DEVICE=auto
SLMODEMD_COUNTRY=USA

#
# Additional options for slmodemd, see "slmodemd -h" output for details.
# Do NOT set country or device name here!

OPTS=""

# force the start of the daemon even if old type modules seem to be
# installed (set it to 1)

FORCESTART=0

# set this to not see any hints of the init script on startup

# BEQUIET=1

# set this to not create the /dev/modem symlink

# NOSYMLINK=1

****************
But to get card working I must provide device name just like this (skipping most of the part):
SLMODEMD_DEVICE=hw:0,6 instead of SLMODEMD_DEVICE=auto

I just checked /etc/init.d/sl-modem-daemon and your suspicions are confirmed, it greps same /proc/asound/cards. So it is bug in two places, init.d script for slmodemd and jockey, caused by something that has changed output in /proc/asound/cards.

Revision history for this message
Pēteris Krišjānis (pecisk-gmail) wrote :

I reported bug about sl-modem-daemon init.d script here, see https://bugs.edge.launchpad.net/ubuntu/+source/sl-modem/+bug/298424

Revision history for this message
Martin Pitt (pitti) wrote :

Thanks. I think we should rather fix it in sl-modem itself, so that people who install it manually still get the right thing.

Revision history for this message
Pēteris Krišjānis (pecisk-gmail) wrote :

Sure it should be fixed in sl-modem, but Jockey still needs to rise a flag and give common user to enable this modem easily :)

Revision history for this message
Pēteris Krišjānis (pecisk-gmail) wrote :

Created patch for jockey/data/handlers/sl_modem.py. It checks aplay -l (after /proc/asound/cards check is failed to detect modem) for "Modem" string. If it finds it, it returns True as it should.

Revision history for this message
Pēteris Krišjānis (pecisk-gmail) wrote :

Again, corrected patch. Geany did a nasty trick with tabs. This is correct patch so sl_modem.py doesn't get borked.

Revision history for this message
Martin Pitt (pitti) wrote :

Wontfix upstream, the sl-modem handler is Ubuntu specific.

Changed in jockey:
status: Triaged → Won't Fix
Revision history for this message
Martin Pitt (pitti) wrote :

Patch needs updating to not use shell=True (replace with env= and array), and some whitespace fixing (alignment, 4 spaces for indentation), and docstring formatting (PEP-8), but looks fine in general. I'll clean that up when committing.

Thank you!

Changed in jockey:
status: Triaged → In Progress
Revision history for this message
Martin Pitt (pitti) wrote :

Note to self: when sponsoring this, include patch in bug 334252

Revision history for this message
Martin Pitt (pitti) wrote :

Ignore my previous comment, wrong bug.

Revision history for this message
Martin Pitt (pitti) wrote :

I cleaned up the patch a bit and committed:

  http://bazaar.launchpad.net/%7Eubuntu-core-dev/jockey/ubuntu/revision/307

I'll upload this after the alpha-5 freeze.

Changed in jockey:
status: In Progress → Fix Committed
status: Won't Fix → Invalid
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package jockey - 0.5-0ubuntu2

---------------
jockey (0.5-0ubuntu2) jaunty; urgency=low

  [ Martin Pitt ]
  * Merge bug fixes from trunk:
    - Replace Exception.message with str(Exception), since .message is
      deprecated in Python 2.6.
  * Python transition: Build for all Python versions again, to work
    with 2.6. Include links in the .deb, bump python-central
    build dependency for this.
  * debian/rules: Drop DEB_PYTHON_INSTALL_ARGS_ALL setting;
    --no-compile is set by default nowadays, and explicitly setting it
    hides python-distutils.mk's --install-layout option.
  * data/handlers/sl_modem.py: Recognize modems which are subdevices
    of alsa cards, and thus only appear in "aplay -l", not in
    /proc/asound/cards. Thanks to Peteris Krisjanis for the patch!
    (LP: #295158)

  [ Mario Limonciello ]
  * data/handlers/broadcom_wl.py:
    - if we don't offer b43 at all with the card, and the Broadcom STA
      driver is loaded, it is implicitly "enabled". (LP: #288211)

 -- Martin Pitt <email address hidden> Fri, 27 Feb 2009 09:04:16 +0100

Changed in jockey:
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.