[alsa-devel] how to convert stereo capture to mono stream (hardware incompatibility)

Clemens Ladisch clemens at ladisch.de
Thu Sep 4 12:58:16 CEST 2008


brunal wrote:
> There is an implementation of alsa in Julius, but I can't make it
> working with my USB sound card, because when alsa tries to set
> channel capture to 1, I get an error from alsa. Here is the code :
>
>   /* set number of channels */
>    if ((err = snd_pcm_hw_params_set_channels(handle, hwparams, 1)) < 0) {
>      jlog("Error: adin_alsa: cannot set PCM channel to %d (%s)\n", 1, snd_strerror(err));
>      return(FALSE);
>    }
> Which always return FALSE.

I'd guess this program uses a wrong device name.  Make sure that the
default device name is "default", which can automatically convert sample
formats not supported by the hardware, and not "hw".


HTH
Clemens


More information about the Alsa-devel mailing list