#include <stdio.h>
#include <stdlib.h>
int main(int argc, char **argv)
{
int iRightVol = 0;
char ucCmdBuf[128] = {0};
int iLeftVol = 0;
iLeftVol = atoi(argv[1]);
iRightVol = atoi(argv[2]);
printf("########## iRightVol is %d , iLeft is %d #########\n", iRightVol, iLeftVol);
system("i2cset -f -y 1 0x18 0x5d 0x99 b");
system("i2cset -f -y 1 0x18 0x5b 0x99 b");
sprintf(ucCmdBuf, "amixer cset numid=2 '%d,%d'", iLeftVol, iRightVol);
printf("######## %s #############\n", ucCmdBuf);
system(ucCmdBuf);
system("i2cget -f -y 1 0x18 0x5d b");
system("i2cget -f -y 1 0x18 0x5b b");
return 0;
}
amixer 左右通道音量设置
最新推荐文章于 2024-10-14 13:40:56 发布