❦ 18 juillet 2013 01:00 CEST, Wouter Verhelst <wouter@debian.org> :
>> Alsa is a completely different layer in the sound stack. It doesn't even
>> make sense to compare these two.
>
> They're both APIs that applications can use to produce audio. What do
> you mean, it doesn't make sense?
>
> Of course they're not the same thing; I get that. That's not what I'm
> saying. But as far as "producing audio" is concerned, they can both do
> that.
To make Alsa work with some 7.1 setup through HDMI:
pcm.hdmi-remap {
type route
slave.pcm hdmi
ttable.0.0 1
ttable.1.1 1
ttable.2.4 1
ttable.3.5 1
ttable.4.2 1
ttable.5.3 1
ttable.6.6 1
ttable.7.7 1
}
Works out of the box with PulseAudio.
Typical 5.1 setup that actually works for desktop and video:
pcm.hdmi_direct {
type route
slave {
pcm "hdmi"
}
ttable.0.0 1
ttable.1.1 1
ttable.2.4 1
ttable.3.5 1
ttable.4.2 1
ttable.5.3 1
}
pcm.hdmi_shared {
type route
slave {
pcm "hdmi_dmixer"
}
ttable.0.0 1
ttable.1.1 1
ttable.2.4 1
ttable.3.5 1
ttable.4.2 1
ttable.5.3 1
}
pcm.hdmi_dmixer {
type dmix
ipc_key 1024
ipc_key_add_uid false
ipc_perm 0660
slave {
pcm "hw:0,3"
}
}
pcm.!default {
type plug
slave.pcm "hdmi_shared"
}
Works out of the box with PulseAudio. Notice the name of your HDMI
device: "hw:0,3". You can have 4 of them, only one will work. PulseAudio
exposes friendly names for your working outputs only. Others are just not
displayed.
Another common dmix setup:
pcm.!default {
type plug
slave.pcm "dmixer"
}
pcm.dmixer {
type dmix
ipc_key 1024
slave {
pcm "hw:1,0"
period_time 0
period_size 1024
buffer_size 4096
rate 44100
}
bindings {
0 0
1 1
}
}
ctl.dmixer {
type hw
card 0
}
How user-friendly!
With PulseAudio, all that works out of the box. You can switch the
output per application during playback. I want to send music to my other
box where my speakers are plugged, I can do this right from pavucontrol
without interrupting playback.
--
Write and test a big program in small pieces.
- The Elements of Programming Style (Kernighan & Plauger)
Attachment:
pgpX9woTEwyjF.pgp
Description: PGP signature