Finally I got it all working including a52 Pulseaudio profiles!
These are the steps on 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(strcmp(u->device_name, "a52") == 0) { pa_sink_set_max_rewind(u->sink, 0);
} else { pa_sink_set_max_rewind(u->sink, u->hwbuf_size);
}
3. Add Colin's patch:
if (PA_UNLIKELY((sframes = snd_pcm_mmap_commit(u->pcm_handle, offset, frames)) < 0)) {
+ if (!after_avail && (int) sframes == -EAGAIN)
+ break;
+
if ((r =
try_recover(u, "snd_pcm_mmap_commit", (int) sframes)) == 0) continue;
4. Compile and install Pulseaudio with udev support: make and sudo make install
5. Edit /usr/local/share/pulseaudio/alsa-mixer/profile-sets/default.conf: change a52:%f to a52
6. Copy /etc/pulse/daemon.conf to ~/.pulse/daemon.conf and ensure it has uncommented: default-sample-rate = 48000
7. Edit ~/.asoundrc
8. Put in it:
# Encode AC3 -> Directly on hardware
pcm.Filter_A52Encode {
type a52
bitrate 448
channels 6
card NVidia
}
# Rate Converter to 48kHz, needed for some applications
pcm.a52 {
type rate
slave {
pcm "Filter_A52Encode"
rate 48000
}
}
9. Change NVidia to your card's name from: cat /proc/asound/cards
10. sudo alsa reload
11. 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 ...
Finally I got it all working including a52 Pulseaudio profiles!
These are the steps on Ubuntu Lucid 10.04 LTS: alsa/alsa- sink.c set_max_ rewind( u->sink, u->hwbuf_size); with: strcmp( u->device_ name, "a52") == 0) {
pa_sink_ set_max_ rewind( u->sink, 0);
pa_sink_ set_max_ rewind( u->sink, u->hwbuf_size); (sframes = snd_pcm_ mmap_commit( u->pcm_ handle, offset, frames)) < 0)) {
1. Open from Pulse source code: src/modules/
2. Replace: pa_sink_
if(
} else {
}
3. Add Colin's patch:
if (PA_UNLIKELY(
+ if (!after_avail && (int) sframes == -EAGAIN) mmap_commit" , (int) sframes)) == 0)
continue; share/pulseaudi o/alsa- mixer/profile- sets/default. conf: change a52:%f to a52 daemon. conf to ~/.pulse/ daemon. conf and ensure it has uncommented: default-sample-rate = 48000 A52Encode {
+ break;
+
if ((r =
try_recover(u, "snd_pcm_
4. Compile and install Pulseaudio with udev support: make and sudo make install
5. Edit /usr/local/
6. Copy /etc/pulse/
7. Edit ~/.asoundrc
8. Put in it:
# Encode AC3 -> Directly on hardware
pcm.Filter_
type a52
bitrate 448
channels 6
card NVidia
}
# Rate Converter to 48kHz, needed for some applications
pcm.a52 {
type rate
slave {
pcm "Filter_A52Encode"
rate 48000
}
}
9. Change NVidia to your card's name from: cat /proc/asound/cards
10. sudo alsa reload
11. 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 ...
12. pulseaudio -k
13. pulseaudio -D