ARTICLE AD BOX
I have tried Android audio manager to handle echo without joy. I have tried linphone core.config.setFloat("sound","echocancellation... without joy. I have been trying to adjust the gain on the microphone to .01f and nothing changes. I can turn the mic off, but can't seem to change the gain. I have put the code under a "streams_running" block so it will function when a call starts. Should I try another tactic? Is there a hardware override I am missing? I am using Android 34, with a new Android v14 tablet. I have been using Gemini in the SDK, but they have throttled it so much I not longer get useful suggestions. Linphone version 5.4.5. Tablet is a Hotwav R8 Android 14 with 4GB ram, Unisoc Octa-Core chipset.
TESTING: Place a call from the tablet, mute the called party. Stand 10 feet away and the mic on the tablet still picks up the voice. No change in volume at the called party. If I mute the mic, there is no echo, and no sound sent to the called party. If I unmute and place a call, with the called party 30 ft. away, with no chance of tablet picking up the sound, the called party gets an echo. There are no errors in the logcat, and the log shows the message in "streamsrunning", but the mic has not changed gain.
I taped over both microphones ( one on the top and one near the speakers on the right side) and the speakers next to one of the mics, with no effect. So, it seems to me once of the echo cancellations is actually echoing. Or, could the echo be on the SIP server or the VOIP server? With the tape on the mics, the called party hears nothing from the tablet, but the echo remains. With the tape on, the called party device when held near the tablet still goes into a feedback loop. Any other test I should try?
I can bite the bullet and acquire another tablet, but this is custom software for access entry and I already spent 3 months building and tweaking for this hardware.
I really expect there is a software solution. Yes?
fun start /\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\ // --- THE FIX FOR MANUAL GAIN CONTROL --- // We MUST disable system processing for the 'mic_gain' config to be respected. config.setBool("sound", "android_audio_processing_allowed", false) // Because we disabled hardware processing, we enable Linphone's software AEC config.setBool("sound", "echo_cancellation", true) config.setBool("sound", "echo_limiter", true) // Now the 0.01 setting will actually be applied by the SDK's software mixer config.setBool("sound", "agc", false) config.setFloat("sound", "mic_gain", 0.01f) config.setFloat("sound", "playback_gain", 1.0f) config.setString("sound", "audio_backend", "opensles") config.setInt("sound", "android_stream", 0) /\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\ Call.State.StreamsRunning -> { _callState.value = CallStatus.Connected audioManager.mode = AudioManager.MODE_IN_COMMUNICATION setSpeakerphoneOn(audioManager, true) val maxVol = audioManager.getStreamMaxVolume(AudioManager.STREAM_VOICE_CALL) core.activateAudioSession(true) //linphone core.isMicEnabled = true //linphone core.config.setFloat("sound", "echo_cancellation", 1f)//linphone core.config.setFloat("sound", "mic_gain", 0.01f)//linphone Log.i("[SipCallManager]", "Call connected. Software AEC and 0.01 Mic Gain forced.") }