Skip to contentSkip to conversation

Setting audio channels on ICH5 with SALSA

DISCUSSION Fausto Carvalho Marques SIlva 3 participants 7 messages Jul 11, 2007 – Jul 13, 2007

lore
Share & tools
lore
#0 lore raw

Setting audio channels on ICH5 with SALSA generates and: EINVAL Numbers of channels is 1. Does anyone have some ideias?? ( on ICH6 and ICH7 works well)
thanks...
Fausto Carvalho Marques Silva

#1 lore raw

More info:
Even getting the number of avaiable audio channels i get error: EINVAL Debuging gets me to:

SNDRV_PCM_HW_PARAM_CHANNELS
params->intervals[2] = {min = 2, max = 6, openmin = 0, openmax = 0, integer = 1, empty = 0}
so snd_interval_single does not get valid ...

Any help is wellcome...
Fausto Carvalho Marques Silva

Quoted 12 lines

Setting audio channels on ICH5 with SALSA generates and: EINVAL Numbers of channels is 1. Does anyone have some ideias?? ( on ICH6 and ICH7 works well)
thanks...
Fausto Carvalho Marques Silva
_______________________________________________
Alsa-devel mailing list
[email protected]
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

#2 lore raw
Quoted 2 lines · Fausto Carvalho Marques SIlva
Quoted 2 lines

Setting audio channels on ICH5 with SALSA generates and: EINVAL Numbers of channels is 1.

The ICH5 AC97 controller does not support mono output; you must use at least a stereo stream.

Quoted 1 line

Even getting the number of avaiable audio channels i get error: EINVAL

What function did you try to use?

Quoted 4 lines

Debuging gets me to:

SNDRV_PCM_HW_PARAM_CHANNELS
params->intervals[2] = {min = 2, max = 6, ...

It supports 2, 4 or 6 channels; this is not a single value.

HTH
Clemens

#3 lore raw
Quoted 5 lines

The ICH5 AC97 controller does not support mono output; you must use at least a stereo stream.

Ok, but lets clear the thing here:

- I ussing salsa v 0.0.6
- Look at this simple code:

if ((err = snd_pcm_hw_params_set_channels (playback_handle, hw_params,

1)) < 0) {
        fprintf (stderr, "cannot set channel count (%s)\n",
                 snd_strerror (err));
        exit (1);
    }

    if ((err = snd_pcm_hw_params_get_channels (hw_params,&j)) < 0) {
        fprintf (stderr, "cannot set channel count (%s)\n",
                 snd_strerror (err));
        exit (1);
    }

when ussing alsa-lib 1.0.14 with device "hw" i get EINVAL, when ussing alsa-lib 1.0.14 with device "default" i do not get erros (set or get functions)
My alsa.conf is the installation default one.
I think the dafault device on alsa.conf is setting something the salsa-lib does not...
Any help is wellcome...

Fausto Carvalho Marques Silva

#4 lore raw
Quoted 2 lines · Fausto Carvalho Marques SIlva

I think the default device on alsa.conf is setting something the salsa-lib does not...

Yes: When the hardware does not support the sample format requested by the application, the default device automatically converts it.

Regards,
Clemens

#5 lore raw
Quoted 4 lines · Clemens Ladisch

Yes: When the hardware does not support the sample format requested by the application, the default device automatically converts it.

Ok...but is there a way to "correct" this on salsa??

Fausto Carvalho Marques Silva

#6 lore raw

At Fri, 13 Jul 2007 14:19:05 -0300,

Quoted 8 lines · Fausto Carvalho Marques SIlva
Quoted 4 lines · Clemens Ladisch

Yes: When the hardware does not support the sample format requested by the application, the default device automatically converts it.

Ok...but is there a way to "correct" this on salsa??

No. That's how SALSA gets rid of fat from its body. It supports only hw layer of ALSA-lib (e.g. equivalent with aplay -Dhw).

Do appropriate conversions in the application itself.

Takashi