#998125 libasound2-plugins: Config file for a52 plugin (60-a52-encoder.conf) produces no/garbled sound via optical digital out (S/PDIF)

Package:
libasound2-plugins
Source:
alsa-plugins
Description:
ALSA library additional plugins
Submitter:
Jens Schmidt
Date:
2022-01-14 12:45:05 UTC
Severity:
normal
#998125#5
Date:
2021-10-30 18:27:25 UTC
From:
To:
Dear Maintainer,

* What led up to the situation?
Fresh Debian 11 install.
I want to output 5.1 sound via toslink.
Used KDE settings to switch from analog output to digital out 5.1.
This produced no or garbled sound and Youtube videos would
play back way to fast without sound.
Then I switched to digital out stereo, this worked as expected but only
stereo.

I could trace back the error to the shipped config file for alsa's a52
plugin: 60-a52-encoder.conf.

When I replaced that file with a much simpler one (see below) 5.1
digital out worked as expedted.

I tried with onboard sound (PCH9) and dedicated card (Audigy Z) with the same result, the inlcuded a52 config file does not work.

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

Therefore I assume the shipped config file with debian has an error somewhere. Please fix this.

Best reagards
Jens

#998125#10
Date:
2021-10-31 15:20:02 UTC
From:
To:
Hi Jens,

* Jens Schmidt <schmidt@iils.de> [2021-10-30 20:27 +0200]:

The package is not unusable because of one use case out of many.

Well 60-a52-encoder.conf is shipped from upstream. So would you
please report this to alsa-devel@alsa-project.org and keep
998125@bugs.debian.org in Cc: ?

We won't replace your a52.conf with 60-a52-encoder.conf as there are
users who might find the original conf file ok. You can create a
$HOME/.asoundrc with your configuration.

Elimar

#998125#17
Date:
2021-11-02 09:14:51 UTC
From:
To:
#998125#22
Date:
2021-12-28 14:00:05 UTC
From:
To:
On Tue, 2 Nov 2021 10:14:51 +0100 Jens Schmidt <schmidt@iils.de> wrote:
 > Reported upstream as
 > https://github.com/alsa-project/alsa-plugins/issues/38
 >
 >

Thanks for reporting upstream. I'm also experiencing non-working a52
encoding with the libasound2-plugins package shipped with debian
(1.2.5-2). On my system, the plugin outputs a digital 2-channel signal
without any sound instead of the expected 6-channel AC3 encoded stream.
After some researching I found that the main problem is not the
configuration files, but changes in the libavcodec encode API that were
not handled correctly by the a52 plugin. There were multiple commits in
upstream alsa already to fix the issue (see for example here:
https://alsa-project.org/wiki/Changes_v1.2.5.1_v1.2.6 ).

So I assume that the current version (1.2.5) is just broken with respect
to the a52 plugin.

I'm looking forward to a new release of 1.2.6 (or newer) to be included
in debian, which should hopefully fix the issues again. It would be
great if a maintainer could upgrade the debian alsa packages to latest
upstream (see also this request
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1001697 )


Best regards, Stefan

#998125#27
Date:
2022-01-13 20:35:40 UTC
From:
To:
Hi there,

i also had these sound problems using a TOSLink to my external receiver.
Today i compiled the new 1.2.6 packages of libasound2 and
libasound2-plugins for bullseye and the 5.1 sound is working again.

I use the default 60-a52-encoder.conf fiĺe.