[HTC Rezound] dlumberg:
So I noticed in AudioHardware.cpp inside

AudioHardware::setVoiceVolume

that the

ALOGV("msm_set_voice_rx_vol(%d) succeeded session_id %d",vol,session_id);

line never gets called. With our LEGACY_QCOM_VOICE board this means that msm_set_voice_rx_vol(vol) is never actually returning and then it's reverting back to the headset before it reinits the BT device and route...

Line 1576

int vol = lrint(v * 100.0);
// Voice volume levels from android are mapped to driver volume levels as follows.
// 0 -> 5, 20 -> 4, 40 ->3, 60 -> 2, 80 -> 1, 100 -> 0
vol = 5 - (vol/20);
ALOGD("setVoiceVolume(%f)\n", v);
ALOGI("Setting in-call volume to %d (available range is 5(MIN VOLUME) to 0(MAX VOLUME)\n", vol);

#ifdef LEGACY_QCOM_VOICE
if (msm_set_voice_rx_vol(vol)) {
ALOGE("msm_set_voice_rx_vol(%d) failed errno = %d", vol, errno);
return -1;
}
#else
if(msm_set_voice_rx_vol_ext(vol,session_id)) {
ALOGE("msm_set_voice_rx_vol(%d) failed errno = %d",vol,errno);
return -1;
}
#endif
ALOGV("msm_set_voice_rx_vol(%d) succeeded session_id %d",vol,session_id);
return NO_ERROR;
}

This was a logcat from forcing the VGS volume to 2, no NRec/EC and adding the extra pyramid audio_data.c file but the setVoiceVolume stuff is the same regardless of what changes are made(as are the results :( ). Notice that it doesn't enter the log entry for the headset either...

D/AudioHardwareMSM8660( 141): setVoiceVolume(1.000000)
I/AudioHardwareMSM8660( 141): Setting in-call volume to 2 (available range is 5(MIN VOLUME) to 0(MAX VOLUME)
I/Bluetooth HeadsetBase( 582): Error processing <AT+VGS=16>
D/Sensors ( 360): Enabling Proximity Sensor..., mEnabled = 1, new state = 0
D/Sensors ( 360): Enabling Proximity Sensor..., mEnabled = 0
I/AudioHardwareMSM8660( 141): Routing audio to Bluetooth PCM
I/AudioHardwareMSM8660( 141): Routing audio to Bluetooth PCM
E/AudioHardwareMSM8660( 141): write(): dec_id = 1 cur_rx = 17
E/AudioHardwareMSM8660( 141): cur_rx for pcm playback = 17
E/AudioHardwareMSM8660( 141): value of device and enable is 17 1 ALSA dev id:37
D/ACDB-LOADER( 141): ACDB -> send_audio_cal, acdb_id = 22, path = 0
D/ACDB-LOADER( 141): ACDB -> send_audtable
D/ACDB-LOADER( 141): ACDB -> ACDB_CMD_GET_AUDPROC_COMMON_TABLE
D/ACDB-LOADER( 141): ACDB -> AUDIO_SET_AUDPROC_CAL
D/ACDB-LOADER( 141): ACDB -> send_audvoltable
D/ACDB-LOADER( 141): ACDB -> ACDB_CMD_GET_AUDPROC_GAIN_DEP_VOLTBL_STEP_COPP
D/ACDB-LOADER( 141): ACDB -> AUDIO_SET_AUDPROC_VOL_CAL
D/AudioHardwareMSM8660( 141): addToTable stream 1
I/AudioHardwareMSM8660( 141): Routing audio to Bluetooth PCM
D/AudioHardwareMSM8660( 141): AudioStreamOutMSM8x60::standby()
D/AudioHardwareMSM8660( 141): Deroute pcm stream
D/AudioHardwareMSM8660( 141): deleteFromTable stream 1
W/ThrottleService( 360): unable to find stats for iface rmnet0
D/lights ( 360): set_light_buttons_func: on=0 brightness=0
D/lights ( 360): set_light_buttons_func: on=9408399 brightness=143
D/InCallScreen( 582): internalHangup()... phone state = OFFHOOK
D/PhoneUtils( 582): hangup(): hanging up foreground call
D/PhoneUtils( 582): - hangup(Call): regular hangup()...
D/Bluetooth HS/HF( 582): CDMA call state: SINGLE_ACTIVE prev state:IDLE
E/AudioHardwareMSM8660( 141): write(): dec_id = 1 cur_rx = 17
E/AudioHardwareMSM8660( 141): cur_rx for pcm playback = 17
E/AudioHardwareMSM8660( 141): value of device and enable is 17 1 ALSA dev id:37
D/ACDB-LOADER( 141): ACDB -> send_audio_cal, acdb_id = 22, path = 0
D/ACDB-LOADER( 141): ACDB -> send_audtable
D/ACDB-LOADER( 141): ACDB -> ACDB_CMD_GET_AUDPROC_COMMON_TABLE
D/ACDB-LOADER( 141): ACDB -> AUDIO_SET_AUDPROC_CAL
D/ACDB-LOADER( 141): ACDB -> send_audvoltable
D/ACDB-LOADER( 141): ACDB -> ACDB_CMD_GET_AUDPROC_GAIN_DEP_VOLTBL_STEP_COPP
D/ACDB-LOADER( 141): ACDB -> AUDIO_SET_AUDPROC_VOL_CAL
D/AudioHardwareMSM8660( 141): addToTable stream 1
D/Bluetooth HS/HF( 582): CDMA call state: SINGLE_ACTIVE prev state:IDLE
D/CallNotifier( 582): onDisconnect: cause = LOCAL, incoming = false, date = 1358225466276
D/CallNotifier( 582): SignalInfoTonePlayer.run(toneId = 98)...
I/PowerManagerService( 360): clearUserActivity for 10000ms from now
D/CallNotifier( 582): InCallTonePlayer.run(toneId = 4)...
I/BATT_vigor( 181): Vigor_get_batt_index adc_battid: 1012, vref: 14881
I/BATT_vigor( 181): Vigor_get_batt_index adc_battid: 1012, vref: 14881
I/BATT_ALG( 181): charging time: 0
I/BATT_ALG( 181): batt_alg_overtemp_check:temp:334, isOver_temp:0
I/BATT_ALG( 181): set_battery_voltage_alarm level=63, alarm_config=25, batt_alarm_config=25
I/BATT_ALG( 181): vol=3858;curr=-241;dis_curr=0;temp=334;id=2;level=63;chg_src=1;chg_en=1;isOver_temp=0;timer=60;safety_count=0
I/ActivityManager( 360): START {cmp=com.android.contacts/.activities.DialtactsActivity u=0} from pid 582
I/AudioHardwareMSM8660( 141): Routing audio to Handset
D/AudioHardwareMSM8660( 141): setVoiceVolume(1.000000)
I/AudioHardwareMSM8660( 141): Setting in-call volume to 2 (available range is 5(MIN VOLUME) to 0(MAX VOLUME)
D/AudioHardwareMSM8660( 141): new_rx = 0
D/AudioHardwareMSM8660( 141): new_tx = 1
D/AudioHardwareMSM8660( 141): updateDeviceInfo() called for default case
D/AudioHardwareMSM8660( 141): updateDeviceInfo: E
D/AudioHardwareMSM8660( 141): case VOICE_CALL/VOIP CALL 3
D/AudioHardwareMSM8660( 141): acdb_loader_send_voice_cal acdb_rx = 7, acdb_tx = 4
D/ACDB-LOADER( 141): ACDB -> send_voice_cal, acdb_rx = 7, acdb_tx = 4
D/ACDB-LOADER( 141): ACDB -> ACDB_CMD_GET_AFE_DATA
D/ACDB-LOADER( 141): ACDB -> AUDIO_SET_SIDETONE_CAL
D/ACDB-LOADER( 141): ACDB -> ACDB_CMD_GET_VOCPROC_COMMON_TABLE
D/ACDB ( 141): ACDBDATA_GET_VOC_PROC_CMN_LOOKUP_KEY (0)
D/ACDB ( 141): ACDBDATA_GET_VOC_PROC_CMN_LOOKUP_KEY (0)
D/ACDB-LOADER( 141): ACDB -> ACDB_CMD_GET_VOCPROC_COMMON_TABLE
D/ACDB ( 141): ACDBDATA_GET_VOC_PROC_CMN_LOOKUP_KEY (0)
D/ACDB ( 141): ACDBDATA_GET_VOC_PROC_CMN_LOOKUP_KEY (0)
D/ACDB-LOADER( 141): ACDB -> ACDB_CMD_GET_VOCPROC_COMMON_TABLE
D/ACDB ( 141): ACDBDATA_GET_VOC_PROC_CMN_LOOKUP_KEY (0)
D/ACDB ( 141): ACDBDATA_GET_VOC_PROC_CMN_LOOKUP_KEY (0)
D/ACDB-LOADER( 141): ACDB -> ACDB_CMD_GET_VOCPROC_COMMON_TABLE
D/ACDB ( 141): ACDBDATA_GET_VOC_PROC_CMN_LOOKUP_KEY (0)
D/ACDB ( 141): ACDBDATA_GET_VOC_PROC_CMN_LOOKUP_KEY (0)
D/ACDB-LOADER( 141): ACDB -> ACDB_CMD_GET_VOCPROC_COMMON_TABLE
D/ACDB ( 141): ACDBDATA_GET_VOC_PROC_CMN_LOOKUP_KEY (0)
D/ACDB ( 141): ACDBDATA_GET_VOC_PROC_CMN_LOOKUP_KEY (0)
D/ACDB-LOADER( 141): ACDB -> ACDB_CMD_GET_VOCPROC_COMMON_TABLE
D/ACDB ( 141): ACDBDATA_GET_VOC_PROC_CMN_LOOKUP_KEY (0)
D/ACDB ( 141): ACDBDATA_GET_VOC_PROC_CMN_LOOKUP_KEY (0)
D/ACDB-LOADER( 141): ACDB -> AUDIO_SET_VOCPROC_CAL
D/ACDB-LOADER( 141): ACDB -> ACDB_CMD_GET_VOCPROC_STREAM_TABLE
D/ACDB-LOADER( 141): ACDB -> ACDB_CMD_GET_VOCPROC_STREAM_TABLE
D/ACDB-LOADER( 141): ACDB -> ACDB_CMD_GET_VOCPROC_STREAM_TABLE
D/ACDB-LOADER( 141): ACDB -> ACDB_CMD_GET_VOCPROC_STREAM_TABLE
D/ACDB-LOADER( 141): ACDB -> ACDB_CMD_GET_VOCPROC_STREAM_TABLE
D/ACDB-LOADER( 141): ACDB -> ACDB_CMD_GET_VOCPROC_STREAM_TABLE
D/ACDB-LOADER( 141): ACDB -> AUDIO_SET_VOCPROC_STREAM_CAL
D/ACDB-LOADER( 141): ACDB -> ACDB_CMD_GET_VOCPROC_GAIN_DEP_VOLTBL
D/ACDB-LOADER( 141): ACDB -> ACDB_CMD_GET_VOCPROC_GAIN_DEP_VOLTBL
D/ACDB-LOADER( 141): ACDB -> ACDB_CMD_GET_VOCPROC_GAIN_DEP_VOLTBL
D/ACDB-LOADER( 141): ACDB -> ACDB_CMD_GET_VOCPROC_GAIN_DEP_VOLTBL
D/ACDB-LOADER( 141): ACDB -> ACDB_CMD_GET_VOCPROC_GAIN_DEP_VOLTBL
D/ACDB-LOADER( 141): ACDB -> ACDB_CMD_GET_VOCPROC_GAIN_DEP_VOLTBL
D/ACDB-LOADER( 141): ACDB -> AUDIO_SET_VOCPROC_VOL_CAL
D/ACDB-LOADER( 141): ACDB -> Sent VocProc Cal!
E/AudioHardwareMSM8660( 141): value of device and enable is 17 0 ALSA dev id:37
E/AudioHardwareMSM8660( 141): value of device and enable is 18 0 ALSA dev id:38
D/Bluetooth HSHFP( 582): AudioStateIntent: 88:9F:FA:F6:D0:1E State: 10 PrevState: 12
E/AudioHardwareMSM8660( 141): value of device and enable is 0 1 ALSA dev id:0
I/ActivityManager( 360): moveTaskToBack: 5
E/AudioHardwareMSM8660( 141): value of device and enable is 1 1 ALSA dev id:1
D/AudioHardwareMSM8660( 141): The node type is 1
E/AudioHardwareMSM8660( 141): value of device and enable is 17 0 ALSA dev id:37
D/dalvikvm( 360): GC_CONCURRENT freed 733K, 28% free 8838K/12167K, paused 3ms+4ms, total 56ms
D/dalvikvm( 360): WAIT_FOR_CONCURRENT_GC blocked 45ms
D/dalvikvm( 360): WAIT_FOR_CONCURRENT_GC blocked 44ms
D/AudioHardwareMSM8660( 141): updateDeviceInfo: X
D/AudioHardwareMSM8660( 141): setVoiceVolume(0.800000)
I/AudioHardwareMSM8660( 141): Setting in-call volume to 2 (available range is 5(MIN VOLUME) to 0(MAX VOLUME)
D/AudioHardwareInterface( 141): setMode(NORMAL)
I/AudioHardwareMSM8660( 141): Routing audio to Handset
D/AudioHardwareMSM8660( 141): new_rx = 0
D/AudioHardwareMSM8660( 141): new_tx = 1
D/AudioHardwareMSM8660( 141): Ending Voice call
E/AudioHardwareMSM8660( 141): value of device and enable is 0 0 ALSA dev id:0
E/AudioHardwareMSM8660( 141): value of device and enable is 1 0 ALSA dev id:1
D/AudioHardwareMSM8660( 141): deleteFromTable stream 3
D/AudioHardwareMSM8660( 141): updateDeviceInfo: E
D/AudioHardwareMSM8660( 141): The node type is 1
E/AudioHardwareMSM8660( 141): value of device and enable is 0 1 ALSA dev id:0
D/ACDB-LOADER( 141): ACDB -> send_audio_cal, acdb_id = 7, path = 0
D/ACDB-LOADER( 141): ACDB -> send_audtable
D/ACDB-LOADER( 141): ACDB -> ACDB_CMD_GET_AUDPROC_COMMON_TABLE
D/ACDB-LOADER( 141): ACDB -> AUDIO_SET_AUDPROC_CAL
D/ACDB-LOADER( 141): ACDB -> send_audvoltable
D/ACDB-LOADER( 141): ACDB -> ACDB_CMD_GET_AUDPROC_GAIN_DEP_VOLTBL_STEP_COPP
D/ACDB-LOADER( 141): ACDB -> AUDIO_SET_AUDPROC_VOL_CAL
D/AudioHardwareMSM8660( 141): updateDeviceInfo: X

Next stop: kernel land to see why it's not returning...