[pulseaudio-tickets] [PulseAudio] #837: A52 (ac3/Dolby Digital) encoding for SPDIF / Pulseaudio
PulseAudio
trac-noreply at tango.0pointer.de
Thu Jul 15 07:52:34 PDT 2010
#837: A52 (ac3/Dolby Digital) encoding for SPDIF / Pulseaudio
----------------------+-----------------------------------------------------
Reporter: mcarans | Owner: lennart
Type: defect | Status: closed
Milestone: 0.9.22 | Component: module-alsa-*
Resolution: fixed | Keywords:
----------------------+-----------------------------------------------------
Comment(by mcarans):
New versions of Pulseaudio will be patched, but in the meantime, here are
the revised steps for Ubuntu Lucid 10.04 LTS:
{{{
1. Open from Pulse source code: src/modules/alsa/alsa-sink.c
2. Replace: pa_sink_set_max_rewind(u->sink, u->hwbuf_size); with:
if (pa_alsa_pcm_is_hw(u->pcm_handle)) {
pa_sink_set_max_rewind(u->sink, u->hwbuf_size);
} else {
pa_log("Disabling rewind for device %s", u->device_name);
pa_sink_set_max_rewind(u->sink, 0);
}
3. Replace: pa_sink_set_max_rewind_within_thread(u->sink, u->hwbuf_size);
with:
if (pa_alsa_pcm_is_hw(u->pcm_handle)) {
pa_sink_set_max_rewind_within_thread(u->sink, u->hwbuf_size);
} else {
pa_log("Disabling rewind_within_thread for device %s",
u->device_name);
pa_sink_set_max_rewind_within_thread(u->sink, 0);
}
4. After line: if (PA_UNLIKELY((sframes =
snd_pcm_mmap_commit(u->pcm_handle, offset, frames)) < 0)) { add:
if (!after_avail && (int) sframes == -EAGAIN)
break;
5. Compile and install Pulseaudio with udev support
6. Copy /etc/pulse/daemon.conf to ~/.pulse/daemon.conf and ensure it has
uncommented: default-sample-rate = 48000
7. Edit ~/.asoundrc and put in it:
pcm.a52 {
@args [CARD]
@args.CARD {
type string
}
type rate
slave {
pcm {
type a52
bitrate 448
channels 6
card $CARD
}
rate 48000 #required somehow, otherwise nothing happens in
PulseAudio
}
8. sudo alsa reload
9. Make sure you do not have a ~/.pulse/default.pa or if you do, that it
is using load-module module-udev-detect to load Alsa sinks not load-module
module-alsa-sink ...
10. pulseaudio -k and pulseaudio -D
}}}
--
Ticket URL: <http://pulseaudio.org/ticket/837#comment:16>
PulseAudio <http://pulseaudio.org/>
The PulseAudio Sound Server
More information about the pulseaudio-bugs
mailing list