Pulseaudio fails with Alsa a52 (ac3) plugin (Ubuntu 10.04 Lucid)

Bug #348353 reported by Danny Wood
32
This bug affects 4 people
Affects Status Importance Assigned to Milestone
PulseAudio
Invalid
Undecided
Unassigned
alsa-plugins
Invalid
Undecided
Unassigned
alsa-plugins (Ubuntu)
Invalid
Undecided
Unassigned
Declined for Jaunty by Daniel T Chen
Declined for Karmic by Daniel T Chen
Declined for Lucid by Daniel T Chen
pulseaudio (Ubuntu)
Invalid
Low
Unassigned
Declined for Jaunty by Daniel T Chen
Declined for Karmic by Daniel T Chen
Declined for Lucid by Daniel T Chen

Bug Description

Binary package hint: pulseaudio

I have a 5.1 digital surround decoder attached to the optical out on my soundcard, in previous versions of Ubuntu and Pulseaudio I have been able to route my audio through the alsa a52 plugin which has worked flawlessly with multiple applications mixing into one output and it up-mixing stereo to 5.1.

Now with Ubuntu jaunty and the latest pulseaudio this no longer works, I get no audio out at all which is strange.
I updated to the latest alsa and still no change, my next step is compiling the latest pulseaudio from source.

I was wondering if this was something to do with that patch which routes all audio through pulse, is there any way of disabling this?

My asound.conf looks like this:
pcm.!default {
 type pulse
}

ctl.!default {
 type pulse
}

pcm.pulse {
    type pulse
}

ctl.pulse {
    type pulse
    card 0
}

pcm.a52encode {
 type a52
 format S16_LE
 channels 6
 rate 48000
 bitrate 448
}

pcm.pulseaudio a52encode

ctl.pulseaudio {
 type hw
 card 0
}

and the relevant lines added to default.pa are this:
# This is for a52 surround
load-module module-alsa-sink device=pulseaudio rate=44100 channels=6 tsched=0 sink_name=alsa_surround
set-default-sink alsa_surround

the output of the alsa-info.sh script is located:
http://www.alsa-project.org/db/?f=391a90fd1367dfe202362817586d3e1bec6ab160

Tags: patch
Revision history for this message
Danny Wood (danwood76) wrote :

This bug seems to have gone away with the release of Jaunty Beta

Changed in pulseaudio:
status: New → Invalid
Revision history for this message
Catscrash (catscrash) wrote :

for me with pulseaudio 0.9.14 and the new 0.9.15~test it doesn't work, when i try to use it with alsa-plugins 1.0.19 i get the following:

D: alsa-util.c: Trying pulseaudio with SND_PCM_NO_AUTO_FORMAT ...
I: (alsa-lib)pcm.c: Cannot open shared library /usr/lib/alsa-lib/libasound_module_pcm_a52.so
I: alsa-util.c: Error opening PCM device pulseaudio: No such file or directory
E: module.c: Failed to load module "module-alsa-sink" (argument: "device=a52encode rate=48000 channels=6 sink_name=alsa_surround mmap=0"): initialization failed.
E: main.c: Module load failed.

but the file is there:
catscrash@catscrash-desktop /usr/lib/alsa-lib % ll | grep a52
-rwxr-xr-x 1 root root 1,4K 2009-03-27 23:25 libasound_module_pcm_a52.la*
-rwxr-xr-x 1 root root 63K 2009-03-27 23:25 libasound_module_pcm_a52.so*
catscrash@catscrash-desktop /usr/lib/alsa-lib %

i used the same config files as danwood76 above us

Changed in pulseaudio:
status: Invalid → New
Revision history for this message
Danny Wood (danwood76) wrote :

One of the updates in the last 2 weeks has broken my a52 again.
I get awful breakups and so on.

Revision history for this message
Danny Wood (danwood76) wrote :

Ok so this has resurfaced in Karmic.

Attached is a pulseaudio -vvv output when the crash happens.

Revision history for this message
Pedro Villavicencio (pedro) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. The issue that you reported is one that should be reproducible with the live environment of the Desktop CD of the development release the Karmic Koala. It would help us greatly if you could test with it so we can work on getting it fixed in the next release of Ubuntu. You can find out more about the development release at http://www.ubuntu.com/testing/ . Thanks again and we appreciate your help.

Changed in pulseaudio (Ubuntu):
status: New → Incomplete
importance: Undecided → Low
Revision history for this message
Danny Wood (danwood76) wrote :

It is not repeatable in a live environment and I have no idea why it should be?
Ubuntu doesn't ship with the A52 plugin by default as there are some patent issues I think.
However this is compilable from the source available from the repos.

Luke Yelavich has also reported this bug upstream and it appears to be to do with the Alsa plugin itself so this bug should be confirmed.

Changed in pulseaudio (Ubuntu):
status: Incomplete → Confirmed
Revision history for this message
Mike Rans (rans) wrote :

I can confirm that I get the same error message with Lucid.

I have raised upstream bugs. According to Lennart, a Pulseaudio developer, the problem (10 months ago) was "Uh. This needs to posted as a bug against the a52 alsa module upstream. It shouldn't return EAGAIN on snd_pcm_commit()."
http://pulseaudio.org/ticket/655#comment:2

I don't know if this is still the problem or if it has been fixed but I have reopened the above ticket with Pulseaudio and raised a new one with the Alsa plugins project here: https://bugtrack.alsa-project.org/alsa-bug/view.php?id=5054

Regarding the A52 plugin, this is compiled from Lucid source as by default Lucid doesn't ship with the A52 plugin. Why can't it be added as a "third party plugin" like Flash or Windows codecs?

Mike Rans (rans)
summary: - Pulse Audio no longer works with alsa a52 plugin (Ubuntu 9.04 Jaunty)
+ Pulse Audio no longer works with alsa a52 plugin (Ubuntu 10.04 Lucid)
summary: - Pulse Audio no longer works with alsa a52 plugin (Ubuntu 10.04 Lucid)
+ Pulseaudio fails with Alsa a52 (ac3) plugin (Ubuntu 10.04 Lucid)
Revision history for this message
Mike Rans (rans) wrote :

I tried using the ppa here: https://launchpad.net/~ricotz/+archive/unstable

This upgraded Alsa to 1.0.23, Pulseaudio to 1:0.9.22 and kernel to 2.6.35-6.7.

The problem is still the same with these newer versions.

Changed in pulseaudio:
status: Unknown → New
Revision history for this message
Mike Rans (rans) wrote :

I have found something that works for a while.

I add to .asoundrc:
# Rate Converter to 48kHz, needed for Pulseaudio it seems
pcm.Filter_RateConvert {
    type rate slave {
        pcm "Filter_A52Encode" rate 48000
    }
}

and in default.pa: load-module module-alsa-sink device=Filter_RateConvert rate=48000 channels=6 tsched=0 sink_properties=device.description=SPDIF sink_name=SPDIF

Music plays through AC3 via SPDIF through Pulseaudio and Alsa, but when I close the application (eg. Rhythmbox music player), the SPDIF output "disappears".

I have attached a new back trace: pulseaudiooutput_rateconverter.txt

I think it's here where the Filter_RateConvert sink gets unloaded for some reason:
I: client.c: Freed 1 "Rhythmbox"
I: protocol-native.c: Connection died.
I: module.c: Unloading "module-alsa-sink" (index: #4).
D: module-always-sink.c: Autoloading null-sink as no other sinks detected.

How can I prevent this unloading?

Revision history for this message
Mike Rans (rans) wrote :

I added to default.pa:
load-module module-suspend-on-idle timeout=0

and it seemed to prevent the unloading with Rhythmbox.

When I load Oolite that uses libsdl then the unloading still seems to occur (so Oolite produces no sound).

Changed in alsa-plugins:
status: Unknown → New
Revision history for this message
Mike Rans (rans) wrote :

I forced Pulseaudio not to rewind using:

    pa_sink_set_max_rewind(u->sink, 0);

This seemed to fix it.

timeout=0 is no longer needed in default.pa: default.pa: load-module module-suspend-on-idle # timeout=0

However, there is still a need for a rate converter in asoundrc: # Rate Converter to 48kHz, needed for Pulseaudio it seems pcm.Filter_RateConvert {

    type rate slave {

        pcm "Filter_A52Encode" rate 48000

    }

}

Revision history for this message
Mike Rans (rans) wrote :

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 ...

12. pulseaudio -k
13. pulseaudio -D

Revision history for this message
Danny Wood (danwood76) wrote :

Thanks and nice work, I will have to test this when I get home.

For now I have created a debian patch against the latest pulseaudio build in Ubuntu which can be put into the debian/patches (and added to the debian/patches/series file) folder to enable building the .deb package using dpkg (and patching through quilt).

In addition I have also added the package to a PPA here for people not comfortable with editing source code:
https://launchpad.net/~danwood76/+archive/pulse-a52

Revision history for this message
Mike Rans (rans) wrote :

Thanks for making the PPA. It should make it a lot easier for users.

I just had a quick look at your patch and I think there's a couple of problems.
     pa_sink_set_max_request(u->sink, u->hwbuf_size);
     pa_sink_set_max_rewind(u->sink, u->hwbuf_size); <--- this one should be deleted

+ 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);
+ }

 [Mapping iec958-ac3-surround-40]
There's second profile which from memory I think is: iec958-ac3-surround-51. This also needs a52 instead of a52:%f

Lastly, I suppose it would be possible to patch /etc/pulse/daemon.conf in this PPA so that it has default-sample-rate = 48000. Then the user doesn't need their own ~/.pulse/daemon.conf

This would mean they only need to edit ~/.asoundrc unless you can come up with a better way.

Now that the Pulseaudio guys have a patch for SPDIF passthrough, hopefully someone will look at putting ac3 encoding in Pulseaudio.

Revision history for this message
Danny Wood (danwood76) wrote :

Oh yeah, forgot to delete that line.

I have made the changes you have suggested, in the ppa and in this patch.
The .asoundrc will need user input anyway for the card name, but the configuration will be reduced to only editing that line now.

A native pulseaudio ac3 would be the best but if this works its an OK workaround until then.

Revision history for this message
Mike Rans (rans) wrote :

That's great. Let me know if it works for you.

tags: added: patch
Revision history for this message
Danny Wood (danwood76) wrote :

Well unfortunatly it appears to not work for me.
Pulseaudio detects the card and profiles correctly but when it comes to playing it dies.

Here is my verbose output:
I: alsa-sink.c: Trying resume...
D: alsa-util.c: Maximum hw buffer size is 21824 ms
D: alsa-util.c: Set buffer size first (to 4608 samples), period size second (to 1536 samples).
D: alsa-sink.c: hwbuf_unused=0
D: alsa-sink.c: setting avail_min=1
I: alsa-sink.c: Resumed successfully...
D: module-suspend-on-idle.c: Sink alsa_output.pci-0000_00_1b.0.iec958-ac3-surround-51 becomes idle, timeout in 5 seconds.
I: alsa-sink.c: Starting playback.
I: (alsa-lib)pcm_hw.c: SNDRV_PCM_IOCTL_START failed
D: module-suspend-on-idle.c: Sink alsa_output.pci-0000_00_1b.0.iec958-ac3-surround-51 becomes busy.
D: memblockq.c: memblockq requested: maxlength=33554432, tlength=0, base=12, prebuf=0, minreq=1 maxrewind=0
D: memblockq.c: memblockq sanitized: maxlength=33554436, tlength=33554436, base=12, prebuf=0, minreq=12 maxrewind=0
I: sink-input.c: Created input 0 "ALSA Playback" on alsa_output.pci-0000_00_1b.0.iec958-ac3-surround-51 with sample spec s16le 6ch 48000Hz and channel map front-left,front-right,rear-left,rear-right,front-center,lfe
I: sink-input.c: media.name = "ALSA Playback"
I: sink-input.c: application.name = "ALSA plug-in [speaker-test]"
I: sink-input.c: native-protocol.peer = "UNIX socket client"
I: sink-input.c: native-protocol.version = "16"
I: sink-input.c: application.process.id = "3829"
I: sink-input.c: application.process.user = "danny"
I: sink-input.c: application.process.host = "danny-desktop"
I: sink-input.c: application.process.binary = "speaker-test"
I: sink-input.c: application.language = "en_GB.utf8"
I: sink-input.c: window.x11.display = ":0.0"
I: sink-input.c: application.process.machine_id = "40751868c16b3a1bccd1c2ce4c024cf4"
I: sink-input.c: application.process.session_id = "40751868c16b3a1bccd1c2ce4c024cf4-1278919834.226667-76606340"
I: sink-input.c: module-stream-restore.id = "sink-input-by-application-name:ALSA plug-in [speaker-test]"
I: protocol-native.c: Requested tlength=7281.75 ms, minreq=1820.44 ms
D: protocol-native.c: Early requests mode enabled, configuring sink latency to minreq.
D: memblockq.c: memblockq requested: maxlength=4194304, tlength=4194288, base=12, prebuf=3145716, minreq=55296 maxrewind=0
D: memblockq.c: memblockq sanitized: maxlength=4194312, tlength=4194288, base=12, prebuf=3145716, minreq=55296 maxrewind=0
I: protocol-native.c: Final latency 7377.75 ms = 7089.75 ms + 2*96.00 ms + 96.00 ms
D: core-subscribe.c: Dropped redundant event due to change event.
D: protocol-native.c: Requesting rewind due to end of underrun.
D: alsa-sink.c: Requested to rewind 55296 bytes.
D: alsa-sink.c: Limited to 55296 bytes.
D: alsa-sink.c: before: 4608
E: alsa-sink.c: snd_pcm_rewind() failed: Unknown error 4608
D: alsa-sink.c: process_rewind: Unknown error 4608
E: alsa-sink.c: process_rewind: Unknown error 4608
I: module.c: Unloading "module-alsa-card" (index: #4).

It looks like it is still trying to rewind.
Was there anything other than this patch I needed to add?

Revision history for this message
Danny Wood (danwood76) wrote :

Forgot to say that any audio app causes this crash and the device just disappears then I have to restart pulseaudio.

I can get sound out just fine using the speaker-test to the alsa device only.

Revision history for this message
Mike Rans (rans) wrote :

My .asoundrc

Revision history for this message
Mike Rans (rans) wrote :

Actually just to rule things out I just reduced my.asoundrc to only:
# 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
    }
}
and it still works.

Revision history for this message
Mike Rans (rans) wrote :

Here's my alsa-sink.c - I'm pretty sure I didn't miss anything though.

Revision history for this message
Mike Rans (rans) wrote :

I saw process_rewind errors like that when the rates didn't match between Alsa and Pulseaudio - is everywhere using 48000?

Is Pulse definitely connecting to the rate converter and not directly to the A52 filter?

Is Pulse itself definitely using 48000?

Failing that, you can try copying Pulse's default.pa to your home directory, deleting the udev stuff (which will stop profiles working) and putting just oen sink for test purposes:
load-module module-alsa-sink device=a52 rate=48000 channels=6 tsched=0 sink_properties=device.description=SPDIF sink_name=SPDIF
load-module module-suspend-on-idle timeout=0

You can then put pa_sink_set_max_rewind(u->sink, 0); instead of the if else (as there is now only one sink) to be absolutely sure that max rewind is being set to 0.

Revision history for this message
Mike Rans (rans) wrote :
Revision history for this message
Mike Rans (rans) wrote :

pl bossart in Pulseaudio email list discussion said:
"
NAK. This does not work for me. You need to rewind also in the thread context:

diff --git a/src/modules/alsa/alsa-sink.c b/src/modules/alsa/alsa-sink.c
index 2995c3c..4059a9b 100644
--- a/src/modules/alsa/alsa-sink.c
+++ b/src/modules/alsa/alsa-sink.c
@@ -953,7 +953,12 @@ static int update_sw_params(struct userdata *u) {
    }

    pa_sink_set_max_request_within_thread(u->sink, u->hwbuf_size -
u->hwbuf_unused);
- pa_sink_set_max_rewind_within_thread(u->sink, u->hwbuf_size);
+ 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);
+ }

    return 0;
}
@@ -1906,7 +1911,12 @@ pa_sink *pa_alsa_sink_new(pa_module *m,
pa_modargs *ma, const char*driver, pa_ca
                (double) pa_bytes_to_usec(u->hwbuf_size, &ss) /
PA_USEC_PER_MSEC);

    pa_sink_set_max_request(u->sink, u->hwbuf_size);
- pa_sink_set_max_rewind(u->sink, u->hwbuf_size);
+ 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);
+ }

    if (u->use_tsched) {
        u->tsched_watermark =
pa_usec_to_bytes_round_up(pa_bytes_to_usec_round_up(tsched_watermark,
&requested_ss), &u->sink->sample_spec);

pa_pcm_is_hw detects a52 but allows rewind for iec958. Looks like a
better fix than a hard-coded string compare.
"

I didn't have a line with pa_sink_set_max_rewind_within_thread but I added it anyway with no ill effect. Probably my Pulseaudio is older.

Danny, can you update the patch with pl bossart's code?

Revision history for this message
Mike Rans (rans) wrote :

Also here's my output if it helps with your debugging.

Revision history for this message
Luke Yelavich (themuso) wrote : Re: [Bug 348353] Re: Pulseaudio fails with Alsa a52 (ac3) plugin (Ubuntu 10.04 Lucid)

This asoundrc is too card specific. You should not be referring to nvidia in your asoundrc, because everyone using a52/SPDIF hardware has different chipsets. You probably need to use the various variables/macros available for specifying the card identifier.

Luke

Revision history for this message
Danny Wood (danwood76) wrote :

Perfect. The extra in thread rewind fixed it for me.

I now have a fully working a52 through pulseaudio.
I have updated my PPA and the new patch is attached.

Revision history for this message
Mike Rans (rans) wrote :

Good news!

pl bossart also came up with a great way to avoid editing /usr/local/share/pulseaudio/alsa-mixer/profile-sets/default.conf

# Rate Converter to 48kHz, needed for some applications
pcm.a52 {
    @args.0 {
        type integer
    }
    type rate
    slave {
        pcm "Filter_A52Encode"
        rate 48000
    }
}

The args.0 will then allow a52:%f to match a52:0.

Luke, what can we put instead of "card NVidia"? "card 0" would work for the majority of users including me, but it would be nice to have something that will work if the card is not 0. Any suggestions?

Revision history for this message
Mike Rans (rans) wrote :

coling suggested:

You shouldn't need to specify either card NVidia or card 0. Just use the argument passed in and pass it through to the slave. It's just about cooking up the right .asoundrc syntax. Something like (untested):
{{{
pcm.Filter_A52Encode {
    @args [ CARD ]
    @args.CARD {
        type integer
        default 0
    }
    type a52
    bitrate 448
    channels 6
    card $CARD
}

pcm.a52 {
    @args [ CARD ]
    @args.CARD {
        type integer
        default 0
    }
    type rate
    slave {
        pcm "Filter_A52Encode"
        card $CARD
        rate 48000
    }
}
}}}

Revision history for this message
Mike Rans (rans) wrote :

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
   }
}

I tried the above. Works for Pierre in Fedora, but doesn't seem to work for me in Lucid.
See https://tango.0pointer.de/pipermail/pulseaudio-discuss/2010-July/007512.html

If I replace $CARD with 0, it works for me.

Can someone please try this and let me know if it works?

Revision history for this message
Danny Wood (danwood76) wrote :

Just removing the card line works.
It binds to the first SPDIF it finds I think which will usually be the correct one.

Revision history for this message
Mike Rans (rans) wrote :

Thanks. I will try that later.

Revision history for this message
Mike Rans (rans) wrote :

I was mistaken. I confused sinks and profiles. With $CARD, withe A52 profile does appear in the Hardware tab in the Sound preferences, so a suitable .asoundrc is:

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
   }
}

Revision history for this message
Mike Rans (rans) wrote :

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

Revision history for this message
Danny Wood (danwood76) wrote :

I have managed to incorporate the alsa config into my pulseaudio file now.
Adding the config to /usr/share/alsa/a52.conf and adding a hook into the pulse.conf within the same directory works perfectly.

My PPA now contains the packages and configs require to get this working from scratch.

So to do it:

1. sudo add-apt-repository ppa:danwood76/pulse-a52
(Adds my PPA to your software sources)

2. sudo apt-get update && sudo apt-get upgrade
(Updates package list and upgrades packages)

3. sudo alsa reload; pulseaudio -k
(Loads alsa config and restarts pulseaudio)

And you should then be able to select the 5.1 digital output in the sounds control panel.
I will test this on a live system once the packages have built.

Revision history for this message
Mike Rans (rans) wrote :

That's excellent. It will make it easy for everyone to get this working.

I suggest you contribute your a52.conf with amended pulse.conf to the appropriate developers (Alsa?) for inclusion in future releases. All the Pulseaudio fixes I've previously mentioned will be in a future Pulseaudio release.

Revision history for this message
Mike Rans (rans) wrote :

Just one more thing as Columbo would say.

To make your PPA self contained, if you haven't already, you need to add the A52 plugin itself, as unfortunately Lucid does not include it in the Alsa plugins.

Revision history for this message
Danny Wood (danwood76) wrote :

I have tried this.
Unfortunately the build system didnt create it.

I will have to upload the source package later with the full buil-depends.

Revision history for this message
QuinnStorm (livinglatexkali) wrote :

In trying to build from source, I had to patch debian/rules to pass --enable-avcodec=yes to configure before it would notice that I'd installed libavcodec-dev, I may have happened to do something else at the same time, but I doubt it. At the very least its something to look into to get it to build on the build system

Revision history for this message
QuinnStorm (livinglatexkali) wrote :

Strike that, I didn't catch that it was running configure twice, I'm not sure just why, I was just using debian/rules binary, maybe there's something strange about how its built, I apologize, I should have checked more before commenting...wish there was an edit feature

Revision history for this message
Danny Wood (danwood76) wrote :

Hi,

I will try again later. I've been busy moving house the last couple of weeks so I haven't had the time.

thanks,
Danny

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in alsa-plugins (Ubuntu):
status: New → Confirmed
Revision history for this message
Luke Yelavich (themuso) wrote :

Lucid is EOL.

Changed in alsa-plugins (Ubuntu):
status: Confirmed → Invalid
Revision history for this message
dino99 (9d9) wrote :

outdated

Changed in pulseaudio:
importance: Unknown → Undecided
status: New → Invalid
Changed in alsa-plugins:
importance: Unknown → Undecided
status: New → Invalid
Changed in pulseaudio (Ubuntu):
status: Confirmed → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.