You are not logged in.

#1 2011-05-17 02:36:20

brian_panneton
Member
Registered: 2009-10-01
Posts: 13

[solved] alsa + asoundrc + hdmi = no sound

I am trying to use my hdmi output as my main sound output, however I can't get it to work correctly.

aplay -l

**** List of PLAYBACK Hardware Devices ****
card 0: SB [HDA ATI SB], device 0: VT1708S Analog [VT1708S Analog]
  Subdevices: 2/2
  Subdevice #0: subdevice #0
  Subdevice #1: subdevice #1
card 0: SB [HDA ATI SB], device 1: VT1708S Digital [VT1708S Digital]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: HDMI [HDA ATI HDMI], device 3: HDMI 0 [HDMI 0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

aplay -L

null
    Discard all samples (playback) or generate zero samples (capture)
front:CARD=SB,DEV=0
    HDA ATI SB, VT1708S Analog
    Front speakers
surround40:CARD=SB,DEV=0
    HDA ATI SB, VT1708S Analog
    4.0 Surround output to Front and Rear speakers
surround41:CARD=SB,DEV=0
    HDA ATI SB, VT1708S Analog
    4.1 Surround output to Front, Rear and Subwoofer speakers
surround50:CARD=SB,DEV=0
    HDA ATI SB, VT1708S Analog
    5.0 Surround output to Front, Center and Rear speakers
surround51:CARD=SB,DEV=0
    HDA ATI SB, VT1708S Analog
    5.1 Surround output to Front, Center, Rear and Subwoofer speakers
surround71:CARD=SB,DEV=0
    HDA ATI SB, VT1708S Analog
    7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
iec958:CARD=SB,DEV=0
    HDA ATI SB, VT1708S Digital
    IEC958 (S/PDIF) Digital Audio Output
hdmi:CARD=HDMI,DEV=0
    HDA ATI HDMI, HDMI 0
    HDMI Audio Output

~/.asoundrc

  1 pcm.!default {
  2     type plughw
  3     card 1
  4     device 3
  5 }
  6 
  7 ctl.!default {
  8     type plughw
  9     card 1
 10     device 3
 11 }

and lastly:

aplay -D plughw:1,3 sound.wav works as it should.

Any idea how I can default to using card 1 device 3?

I am on x86_64 with openbox.

Thanks,
Brian Panneton

Last edited by brian_panneton (2011-05-18 04:42:31)

Offline

#2 2011-05-17 04:48:41

jlindgren
Member
Registered: 2011-02-27
Posts: 214

Re: [solved] alsa + asoundrc + hdmi = no sound

I tried your .asoundrc here and got these errors:

ALSA lib dlmisc.c:236:(snd1_dlobj_cache_get) Cannot open shared library /usr/lib/alsa-lib/libasound_module_ctl_plughw.so
ALSA lib dlmisc.c:236:(snd1_dlobj_cache_get) Cannot open shared library /usr/lib/alsa-lib/libasound_module_pcm_plughw.so

This should work for setting the PCM device:

pcm.!default "plughw:1,3"

I don't know how to get the mixer working, or if it's even possible (other than using softvol).

Offline

#3 2011-05-17 05:32:48

swanson
Member
From: Sweden
Registered: 2011-02-05
Posts: 759

Re: [solved] alsa + asoundrc + hdmi = no sound

This is my HDMI sound setup:

pcm.dmixer {
  type dmix
  ipc_key 2048
  slave {
    pcm "hw:1,7"
    period_size 512
    buffer_size 4096
    rate 48000
    format S16_LE
  }
  bindings {
    0 0
    1 1
  }
}

pcm.!default {
  type plug
  slave.pcm dmixer
}

pcm:iec958 {
  type plug
  slave.pcm dmixer
}

# Original
# pcm.!default {
#      type plug
#      slave.pcm {
#              type hw
#              card 1
#              device 7
#      }
# }

The last unused bit is the original, without mixing sound sources. Of course my card has a different enumeration compared to yours.

Also, did you unmute the HDMI card in alsa mixer and save the new setting?

Offline

#4 2011-05-18 04:41:44

brian_panneton
Member
Registered: 2009-10-01
Posts: 13

Re: [solved] alsa + asoundrc + hdmi = no sound

jlindgren: That seemed to work. I'm going to play around with it some more with what swanson mentioned to get the mixer working. Thanks so much.

Offline

#5 2011-06-16 17:51:33

banker247
Member
Registered: 2011-06-16
Posts: 2

Re: [solved] alsa + asoundrc + hdmi = no sound

swanson great post man - i've been mucking around with this for hours trying to figure it out.. - this should definetely be on the wiki posted over the current intstructions... now will work on the mixer. ;0

Offline

Board footer

Powered by FluxBB