iMX6 android audio control flow

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

iMX6 android audio control flow

1,571 次查看
aravinthkumarja
Senior Contributor II

Hi All,

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. ? 

Regards,

Aravinth

标签 (5)
0 项奖励
回复
3 回复数

986 次查看
weidong_sun
NXP TechSupport
NXP TechSupport

Hello aravinthkumar

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!

Best Regards,

Weidong

986 次查看
aravinthkumarja
Senior Contributor II

Hi Wigros Sun,

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.

[Q] If volume controlled by any software also finally the value should write into codec volume register right?

 

 

Regards,

Aravinth

0 项奖励
回复

986 次查看
weidong_sun
NXP TechSupport
NXP TechSupport

Hello Aravinth,

      Audio Volume is controlled by software, 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.

Regards,

Weidong