Another problem, but with the PCM In group

Hi !

DDK’s info about “ado_mixer_capture_group_create” and mux elements very
poor, I’m don’t understand some args.
Below my invalid code of crteation of PCM in group:

cmpci->me_pcm_capture=ado_mixer_element_io(mixer, SND_MIXER_PCM_IN,
SND_MIXER_ETYPE_INPUT, 0, 2, stereo_voices);

// Using me_vol_pcm from PCM out group is this correct ?
ado_mixer_element_route_add(mixer, cmpci->me_pcm_capture,
cmpci->me_vol_pcm);

// Using sw1 type for PCM Input selector, is this correct ?
cmpci->me_pcm_select=ado_mixer_element_sw1(mixer, “PCM Select”, 2,
snd_cmipci_pcm_input_switch, cmpci, NULL);

ado_mixer_element_route_add(mixer, cmpci->me_vol_pcm, cmpci->me_pcm_select);
ado_mixer_element_route_add(mixer, cmpci->me_pcm_select, cmpci->me_in_accu);

cmpci->pcm_in_grp=ado_mixer_capture_group_create(mixer, SND_MIXER_PCM_IN,
SND_MIXER_CHN_MASK_STEREO, cmpci->me_vol_pcm, cmpci->me_vol_pcm_mute, NULL,
cmpci->me_pcm_select);

What the element must be in the place of first NULL arg (in place of capture
element) in the “ado…capture…group” ? Can I use the vol, mute,
inputswitch args without capture element ?

DDK’s documentation doesn’t secribes mux callbacks at all !

Too many questions :frowning: So no answers …

P.S. Mixer example doesn’t show how to create input selectors. May be you
can open your AC’97 mixer code it would be nice ! It helps to understand
some things …

Mike,
I understand the ac97.so is more or less a ripoff of ALSA ac97.c. Might be
worth looking into it, since objects they operate and even terminology are
pretty close.

“Mike Gorchak” <mike@malva.com.ua> wrote in message
news:a9hkb0$85k$1@inn.qnx.com

Hi !

DDK’s info about “ado_mixer_capture_group_create” and mux elements very
poor, I’m don’t understand some args.
Below my invalid code of crteation of PCM in group:

cmpci->me_pcm_capture=ado_mixer_element_io(mixer, SND_MIXER_PCM_IN,
SND_MIXER_ETYPE_INPUT, 0, 2, stereo_voices);

// Using me_vol_pcm from PCM out group is this correct ?
ado_mixer_element_route_add(mixer, cmpci->me_pcm_capture,
cmpci->me_vol_pcm);

// Using sw1 type for PCM Input selector, is this correct ?
cmpci->me_pcm_select=ado_mixer_element_sw1(mixer, “PCM Select”, 2,
snd_cmipci_pcm_input_switch, cmpci, NULL);

ado_mixer_element_route_add(mixer, cmpci->me_vol_pcm,
cmpci->me_pcm_select);
ado_mixer_element_route_add(mixer, cmpci->me_pcm_select,
cmpci->me_in_accu);

cmpci->pcm_in_grp=ado_mixer_capture_group_create(mixer, SND_MIXER_PCM_IN,
SND_MIXER_CHN_MASK_STEREO, cmpci->me_vol_pcm, cmpci->me_vol_pcm_mute,
NULL,
cmpci->me_pcm_select);

What the element must be in the place of first NULL arg (in place of
capture
element) in the “ado…capture…group” ? Can I use the vol, mute,
inputswitch args without capture element ?

DDK’s documentation doesn’t secribes mux callbacks at all !

Too many questions > :frowning: > So no answers …

P.S. Mixer example doesn’t show how to create input selectors. May be you
can open your AC’97 mixer code it would be nice ! It helps to understand
some things …

Mike,
I understand the ac97.so is more or less a ripoff of ALSA ac97.c. Might be
worth looking into it, since objects they operate and even terminology are
pretty close.

Thanks, but I’m trying to port CMedia PCI (8338, 8738) driver from ALSA
0.5.12, I have no problems except mixer stuff :wink: ALSA uses common groups
(snd_mixer_lib_group_ctrl) but with DDK I’m must use the separated groups
for playback and capture - it is a my main problem.

Why when I may to use sw1 switch for input select, I must use muxX with DDK.
The CMI board allows to use multiple input selectors, but with ddk I must
use huge mux3 element without any helpfull information in ddk documentation

Strange, I was under impression that CMedia has AC97-compliant mixer. Are
you sure they are not? Perhaps the code you’re traying to port is legacy?

“Mike Gorchak” <mike@malva.com.ua> wrote in message
news:a9j5vi$bf0$1@inn.qnx.com

Mike,
I understand the ac97.so is more or less a ripoff of ALSA ac97.c. Might
be
worth looking into it, since objects they operate and even terminology
are
pretty close.

Thanks, but I’m trying to port CMedia PCI (8338, 8738) driver from ALSA
0.5.12, I have no problems except mixer stuff > :wink: > ALSA uses common groups
(snd_mixer_lib_group_ctrl) but with DDK I’m must use the separated groups
for playback and capture - it is a my main problem.

Why when I may to use sw1 switch for input select, I must use muxX with
DDK.
The CMI board allows to use multiple input selectors, but with ddk I must
use huge mux3 element without any helpfull information in ddk
documentation

Strange, I was under impression that CMedia has AC97-compliant mixer. Are
you sure they are not? Perhaps the code you’re traying to port is legacy?

CMedia 8738 and 8338 has SB16 compatible mixer, if you not sure, see the
sources
:wink: I was under this imression too, until see the sources :wink:

I understand the ac97.so is more or less a ripoff of ALSA ac97.c.
Might
be
worth looking into it, since objects they operate and even terminology
are
pretty close.

Thanks, but I’m trying to port CMedia PCI (8338, 8738) driver from ALSA
0.5.12, I have no problems except mixer stuff > :wink: > ALSA uses common
groups
(snd_mixer_lib_group_ctrl) but with DDK I’m must use the separated
groups
for playback and capture - it is a my main problem.

Why when I may to use sw1 switch for input select, I must use muxX with
DDK.
The CMI board allows to use multiple input selectors, but with ddk I
must
use huge mux3 element without any helpfull information in ddk
documentation