User:Jens3/Setting the default audio device

From Gentoo Wiki
Jump to:navigation Jump to:search

After a reboot I was unable to play sound, neither with Firefox nor with mplayer. By random I realized that [c]vlc was working. leio recommended the player media-video/mpv.

user $ mpv --audio-device=help
List of detected audio devices:
  'auto' (Autoselect device)
  'pulse/auto_null' (Dummy Output)
  'alsa' (Default (alsa))
  'alsa/lavrate' (Rate Converter Plugin Using Libav/FFmpeg Library)
  'alsa/samplerate' (Rate Converter Plugin Using Samplerate Library)
  'alsa/speexrate' (Rate Converter Plugin Using Speex Resampler)
  'alsa/speex' (Plugin using Speex DSP (resample, agc, denoise, echo, dereverb))
  'alsa/upmix' (Plugin for channel upmix (4,6,8))
  'alsa/vdownmix' (Plugin for channel downmix (stereo) with a simple spacialization)
  'alsa/sysdefault:CARD=b1' (bcm2835 HDMI 1, bcm2835 HDMI 1/Default Audio Device)
  'alsa/usbstream:CARD=b1' (bcm2835 HDMI 1/USB Stream Output)
  'openal' (Default (openal))
  'sdl' (Default (sdl))

Playing videos with the following worked:

user $ mpv --audio-device=alsa/sysdefault:CARD=b1 <filename>

The default sound config has changed somehow and differs between my user and root:

user $amixer info
Card default 'pulse'/'PulseAudio'
  Mixer name    : 'PulseAudio'
  Components    : ''
  Controls      : 4
  Simple ctrls  : 2
root #amixer info
Card default 'b1'/'bcm2835 HDMI 1'
  Mixer name    : 'Broadcom Mixer'
  Components    : ''
  Controls	: 2
  Simple ctrls  : 1

ALSA in the gentoo wiki.