You are not logged in.

#51 2021-05-31 14:47:49

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

Re: A52 plugin with alsa-plugins >1.1.6

manio wrote:

did you maybe tested if the latest alsa-plugin changes makes any difference to our problem?
There was 3 commits on 25 may regarding a52 plugin:
https://github.com/alsa-project/alsa-pl … master/a52

Oh wow, fresh commits after three years without updates. No, so far I've only gone upstream on ffmpeg. It looks like these could potentially solve our need to build a patched alsa-lib, but I've never had the symptoms described in the linked bug report. I'll give this a try as soon as I have some time.

regarding the commits we need to test I think it is worth to start bisecting using these:
https://github.com/FFmpeg/FFmpeg/commit … c/ac3enc.c
If anything wrong happens there (in ac3 encoder) - it could directly hit our use-case.

Indeed, a targeted approach seems like a good idea. There are 3700 commits between the last working version and the latest stable release, but I did spot check and (unless I've done something terribly wrong) chopped it down to about 150 candidates over the weekend. Seems like whatever changed, it wasn't long after the release of 4.3.2.

------------

Edit: Sort of hit a wall here. I haven't narrowed it down to a particular commit, but approaching 4.3.2 in ffmpeg's commit log it fails to build with messages about undefined things in libsrt. These versions most likely depend on an earlier version of srt, which is now at 1.4.3-1 in [extra]. Trying to build the previous version of this package, 1.4.2-1, fails because it in turn appears to require earlier version of gcc. Compiling the compiler is a rather extreme measure, but that's what I am doing now: compiling the previous release of gcc in order to build srt against it in order to build (probably several versions of) ffmpeg against that in order to build alsa-lib-a52pcm against them... Hopefully srt builds against the immediately previous version of gcc; the compiler is updated rather frequently and takes even longer to build than ffmpeg and hopefully I get away with it (generally speaking, building one thing with a different version of the compiler than its dependency was built with does not work).

Edit again: looks like there's no building the previous version of srt without going back in time.

Last edited by quequotion (2021-06-02 14:08:26)

Offline

#52 2021-06-05 19:51:18

manio
Member
Registered: 2021-05-05
Posts: 7

Re: A52 plugin with alsa-plugins >1.1.6

I found it smile
First bad commit:

commit 93016f5d1d280f9cb7856883af287fa66affc04c
Author: James Almer <jamrial@gmail.com>
Date:   Tue Jun 9 18:35:00 2020 -0300

    avcodec/encode: restructure the old encode API

    Following the same logic as 061a0c14bb, this commit turns the old encode API
    into a wrapper for the new one.

    Signed-off-by: James Almer <jamrial@gmail.com>

I've sent an email to James Almer...

@quequotion
I've tested with the following PKGBUILD:

diff --git a/trunk/PKGBUILD b/trunk/PKGBUILD
index 94058d1..be3abe8 100644
--- a/trunk/PKGBUILD
+++ b/trunk/PKGBUILD
@@ -106,14 +106,16 @@ sha256sums=(

 pkgver() {
   cd ffmpeg
-
-  git describe --tags | sed 's/^n//'
+  echo "4.4"
 }

 prepare() {
   cd ffmpeg
-  git cherry-pick -n 988f2e9eb063db7c1a678729f58aab6eba59a55b # fix nvenc on older gpus
-  patch -Np1 -i "${srcdir}"/vmaf-model-path.patch
+  #git cherry-pick -n 988f2e9eb063db7c1a678729f58aab6eba59a55b # fix nvenc on older gpus
+  #patch -Np1 -i "${srcdir}"/vmaf-model-path.patch
+
+  #git checkout 93016f5d1d   # first bad one
+  git checkout 827d6fe73d   # last OK
 }

 build() {
@@ -155,9 +157,7 @@ build() {
     --enable-librsvg \
     --enable-libsoxr \
     --enable-libspeex \
-    --enable-libsrt \
     --enable-libssh \
-    --enable-libsvtav1 \
     --enable-libtheora \
     --enable-libv4l2 \
     --enable-libvidstab \
@@ -176,7 +176,7 @@ build() {
     --enable-shared \
     --enable-version3

-  make
+  make -j4
   make tools/qt-faststart
   make doc/ff{mpeg,play}.1
 }

can you please also confirm it on your system?

update: I've got a back info from James that the A52 plugin is the one to blame as it unconditionally feeding the new ac3_fixed encoder with with wrong S16 planar audio...

edit 2: I was trying to fix the a52 plugin myself but unfortunately it was too hard for me, but I created an issue for this: https://github.com/alsa-project/alsa-plugins/issues/22

edit 3:
Some tips for you which are trying to build the alsa-plugins. The repository in Arch was upgraded to newest package version so doing it all according to @quequotion instructions will not work:
1. It will complain about missing pgp key - one workaround is to call it like this:

makechrootpkg -c -r $CHROOT -I ../../libavresample/libavresample-4.3.1-1-x86_64.pkg.tar.zst -- --skippgpcheck

note the skippgpcheck argument passed
2. It will not build because the usbstream. You can disable it in PKGBUILD by adding the line "--disable-usbstream \" in the ./configure / build() section

Otherwise you can checkout known good old version addind the bolded line:
[...]
cd alsa-plugins/trunk/
git checkout 0d52e87
[...]

Last edited by manio (2021-06-06 14:25:47)

Offline

#53 2021-06-06 16:30:44

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

Re: A52 plugin with alsa-plugins >1.1.6

manio wrote:

I found it smile

Thank you for your hard work!

update: I've got a back info from James that the A52 plugin is the one to blame as it unconditionally feeding the new ac3_fixed encoder with with wrong S16 planar audio...

Progress! In the meantime I have tracked down Giovanni Harting (IdleGandalf) who wrote the patch for alsa-lib-a52pcm (fixing the config parser) and informed him of our plight. Perhaps he could be of assistance here.

@@ -155,9 +157,7 @@ build() {
     --enable-librsvg \
     --enable-libsoxr \
     --enable-libspeex \
-    --enable-libsrt \
     --enable-libssh \
-    --enable-libsvtav1 \
     --enable-libtheora \
     --enable-libv4l2 \
     --enable-libvidstab \

can you please also confirm it on your system?

I will give this a try after work tomorrow. For some reason I thought libsrt had to be enabled; it never occurred to me to try building without it.

The repository in Arch was upgraded to newest package version so doing it all according to @quequotion instructions will not work

The never-ending battle. After I confirm your build I'll go over the procedure again. There's probably a better way to avoid the pgp key issue.

It will not build because the usbstream.

Likely the same as the problem with libsrt: building an older version of ffmpeg against a newer Archlinux repository. Hopefully we can get the bug fixed in alsa-plugins so we can upgrade to the latest release of ffmpeg and not have this issue.

Last edited by quequotion (2021-06-07 23:27:06)

Offline

#54 2021-06-06 17:23:09

manio
Member
Registered: 2021-05-05
Posts: 7

Re: A52 plugin with alsa-plugins >1.1.6

Yeah, maybe libsrt and libsvtav1 has to be enabled - I only removed it because I've built a wider range of commits when bisecting - and this was the reason...

Offline

#55 2021-06-07 17:57:00

IdleGandalf
Member
Registered: 2016-12-30
Posts: 4

Re: A52 plugin with alsa-plugins >1.1.6

Hi all, I wrote that patchset years ago.

I had a quick look, but my patches are not affected by whatever changed, as you previously guessed.

While looking through stuff I found this very recent commit: https://github.com/jamrial/alsa-plugins … 04d9476cf4

That seems to address at least one of the issues. Can someone test that to verify?

Offline

#56 2021-06-08 03:10:03

manio
Member
Registered: 2021-05-05
Posts: 7

Re: A52 plugin with alsa-plugins >1.1.6

@IdleGandalf
I know jamrial's pull request. I contacted him at the beginning when i discovered the "bad" commit. He is so kind, that he made some work on the plugin code which is adapting it to new API but this changes are not sufficient to give a clean sound (as he also mention in that pull request). I was trying to work on this yesterday (on top of his changes) but the best I've got so far was a stuttering sound (on all newest packages).

Offline

#57 2021-06-10 16:16:47

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

Re: A52 plugin with alsa-plugins >1.1.6

Finally got something to work, sort of. I managed to replicate @manio's results with @jamrial's patches: the a52 plugin is operational but sound quality is bad (choppy, grinding really; kind of what you'd expect from an encoder that requires 32bits but is recieving 16).

I have a new PKGBUILD: alsa-plugins-libswresample-git, which I have not yet published on the AUR (waiting to see if @jamrial's branch gets merged).

This mouthful of a pkgname includes @IdleGandalf's patches to use libswresample instead of libavresample (see alsa-plugins-libswresample), eliminating the need to build the deprecated library, as well as pulling @jamrial's branch to support the new libavc API.

Note that indeed usbstream has to be disabled (failing to find a function that ought to be provided by alsa-lib? todo: debug that).

UPDATE: usbstream is buildable again; no idea what was wrong or how it was fixed but anyway, it's fine now.

pkgname=alsa-plugins-libswresample-git
_basename=alsa-plugins
provides=('alsa-plugins=1.2.2')
conflicts=(alsa-plugins)
pkgver=1.2.5.r4.g66b1db7
pkgrel=1
pkgdesc="Additional ALSA plugins (with libswresample support)"
arch=(x86_64)
url="https://www.alsa-project.org"
license=(LGPL2.1)
depends=(glibc libasound.so)
optdepends=('dbus: for maemo plugin'
            'jack: for pcm_jack plugin'
            'libavtp: for pcm_aaf plugin'
            'libsamplerate: for rate_samplerate plugin'
            'libpulse: for conf_pulse, ctl_pulse and pcm_pulse plugins'
            'speexdsp: for pcm_speex and rate_speexrate plugins'
            'ffmpeg: for a52 plugin')
makedepends=(alsa-lib dbus jack libavtp libpulse libsamplerate speexdsp ffmpeg)
source=(git+https://github.com/jamrial/alsa-plugins.git#branch=new_lavc_api
        pulse-sysdefault.diff
        "https://git.harting.dev/anonfunc/alsa-plugins/commit/9cdbbb9874757b6f8fda7fb4ac2e3fc59da65946.patch")
sha256sums=(SKIP
            'd8c59b891e2913619d057ffea308293d73892b16fa5a01583d056e372e55309d'
            'f1fc4fe7d3b4c34b244b276d109af9bfb0b501554e882749b22d4e9a6f3d7596')

pkgver() {
  cd $_basename
  git describe --long | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
}

prepare() {
  cd $_basename

  # Make use of the pulse plugin's "fallback" feature
  # Keeps parity with our old config from pulseaudio-alsa
  patch -Np1 -i ../pulse-sysdefault.diff
 
  # Make rate plugin use libswresample
  patch -Np1 -i ../9cdbbb9874757b6f8fda7fb4ac2e3fc59da65946.patch

  autoreconf -fvi
}

build() {
  cd $_basename
  ./configure \
    --disable-usbstream \
    --prefix=/usr \
    --sysconfdir=/etc \
    --enable-maemo-plugin \
    --enable-maemo-resource-manager
  make
}

package() {
  cd $_basename
  make DESTDIR="$pkgdir" install
  install -Dt "$pkgdir/usr/share/doc/$_basename" -m644 doc/README* doc/*.txt

  # remove maemo plugin configuration (it overrides defaults for pcm and ctl),
  # until a better way is found to package default overrides:
  # https://bugs.archlinux.org/task/65440
  rm -v "${pkgdir}/etc/alsa/conf.d/98-maemo.conf"

  # make a proper off-by-default config template out of the example file
  mv -v "${pkgdir}/etc/alsa/conf.d/99-pulseaudio-default.conf.example" \
    "${pkgdir}/usr/share/alsa/alsa.conf.d/99-pulseaudio-default.conf"
}

I built this package then installed it and alsa-lib from [extra]:

$ makechrootpkg -c -r $CHROOT
$ pacman -U --asdeps alsa-plugins-libswresample-git-1.2.5.r4.g66b1db7-1-x86_64.pkg.tar.zst
$ pacman -S --asdeps alsa-lib

---------------------------------------

The sound quality from the plugin is really too bad to use, but producing sound at all is progress (especially with the install process streamlined to this point). It's still possible to disable pulseaudio (or just set a digital stereo profile for the card) and configure individual apps to pass-through ac3 directly to the external amp to get full quality.

There are two more things we need to get working on for a52's future: use 32bit sampling in alsa-plugins, have IdleGandalf's libswresample patch upstreamed.

UPDATE: It may be time to end the cargo-cult of the a52 configuration, and the alsa-lib-a52pcm package with it. This configuration is not needed to use the plugin with pulseaudio, which can (now) configure the card by loading the appropriate profile from preconfiguration provided by the alsa-plugins package. Not sure how users of standalone ALSA without pulseaudio are to access the module however (the module ought to be "plug:a52", but speaker-test is broken; could be because of the sample rate).

Last edited by quequotion (2021-06-19 11:14:59)

Offline

#58 2021-06-16 03:25:43

manio
Member
Registered: 2021-05-05
Posts: 7

Re: A52 plugin with alsa-plugins >1.1.6

Good news: thanks to @tiwai we have a crystal clear sound back with recent changes smile
Development work is in progress...

Offline

#59 2021-06-18 16:48:52

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

Re: A52 plugin with alsa-plugins >1.1.6

And it's fixed!

Allow me to reiterate,

A52 surround now works out of the box. No ALSA configuration needed. As soon as alsa-plugins gets its next stable release, there won't be any need to build a package either.

In the mean time, build and install alsa-plugins-git.

@Moonbane, are you still around? This thread should be marked as [SOLVED].

Offline

#60 2021-06-19 13:48:22

bernd_b
Member
Registered: 2013-07-30
Posts: 140

Re: A52 plugin with alsa-plugins >1.1.6

That's very good news. Still output via hdmi won't be possible, I guess?

Offline

#61 2021-06-19 14:46:22

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

Re: A52 plugin with alsa-plugins >1.1.6

bernd_b wrote:

That's very good news. Still output via hdmi won't be possible, I guess?

If you have the hardware to test, please test.

Offline

#62 2021-06-19 15:25:48

bernd_b
Member
Registered: 2013-07-30
Posts: 140

Re: A52 plugin with alsa-plugins >1.1.6

On one of my PC, it works like described;
I installed alsa-plugins-git from AUR and pavucontrol shows the a52 device, but only for the S/PDIF  output, as I understand.

On my "home-theatre"-PC, where I have a dts/ac3 headphone decoder attached, there is no explicit S/PDIF output, so maybe this is the reason I cannot see the a52 device at all

null
    Discard all samples (playback) or generate zero samples (capture)
lavrate
    Rate Converter Plugin Using Libav/FFmpeg Library
samplerate
    Rate Converter Plugin Using Samplerate Library
speexrate
    Rate Converter Plugin Using Speex Resampler
jack
    JACK Audio Connection Kit
oss
    Open Sound System
pipewire
    PipeWire Sound Server
pulse
    PulseAudio Sound Server
speex
    Plugin using Speex DSP (resample, agc, denoise, echo, dereverb)
upmix
    Plugin for channel upmix (4,6,8)
vdownmix
    Plugin for channel downmix (stereo) with a simple spacialization
default
    Default ALSA Output (currently PipeWire Media Server)
sysdefault:CARD=PCH
    HDA Intel PCH, ALC887-VD Analog
    Default Audio Device
front:CARD=PCH,DEV=0
    HDA Intel PCH, ALC887-VD Analog
    Front output / input
surround21:CARD=PCH,DEV=0
    HDA Intel PCH, ALC887-VD Analog
    2.1 Surround output to Front and Subwoofer speakers
surround40:CARD=PCH,DEV=0
    HDA Intel PCH, ALC887-VD Analog
    4.0 Surround output to Front and Rear speakers
surround41:CARD=PCH,DEV=0
    HDA Intel PCH, ALC887-VD Analog
    4.1 Surround output to Front, Rear and Subwoofer speakers
surround50:CARD=PCH,DEV=0
    HDA Intel PCH, ALC887-VD Analog
    5.0 Surround output to Front, Center and Rear speakers
surround51:CARD=PCH,DEV=0
    HDA Intel PCH, ALC887-VD Analog
    5.1 Surround output to Front, Center, Rear and Subwoofer speakers
surround71:CARD=PCH,DEV=0
    HDA Intel PCH, ALC887-VD Analog
    7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
hdmi:CARD=PCH,DEV=0
    HDA Intel PCH, HDMI 0
    HDMI Audio Output
hdmi:CARD=PCH,DEV=1
    HDA Intel PCH, HDMI 1
    HDMI Audio Output
hdmi:CARD=PCH,DEV=2
    HDA Intel PCH, HDMI 2
    HDMI Audio Output
hdmi:CARD=PCH,DEV=3
    HDA Intel PCH, HDMI 3
    HDMI Audio Output
usbstream:CARD=PCH
    HDA Intel PCH
    USB Stream Output
dcahdmi:CARD=PCH,DEV=0
    HDA Intel PCH, HDMI 0
    DTS Encoding through HDMI
dcahdmi:CARD=PCH,DEV=1
    HDA Intel PCH, HDMI 1
    DTS Encoding through HDMI
dcahdmi:CARD=PCH,DEV=2
    HDA Intel PCH, HDMI 2
    DTS Encoding through HDMI
dcahdmi:CARD=PCH,DEV=3
    HDA Intel PCH, HDMI 3
    DTS Encoding through HDMI
usbstream:CARD=U0x46d0x819
    USB Device 0x46d:0x819
    USB Stream Output

Entering the asound.conf entries from here makes the device a52 listed in aplay -L, but pavucontrol doesn't list the output. This hint didn't change this.

pactl load-module module-alsa-sink device=a52 device_id=PCH sink_name="A52 Surround Sink"
Failure: No such entity

 pacman -Qs alsa-plugins
local/alsa-plugins-git 1:1.2.5.r27.g873d962-1
    Additional ALSA plugins
 

Last edited by bernd_b (2021-06-19 15:28:52)

Offline

#63 2021-06-19 17:33:50

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

Re: A52 plugin with alsa-plugins >1.1.6

bernd_b wrote:

On my "home-theatre"-PC, where I have a dts/ac3 headphone decoder attached, there is no explicit S/PDIF output, so maybe this is the reason I cannot see the a52 device at all

The reason you cannot see the a52 device is that there is no a52 device; it doesn't show up in the output of:

aplay -L

I suspect that is because it is a virtual device that doesn't actually "exist" unless in use. I wish it would be visible the way it was with the deprecated manual configuration method, but it is not. Perhaps we should file another issue report to alsa-plugins' git repository.

Nonetheless, the device is usable as "plug:a52" where you would normally provide the name of a device to ALSA applications.

ie, you should be able to test the output with:

speaker-test -D plug:a52 -c6

Edit: note that -c6 is for 5.1 surround (six channels); if you want to test 7.1 this will be -c8, etc.

bernd_b wrote:

Entering the asound.conf entries from here makes the device a52 listed in aplay -L

The time has come to stop using this configuration. We need to go out, across the internet, and tell everyone--everywhere--that it is time to put this away.

It is apparent that what happened after alsa-plugins 1.1.6 is that the newly supplied preconfiguration (in 1.1.7+) was not at all publicized, nor was the fact that ALSA will merge a manual configuration unless prepended with an exclamation mark. See the discussion here.

The ALSA developers may have expected users to see a post in their mailing list, or read the documentation and look at the source code, but no one did.

bernd_b wrote:

This hint didn't change this.

I don't think that is meant to be copied and pasted.

In my case, I load the module like this in /etc/pulse/default.pa:

load-module module-alsa-card device_id="0" profile="output:iec958-ac3-surround-51+input:analog-stereo"

The "device_id" and "profile" specifications are acquired from the output of:

pactl list cards

Yours are probably not the same as mine.

Edit: Not to imply that manual pulseaudio configuration is necessary. If you see any "...Digital Surround..." options in pavucontrol on your HDMI equipped PC, setting one of them ought to be equivalent.

Edit again: Are these not what you need?:

dcahdmi:CARD=PCH,DEV=0
    HDA Intel PCH, HDMI 0
    DTS Encoding through HDMI
dcahdmi:CARD=PCH,DEV=1
    HDA Intel PCH, HDMI 1
    DTS Encoding through HDMI
dcahdmi:CARD=PCH,DEV=2
    HDA Intel PCH, HDMI 2
    DTS Encoding through HDMI
dcahdmi:CARD=PCH,DEV=3
    HDA Intel PCH, HDMI 3
    DTS Encoding through HDMI

Last edited by quequotion (2021-06-19 17:47:28)

Offline

#64 2021-06-19 21:32:37

bernd_b
Member
Registered: 2013-07-30
Posts: 140

Re: A52 plugin with alsa-plugins >1.1.6

quequotion wrote:

Edit again: Are these not what you need?:

dcahdmi:CARD=PCH,DEV=0
    HDA Intel PCH, HDMI 0
    DTS Encoding through HDMI
dcahdmi:CARD=PCH,DEV=1
    HDA Intel PCH, HDMI 1
    DTS Encoding through HDMI
dcahdmi:CARD=PCH,DEV=2
    HDA Intel PCH, HDMI 2
    DTS Encoding through HDMI
dcahdmi:CARD=PCH,DEV=3
    HDA Intel PCH, HDMI 3
    DTS Encoding through HDMI

These are the devices made by the dcaenc-plugin.

Emptying /etc/asound.conf from everything belonging to a52-stuff.
And firing up:

speaker-test -D plug:a52 -c6

speaker-test 1.2.5.1

Playback device is plug:a52
Stream parameters are 48000Hz, S16_LE, 6 channels
Using 16 octaves of pink noise
Playback open error: -2,No such file or directory

gives me no luck again, I wonder how to tell speakers-test which Device number to use (or how should the a52 plugin know?)

pactl list cards

gives a very long output. What do I have to be looking for? I cannot find any "a52" term in the output.

On another PC, the plugin is recognized without any further invention, but only output via toslink is offered in pavucontrol.

Last edited by bernd_b (2021-06-19 21:34:31)

Offline

#65 2021-06-20 03:05:38

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

Re: A52 plugin with alsa-plugins >1.1.6

bernd_b wrote:

These are the devices made by the dcaenc-plugin.

Having just built and installed dcaenc myself, to test over S/PDIF (my surround sound amplifier does not have an HDMI port), I was surprised to find that it does work (with aplay and  pulseaudio) but the audio quality is quite poor. I am not sure the cause of that; there seems to be a wide range of speculation as I google this for the first time (configuration options, insufficient bandwidth, unimplemented proprietary technology, etc). Furthermore, I get this error from speaker-test:

speaker-test -D dca:CARD=PCH,DEV=0 -c6

speaker-test 1.2.5.1

Playback device is dca:CARD=PCH,DEV=0
Stream parameters are 48000Hz, S16_LE, 6 channels
Using 16 octaves of pink noise
Rate set to 48000Hz (requested 48000Hz)
Buffer size range from 64 to 8544000
Period size range from 32 to 4272000
Using max buffer size 8544000
Periods = 4
Unable to set hw params for playback: Cannot allocate memory
Setting of hwparams failed: Cannot allocate memory

Do those dcaenc outputs also produce poor audio quality for you?

Emptying /etc/asound.conf from everything belonging to a52-stuff.

Note, after installing alsa-plugins-git or changing your alsa configuration, you should restart alsa (and pulseaudio):

$ systemctl --user stop pulseaudio{,.socket}
# alsactl init
$ systemctl --user start pulseaudio.socket

I wonder how to tell speakers-test which Device number to use (or how should the a52 plugin know?)

Legit question is legit. I don't understand how "plug:a52" with no device specification is sufficient. For my hardware, there's only one device this could refer to, but that may not be the case for others.

What do I have to be looking for? I cannot find any "a52" term in the output.

Show us the whole thing. Sounds like the plugin isn't loaded; there should be a profile like "output:iec958-ac3-surround-51" or "output:hdmi-ac3-surround-51".

Offline

#66 2021-06-20 08:36:22

bernd_b
Member
Registered: 2013-07-30
Posts: 140

Re: A52 plugin with alsa-plugins >1.1.6

quequotion wrote:

Show us the whole thing. Sounds like the plugin isn't loaded; there should be a profile like "output:iec958-ac3-surround-51" or "output:hdmi-ac3-surround-51".


So let's start with the easiest one:

[bernd_b@P4560-dev ~]$ pactl list cards
Card #40
	Name: alsa_card.usb-046d_0819_50616690-02
	Driver: alsa
	Owner Module: n/a
	Properties:
		device.enum.api = "udev"
		device.api = "alsa"
		media.class = "Audio/Device"
		api.alsa.path = "hw:0"
		api.alsa.card = "0"
		api.alsa.card.name = "USB Device 0x46d:0x819"
		api.alsa.card.longname = "USB Device 0x46d:0x819 at usb-0000:00:14.0-7, high speed"
		device.plugged.usec = "9794903"
		device.bus_path = "pci-0000:00:14.0-usb-0:7:1.2"
		device.sysfs.path = "/sys/devices/pci0000:00/0000:00:14.0/usb1/1-7/1-7:1.2/sound/card0"
		device.bus-id = "usb-046d_0819_50616690-02"
		device.bus = "usb"
		device.subsystem = "sound"
		device.vendor.id = "1133"
		device.vendor.name = "Logitech, Inc."
		device.product.id = "2073"
		device.product.name = "Webcam C210"
		device.serial = "046d_0819_50616690"
		device.form_factor = "webcam"
		device.name = "alsa_card.usb-046d_0819_50616690-02"
		device.description = "Webcam C210"
		device.nick = "USB Device 0x46d:0x819"
		device.icon_name = "camera-web-usb"
		api.alsa.use-acp = "true"
		api.acp.auto-profile = "false"
		api.acp.auto-port = "false"
		api.dbus.ReserveDevice1 = "Audio0"
		factory.id = "14"
		client.id = "30"
		object.id = "40"
		object.path = "alsa:pcm:0"
		alsa.card = "0"
		alsa.card_name = "USB Device 0x46d:0x819"
		alsa.long_card_name = "USB Device 0x46d:0x819 at usb-0000:00:14.0-7, high speed"
		alsa.driver_name = "snd_usb_audio"
		device.string = "0"
	Profiles:
		off: Off (sinks: 0, sources: 0, priority: 0, available: yes)
		pro-audio: Pro Audio (sinks: 0, sources: 1, priority: 1, available: yes)
		input:mono-fallback: Mono Input (sinks: 0, sources: 1, priority: 1, available: yes)
	Active Profile: input:mono-fallback
	Ports:
		analog-input-mic: Microphone (type: Mic, priority: 8700, latency offset: 0 usec, availability unknown)
			Properties:
				port.type = "mic"
				device.icon_name = "audio-input-microphone"
				card.profile.port = "0"
			Part of profile(s): input:mono-fallback

Card #41
	Name: alsa_card.pci-0000_00_1f.3
	Driver: alsa
	Owner Module: n/a
	Properties:
		device.enum.api = "udev"
		device.api = "alsa"
		media.class = "Audio/Device"
		api.alsa.path = "hw:1"
		api.alsa.card = "1"
		api.alsa.card.name = "HDA Intel PCH"
		api.alsa.card.longname = "HDA Intel PCH at 0x2ffff20000 irq 130"
		device.plugged.usec = "10457810"
		device.bus_path = "pci-0000:00:1f.3"
		device.sysfs.path = "/sys/devices/pci0000:00/0000:00:1f.3/sound/card1"
		device.bus = "pci"
		device.subsystem = "sound"
		device.vendor.id = "32902"
		device.vendor.name = "Intel Corporation"
		device.product.id = "41712"
		device.product.name = "200 Series PCH HD Audio"
		device.form_factor = "internal"
		device.name = "alsa_card.pci-0000_00_1f.3"
		device.description = "Built-in Audio"
		device.nick = "HDA Intel PCH"
		device.icon_name = "audio-card-pci"
		api.alsa.use-acp = "true"
		api.acp.auto-profile = "false"
		api.acp.auto-port = "false"
		api.dbus.ReserveDevice1 = "Audio1"
		factory.id = "14"
		client.id = "30"
		object.id = "41"
		object.path = "alsa:pcm:1"
		alsa.card = "1"
		alsa.card_name = "HDA Intel PCH"
		alsa.long_card_name = "HDA Intel PCH at 0x2ffff20000 irq 130"
		alsa.driver_name = "snd_hda_intel"
		device.string = "1"
	Profiles:
		off: Off (sinks: 0, sources: 0, priority: 0, available: yes)
		output:analog-stereo+input:analog-stereo: Analog Stereo Duplex (sinks: 1, sources: 1, priority: 6565, available: no)
		output:analog-stereo: Analog Stereo Output (sinks: 1, sources: 0, priority: 6500, available: yes)
		output:hdmi-stereo+input:analog-stereo: Digital Stereo (HDMI) Output + Analog Stereo Input (sinks: 1, sources: 1, priority: 5965, available: no)
		output:hdmi-stereo: Digital Stereo (HDMI) Output (sinks: 1, sources: 0, priority: 5900, available: no)
		output:hdmi-stereo-extra1+input:analog-stereo: Digital Stereo (HDMI 2) Output + Analog Stereo Input (sinks: 1, sources: 1, priority: 5765, available: no)
		output:hdmi-stereo-extra2+input:analog-stereo: Digital Stereo (HDMI 3) Output + Analog Stereo Input (sinks: 1, sources: 1, priority: 5765, available: no)
		output:hdmi-stereo-extra3+input:analog-stereo: Digital Stereo (HDMI 4) Output + Analog Stereo Input (sinks: 1, sources: 1, priority: 5765, available: no)
		output:hdmi-stereo-extra1: Digital Stereo (HDMI 2) Output (sinks: 1, sources: 0, priority: 5700, available: yes)
		output:hdmi-stereo-extra2: Digital Stereo (HDMI 3) Output (sinks: 1, sources: 0, priority: 5700, available: no)
		output:hdmi-stereo-extra3: Digital Stereo (HDMI 4) Output (sinks: 1, sources: 0, priority: 5700, available: no)
		output:hdmi-surround+input:analog-stereo: Digital Surround 5.1 (HDMI) Output + Analog Stereo Input (sinks: 1, sources: 1, priority: 865, available: no)
		output:hdmi-surround71+input:analog-stereo: Digital Surround 7.1 (HDMI) Output + Analog Stereo Input (sinks: 1, sources: 1, priority: 865, available: no)
		output:hdmi-surround: Digital Surround 5.1 (HDMI) Output (sinks: 1, sources: 0, priority: 800, available: no)
		output:hdmi-surround71: Digital Surround 7.1 (HDMI) Output (sinks: 1, sources: 0, priority: 800, available: no)
		output:hdmi-dts-surround+input:analog-stereo: Digital Surround 5.1 (HDMI/DTS) Output + Analog Stereo Input (sinks: 1, sources: 1, priority: 665, available: no)
		output:hdmi-dts-surround-extra1+input:analog-stereo: Digital Surround 5.1 (HDMI 2/DTS) Output + Analog Stereo Input (sinks: 1, sources: 1, priority: 665, available: no)
		output:hdmi-surround-extra2+input:analog-stereo: Digital Surround 5.1 (HDMI 3) Output + Analog Stereo Input (sinks: 1, sources: 1, priority: 665, available: no)
		output:hdmi-surround71-extra2+input:analog-stereo: Digital Surround 7.1 (HDMI 3) Output + Analog Stereo Input (sinks: 1, sources: 1, priority: 665, available: no)
		output:hdmi-dts-surround-extra2+input:analog-stereo: Digital Surround 5.1 (HDMI 3/DTS) Output + Analog Stereo Input (sinks: 1, sources: 1, priority: 665, available: no)
		output:hdmi-surround-extra3+input:analog-stereo: Digital Surround 5.1 (HDMI 4) Output + Analog Stereo Input (sinks: 1, sources: 1, priority: 665, available: no)
		output:hdmi-surround71-extra3+input:analog-stereo: Digital Surround 7.1 (HDMI 4) Output + Analog Stereo Input (sinks: 1, sources: 1, priority: 665, available: no)
		output:hdmi-dts-surround-extra3+input:analog-stereo: Digital Surround 5.1 (HDMI 4/DTS) Output + Analog Stereo Input (sinks: 1, sources: 1, priority: 665, available: no)
		output:hdmi-dts-surround: Digital Surround 5.1 (HDMI/DTS) Output (sinks: 1, sources: 0, priority: 600, available: no)
		output:hdmi-dts-surround-extra1: Digital Surround 5.1 (HDMI 2/DTS) Output (sinks: 1, sources: 0, priority: 600, available: yes)
		output:hdmi-surround-extra2: Digital Surround 5.1 (HDMI 3) Output (sinks: 1, sources: 0, priority: 600, available: no)
		output:hdmi-surround71-extra2: Digital Surround 7.1 (HDMI 3) Output (sinks: 1, sources: 0, priority: 600, available: no)
		output:hdmi-dts-surround-extra2: Digital Surround 5.1 (HDMI 3/DTS) Output (sinks: 1, sources: 0, priority: 600, available: no)
		output:hdmi-surround-extra3: Digital Surround 5.1 (HDMI 4) Output (sinks: 1, sources: 0, priority: 600, available: no)
		output:hdmi-surround71-extra3: Digital Surround 7.1 (HDMI 4) Output (sinks: 1, sources: 0, priority: 600, available: no)
		output:hdmi-dts-surround-extra3: Digital Surround 5.1 (HDMI 4/DTS) Output (sinks: 1, sources: 0, priority: 600, available: no)
		input:analog-stereo: Analog Stereo Input (sinks: 0, sources: 1, priority: 65, available: no)
		pro-audio: Pro Audio (sinks: 5, sources: 2, priority: 1, available: yes)
	Active Profile: output:hdmi-dts-surround-extra1
	Ports:
		analog-input-front-mic: Front Microphone (type: Mic, priority: 8500, latency offset: 0 usec, availability group: Legacy 1, not available)
			Properties:
				port.type = "mic"
				port.availability-group = "Legacy 1"
				device.icon_name = "audio-input-microphone"
				card.profile.port = "0"
			Part of profile(s): input:analog-stereo, output:analog-stereo+input:analog-stereo, output:hdmi-stereo+input:analog-stereo, output:hdmi-surround+input:analog-stereo, output:hdmi-surround71+input:analog-stereo, output:hdmi-dts-surround+input:analog-stereo, output:hdmi-stereo-extra1+input:analog-stereo, output:hdmi-dts-surround-extra1+input:analog-stereo, output:hdmi-stereo-extra2+input:analog-stereo, output:hdmi-surround-extra2+input:analog-stereo, output:hdmi-surround71-extra2+input:analog-stereo, output:hdmi-dts-surround-extra2+input:analog-stereo, output:hdmi-stereo-extra3+input:analog-stereo, output:hdmi-surround-extra3+input:analog-stereo, output:hdmi-surround71-extra3+input:analog-stereo, output:hdmi-dts-surround-extra3+input:analog-stereo
		analog-input-rear-mic: Rear Microphone (type: Mic, priority: 8200, latency offset: 0 usec, availability group: Legacy 2, not available)
			Properties:
				port.type = "mic"
				port.availability-group = "Legacy 2"
				device.icon_name = "audio-input-microphone"
				card.profile.port = "1"
			Part of profile(s): input:analog-stereo, output:analog-stereo+input:analog-stereo, output:hdmi-stereo+input:analog-stereo, output:hdmi-surround+input:analog-stereo, output:hdmi-surround71+input:analog-stereo, output:hdmi-dts-surround+input:analog-stereo, output:hdmi-stereo-extra1+input:analog-stereo, output:hdmi-dts-surround-extra1+input:analog-stereo, output:hdmi-stereo-extra2+input:analog-stereo, output:hdmi-surround-extra2+input:analog-stereo, output:hdmi-surround71-extra2+input:analog-stereo, output:hdmi-dts-surround-extra2+input:analog-stereo, output:hdmi-stereo-extra3+input:analog-stereo, output:hdmi-surround-extra3+input:analog-stereo, output:hdmi-surround71-extra3+input:analog-stereo, output:hdmi-dts-surround-extra3+input:analog-stereo
		analog-input-linein: Line In (type: Line, priority: 8100, latency offset: 0 usec, availability group: Legacy 3, not available)
			Properties:
				port.type = "line"
				port.availability-group = "Legacy 3"
				card.profile.port = "2"
			Part of profile(s): input:analog-stereo, output:analog-stereo+input:analog-stereo, output:hdmi-stereo+input:analog-stereo, output:hdmi-surround+input:analog-stereo, output:hdmi-surround71+input:analog-stereo, output:hdmi-dts-surround+input:analog-stereo, output:hdmi-stereo-extra1+input:analog-stereo, output:hdmi-dts-surround-extra1+input:analog-stereo, output:hdmi-stereo-extra2+input:analog-stereo, output:hdmi-surround-extra2+input:analog-stereo, output:hdmi-surround71-extra2+input:analog-stereo, output:hdmi-dts-surround-extra2+input:analog-stereo, output:hdmi-stereo-extra3+input:analog-stereo, output:hdmi-surround-extra3+input:analog-stereo, output:hdmi-surround71-extra3+input:analog-stereo, output:hdmi-dts-surround-extra3+input:analog-stereo
		analog-output-lineout: Line Out (type: Line, priority: 9000, latency offset: 0 usec, availability group: Legacy 4, not available)
			Properties:
				port.type = "line"
				port.availability-group = "Legacy 4"
				card.profile.port = "3"
			Part of profile(s): output:analog-stereo, output:analog-stereo+input:analog-stereo
		analog-output-speaker: Speakers (type: Speaker, priority: 10000, latency offset: 0 usec, availability group: Legacy 5, availability unknown)
			Properties:
				port.type = "speaker"
				port.availability-group = "Legacy 5"
				device.icon_name = "audio-speakers"
				card.profile.port = "4"
			Part of profile(s): output:analog-stereo, output:analog-stereo+input:analog-stereo
		analog-output-headphones: Headphones (type: Headphones, priority: 9900, latency offset: 0 usec, availability group: Legacy 6, not available)
			Properties:
				port.type = "headphones"
				port.availability-group = "Legacy 6"
				device.icon_name = "audio-headphones"
				card.profile.port = "5"
			Part of profile(s): output:analog-stereo, output:analog-stereo+input:analog-stereo
		hdmi-output-0: HDMI / DisplayPort (type: HDMI, priority: 5900, latency offset: 0 usec, availability group: Legacy 7, not available)
			Properties:
				port.type = "hdmi"
				port.availability-group = "Legacy 7"
				device.icon_name = "video-display"
				card.profile.port = "6"
			Part of profile(s): output:hdmi-stereo, output:hdmi-stereo+input:analog-stereo, output:hdmi-surround, output:hdmi-surround+input:analog-stereo, output:hdmi-surround71, output:hdmi-surround71+input:analog-stereo, output:hdmi-dts-surround, output:hdmi-dts-surround+input:analog-stereo
		hdmi-output-1: HDMI / DisplayPort 2 (type: HDMI, priority: 5800, latency offset: 0 usec, availability group: Legacy 8, available)
			Properties:
				port.type = "hdmi"
				port.availability-group = "Legacy 8"
				device.icon_name = "video-display"
				card.profile.port = "7"
			Part of profile(s): output:hdmi-stereo-extra1, output:hdmi-stereo-extra1+input:analog-stereo, output:hdmi-dts-surround-extra1, output:hdmi-dts-surround-extra1+input:analog-stereo
		hdmi-output-2: HDMI / DisplayPort 3 (type: HDMI, priority: 5700, latency offset: 0 usec, availability group: Legacy 9, not available)
			Properties:
				port.type = "hdmi"
				port.availability-group = "Legacy 9"
				device.icon_name = "video-display"
				card.profile.port = "8"
			Part of profile(s): output:hdmi-stereo-extra2, output:hdmi-stereo-extra2+input:analog-stereo, output:hdmi-surround-extra2, output:hdmi-surround-extra2+input:analog-stereo, output:hdmi-surround71-extra2, output:hdmi-surround71-extra2+input:analog-stereo, output:hdmi-dts-surround-extra2, output:hdmi-dts-surround-extra2+input:analog-stereo
		hdmi-output-3: HDMI / DisplayPort 4 (type: HDMI, priority: 5600, latency offset: 0 usec, availability group: Legacy 10, not available)
			Properties:
				port.type = "hdmi"
				port.availability-group = "Legacy 10"
				device.icon_name = "video-display"
				card.profile.port = "9"
			Part of profile(s): output:hdmi-stereo-extra3, output:hdmi-stereo-extra3+input:analog-stereo, output:hdmi-surround-extra3, output:hdmi-surround-extra3+input:analog-stereo, output:hdmi-surround71-extra3, output:hdmi-surround71-extra3+input:analog-stereo, output:hdmi-dts-surround-extra3, output:hdmi-dts-surround-extra3+input:analog-stereo

Offline

#67 2021-06-20 10:19:07

bernd_b
Member
Registered: 2013-07-30
Posts: 140

Re: A52 plugin with alsa-plugins >1.1.6

quequotion wrote:

Do those dcaenc outputs also produce poor audio quality for you?

No, there where problems here and there, but at the end solvable, last one see here

Swichting to pipewire instead of using pulseaudio itself, no changes to the defaults are needed at the moment as far as I can notice.


I have no luck with speaker-test using hdmi-output, unless pulse is running and I don't choose a device using the -D option of speaker-test.
So the device is chosen by pulseaudio and/or pavucontrol, which makes life with pulseaudio worth living apart from things we discuss here.

To test alsa, I chose to use mpv, and

mpv --audio-channels=auto --audio-device=alsa/hdmi:DEV=1 surroundTest.ac3
[ffmpeg/demuxer] ac3: Estimating duration from bitrate, this may be inaccurate
 (+) Audio --aid=1 (ac3 6ch 44100Hz)
AO: [alsa] 44100Hz stereo 2ch s16
(Paused) A: 00:00:08 / 00:00:08 (100%)

or

mpv --audio-channels=5 --audio-device=alsa/dcahdmi:DEV=1 surroundTest.ac3
[ffmpeg/demuxer] ac3: Estimating duration from bitrate, this may be inaccurate
 (+) Audio --aid=1 (ac3 6ch 44100Hz)
[ao/alsa] ALSA channel map conflicts with channel count!
[ao/alsa] Asked for 5 channels, got 6 - fallback to fl-fr-na-na-na-na.
[ao/alsa] ALSA channel map conflicts with channel count!
[ao/alsa] Asked for 2 channels, got 4 - fallback to fl-fr-na-na.
AO: [alsa] 44100Hz fl-fr-na-na (stereo) 4ch s32
(Paused) A: 00:00:08 / 00:00:08 (100%)

The channel layout was wrong with "--audio-channels=auto", with --audio-channels=5, left, center, right and left/right surround were audible without distortions or audible quality losses.



I once played around with a Sony headphone and its included dts-decoder, where I needed these settings using dcaenc to have sound without distortions:

Some receivers (including JVC TH-A25 and Sony STR-DB780) mute their outputs
when receiving full 32-bit DTS stream (as generated by the ALSA plugin) over
SPDIF with AES0=6 (the default for the "dca" and "dcahdmi" families of ALSA
devices). To overcome this problem, add the following line to the end
of .asoundrc:

 defaults.pcm.dca.aes0 0x04

However, it can cause your receiver to unmute its output even if it does
not support DTS streams or does not detect them reliably. This will result
in very loud hiss that can damage the loudspeakers. So try this setting with
the lowest possible volume, and this is why it is not the default.

Similar settings exist for AES1, AES2 and AES3 SPDIF parameters.

Some other receivers (including the LG 47LM640T TV) need not raw DTS frames,
but DTS frames wrapped according to IEC61937-5, and either mute the output
or produce loud hiss otherwise. For such receivers, add the following line to
the end of .asoundrc:

 defaults.pcm.dca.iec61937 1

This could not be made the default, because other receivers (such as Sony
STR-DB780) reject DTS frames wrapped into IEC61937-5.

(from the README at https://github.com/darealshinji/dcaenc#readme)

You need to play around for a while, cause with me, restarting pulse or the pc wasn't enough, its seemed to me the restarting the audio device (meaning the decoder) was necessary too.

Offline

#68 2021-06-20 10:24:08

bernd_b
Member
Registered: 2013-07-30
Posts: 140

Re: A52 plugin with alsa-plugins >1.1.6

But this is about the a52 plugin:

What doesn't work for me is e.g:

[bernd_b@P4560-dev makepkg]$ mpv --audio-channels=auto --audio-device=a52/hdmi:DEV=1 surroundTest.ac3   
[ffmpeg/demuxer] ac3: Estimating duration from bitrate, this may be inaccurate
 (+) Audio --aid=1 (ac3 6ch 44100Hz)
[ao] Audio output a52 not found!
[ao] Failed to initialize audio driver 'a52'                                                                                                                                                                                               
[ao] This audio driver/device was forced with the --audio-device option.
[ao] Try unsetting it.
Could not open/initialize audio device -> no sound.
Audio: no audio

Exiting... (Errors when loading file)
[bernd_b@P4560-dev makepkg]$ mpv --audio-channels=auto --audio-device=plug:a52/hdmi:DEV=1 surroundTest.ac3
[ffmpeg/demuxer] ac3: Estimating duration from bitrate, this may be inaccurate
 (+) Audio --aid=1 (ac3 6ch 44100Hz)
[ao] Audio output plug:a52 not found!
[ao] Failed to initialize audio driver 'plug:a52'
[ao] This audio driver/device was forced with the --audio-device option.
[ao] Try unsetting it.
Could not open/initialize audio device -> no sound.
Audio: no audio

So I must assume that the a52-plugin is strictly bound to s/pdif or IECxxx output, as it was before to my knowledge.

Last edited by bernd_b (2021-06-20 10:25:21)

Offline

#69 2021-06-20 12:22:51

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

Re: A52 plugin with alsa-plugins >1.1.6

How about these profiles?

output:hdmi-surround+input:analog-stereo: Digital Surround 5.1 (HDMI) Output + Analog Stereo Input (sinks: 1, sources: 1, priority: 865, available: no)
output:hdmi-surround71+input:analog-stereo: Digital Surround 7.1 (HDMI) Output + Analog Stereo Input (sinks: 1, sources: 1, priority: 865, available: no)
output:hdmi-surround: Digital Surround 5.1 (HDMI) Output (sinks: 1, sources: 0, priority: 800, available: no)
output:hdmi-surround71: Digital Surround 7.1 (HDMI) Output (sinks: 1, sources: 0, priority: 800, available: no)

You should be able to set any one of them for your card, either manually in /etc/pulse/default.pa or by selecting one in pavucontrol.

I note they do not indicate a type of encoding. As far as I know, HDMI does not have a *native* surround sound encoding format, so these ought to be producing some kind of Dolby encoded output (maybe they are AC-3 but not properly labeled?)

Curious what this is:

pro-audio: Pro Audio (sinks: 5, sources: 2, priority: 1, available: yes)

You have one of the dcaenc profiles selcted:

Active Profile: output:hdmi-dts-surround-extra1

there where problems here and there, but at the end solvable, last one see here

Aha, I use tsched=yes and I'll have to look up what AES my old Denon amp expects, if they even bothered to document that.

Swichting to pipewire instead of using pulseaudio itself, no changes to the defaults are needed at the moment as far as I can notice.

I can't help with pipewire. I wouldn't expect switching subsystems to solve the problem, but one never knows.

Are you sure you need the a52 plugin? HDMI seems to offer several other ways to achieve surround output and you seem to have dcaenc outputs working.

I don't have a compatible receiver, but my onboard sound card does have an HDMI output. This is currently blacklisted to simplify my audio setup and lighten my kernel modules. I could try opening it up again to see if the a52 plugin will configure profiles for it.

EDIT: I was mistaken: my onboard sound card does not have an HDMI output. Rather the snd-hda-codec-hdmi module gets loaded for HDMI ports on my GPU. These are provided with neither DTS nor AC-3 profiles, though both are available for the onboard card (snd-hda-intel).

Last edited by quequotion (2021-06-20 15:12:15)

Offline

#70 2021-06-20 12:47:09

T-bond
Member
Registered: 2020-01-12
Posts: 14
Website

Re: A52 plugin with alsa-plugins >1.1.6

@quequotion and @manio and others on Github too who helped bringing this fix into upstream.
I was following all the merge requests and issues comment by comment and I could not think that it will be solved this fast.
I just removed all the packages installed previously by quequotion's package, removed all the configurations I set up for them in the *.conf files, installed back Arch's main packages with alsa-plugins-git, as quequotion said, rebooted and everything works out of the box. I could not be any happier. Thanks for all of you.

I hope that the next release of alsa-plugins comes soon, but thats is not as important at this point, as this just works with a simple AUR package install, which is terrific.
Again, thanks for everybody, who helped to make this work.

For the HDMI part. At some point in the past, I tried to unblock the HDMI output, and it worked again. I have used it too, and could switch between them. I forgot to check, if it still works with this new zero config, fixed alsa-plugins, but if I remember correctly I have seen it listed, in the Plasma Pulse Audio applet. When I get home, I will check if it works or not, and report it back.
Note: I use my HDMI output, for just a 2.0 speaker set, when I don't want to turn on my full HTS which uses the 5.1 S/PDIF

I have one question, left. I did not tried yet, but does this fix means, that I can remove pulseaudio, and replace it with pipewire-pulse, and pipewire, and everything should work there too? I will try it, but wondered if somebody maybe know the answer.

So thanks everybody! Great work.

Last edited by T-bond (2021-06-20 12:54:36)

Offline

#71 2021-06-20 13:40:10

bernd_b
Member
Registered: 2013-07-30
Posts: 140

Re: A52 plugin with alsa-plugins >1.1.6

quequotion wrote:

How about these profiles?

output:hdmi-surround+input:analog-stereo: Digital Surround 5.1 (HDMI) Output + Analog Stereo Input (sinks: 1, sources: 1, priority: 865, available: no)
		output:hdmi-surround71+input:analog-stereo: Digital Surround 7.1 (HDMI) Output + Analog Stereo Input (sinks: 1, sources: 1, priority: 865, available: no)
				output:hdmi-surround: Digital Surround 5.1 (HDMI) Output (sinks: 1, sources: 0, priority: 800, available: no)
						output:hdmi-surround71: Digital Surround 7.1 (HDMI) Output (sinks: 1, sources: 0, priority: 800, available: no)

Too my knowledge, these profiles are for multichanel output, but on pcm-basis .
If you decoder support hdmi-input, no encoding to ac3/dts or similiar is needed anymore.
I use hdmi to pass through the sound from PC through my TV, or to catch the sound of the TV for my decoder. The decoder itself as a coxial s/pdif interface and this only supports pcm up to 2 channels. So for multichannel, I need something like the dcaenc-plugin which encodes audio and reduces bandwith this way. It would be nice to have an alternative which is actively maintained like the alsa a52 plugin, but at the moment, I don't really need it.


quequotion wrote:

Curious what this is:

pro-audio: Pro Audio (sinks: 5, sources: 2, priority: 1, available: yes)

I didn't find out so far, it is offered as a pulse profile when using pipewire instead of pulseaudio itself.

quequotion wrote:

Aha, I use tsched=yes and I'll have to look up what AES my old Denon amp expects.

This is a pulseaudio option, which affects compatibility between pulseaudio and the dcaenc-plugin, your receiver/hardware decoder won't notice it directly, in my case, the audio dropouts which occured up from a certain pulseaudio-release vanished.

Take a look at the other two options if you have bad sound with dcaenc. I can't hear any difference between two channel sound and reencoded two channel sound with the dcaenc plugin using a high valued headphone. An the people who know me consider me to hear things no one else hears ...

Last edited by bernd_b (2021-06-20 13:41:09)

Offline

#72 2021-06-20 13:45:50

bernd_b
Member
Registered: 2013-07-30
Posts: 140

Re: A52 plugin with alsa-plugins >1.1.6

T-bond wrote:

does this fix means, that I can remove pulseaudio, and replace it with pipewire-pulse

This fix isn't about issues in pulseaudio, it was about making the plugin working again at all and especially with alsa itself.

But trying pipewire-pulse instead of pulseaudio itself is worth a shot apart from this, if you have issues with pulseaudio in general you may have luck. As far as I read through this stuff, the use of the plugin should work with pulseaudio as well as with pipewire-pulse.

Last edited by bernd_b (2021-06-20 13:46:49)

Offline

#73 2021-06-20 17:29:25

T-bond
Member
Registered: 2020-01-12
Posts: 14
Website

Re: A52 plugin with alsa-plugins >1.1.6

bernd_b wrote:
T-bond wrote:

does this fix means, that I can remove pulseaudio, and replace it with pipewire-pulse

This fix isn't about issues in pulseaudio, it was about making the plugin working again at all and especially with alsa itself.

But trying pipewire-pulse instead of pulseaudio itself is worth a shot apart from this, if you have issues with pulseaudio in general you may have luck. As far as I read through this stuff, the use of the plugin should work with pulseaudio as well as with pipewire-pulse.

Yeah, thanks I remember now that I haven't switched to Pipewire because I did not know where was the problem with my 5.1 setup, and not because I had any problem with Pulseaudio. So I probably keep using PA.

I got home and tested the HDMI output. It works, I can switch to it, and sound plays correctly.
So it seems everything is working perfectly.
For reference my setup is: S/PDIF on motherboard to 5.1 HTS (no integrated VGA), and the dedicated GPU's HDMI to monitor, and from the monitor to a 2.0 speaker set.

Edit: I just switched to Pipewire-pulse because Pulseaudio used 3% of my CPU.

Last edited by T-bond (2021-06-20 18:10:45)

Offline

#74 2021-06-20 18:33:11

bernd_b
Member
Registered: 2013-07-30
Posts: 140

Re: A52 plugin with alsa-plugins >1.1.6

T-bond wrote:

I got home and tested the HDMI output. It works, I can switch to it, and sound plays correctly.

Switch to what exactly, could you tell us what profile you tested when switching to hdmi? I fear was not a52-related?

Offline

#75 2021-06-20 18:44:12

T-bond
Member
Registered: 2020-01-12
Posts: 14
Website

Re: A52 plugin with alsa-plugins >1.1.6

bernd_b wrote:
T-bond wrote:

I got home and tested the HDMI output. It works, I can switch to it, and sound plays correctly.

Switch to what exactly, could you tell us what profile you tested when switching to hdmi? I fear was not a52-related?

Yes, it is not related to a52. On HDMI you don't need a52 anyway, right? It has more bandwith so it does not need to be compressed.

Offline

Board footer

Powered by FluxBB