Another problem, but with the PCM In group

bridged with qdn.public.ddk.audio
Post Reply
Mike Gorchak

Another problem, but with the PCM In group

Post by Mike Gorchak » Tue Apr 16, 2002 4:51 pm

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 :-( 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 ...

Igor Kovalenko

Re: Another problem, but with the PCM In group

Post by Igor Kovalenko » Wed Apr 17, 2002 6:43 am

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 :-( 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 Gorchak

Re: Another problem, but with the PCM In group

Post by Mike Gorchak » Wed Apr 17, 2002 6:59 am

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 ;-) 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
....

Igor Kovalenko

Re: Another problem, but with the PCM In group

Post by Igor Kovalenko » Wed Apr 17, 2002 5:40 pm

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 ;-) 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
...


Mike Gorchak

Re: Another problem, but with the PCM In group

Post by Mike Gorchak » Thu Apr 18, 2002 5:28 am

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
;-) I was under this imression too, until see the sources ;-)
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 ;-) 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
...

Post Reply

Return to “qdn.public.ddk.audio”