I'm using Android 6.0, when i change volume through UI, it is happening(volume decrease and increase happen) output also working fine.
If i read the volume register i will get default value only. If i increase or decrease the volume output volume changing. but in register level no change. How it is happening.?
What is the Audio control flow from Android to driver. ?
See following, please!
1. If i read the volume register i will get default value only. If i increase or decrease the volume output volume changing. but in register level no change. How it is happening.?
[A] On android top, Audio Volume is controlled by software, not trough Tinyalsa, so when increasing / decreasing volume, the value of register will not be changed.
2. What is the Audio control flow from Android to driver. ?
Due to Tinyalsa not contolling volume, alsa API can't deliver volume data to audio codec driver, so if you want to change the default architecture，a lot of work will have to be done.
(1) Understanding Android AudioPolicy from top to bottom
(2) Adding source code(Using alsa-lib API) to adjust volume.
ALSA API will deliver volume data to codec driver, then value of register will be set.
Hope above information is helpful for you!
, here software is android top level( audio policy ), not app, not tinyalsa.
if you hope the value of register can be changed, Volume controlling data should be delivered to audio codec driver by tinyalsa, because alsa API can communicate with codec driver.
So Volume's increasing or decreasing is controlled by android audio level, in which there exists audio algorithm for volume.