通过SSH使用cmus时,将OSMC设备音频从HDMI切换至插孔的方法
Switching cmus Audio Output to Headphone Jack on OSMC (Debian Jessie)
Hey there! Let's get your cmus audio switched from HDMI to the headphone jack without needing to install missing ALSA tools like alsamixer or amixer. Here are a few reliable methods tailored to your OSMC setup:
Method 1: Configure cmus Directly (Recommended)
cmus has built-in audio output controls, so we can tweak this right within the player:
- Open cmus and press
:to enter command mode. - First, check your current audio output module with:
You’ll likely see:show aoao=alsasince OSMC uses ALSA under the hood. - List all supported audio modules to confirm your options:
Common options here are:ao listalsaandpulse—stick withalsafor most OSMC setups. - Identify the correct ALSA device for your headphone jack:
Exit cmus (pressq) and run this command (no installation needed—it reads kernel audio info):
For a typical Raspberry Pi-based OSMC setup, you’ll see output like:cat /proc/asound/cards
Usually, HDMI maps to0 [ALSA ]: bcm2835 - bcm2835 ALSA bcm2835 ALSAhw:0,0and the headphone jack tohw:0,1. - Back in cmus, set the ALSA device to your headphone jack:
If that doesn’t work, try:ao set alsa device=hw:0,1plughw:0,1(adds software mixing for better compatibility) orsysdefault:CARD=ALSA. - Play a track to test the output. If it works, save the config with
:saveso cmus uses this setting every time you launch it.
Method 2: Use OSMC’s Built-in Audio Tool
OSMC comes with a dedicated audio config utility that lets you set the system-wide default output:
- Exit cmus and run:
sudo /usr/bin/osmc-audio-config - Follow the on-screen prompts to select
Analog(this corresponds to the headphone jack) as your default audio output. - Restart your device or restart cmus—your music will now play through the headphones.
Method 3: Edit cmus Config File for Permanent Settings
If you want cmus to always use the headphone jack by default, edit its config file:
- Exit cmus and open the config file with your favorite editor (nano is pre-installed on OSMC):
nano ~/.cmus/rc - Add this line at the end (replace
hw:0,1with the device that worked for you):ao_set alsa device=hw:0,1 - Save and exit (press
Ctrl+O, hit Enter, thenCtrl+X). Next time you start cmus, it’ll automatically use the headphone jack.
Any of these methods should get your audio switched over. Start with Method 1 since it targets cmus specifically without changing your system’s global audio settings.
内容的提问来源于stack exchange,提问作者Johannes Lemonde
相关产品推荐
相关产品推荐

