>Hello, > >Could you write such code? >Anyway, open an issue for this bug, please: >http://track.sipfoundry.org/
Yes I can. My sound card is ALC 885. The mixer with id 0 which is used by default in MpCodec_setGain(int level) contains a Mic/Line In which strangely doesnt have dwComponentType == MIXERLINE_COMPONENTTYPE_SRC_MICROPHONE (mixerGetLineInfo resulted with error - invalid parameters MMSYSERR_INVALPARAM) but dwComponentType = MIXERLINE_COMPONENTTYPE_SRC_ANALOG (so mic looks like "analog"). If I changed the component type in MpCodec_setGain to SRC_ANALOG then it would set the gain for this line. Unfortunately, setting gain for this line doesn't have an affect on the recording mic gain. I have tested it using microsoft sound recorder. I have to set mic gain for the mic in the mixer with id 1 (the first mixer is output, 2nd is for input), then microsoft sound recorder confirms that the gain is really changing. The problem is, that while in the mixer 0, mic can be found as MIXERLINE_COMPONENTTYPE_SRC_ANALOG, in mixer 1, there are 2 lines with this type - "Stereo mix" and "mic/line in". If you specify component type as MIXERLINE_COMPONENTTYPE_SRC_ANALOG and call mixerGetLineInfo for mixer 1, you get the "stereo mix" not the mic by default. You can gain access to the mic, but you have no way of knowing it is really the mic and not the "stereo mix". Currently the only way of setting mic gain is to set gain for both "stereo mix" and "mic/line in" if we want to find mic by component type. I have found out that on this sound card dwLineID for mic on mixer 1 is 131072. This way mic can be located. Unfortunately this id is unique for each mixer device and can be different for each soundcard. I will create a ticket for this. I can write a patch for this, but I will try different driver first. If the new driver doesn't fix the problem described here with mixer 1, then I think we will have to detect type of soundcard and use the specified mixer id (1) and lineid (131072) for setting mic gain. We cant change gain for both "stereo mix" and "mic/line in". Jaro _______________________________________________ sipxtapi-dev mailing list [email protected] List Archive: http://list.sipfoundry.org/archive/sipxtapi-dev/
