Oss mixer emulation
A quick question, as I'm tired of reading source:
I can adjust the volume of my driver with either alsamixer or aumix.
Using the OSS output plugin for XMMS, however, the volume control on XMMS has no effect.
Besides trading XMMS for Alsaplayer, what can I do to fix this? The same setup works fine with my AWE32. (I referred to the sb_mixer code when adding the volume control)
Does the OSS mixer emulation look for the first control to emulate as master volume? Else, how does it choose?
Regards,
Mark
-------------------------------------------------------
This sf.net email is sponsored by: OSDN - Tired of that same old cell phone? Get a new here for FREE!
https://www.inphonic.com/r.asp?r=sourceforge1&refcode1=vs3390
Quoted 7 lines · Mark Rages
A quick question, as I'm tired of reading source:
I can adjust the volume of my driver with either alsamixer or aumix.
Using the OSS output plugin for XMMS, however, the volume control on XMMS has no effect.
Quoted 6 lines
Besides trading XMMS for Alsaplayer, what can I do to fix this? The same setup works fine with my AWE32. (I referred to the
sb_mixercode when adding the volume control)Does the OSS mixer emulation look for the first control to emulate as master volume? Else, how does it choose?
Following up:
This card has two stereo PCM outputs.
After a little experimentation, I find that if I name one mixer "PCM" and the other "Master" I get the desired operation.
However, I want them to show as "PCM 1+2" and "PCM 3+4" in alsamixer etc.
Is there some way to hint the alsa oss mixer emulation code?
Also, I have code like this (borrowed from sb_mixer.c):
static snd_kcontrol_new_t snd_wave4_controls_double[] = {
{ iface: SNDRV_CTL_ELEM_IFACE_MIXER,
name: "PCM",
info: snd_wave4_mixer_info_double,
get: snd_wave4_mixer_get_double,
put: snd_wave4_mixer_put_double,
private_value: 0
},
{ iface: SNDRV_CTL_ELEM_IFACE_MIXER,
name: "Master",
info: snd_wave4_mixer_info_double,
get: snd_wave4_mixer_get_double,
put: snd_wave4_mixer_put_double,
private_value: 1 }
};
static int snd_wave4_mixer_init_double(wave4_t *wave4, char *name) {
int i, err;
for (i = 0; i < 2; i++) {
if ((err = snd_ctl_add(wave4->card,
snd_ctl_new1(&snd_wave4_controls_double[i],
wave4))) < 0)
return err;}
snd_component_add(wave4->card, name); strcpy(wave4->card->mixername, name);
return 0;
}
So what are all these names? Can I use different names to get what I want?
- The one in snd_kcontrol_t
- the one passed to snd_component_add
- the one in card->mixername
Regards,
Mark
-------------------------------------------------------
This sf.net email is sponsored by: OSDN - Tired of that same old cell phone? Get a new here for FREE!
https://www.inphonic.com/r.asp?r=sourceforge1&refcode1=vs3390
At Sat, 24 Aug 2002 03:41:56 -0500,
Quoted 16 lines · Mark Rages
Quoted 7 lines · Mark Rages
A quick question, as I'm tired of reading source:
I can adjust the volume of my driver with either alsamixer or aumix.
Using the OSS output plugin for XMMS, however, the volume control on XMMS has no effect.
Quoted 6 lines
Besides trading XMMS for Alsaplayer, what can I do to fix this? The same setup works fine with my AWE32. (I referred to the
sb_mixercode when adding the volume control)Does the OSS mixer emulation look for the first control to emulate as master volume? Else, how does it choose?
Quoted 8 lines
Following up:
This card has two stereo PCM outputs.
After a little experimentation, I find that if I name one mixer "PCM" and the other "Master" I get the desired operation.
However, I want them to show as "PCM 1+2" and "PCM 3+4" in alsamixer etc.
you can use the different indices for the same control name. this is the common case.
Quoted 1 line
Is there some way to hint the alsa oss mixer emulation code?
so far, no. i'm thinking of adding it, too...
on the current cvs code, you can change this mapping via proc file. (please see my recent post)
Quoted 29 lines
Also, I have code like this (borrowed from
sb_mixer.c):static
snd_kcontrol_new_tsnd_wave4_controls_double[] = {
{ iface:SNDRV_CTL_ELEM_IFACE_MIXER,name: "PCM", info: snd_wave4_mixer_info_double, get: snd_wave4_mixer_get_double, put: snd_wave4_mixer_put_double, private_value: 0 }, { iface: SNDRV_CTL_ELEM_IFACE_MIXER, name: "Master", info: snd_wave4_mixer_info_double, get: snd_wave4_mixer_get_double, put: snd_wave4_mixer_put_double, private_value: 1}
};static int
snd_wave4_mixer_init_double(wave4_t *wave4, char *name){
int i, err;for (i = 0; i < 2; i++) { if ((err = snd_ctl_add(wave4->card, snd_ctl_new1(&snd_wave4_controls_double[i], wave4))) < 0) return err;}
Quoted 8 lines
snd_component_add(wave4->card, name); strcpy(wave4->card->mixername, name);return 0;
}So what are all these names? Can I use different names to get what I want?
- The one insnd_kcontrol_t
this appears as a control (e.g. mixer) element.
Quoted 1 line
- the one passed to
snd_component_add
this is used to check the validity of components when a card consists of sevaral different parts.
you can use a unique string id for each part. for example, ac97 codec adds a component "AC97".
Quoted 1 line
- the one in
card->mixername
the name of mixer chip.
inquired via snd_ctl_card_info_get_mixername() in alsa-lib api.
Takashi
-------------------------------------------------------
This sf.net email is sponsored by: OSDN - Tired of that same old cell phone? Get a new here for FREE!
https://www.inphonic.com/r.asp?r=sourceforge1&refcode1=vs3390