I use the cmus console music player through ssh on a device with OSMC (Kodi, based on Debian Jessie) installed. My problem is that the sound is played to the HDMI, and I want to play music to the jack output.

I tried to use alsamixer, amixer, aplay, etc... but these are not installed and sudo apt-get install alsamixer doesn't help. (Package not found - Maybe there's a better option than installing alsamixer anyway).

I tried to read man cmus, which seems to offer the possibility to change some alsa settings : link to the online manual page, but I don't understand which settings are relevant for me, nor which values to put... Anyway : cmus is maybe not the source of my issue.

How can I achieve what I want to, using only the terminal (I am through SSH) ?


PS : I finally installed alsamixer (actually the package's name was alsa-utils). And results that my jack output is not recognised. But I know it is working since other programs use it.

  • Do you run Pulseaudio (check with ps axu)? If no, alsamixer and amixer are in package alsa-utils. If yes, use pacmd (see pacmd help). – dirkt Feb 17 '18 at 14:45
  • No I don't. I have installed alsa-utils, but it doesn't help : I can't find my jack output port in order to select it – Johannes Lemonde Feb 17 '18 at 14:54
  • Hm. You wrote device, so what kind of device exactly? Maybe something exotic? Please edit question with output of lspci -nn | grep Audio, cat /proc/asound/pcm and lsmod | grep snd. – dirkt Feb 17 '18 at 15:00
  • My answer assumed you were on a raspberry pi, for some reason (osmc, hdmi, jack plug). if not, add the output of aplay --list-devices to your post. – meuh Feb 17 '18 at 15:21

This article explains how you can dynamically switch the audio output between hdmi and analogue on a Raspberry Pi. From the command line use

amixer cset numid=3 2

for hdmi and

amixer cset numid=3 1

for analogue. You can generate a stereo test tone with another command from alsa-utils:

speaker-test -c 2 -s 1 -t sine -f 440

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.