Following the patch to fix the si3054 modem detection in the Clevo m540 laptop I noticed, much to my dismay, that slmodemd refused to work spitting out the infamous error period size 48 not supported by playback (64). This error was also discussed in the ALSA bugtracking system. This problem happens in kernels post-2.6.20, specifically in my 2.6.20 with HDA drivers backported from 2.6.22.

Instead of being a bug in ALSA, it seems to me that slmodem should gracefully handle a new period size returned by snd_pcm_hw_params_set_period_size_near() if it differs from the requested period size. It does not, and stops if the value is not exactly what it wants. Proper study of the problem in slmodem’s side is required, however this quick patch solved the issue for me:

In my case, ALSA returns 64 when slmodem requests a period size of 48, and everything seems to work well as long as the returned size is larger than the requested size.

Update: the slmodemd hack works with the m540, but not with the LG LW20. Both use a si3054 codec.

Another update: it seems that it worked with the HP Pavilion DV6567CL.

11 Responses to “Slmodem: period size 48 not supported”

  1. Paolo says:

    I applied the patch according to what described in the post and re-compiled the daemon binary. Everything went fine except that now it produces the following error message

    error: cannot setup hw params for playback: Invalid argument

    Any ideas ?

    thanks,
    Paolo

  2. Valdyr says:

    I`ve got the same error on my Asus A8JN. Will appreciate any help

  3. Valdyr says:

    I`ve been looking for solution and found it. Installed latest stable vanilla kernel (2.6.22.5 in gentoo with alsa compiled in kernel). ALso I`ve made an overlay and applied this patch to the slmodem-2.9.11_pre20061021-r2 and everything works as well as in 2.6.19 kernel, but still dont hear modem sound. If u have any questions ask me: valdyr@rambler.ru

  4. Andrew Hamilton says:

    The slmodem-2.9.11-alsa-period-size.patch patch worked for me, on two machines, both clevo laptops - an Alienware Area51-m, and a Hypersonic Aviator EQ7. Both modems are incorporated into the Intel audio chip, both need the hda_snd_intel module, and both need the slmodem daemon
    slmodemd –alsa hw:0,6

    Let’s hope the patch gets into the slmodem package.

    Although the modems work, as for Valdyr they refuse to make any sound (ironic, since the modem is on a sound chip), even when explicitly unmuted with ATM1 - see http://wwwapp.us.dell.com/support/edocs/NETWORK/5606d/commset.htm

  5. Norayr says:

    Thank you very much for the patch. I have applied it for my gentoo notebook, and it seems that it works
    I will check it later at home, but I have no errors now, and it waits for dialtone, then tells that there’s no carrier which is ok, because here I have no tel line
    I will check at home, but from the behavour it seems that it works on Fujitsu Siemens Amilo La 1703 as well :)
    Thank you!

    P. S. Did you send this patch to the slmodem developers?

  6. Norayr says:

    I confirm that your patch worked on Gentoo Linux. Thank you!

  7. Mack says:

    Thanks very much for the patch. It works perfectly for me against slmodem-2.9.11-20070813. I’m running 32 bit Fedora 8 (kernel 2.6.23.8-63.fc8) on this computer, a Toshiba M105-S3041.
    “aplay -l” shows “card 0: Intel [HDA Intel], device 6: Si3054 Modem [Si3054 Modem]“.

    I was so pleased that I posted a “howto” on the Fedora Forum.

    Thanks again!

  8. Howto: Ubuntu on HP pavilion dv65xx series laptop « nobody was born with linux knowledge says:

    [...] patch it with the simple patch found at Hell Labs [...]

  9. Delian says:

    Thanks very much! It works!
    I’m using a Si3054 Modem on a Packard Bell EasyNote w7010 with Gentoo Linux and 2.6.22-gentoo-r9 linux kernel.
    Thanks again! ^^

  10. Delian’s Blog » Blog Archive » Winmodem: un buon partito per un mal di testa says:

    [...] Pare che nonostante la differenza di periodo, su alcuni modem/schede-audio, tutto fili liscio Testato personalmente da me sul suddetto portatile con kernel 2.6.22-gentoo-r9 e ALSA kernel-built-in. Rimando all’articolo del blog che ha curato il mio mal di testa: helllabs.org [...]

  11. Alexandre says:

    Your patch worked for me against slmodem-2.9.11-20070813 on a LG LE50 Express laptop. Thanks!

Leave a Reply