Hi, I recently got my soldering iron out and wired up the optical port on my motherboard (yes I did have to solder the ports, even tho' the final stage is light!)
As I'll be wanting to use AC3/DTS passthrough and the like, it's one of the few occasions where I might not actually use PulseAudio (shock!) until it supports such encoded passthrough, but in the process of generally fiddling, I played with the alsa a52 plugin. Putting in a definition for pcm.a51 in ./asoundrc meant that PulseAudio automatically offered me Digitial 5.1 support which is neat, but sadly it crashed Pulse with an assertion. The problem was that when setting up mmap with the a52 plugin, the -EAGAIN error was returned and the try_recover method called which has an assertion on the error != EAGAIN. Looking at other bits in the code, I copied/pasted a potential fix. As I really don't understand this code in any depth, I'm not willing to commit the patch straight away, so please find it attached for review. Lennart, as your LinuxTag talk is on surround sound in Gnome, maybe a fix for this should go in sooner rather than later :D While it stops PA from crashing, I couldn't get the a52 stuff to work. It does make some kind of noise, but it seems that all of the sound is concentrated into several microseconds length and PA underruns like crazy. FWIW speaker-test does work with a52, but the time spent on each speaker is much less than with analog 5.1. As it just produces white noise I couldn't really tell if it was properly broken. I'll have a more thorough play at some point. -- Colin Guthrie gmane(at)colin.guthr.ie http://colin.guthr.ie/ Day Job: Tribalogic Limited [http://www.tribalogic.net/] Open Source: Mandriva Linux Contributor [http://www.mandriva.com/] PulseAudio Hacker [http://www.pulseaudio.org/] Trac Hacker [http://trac.edgewall.org/]
From 35e17d76388e453452cd5b5487f6cb236da8b0c6 Mon Sep 17 00:00:00 2001 From: Colin Guthrie <cguth...@mandriva.org> Date: Sun, 6 Jun 2010 21:19:34 +0100 Subject: [PATCH] alsa: Fix assertion on mmap_write (triggered via a52 plugin) --- src/modules/alsa/alsa-sink.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/src/modules/alsa/alsa-sink.c b/src/modules/alsa/alsa-sink.c index ed16c83..29b9fb7 100644 --- a/src/modules/alsa/alsa-sink.c +++ b/src/modules/alsa/alsa-sink.c @@ -607,6 +607,9 @@ static int mmap_write(struct userdata *u, pa_usec_t *sleep_usec, pa_bool_t polle 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; -- 1.7.1
_______________________________________________ pulseaudio-discuss mailing list pulseaudio-discuss@mail.0pointer.de https://tango.0pointer.de/mailman/listinfo/pulseaudio-discuss