[Galaxy S III General] peramikic:
I finished my audio problem test and collected logs (attached on the bottom) during each stage that i identified as break-fix points. There are five logs and the indicate 4 skype calls to echo service and 1 cell call. the order of calls (logs) is such

boot > first > second > call > third > fourth

Observed behavior:

First - no mic audio

Second - mic works as expected

Call - mic works as expected

Third - no mic audio

Fourth - mic works as expected

I concentrated on audio_hw events in the logs and observerd following difference between 1st and 2nd calls.

In first call we note the underlined value of input device going from value 4 to 4 as well as last 2 lines where builtin mic is selected

09-23 22:37:54.509 D/audio_hw_primary( 1908): select_output_device: AUDIO_DEVICE_OUT_SPEAKER
09-23 22:37:54.844 D/audio_hw_primary( 1908): select_output_device: AUDIO_DEVICE_OUT_EARPIECE
09-23 22:37:54.844 V/audio_hw_primary( 1908): Changing output device 2 => 1
[B][U]09-23 22:37:54.844 V/audio_hw_primary( 1908): Changing input device 4 => 4[/U][/B]
09-23 22:37:54.854 V/audio_hw_primary( 1908): Set 'RCV Switch'.0 to 1
09-23 22:37:54.854 V/audio_hw_primary( 1908): Set 'AIF1DAC1 Volume'.0 to 96
09-23 22:37:54.854 V/audio_hw_primary( 1908): Set 'AIF1DAC1 Volume'.1 to 96
09-23 22:37:54.854 V/audio_hw_primary( 1908): Set 'AIF1 Boost Volume'.0 to 0
09-23 22:37:54.854 V/audio_hw_primary( 1908): Set 'DAC1 Volume'.0 to 96
09-23 22:37:54.854 V/audio_hw_primary( 1908): Set 'DAC1 Volume'.1 to 96
09-23 22:37:54.854 V/audio_hw_primary( 1908): Set 'Left Output Mixer DAC Volume'.0 to 7
09-23 22:37:54.854 V/audio_hw_primary( 1908): Set 'Right Output Mixer DAC Volume'.0 to 7
09-23 22:37:54.854 V/audio_hw_primary( 1908): Set 'Output Volume'.0 to 57
09-23 22:37:54.854 V/audio_hw_primary( 1908): Set 'Output Volume'.1 to 57
09-23 22:37:54.854 V/audio_hw_primary( 1908): Set 'Earpiece Volume'.0 to 1
09-23 22:37:54.854 V/audio_hw_primary( 1908): Set 'Speaker Mixer Volume'.0 to 1
09-23 22:37:54.854 V/audio_hw_primary( 1908): Set 'Speaker Mixer Volume'.1 to 1
09-23 22:37:54.859 V/audio_hw_primary( 1908): Set 'SPK Switch'.0 to 0
09-23 22:37:54.859 V/audio_hw_primary( 1908): Set 'AIF1DAC1 Volume'.0 to 96
09-23 22:37:54.859 V/audio_hw_primary( 1908): Set 'AIF1DAC1 Volume'.1 to 96
09-23 22:37:54.859 V/audio_hw_primary( 1908): Set 'AIF1 Boost Volume'.0 to 0
09-23 22:37:54.859 V/audio_hw_primary( 1908): Set 'DAC1 Volume'.0 to 96
09-23 22:37:54.859 V/audio_hw_primary( 1908): Set 'DAC1 Volume'.1 to 96
09-23 22:37:54.859 V/audio_hw_primary( 1908): Set 'SPKL DAC1 Volume'.0 to 1
09-23 22:37:54.859 V/audio_hw_primary( 1908): Set 'SPKR DAC1 Volume'.0 to 1
09-23 22:37:54.859 V/audio_hw_primary( 1908): Set 'Speaker Mixer Volume'.0 to 0
09-23 22:37:54.859 V/audio_hw_primary( 1908): Set 'Speaker Mixer Volume'.1 to 0
09-23 22:37:54.864 V/audio_hw_primary( 1908): Set 'Speaker Volume'.0 to 0
09-23 22:37:54.864 V/audio_hw_primary( 1908): Set 'Speaker Volume'.1 to 0
09-23 22:37:54.864 V/audio_hw_primary( 1908): Set 'Speaker Boost Volume'.0 to 0
09-23 22:37:54.864 V/audio_hw_primary( 1908): Set 'Speaker Boost Volume'.1 to 0
09-23 22:37:54.864 V/audio_hw_primary( 1908): Set 'AIF1DAC1 EQ Switch'.0 to 0
[B]09-23 22:37:58.109 D/audio_hw_primary( 1908): select_input_device: AUDIO_DEVICE_IN_BUILTIN_MIC
09-23 22:37:58.109 V/audio_hw_primary( 1908): get_next_buffer: read_buf 0x40c49008 extended to 4096 bytes[/B]

Comparing with second call we can observer to things:

- The "Changing input value" now goes from 0 to 0 and

- There is a whole additional set of audio events after selecting Builtin mic where the mic (IN1L) is switched on and the gain is set from 0 to 22

09-23 22:40:38.044 D/audio_hw_primary( 1908): select_output_device: AUDIO_DEVICE_OUT_EARPIECE
09-23 22:40:38.044 V/audio_hw_primary( 1908): Changing output device 2 => 1
[B][U]09-23 22:40:38.044 V/audio_hw_primary( 1908): Changing input device 0 => 0[/U][/B]
09-23 22:40:38.049 V/audio_hw_primary( 1908): Set 'RCV Switch'.0 to 1
09-23 22:40:38.049 V/audio_hw_primary( 1908): Set 'AIF1DAC1 Volume'.0 to 96
09-23 22:40:38.049 V/audio_hw_primary( 1908): Set 'AIF1DAC1 Volume'.1 to 96
09-23 22:40:38.049 V/audio_hw_primary( 1908): Set 'AIF1 Boost Volume'.0 to 0
09-23 22:40:38.049 V/audio_hw_primary( 1908): Set 'DAC1 Volume'.0 to 96
09-23 22:40:38.049 V/audio_hw_primary( 1908): Set 'DAC1 Volume'.1 to 96
09-23 22:40:38.049 V/audio_hw_primary( 1908): Set 'Left Output Mixer DAC Volume'.0 to 7
09-23 22:40:38.049 V/audio_hw_primary( 1908): Set 'Right Output Mixer DAC Volume'.0 to 7
09-23 22:40:38.049 V/audio_hw_primary( 1908): Set 'Output Volume'.0 to 57
09-23 22:40:38.049 V/audio_hw_primary( 1908): Set 'Output Volume'.1 to 57
09-23 22:40:38.049 V/audio_hw_primary( 1908): Set 'Earpiece Volume'.0 to 1
09-23 22:40:38.049 V/audio_hw_primary( 1908): Set 'Speaker Mixer Volume'.0 to 1
09-23 22:40:38.049 V/audio_hw_primary( 1908): Set 'Speaker Mixer Volume'.1 to 1
09-23 22:40:38.054 V/audio_hw_primary( 1908): Set 'SPK Switch'.0 to 0
09-23 22:40:38.054 V/audio_hw_primary( 1908): Set 'AIF1DAC1 Volume'.0 to 96
09-23 22:40:38.054 V/audio_hw_primary( 1908): Set 'AIF1DAC1 Volume'.1 to 96
09-23 22:40:38.054 V/audio_hw_primary( 1908): Set 'AIF1 Boost Volume'.0 to 0
09-23 22:40:38.054 V/audio_hw_primary( 1908): Set 'DAC1 Volume'.0 to 96
09-23 22:40:38.054 V/audio_hw_primary( 1908): Set 'DAC1 Volume'.1 to 96
09-23 22:40:38.059 V/audio_hw_primary( 1908): Set 'SPKL DAC1 Volume'.0 to 1
09-23 22:40:38.059 V/audio_hw_primary( 1908): Set 'SPKR DAC1 Volume'.0 to 1
09-23 22:40:38.059 V/audio_hw_primary( 1908): Set 'Speaker Mixer Volume'.0 to 0
09-23 22:40:38.059 V/audio_hw_primary( 1908): Set 'Speaker Mixer Volume'.1 to 0
09-23 22:40:38.059 V/audio_hw_primary( 1908): Set 'Speaker Volume'.0 to 0
09-23 22:40:38.059 V/audio_hw_primary( 1908): Set 'Speaker Volume'.1 to 0
09-23 22:40:38.059 V/audio_hw_primary( 1908): Set 'Speaker Boost Volume'.0 to 0
09-23 22:40:38.059 V/audio_hw_primary( 1908): Set 'Speaker Boost Volume'.1 to 0
09-23 22:40:38.059 V/audio_hw_primary( 1908): Set 'AIF1DAC1 EQ Switch'.0 to 0
[B]09-23 22:40:38.079 D/audio_hw_primary( 1908): select_output_device: AUDIO_DEVICE_OUT_EARPIECE
09-23 22:40:40.164 D/audio_hw_primary( 1908): select_input_device: AUDIO_DEVICE_IN_BUILTIN_MIC
09-23 22:40:40.164 V/audio_hw_primary( 1908): Changing output device 1 => 1
09-23 22:40:40.164 V/audio_hw_primary( 1908): Changing input device 0 => 4
09-23 22:40:40.249 V/audio_hw_primary( 1908): Set 'HP Switch'.0 to 1
09-23 22:40:40.249 V/audio_hw_primary( 1908): Set 'Headphone Volume'.0 to 60
09-23 22:40:40.249 V/audio_hw_primary( 1908): Set 'Headphone Volume'.1 to 60
09-23 22:40:40.249 V/audio_hw_primary( 1908): Set 'Headphone ZC Switch'.0 to 0
09-23 22:40:40.249 V/audio_hw_primary( 1908): Set 'Headphone ZC Switch'.1 to 0
09-23 22:40:40.249 V/audio_hw_primary( 1908): Set 'AIF1DAC1 Volume'.0 to 96
09-23 22:40:40.249 V/audio_hw_primary( 1908): Set 'AIF1DAC1 Volume'.1 to 96
09-23 22:40:40.249 V/audio_hw_primary( 1908): Set 'AIF1 Boost Volume'.0 to 0
09-23 22:40:40.249 V/audio_hw_primary( 1908): Set 'DAC1 Volume'.0 to 96
09-23 22:40:40.249 V/audio_hw_primary( 1908): Set 'DAC1 Volume'.1 to 96
09-23 22:40:40.249 V/audio_hw_primary( 1908): Set 'Left Output Mixer DAC Volume'.0 to 7
09-23 22:40:40.249 V/audio_hw_primary( 1908): Set 'Right Output Mixer DAC Volume'.0 to 7
09-23 22:40:40.249 V/audio_hw_primary( 1908): Set 'AIF1DAC1 EQ Switch'.0 to 1
09-23 22:40:40.249 V/audio_hw_primary( 1908): Set 'AIF1DAC1 EQ1 Volume'.0 to 16
09-23 22:40:40.254 V/audio_hw_primary( 1908): Set 'AIF1DAC1 EQ2 Volume'.0 to 14
09-23 22:40:40.254 V/audio_hw_primary( 1908): Set 'AIF1DAC1 EQ3 Volume'.0 to 12
09-23 22:40:40.254 V/audio_hw_primary( 1908): Set 'AIF1DAC1 EQ4 Volume'.0 to 14
09-23 22:40:40.254 V/audio_hw_primary( 1908): Set 'AIF1DAC1 EQ5 Volume'.0 to 16
09-23 22:40:40.259 V/audio_hw_primary( 1908): Set 'Main Mic Switch'.0 to 1
09-23 22:40:40.259 V/audio_hw_primary( 1908): Set 'IN1L Volume'.0 to 22
09-23 22:40:40.264 V/audio_hw_primary( 1908): Set 'MIXINL IN1L Switch'.0 to 1
09-23 22:40:40.264 V/audio_hw_primary( 1908): Set 'MIXINL IN1L Volume'.0 to 1
09-23 22:40:40.264 V/audio_hw_primary( 1908): Set 'AIF1ADCL Source'.0 to 0
09-23 22:40:40.264 V/audio_hw_primary( 1908): Set 'AIF2ADCL Source'.0 to 0
09-23 22:40:40.264 V/audio_hw_primary( 1908): Set 'AIF1ADC1 HPF Mode'.0 to 0
09-23 22:40:40.264 V/audio_hw_primary( 1908): Set 'AIF1ADC1 HPF Switch'.0 to 1
09-23 22:40:40.264 V/audio_hw_primary( 1908): Set 'AIF1ADC1 HPF Switch'.1 to 1
09-23 22:40:40.269 V/audio_hw_primary( 1908): Set 'AIF1ADC1 Volume'.0 to 96
09-23 22:40:40.269 V/audio_hw_primary( 1908): Set 'AIF1ADC1 Volume'.1 to 96
09-23 22:40:40.269 V/audio_hw_primary( 1908): get_next_buffer: read_buf 0x40c56008 extended to 4096 bytes[/B]

My guess that happens because of how the first (and for that matter second,third and fourth) calls end. My feeling is that something is not initialized properly and it gets fixed during this routine

09-23 22:37:58.564 E/audio_hw_primary( 1908): Leaving IN_CALL state, in_call=0, mode=3
[B]09-23 22:38:23.519 V/audio_hw_primary( 1908): Changing output device 1 => 1
[B][I]09-23 22:38:23.519 V/audio_hw_primary( 1908): Changing input device 4 => 0[/I][/B]
09-23 22:38:23.524 V/audio_hw_primary( 1908): Set 'HP Switch'.0 to 0
09-23 22:38:23.524 V/audio_hw_primary( 1908): Set 'AIF1DAC1 EQ Switch'.0 to 0
09-23 22:38:23.524 V/audio_hw_primary( 1908): Set 'Main Mic Switch'.0 to 0
09-23 22:38:23.524 V/audio_hw_primary( 1908): Set 'MIXINL IN1L Switch'.0 to 0
09-23 22:38:23.524 V/audio_hw_primary( 1908): Set 'MIXINL IN1L Volume'.0 to 0
[B][U]09-23 22:38:23.524 V/audio_hw_primary( 1908): Set 'IN1L Volume'.0 to 10[/U][/B][/B]
09-23 22:38:24.734 E/audio_hw_primary( 1908): Leaving IN_CALL state, in_call=0, mode=0
09-23 22:38:25.064 D/audio_hw_primary( 1908): select_output_device: AUDIO_DEVICE_OUT_SPEAKER
09-23 22:38:25.064 V/audio_hw_primary( 1908): Changing output device 1 => 2
09-23 22:38:25.064 V/audio_hw_primary( 1908): Changing input device 0 => 0
09-23 22:38:25.069 V/audio_hw_primary( 1908): Set 'SPK Switch'.0 to 1
09-23 22:38:25.069 V/audio_hw_primary( 1908): Set 'AIF1DAC1 Volume'.0 to 96
09-23 22:38:25.069 V/audio_hw_primary( 1908): Set 'AIF1DAC1 Volume'.1 to 96
09-23 22:38:25.069 V/audio_hw_primary( 1908): Set 'AIF1 Boost Volume'.0 to 0
09-23 22:38:25.069 V/audio_hw_primary( 1908): Set 'DAC1 Volume'.0 to 96
09-23 22:38:25.069 V/audio_hw_primary( 1908): Set 'DAC1 Volume'.1 to 96
09-23 22:38:25.069 V/audio_hw_primary( 1908): Set 'Left Output Mixer DAC Volume'.0 to 7
09-23 22:38:25.069 V/audio_hw_primary( 1908): Set 'Right Output Mixer DAC Volume'.0 to 7
09-23 22:38:25.069 V/audio_hw_primary( 1908): Set 'SPKL DAC1 Volume'.0 to 1
09-23 22:38:25.069 V/audio_hw_primary( 1908): Set 'SPKR DAC1 Volume'.0 to 1
09-23 22:38:25.069 V/audio_hw_primary( 1908): Set 'Speaker Mixer Volume'.0 to 3
09-23 22:38:25.069 V/audio_hw_primary( 1908): Set 'Speaker Mixer Volume'.1 to 3
09-23 22:38:25.069 V/audio_hw_primary( 1908): Set 'Speaker Boost Volume'.0 to 4
09-23 22:38:25.069 V/audio_hw_primary( 1908): Set 'Speaker Boost Volume'.1 to 4
09-23 22:38:25.069 V/audio_hw_primary( 1908): Set 'Speaker Volume'.0 to 57
09-23 22:38:25.069 V/audio_hw_primary( 1908): Set 'Speaker Volume'.1 to 57
09-23 22:38:25.069 V/audio_hw_primary( 1908): Set 'AIF1DAC1 EQ Switch'.0 to 1
09-23 22:38:25.074 V/audio_hw_primary( 1908): Set 'AIF1DAC1 EQ1 Volume'.0 to 9
09-23 22:38:25.074 V/audio_hw_primary( 1908): Set 'AIF1DAC1 EQ2 Volume'.0 to 7
09-23 22:38:25.074 V/audio_hw_primary( 1908): Set 'AIF1DAC1 EQ3 Volume'.0 to 10
09-23 22:38:25.074 V/audio_hw_primary( 1908): Set 'AIF1DAC1 EQ4 Volume'.0 to 13
09-23 22:38:25.074 V/audio_hw_primary( 1908): Set 'AIF1DAC1 EQ5 Volume'.0 to 12
09-23 22:38:25.074 V/audio_hw_primary( 1908): Set 'RCV Switch'.0 to 0
09-23 22:38:25.074 V/audio_hw_primary( 1908): Set 'AIF1DAC1 Volume'.0 to 96
09-23 22:38:25.074 V/audio_hw_primary( 1908): Set 'AIF1DAC1 Volume'.1 to 96
09-23 22:38:25.074 V/audio_hw_primary( 1908): Set 'AIF1 Boost Volume'.0 to 0
09-23 22:38:25.074 V/audio_hw_primary( 1908): Set 'DAC1 Volume'.0 to 96
09-23 22:38:25.074 V/audio_hw_primary( 1908): Set 'DAC1 Volume'.1 to 96
09-23 22:38:25.074 V/audio_hw_primary( 1908): Set 'Left Output Mixer DAC Volume'.0 to 7
09-23 22:38:25.074 V/audio_hw_primary( 1908): Set 'Right Output Mixer DAC Volume'.0 to 7
09-23 22:38:25.074 V/audio_hw_primary( 1908): Set 'Output Volume'.0 to 57
09-23 22:38:25.074 V/audio_hw_primary( 1908): Set 'Output Volume'.1 to 57
09-23 22:38:25.074 V/audio_hw_primary( 1908): Set 'Earpiece Volume'.0 to 1

I think this is the same reason why after cell call we lose bottom mic on first after use, it's the call end routine, which does not look like the other four and even has an error about two mic control

09-23 22:43:34.424 D/audio_hw_primary( 1908): select_input_device: AUDIO_DEVICE_IN_BUILTIN_MIC
[B][U]09-23 22:43:34.444 E/audio_hw_primary( 1908): adev_set_parameters: disabling two mic control[/U][/B]
09-23 22:43:34.459 V/audio_hw_primary( 1908): Set 'Sub Mic Switch' to '0'
09-23 22:43:34.459 V/audio_hw_primary( 1908): Set 'IN1R Volume' to '7'
09-23 22:43:34.464 V/audio_hw_primary( 1908): Set 'MIXINR IN1R Switch' to '0'
09-23 22:43:34.464 V/audio_hw_primary( 1908): Set 'MIXINR IN1R Volume' to '0'
09-23 22:43:34.509 D/audio_hw_primary( 1908): select_output_device: AUDIO_DEVICE_OUT_EARPIECE

Hope this helps [MENTION=3208754]codeworkx[/MENTION] (or any other dev interested), at least with generating logs if nothing else.