You are not logged in.

#1 2018-10-29 14:13:59

quequotion
Member
From: Oita, Japan
Registered: 2013-07-29
Posts: 813
Website

[WORKAROUND] A52 plugin fails with alsa-lib and alsa-plugins 1.1.7

EDIT: I've published an AUR package, with instructions to expedite working around this issue. There is a FlySpray task as well.

Just in case any other users with a similar surround sound setup are banging their heads trying to figure out what went wrong this time; it seems like a52 is borked upstream.

Edit: alsa-lib's configuration parser, at least for the rate plugin which a52 depends on, is apparently the thing that is borked.

I have not yet done a detailed investigation of the changes between 1.1.6 and 1.1.7, but it doesn't seem like a52 (aka digital surround sound over SPDIF or iec958-ac3-surround) can be made to work anymore. Either it is utterly broken, or the method of configuration has drastically changed (pulseaudio fails to initialize the plugin, stating "(alsa-lib)pcm_rate.c: Unknown field card" and refusing the configuration).

Edit: It is indeed borked upstream; see above linked FlySpray task for details.

If you are using such a surround sound system, the thing to do for now is downgrade to 1.1.6--making sure to build alsa-plugins against ffmpeg for the a52 plugin.

Edit: It is safe to upgrade, but alsa-lib requires patching.

Before doing that however, either build ffmpeg with libavresample (used by the rate plugin), which has been dropped in favor of libswresample (no telling if or when the alsa devs might port their plugin), by adding "--enable-avresample" to configure.

EDIT: Much simpler to use the libavresample package from the AUR.

Last edited by quequotion (2020-03-29 03:14:03)

Offline

#2 2018-10-29 16:05:57

quequotion
Member
From: Oita, Japan
Registered: 2013-07-29
Posts: 813
Website

Re: [WORKAROUND] A52 plugin fails with alsa-lib and alsa-plugins 1.1.7

FS#60586 suggests going the other way around, by removing the lavrate plugin from alsa-plugins.

That is probably what is required for arch packaging (dropping the thing with a dependency on a deprecated library) but I am not sure the a52 plugin will be usable without the rate plugin, which I believe is invoked by this (widely available) configuration:

pcm.a52 {
  @args [CARD]
  @args.CARD {
    type string
  }
  type rate
  slave {
    pcm {
      type a52
      bitrate 448
      channels 6
      card $CARD
    }
    rate 48000
  }
}

EDIT: The above still works with IdleGandalf's patched alsa-lib. Since 1.1.7, there appears to have been a parsing error undermining configuration of the a52 plugin.

The only configuration I could find to activate the 1.1.7 version of the plugin (built against ffmpeg with libavresample) was this:

pcm.a52 {
  type a52
}

This created iec958-ac3-surround sinks, but none were usable. If such a profile were configured, pulseaudio would suffer thousands of underruns per second. If that didn't crash pulseaudio, it would certainly crash as soon as any attempt to play audio was made.

It is possible the method of configuring the plugin has been changed.

Last edited by quequotion (2019-12-23 06:03:19)

Offline

Board footer

Powered by FluxBB