Skip to content
View in the app

A better way to browse. Learn more.

Armbian Community Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

How to control audio volume by command on Orange Pi One Armbian?

Featured Replies

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!

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.

  • Author

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

 

  • Author

Oh, I forgot pulseaudio. I will check it tomorrow and report back to you. Thanks!

  • Author

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.

Guest
This topic is now closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.