[alsa-devel] Missing 4-channel support on older NVIDIA MCP HW

Raymond Yau superquad.vortex2 at gmail.com
Wed Sep 1 03:54:40 CEST 2010


2010/8/31 Stephen Warren <swarren at nvidia.com>

> Takashi Iwai wrote:
> >
>
> > > Unfortunately, it doesn't look like it's possible for applications to
> query
> > > this information from ALSA, since a hw_params_t exposes just a min/max
> > > channel count rather than a mask.
> >
> > It can be also masked.
>
> Are you saying the APIs already support a mask for channel count, and I
> just
> didn't find it, or that the APIUs should be updated to report a mask?
>
> Thanks.
>
> you can find the examples in intel8x0.c



static unsigned int channels2and8[] = {
    2,  8,
};

static struct snd_pcm_hw_constraint_list hw_constraints_channels2and8 = {
    .count = ARRAY_SIZE(channels2and8),
    .list = channels8,
    .mask = 0,
};

        runtime->hw.channels_max = 8;
        snd_pcm_hw_constraint_list(runtime, 0,
                        SNDRV_PCM_HW_PARAM_CHANNELS,
                        &hw_constraints_channels2and8);



The ALSA application need to snd_pcm_hw_params_test_channels() to find the
supported channel one by one


More information about the Alsa-devel mailing list