How to set HDMI audio volume through alsamixer?

I did not find any controls responsible for the volume.

Please select sound setting → output source to HDMI

This is clear! But I need to adjust the volume through amixer. And I did not find the control by which this can be done. In alsamixer, I see some controls, but none set the volume level. It is very strange.

Hello!

The HDA controller (used for audio playback through the HDMI interface) does not have any internal volume control and hence there is not control you can set with amixer.

You can control the volume from the command line using pulseaudio. For example, first find the name of the HDMI soundcard …

$ pactl list sinks | grep "Name:"
Name: alsa_output.platform-70030000.hda.hdmi-stereo
Name: alsa_output.platform-sound.analog-stereo

Then you can set the volume as follows …

# Increase by 10%
$ pactl set-sink-volume alsa_output.platform-70030000.hda.hdmi-stereo +10%
# Set to 100%
$ pactl set-sink-volume alsa_output.platform-70030000.hda.hdmi-stereo 100%

You can check the volume by …

$ pactl list sinks | grep "Name:\|Volume:"
Name: alsa_output.platform-70030000.hda.hdmi-stereo
Volume: front-left: 65536 / 100% / 0.00 dB,   front-right: 65536 / 100% / 0.00 dB
Base Volume: 65536 / 100% / 0.00 dB
Name: alsa_output.platform-sound.analog-stereo
Volume: front-left: 65536 / 100% / 0.00 dB,   front-right: 65536 / 100% / 0.00 dB
Base Volume: 65536 / 100% / 0.00 dB

Regards,
Jon

1 Like

Hello, Jonathanh.
Thanks for the advice. Can you tell me how to control the volume linearly through pactl? From help, I did not understand this. Amixer had the -M option for this. And yet, if it’s not a secret, how is the HDMI volume controlled through pulseaudio if there is no device that is responsible for this?

Hello!

The volume control in pulseaudio is purely handled by software, and hence there is no underlying hardware that is controlling the volume in this case. So the above solution provides some basic volume control.

What is the HDMI interface connected to? Sometimes the display, monitor, etc has its own volume control and so the volume could be controlled on the receiver side which might be better.

Regards,
Jon

Hello, Jonathanh!
I am also using hdmi audio in jetpack4.4( the emmc core board flashed by bsp 32.4.3) . I have testing it by using your advice,but failed.My testing steps are:

step1:
Open terminal1 and do the command:
aplay -Dplughw:0,3 test.wav

step2:
Open terminal2 and do the command:
pactl set-sink-volume alsa_output.platform-70030000.hda.hdmi-stereo ${volume value}%

step3:
Listen the earphone and judge the change of the volume while adjusting the volume by "pactl set-sink-volume ". But the volume does not change.

Addtionally, I have tried the audio tool on the ubuntu desktop.But the volume does not change too. So I guest there may lacks something to adapt the hdmi audio and the system audio tool.

Could you tell me how to resolve the problem. Thank you very much!

Hi jnhhcl,

This is an old thread, please help to open a one to get the support. Thanks