Mori Posted July 25, 2016 Posted July 25, 2016 I'm using Orange Pi One with Armbiab 5.14. And trying to use GPIO (keys) for volume up and down, making game console. Of course, I could read GPIOs status by Wiring Pi, but I couldn't control volume by command. I tried amixer with various parameters, but not change HDMI volume. I'm not sure the usage detail of amixer on Armbian. Please advise me how to change volume by command. It's OK to control by C source, because use C program to read GPIOs!
Igor Posted July 25, 2016 Posted July 25, 2016 AFAIK HDMI volume levels can't be change with alsamixer ? We use stock Debian / Ubuntu alsa packages.
lanefu Posted July 26, 2016 Posted July 26, 2016 you may be able to adjust the volume of the PCM channel in the mixer. that will have the same effect. pure digital audio connections [hdmi, spdif, etc] are fixed. volume is adjusted at the output rather than source Tapatalk thinks its important to tell you im using tapatalk from a phone.
zador.blood.stained Posted July 26, 2016 Posted July 26, 2016 @Mori ... or you can try to set up software mixer (dmix) in ALSA configuration and set dmix device as default input.
borombo Posted July 26, 2016 Posted July 26, 2016 amixer set 'Lineout volume control' 1- amixer set 'Lineout volume control' 1+
Mori Posted July 26, 2016 Author Posted July 26, 2016 Thanks for your advise. I understood that HDMI audio level is fixed and I have to change other volume, like "PCM". At first, I checked alsa devices by amixer. Result was following, $ amixer Simple mixer control 'hdmi audio format Function',0 Capabilities: enum Items: 'null' 'pcm' 'AC3' 'MPEG1' 'MP3' 'MPEG2' 'AAC' 'DTS' 'ATRAC' 'ONE_BIT_AUDIO' 'DOLBY_DIGITAL_PLUS' 'DTS_HD' 'MAT' 'WMAPRO' Item0: 'pcm' Then tried to check alsamixer. Displayed "sndhdmi" device and press F6: select sound card. $ alsamixer Card: sndhdmi Chip: Item: hdmi audio format Function [pcm] Sound Card - (default) 0 audiocodec 1 sndhdmi enter device name... I put below command, but result was error. It means "default" has no "Lineout volume control", right? $ amixer set 'Lineout volume control' 1- amixer: Unable to find simple control 'Lineout volume control',0 I expect I have to change line out volume on sound card 0:audiocodec. How do you think and how to change it? I'm studying ALSA sample code now...
borombo Posted July 26, 2016 Posted July 26, 2016 yeah, sorry, not sure alsa can control hdmi sound, but there are also pulseaudio.
Mori Posted July 26, 2016 Author Posted July 26, 2016 Oh, I forgot pulseaudio. I will check it tomorrow and report back to you. Thanks!
Mori Posted July 27, 2016 Author Posted July 27, 2016 Today I installed pulse audio and pavucontrol for GUI setting. Both can change volume level. I used following command, $ pactl set-sink-volume 1 100% $ pactl set-sink-volume 1 0% I expect, 1: means HDMI audio and 0:means analog audio line out. But I7m not sure about analog line out, because Orange Pi One does not have it officially. I will solder them directly and check it later. Thank you for all of advise. I close this thread.
Recommended Posts