alsa periods in buffer (4) is bad: Invalid argument

Hello,
I'm trying to get celliax working on whitebox linux 4 (RHEL4 clone)
* All current os updates installed
* I'm using Asterisk 1.4.9
* I've got alsa 10.0.13 installed.
* on 8/24/2007: I got the source from here: svn co http://www.celliax.org:8081/svn/celliax/trunk
* chan_celliax.so compiles without errors

When I try to load the celliax module, I get the following errors:
== Registered channel type 'Celliax' (Celliax, Audio-Serial Driver)
== Parsing '/etc/asterisk/celliax.conf': Found
== Registered application 'Celliax_Directory'
== Registered application 'celliax_sendsms'
== Registered channel type 'Celliax' (Celliax, Audio-Serial Driver)
== Parsing '/etc/asterisk/celliax.conf': Found
[Aug 24 22:33:21] ERROR[29449]: chan_celliax.c:3945 alsa_open_dev: [b7f786c0][ERROR 3945 ][motoV3i ][-1, 0, 0, 0] alsa_periods_in_buffer (4) is bad: Invalid argument

[Aug 24 22:33:21] ERROR[29449]: chan_celliax.c:3792 alsa_init: [b7f786c0][ERROR 3792 ][motoV3i ][-1, 0, 0, 0] Failed opening ALSA capture device: default:0

[Aug 24 22:33:21] ERROR[29449]: chan_celliax.c:3157 mkif: [b7f786c0][ERROR 3157 ][motoV3i ][-1, 0, 0, 0] Failed initializing sound device

[Aug 24 22:33:21] ERROR[29449]: chan_celliax.c:2494 load_module: [b7f786c0][ERROR 2494 ][none ][-1,-1,-1,-1] Unable to create channel Celliax from celliax.conf category '[motoV3i]'
== Unregistered channel type 'Celliax'

Any ideas?


Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

try different values

Seems that your soundcard do not accept the config values

try other values for alsa_period_size and alsa_periods_in_buffer

on some soundcard I have found alsa_period_size=32 and alsa_periods_in_buffer=32 to work well.

Also, try to use different names for the devices, substituting plughw to default, eg:

alsa_capture_device_name=plughw:0
alsa_playback_device_name=plughw:0

If all this do not works, write here again and we'll help you further ;-)


I also had problems with these values

So, Giovanni, how about implementing a "hint" in the output log using the functions:

snd_pcm_hw_params_get_periods_min()
snd_pcm_hw_params_get_periods_max()
snd_pcm_hw_params_get_buffer_size_min()
snd_pcm_hw_params_get_buffer_size_max()

Searching the web the information that can be found is that these values are highly hardware-dependent: users will definitely have to adapt the values to what their hardware accepts, but at least the log could indicate what values ranges are valid otherwise it will be a blind shot until the correct values are chosen.

By the way, my sound card does not accept alsa_periods_in_buffer > 2.


alsa parameters hint

good idea, let's continue discussion about alsa parameters hint on the celliax-dev mailing list


Different soundcard works I

Different soundcard works

I configured celliax to use my on-board soundcard, and now the module loads

The soundcard that this failed was a Creative Labs SB Live! EMU10k1 (rev 0a)
The soundcard that works is a Intel Corporation 82801BA/BAM AC'97 Audio Controller (rev 04)


Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.