How to Adjust Headphone Volume?
Answer.
There are two methods for modifying volume:
- Use the “amixer” command to set the headphone volume.
When the development environment is Yocto project (QT5), amixer is used by default. If not, the development environment is buildroot, and users need to enable amixer in menucofig. (refer to Figure 1)
Set Headphone volume by “amixer” or “alsamixer”, refer to Figure 2.Code: Select all
amixer set Headphone 70%
Info:
amixer controls:show all control item as follows:
amixer contents:view all interfaces of the sound card driver
.
.
. - Modify the default value of the codec driver:
Modify the value of the register in nau8822.c(Nau8822.c(sound\soc\codecs)) and the default value is 0x39(the gain is 0db).
The 0x003f is the maximum volume. The modification method is as follows:Code: Select all
{NAU8822_REG_LSPKOUT_VOLUME, 0x0039}, {NAU8822_REG_RSPKOUT_VOLUME, 0x0039}
changetoCode: Select all
{ NAU8822_REG_LHP_VOLUME, 0x0039 }, { NAU8822_REG_RHP_VOLUME, 0x0039 },
Code: Select all
{ NAU8822_REG_LHP_VOLUME, 0x003f }, { NAU8822_REG_RHP_VOLUME, 0x003f },
#MA35D1 #headphone sound #volume #sound
.