In my case on KK below is what happened..
1. primary audio HAL did a stub implementation for get_master_volume but
did not update the master volume so mastervolume got set to an
uninitialized value
if (NULL != dev->get_master_volume) {
float mv; // Uninitialized
if (OK == dev->get_master_volume(dev, &mv)) {
mMasterVolume = mv;
}
}
2. A2DP HAL does not implement any support for mater volume. So the
mastervolume set in 1 above to some uninitialized value gets sent to the
A2DP mixer thread for SW master volume control.
Is above the intended implementation.
On Wednesday, April 16, 2014 9:15:09 AM UTC-7, Eric Laurent wrote:
>
> This is not what is implemented. There is indeed one single master volume
> shared by all HALs. But if one HAL does not implement it, then it will fall
> back to software master volume.
>
> On Tuesday, April 15, 2014 10:11:14 AM UTC-7, Uday Gupta wrote:
>>
>> One issue though. Looks like if one audio HAL implements master volume
>> control then audio flinger expects all other HAL's to do the same as there
>> is only one mMasterVolume in audio flinger. Is my understanding correct?
>>
>> On Tuesday, April 15, 2014 9:54:19 AM UTC-7, Uday Gupta wrote:
>>>
>>> Thanks for the hint. Our primary audio HAL implemented a
>>> get_master_volume function but did not update the volume value and thus the
>>> uninitialized value. We don't do volume control in the HAL so removed it
>>> now and everything is working now.
>>>
>>> On Tuesday, April 15, 2014 7:39:35 AM UTC-7, Glenn Kasten wrote:
>>>>
>>>> This seems like an uninitialized value, not a valid value.
>>>>
>>>> I suggest that you find a known working reference device
>>>> (e.g. Nexus family) running the same OS version, and then
>>>> start comparing logs, volumes at various places etc., to
>>>> see where the difference first appears in the pipeline.
>>>>
>>>> On Monday, April 14, 2014 4:10:24 PM UTC-7, Uday Gupta wrote:
>>>>>
>>>>> Hi,
>>>>>
>>>>> On our development platform on KK, A2DP playback has no sound. Data
>>>>> dump in the A2DP HAL shows all zeros.
>>>>>
>>>>> Enabling and adding some logs in AudioFlinger.cpp and threads.cpp
>>>>> shows the master volume as -0.000002.
>>>>>
>>>>> Has sometime changed in KK compared to JB and some configuration
>>>>> parameters need to be set to set the master volume to 1.0f.
>>>>>
>>>>> Thanks
>>>>>
>>>>
--
--
unsubscribe: [email protected]
website: http://groups.google.com/group/android-porting
---
You received this message because you are subscribed to the Google Groups
"android-porting" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.