After upgrading from sys-kernel/gentoo-sources-2.6.27-r10 to sys-kernel/gentoo-sources-2.6.30-r6, net-dialup/hsfmodem-7.80.02.04 is no longer able to build alsa modules for kernel. It also brokes sound as running hsfconfig renames existing alsa modules and doesn't build new. nnn # ls /lib/modules/2.6.30-gentoo-r6/kernel/sound/pci/hda/ snd-hda-codec-analog.ko snd-hda-codec.ko.REPLACEDBYhsfmodem snd-hda-codec-conexant.ko snd-hda-intel.ko.REPLACEDBYhsfmodem Reproducible: Always Steps to Reproduce: 1.Emerge, build and boot to sys-kernel/gentoo-sources-2.6.30-r6 2.Emerge net-dialup/hsfmodem-7.80.02.04 if it has not already been emerged 3.Run hsfconfig as root to try to build the kernel modules 4.Run ls /lib/modules/2.6.30-gentoo-r6/kernel/sound/pci/hda to see renamed modules. 5.Run ls /lib/modules/2.6.30-gentoo-r6/updates/ to see that there are no alsa modules where they should be. 4.Try to dial-up. 5.Try to play some sound. 6.Try to restart alsasound. Actual Results: nostromo nnn # hsfconfig Conexant HSF softmodem driver, version 7.80.02.04full If you need license keys, assistance or more information, please go to: http://www.linuxant.com/ When reporting a problem for the first time, please send us the file generated by "hsfconfig --dumpdiag". No pre-built modules for: unknown-unknown linux-2.6.30-gentoo-r6 i686-SMP Trying to automatically build the driver modules... (this requires a C compiler and proper kernel sources to be installed) Where is the linux source build directory that matches your running kernel? [/lib/modules/2.6.30-gentoo-r6/build] WARNING: Building older built-in HDA driver; some audio/modem issues may occur. If this is the case, please try the latest alsa-driver-linuxant package available from http://www.linuxant.com/alsa-driver Building modules for kernel 2.6.30-gentoo-r6, using source directory /lib/modules/2.6.30-gentoo-r6/build. Please wait... done. * Updating modules.conf ... [ ok ] * Updating modules.dep ... [ ok ] * Please file a bug about /etc/modules.d/hsf: it needs an /etc/modprobe.d/hsf * Updating modprobe.conf by hand ... [ ok ] Warning: no device detected by hsf driver - HDA modems may require reboot Note: HDA support not compiled in the driver nostromo nnn # ls /lib/modules/2.6.30-gentoo-r6/kernel/sound/pci/hda/ snd-hda-codec-analog.ko snd-hda-codec.ko.REPLACEDBYhsfmodem snd-hda-codec-conexant.ko snd-hda-intel.ko.REPLACEDBYhsfmodem nostromo nnn # ls /lib/modules/2.6.30-gentoo-r6/updates/ nostromo nnn # nostromo nnn # wvdial dial-up --> WvDial: Internet dialer version 1.60 --> Cannot open /dev/modem: Input/output error --> Cannot open /dev/modem: Input/output error --> Cannot open /dev/modem: Input/output error nostromo nnn # LANG=en aplay -t raw -f S16_LE -r16000 /etc/hsfmodem/dcprecord/000 ALSA lib confmisc.c:768:(parse_card) cannot find card '0' ALSA lib conf.c:3513:(_snd_config_evaluate) function snd_func_card_driver returned error: No such file or directory ALSA lib confmisc.c:392:(snd_func_concat) error evaluating strings ALSA lib conf.c:3513:(_snd_config_evaluate) function snd_func_concat returned error: No such file or directory ALSA lib confmisc.c:1251:(snd_func_refer) error evaluating name ALSA lib conf.c:3513:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory ALSA lib conf.c:3985:(snd_config_expand) Evaluate error: No such file or directory ALSA lib pcm.c:2211:(snd_pcm_open_noupdate) Unknown PCM default aplay: main:608: audio open error: No such file or directory nostromo nnn # /etc/init.d/alsasound restart * Storing ALSA Mixer Levels ... alsactl: save_state:1502: No soundcards found... * Error saving levels. [ !! ] * Loading ALSA modules ... * Loading: snd-card-0 ... WARNING: Module snd_hda_intel not found. WARNING: Module snd_hda_intel not found. [ ok ] * Loading: snd-card-0 ... WARNING: Module snd_hda_intel not found. WARNING: Module snd_hda_intel not found. [ ok ] * ERROR: Failed to load necessary drivers [ ok ] * Restoring Mixer Levels ... alsactl: unrecognized option '---' * Errors while restoring defaults, ignoring Modem doesn't work at all. Sound is broken. Expected Results: The alsa kernel modules should have been successfully built. Modem should dial. Alsa should work too. My sound card is Intel HD Audio with Analog Device HD-audio codec, my modem is Conexant HSF so i marked them to be built as a modules during kernel configuration. Then i decided to switch off in-kernel alsa to try out separate alsa-driver package (1.0.20) with patch from linuxant with improved support for Conexant chipsets and the HSF driver as was advised on their website. All compiled ok. hsfconfig build all modules. Modem works. But the modem can't establish connection due "clicks" in its signal. I have a record of it. The same version of hsfmodem driver works ok with gentoo-sources-2.6.27 (with in-kernel alsa) without any patching. I also have applied alsa-patch from linuxant to gentoo-sources-2.6.30-r6 to try it with in-kernel alsa (1.0.20). This works too but also with "clicks". Also with patched alsa-modules (both in-kernel or separate package) running hsfconfig doesn't replace them. Driver just picks them up. I was able to record sound from modem. It is in the attachment and can be played with: aplay -t raw -f S16_LE -r16000 <filename> Note that it shows just clicks, i even did't try to establish connection (it's impossible due clicks) so i swithed from pulse to tone dialing as my provider supports only pulse dial-out.
Created attachment 203534 [details] Handshake sound of modem with "clicks" Can be played with aplay -t raw -f S16_LE -r16000 <filename>
Created attachment 203535 [details, diff] Patch for alsa-driver from linuxant website I've aplied this patch to both the external alsa-driver-1.0.20-r1 package which is not supported by Gentoo maintainers and to gentoo-sources-2.6.30-r6.
nnn@nostromo ~ $ emerge --info Portage 2.1.6.13 (default/linux/x86/2008.0/desktop, gcc-4.4.1, glibc-2.9_p20081201-r2, 2.6.30-gentoo-r6 i686) ================================================================= System uname: Linux-2.6.30-gentoo-r6-i686-Intel-R-_Core-TM-2_Duo_CPU_T7300_@_2.00GHz-with-gentoo-1.12.11.1 Timestamp of tree: Mon, 07 Sep 2009 19:45:01 +0000 ccache version 2.4 [disabled] app-shells/bash: 3.2_p39 dev-java/java-config: 1.3.7-r1, 2.1.8-r1 dev-lang/python: 2.4.4-r14, 2.5.4-r3, 2.6.2-r1 dev-python/pycrypto: 2.0.1-r8 dev-util/ccache: 2.4-r7 dev-util/cmake: 2.6.2 sys-apps/baselayout: 1.12.11.1 sys-apps/sandbox: 1.6-r2 sys-devel/autoconf: 2.63-r1 sys-devel/automake: 1.4_p6, 1.5, 1.7.9-r1, 1.9.6-r2, 1.10.2 sys-devel/binutils: 2.18-r3 sys-devel/gcc-config: 1.4.1 sys-devel/libtool: 1.5.26 virtual/os-headers: 2.6.30-r1 ACCEPT_KEYWORDS="x86" CBUILD="i686-pc-linux-gnu" CFLAGS="-march=prescott -O2 -pipe -fomit-frame-pointer" CHOST="i686-pc-linux-gnu" CONFIG_PROTECT="/etc" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/udev/rules.d" CXXFLAGS="-march=prescott -O2 -pipe -fomit-frame-pointer" DISTDIR="/usr/portage/distfiles" FEATURES="distlocks fixpackages parallel-fetch protect-owned sandbox sfperms strict unmerge-orphans userfetch" GENTOO_MIRRORS="ftp://mirror.yandex.ru/gentoo-distfiles/ " LANG="ru_RU.UTF-8" LC_ALL="" LDFLAGS="-Wl,-O1" LINGUAS="ru" MAKEOPTS="-j3" PKGDIR="/usr/portage/packages" PORTAGE_CONFIGROOT="/" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/portage/local/layman/sunrise /usr/portage/local/layman/arcon /usr/portage/local/layman/oss-overlay /usr/portage/local/layman/voyageur /usr/local/portage" SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage" USE="X a52 aac acl acpi alsa berkdb bluetooth branding bzip2 cairo cdr cli cracklib crypt dbus dri dts dvd dvdr eds emboss encode esd evo fam firefox flac fortran gdbm gif gpm gstreamer gtk hal iconv irda isdnlog jpeg ldap libnotify mad mikmod mmx mp3 mp4 mpeg mudflap ncurses nls nptl nptlonly ogg opengl openmp pam pcre pdf perl png ppds pppd python qt3support qt4 quicktime readline reflection sdl session spell spl sse sse2 ssl startup-notification svg sysfs tcpd thunar tiff truetype unicode usb vorbis win32codecs x264 x86 xml xorg xulrunner xv xvid zlib" ALSA_CARDS="hda-intel" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" FOO2ZJS_DEVICES="hpp1005" INPUT_DEVICES="evdev synaptics keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="ru" USERLAND="GNU" VIDEO_CARDS="i810 intel" Unset: CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Some information about modem chip cat -v /proc/asound/card0/codec#1 Codec: Conexant HSF Address: 1 Function Id: 0x2 Vendor Id: 0x14f12c06 Subsystem Id: 0x103c1379 Revision Id: 0x100000 Modem Function Group: 0x2
After some research i founded that the problem with "clicks" was in not properly configured alsa which was not able to determine right wake-up timing for controller by default. Clicks disappearied after manual setting "bdl_pos_adj" in alsa.conf I've added: options snd-hda-intel model=hp position_fix=2 bdl_pos_adj=32 to alsa.conf to make it work without clicks. But this works for me only after applying patch from linuxant to kernel sources. Without patch driver fails to load its modules with post install messages like (after hsfconfig): Warning: no device detected by hsf driver - HDA modems may require reboot Note: HDA support not compiled in the driver