You are not logged in.

#1 2016-03-29 02:27:49

uxiofp
Member
Registered: 2014-04-19
Posts: 26

Set HDMI as default audio device in alsa

I want to set HDMI as default audio device in alsa.

$ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: Intel [HDA Intel], device 0: ALC269 Analog [ALC269 Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: Intel [HDA Intel], device 1: ALC269 Digital [ALC269 Digital]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: Intel [HDA Intel], device 3: HDMI 0 [HDMI 0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
$ cat ~/.asoundrc 
pcm.!default {
    type hw
    card 0
    device 3
}
$ aplay /usr/share/sounds/alsa/Front_Center.wav 
Playing WAVE '/usr/share/sounds/alsa/Front_Center.wav' : Signed 16 bit Little Endian, Rate 48000 Hz, Mono
aplay: set_params:1239: Channels count non available

With -D plughw:0,3 no errors but no sound in HDMI.

$ aplay -D plughw:0,3 /usr/share/sounds/alsa/Front_Center.wav 
Playing WAVE '/usr/share/sounds/alsa/Front_Center.wav' : Signed 16 bit Little Endian, Rate 48000 Hz, Mono

If i activate HDMI audio device in vlc and play some video, then aplay -D plughw0,3 ... works ok, but no sound in system, only in vlc.

Last edited by uxiofp (2016-03-29 02:32:40)

Offline

#2 2016-03-29 02:54:50

uxiofp
Member
Registered: 2014-04-19
Posts: 26

Re: Set HDMI as default audio device in alsa

I modified  ~/.asoundrc

pcm.!default {
  type plug
  slave {
    pcm "hw:0,3"
  }
}
ctl.!default {
  type hw
  card 0
}

Now, sound only begins to work when i play something in vlc, but works also in system.

Offline

Board footer

Powered by FluxBB