You are not logged in.

#26 2020-09-28 17:04:55

AntiK
Member
Registered: 2016-03-07
Posts: 19

Re: A52 plugin with alsa-plugins >1.1.6

T-bond wrote:

So, next up to figure out, why PA does not lists the sink. sad

Maybe now you also have the problem that pulseaudio refuse to list the sink when any HDMI output is present...
As I wrote earlier, my solution was to blacklist the HDMI audio cards.

Edit:

You can list the currently loaded cards with

cat /proc/asound/cards

The order in the output is the order you can disable cards like so

/etc/modprobe.d/alsa.conf:

options snd-hda-intel enable=0,1

Which disables the first snd-hda-intel card, but enables the second one.

Last edited by AntiK (2020-09-28 17:15:35)

Offline

#27 2020-09-28 17:39:22

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

Re: A52 plugin with alsa-plugins >1.1.6

@AntiK oh, I missed your follow up comment, but ended up disabling my HDMI anyways.
It now lists the 5.1, I can switch to it, but the test (from Plasma's PA produces no sound)
Now stereo is dead too. (Also no sound from anywhere in the system)
I checked journalct -xe and see the following spammed:

pulseaudio[839]: W: [alsa-sink-] alsa-sink.c: Resume failed, couldn't restore original fragment settings. (Old: 94189128/16932, New 94187520/18432)

Edit: I restarted my HTS and the PC and stereo works again. But 5.1 still produces no sound.

Edit2:
Also:

speaker-test -c 6 -D a52:Generic

speaker-test 1.2.3

Playback device is a52:Generic
Stream parameters are 48000Hz, S16_LE, 6 channels
Using 16 octaves of pink noise
Playback open error: -16,Device or resource busy

Last edited by T-bond (2020-09-28 18:42:22)

Offline

#28 2020-09-28 19:14:30

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

Re: A52 plugin with alsa-plugins >1.1.6

Okay. I found out the solution. Actually I found it on a post or forum, back when I had to patch alsa-lib myself, because this cool AUR package was not here.

The solution is to set the

/etc/pulse/daemon.conf:
default-sample-rate = 48000

Unfortunately I don't remember where I did find it.
I hope it helps somebody.

And thank you @AntiK and @quequotion for helping me.
I hope some day the upstream package gets fixed, or at least we figure out a way to enable back HDMI.

Offline

#29 2020-10-21 11:54:33

mariothearcher
Member
Registered: 2020-10-17
Posts: 2

Re: A52 plugin with alsa-plugins >1.1.6

Hi everyone, first, I want to thank all of you for your work in this topic. Your hard work let me advance in this. Now to the question:
1. I build the package a52 with the instructions given(thanks to T bond for addressing the differences of extensions and versions, and the tip for disabling the hdmi output).
2. My audio card is a https://en.creative.com/p/sound-blaster … nd-5-1-pro
3. The plugin work for two minutes and  crash and the usb audio card shutdown then the output is stereo.

¿somebody knows if a miss a tweak in the pa file config? (i'm already changue the /etc/pulse/daemon.conf:
default-sample-rate = 48000 parameter, i've read other post and i feel like the previous work of quequotion searching parameters for prolong the plugin working time.)

thanks in advanced!!

Offline

#30 2020-12-20 11:40:01

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

Re: A52 plugin with alsa-plugins >1.1.6

I just want to report and show my interest in this topic:

I installed:
1. libavresample  from AUR
2. and then alsa-lib-a52pcm/  from AUR
3. Recompiled the alsa-plugins-Package from the main repository

And indeed:
With this

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

added to /etc/asound.conf I get a new alsa output device:

aplay -L
.
.
.

a52:CARD=PCH
    HDA Intel PCH
    Plugin to convert multichannel stream to A52 (AC3) bitstream

.
.
.

But for me, this is the end of the journey. Nothing shows up in pavucontrol.
Since I want the output of the a52-plugin via hdmi (the headphone amplifier is connected to the TV, so the sound of the PC should be passed through the TV), disabling HDMI is no option for me.

I wonder if it is possible at all to use this plugin via HDMI. I find people answer this question in the www,  but they never got an answer ...

Offline

#31 2020-12-20 22:34:30

AntiK
Member
Registered: 2016-03-07
Posts: 19

Re: A52 plugin with alsa-plugins >1.1.6

@bernd_b

I now have the same issue. There must have been an update which breaks our pretty workaround.

Besides that, why are you exactly trying to get the a52 plugin to work for HDMI?
In theory you should be able to output a raw 5.1 pcm stream over HDMI without having to first convert it to a52.

Offline

#32 2020-12-21 08:06:11

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

Re: A52 plugin with alsa-plugins >1.1.6

Yes, but at the end of the toolchain is an old headphone amplifier which has a coax cable as digital input, therefore I am limited to pcm stereo or raw ac3/dts multichannel. The pro is that the amplifier uses dolby headphone while decoding.

Until now, I have used with more or less problems dcaenc-git.
Another solution I use on another setup is to recompile ffmpeg with libmysofa-support and play the video with this filter using mpv. Multichannel is only needed with movies for me so I have some setup at least not ignoring the multichannel information and I still have sound from other applications while watching something with mpv.

But the a52-Plugin would be a nice alternative if it was maintained.

Last edited by bernd_b (2020-12-21 08:07:13)

Offline

#33 2020-12-21 09:26:25

AntiK
Member
Registered: 2016-03-07
Posts: 19

Re: A52 plugin with alsa-plugins >1.1.6

Ah, I see. On my side dcaenc produces horrible audio quality. If you only need digital audio for movies, it should be possible to configure pulseaudio to passthrough AC3 and DTS. Aren't there some checkboxes in pavucontrol?

I remember that I once also had problems with passthrough, so I utilized

pasuspender

to temporarily suspend pulseaudio and use alsa directly when watching movies.

Unfortunately it is not possible to mix digital and analog streams. So if you need that, the a52 plugin would indeed be the only option.
It would be really great if some would fix the plugin upstream to work reliably again...

I'm also stuck with stereo now and I don't know how to tell pulseaudio to use the alsa a52 device. This is really frustrating, because if I test the alsa device with

speaker-test -c 6 -D a52:Generic

everything works fine. It's just that pulseaudio refuse to pickup the device.

Offline

#34 2020-12-21 10:04:23

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 12,698

Re: A52 plugin with alsa-plugins >1.1.6

If you want pulseaudio to pick up the device allocate a custom software sink e.g. ~/.config/pulse/default.pa

.include /etc/pulse/default.pa

.nofail
;Since this isn't a hardware sink it's likely you need to set the tsched=0 here maybe  try without, adjust the device_id as necessary e.g. it's Generic for AntiK PCH for bernd_b
load-module module-alsa-sink device=a52 device_id=Generic sink_name="A52 Surround Sink" tsched=0

Offline

#35 2020-12-21 11:58:22

AntiK
Member
Registered: 2016-03-07
Posts: 19

Re: A52 plugin with alsa-plugins >1.1.6

Thanks @V1del!

Unfortunately this doesn't work for me.
But I figured out that everything works again if I disconnect my USB Webcam, which has a microphone.

That is really strange. I also tried to remove my modprobe blacklist to enable my HDMI audio output again.
If I dot that pulseaudio refuses to start.
Even if I blacklist my HDMI output pulse audio refuses to start if I allocate the custom software sync as proposed by V1del.
If I remove the custom software sink while having HDMI blacklisted pulseaudio starts.
But then pulseaudio only picks up the a52 device when my webcam is disconnected.

Well, Linux audio is still very funny in 2020 big_smile

Last edited by AntiK (2020-12-21 15:32:46)

Offline

#36 2020-12-21 16:02:51

AntiK
Member
Registered: 2016-03-07
Posts: 19

Re: A52 plugin with alsa-plugins >1.1.6

Okay guys, even with the setup described above, pulseaudio server get killed whenever I start to playback audio...
I guess the alsa-lib-a52pcm package is finally broken for me.
Is there anybody who got it still working?

Offline

#37 2020-12-21 16:49:43

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

Re: A52 plugin with alsa-plugins >1.1.6

Thank you very much for watching, but no luck here either:

Running

$ pacmd load-module module-alsa-sink device=a52 device_id=PCH sink_name="A52 Surround Sink" tsched=0

or

$ pacmd load-module module-alsa-sink device=a52 device_id=PCH sink_name="A52 Surround Sink"

leads to pulseaudio (started with the option -vv) reporting

I: [pulseaudio] main.c: Got signal SIGUSR2.
I: [pulseaudio] module.c: Loaded "module-cli-protocol-unix" (index: #20; argument: "").
D: [pulseaudio] protocol-dbus.c: Interface org.PulseAudio.Core1.Module added for object /org/pulseaudio/core1/module20
I: [pulseaudio] client.c: Created 2 "UNIX socket client"
D: [pulseaudio] protocol-dbus.c: Interface org.PulseAudio.Core1.Client added for object /org/pulseaudio/core1/client2
E: [pulseaudio] module-alsa-sink.c: Failed to parse module arguments
E: [pulseaudio] module.c: Failed to load module "module-alsa-sink" (argument: "device=a52 device_id=PCH sink_name=A52 Surround Sink tsched=0"): initialization failed.
D: [pulseaudio] cli.c: CLI got EOF from user.
D: [pulseaudio] protocol-dbus.c: Interface org.PulseAudio.Core1.Client removed from object /org/pulseaudio/core1/client2
I: [pulseaudio] client.c: Freed 2 "UNIX socket client"
I: [pulseaudio] client.c: Created 3 "UNIX socket client"
D: [pulseaudio] protocol-dbus.c: Interface org.PulseAudio.Core1.Client added for object /org/pulseaudio/core1/client3
E: [pulseaudio] module-alsa-sink.c: Failed to parse module arguments
E: [pulseaudio] module.c: Failed to load module "module-alsa-sink" (argument: "device=a52 device_id=PCH sink_name=A52 Surround Sink"): initialization failed.
D: [pulseaudio] cli.c: CLI got EOF from user.
D: [pulseaudio] protocol-dbus.c: Interface org.PulseAudio.Core1.Client removed from object /org/pulseaudio/core1/client3
I: [pulseaudio] client.c: Freed 3 "UNIX socket client

Offline

#38 2020-12-21 17:00:02

AntiK
Member
Registered: 2016-03-07
Posts: 19

Re: A52 plugin with alsa-plugins >1.1.6

Since I couldn't figure out how to get this thing working again, I switched back to the official alsa-lib package and gave dcaenc another shot.
And I get prettey decent audio quality now.

Whenever I tested this I just had the following in my .asoundrc:

<confdir:pcm/dca.conf>

Which produces the said horrible audio quality.
Now I have the following config:

<confdir:pcm/dca.conf>

pcm.dcacustom {
    type dca
    slave.pcm "custompcm"
    #iec61937 1
}

And with this config I don't hear any distortions anymore.
So I guess I will go with dcaenc from now on.


Edit: Forget everything above. I forgot to select the dcaenc device in pulse audio. still horrbile audio quality. I give up...

Last edited by AntiK (2020-12-21 17:04:42)

Offline

#39 2021-01-09 04:44:19

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

Re: A52 plugin with alsa-plugins >1.1.6

When you say you installed alsa-lib-a52pcm, did you do this complete process? Because you must do the complete process.

No aur helper is going to get it right.

Edit: I have updated alsa-lib-a52pcm from 1.2.3 to 1.2.4, and the guide accordingly (version of libavresample also bumped; changed *.pkg.tar.xz to *.pkg.tar.zst).

Last edited by quequotion (2021-01-14 13:09:01)

Offline

#40 2021-04-29 17:20:48

AntiK
Member
Registered: 2016-03-07
Posts: 19

Re: A52 plugin with alsa-plugins >1.1.6

Hey guys, alsa-lib-a52pcm stopped working for me recently.
The plugin loads, I have my 6 channels, but there's no sound anymore.
speakertest -c6 iterates all the channels, but everything is mute.
I've checked the volume levels in alsamixer and pulsemixer and everything seems to be okay there.
I've also repeated the complete installation process, no success.

Any ideas?

Offline

#41 2021-04-30 23:33:24

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

Re: A52 plugin with alsa-plugins >1.1.6

AntiK wrote:

Hey guys, alsa-lib-a52pcm stopped working for me recently.
The plugin loads, I have my 6 channels, but there's no sound anymore.
speakertest -c6 iterates all the channels, but everything is mute.
I've checked the volume levels in alsamixer and pulsemixer and everything seems to be okay there.
I've also repeated the complete installation process, no success.

Any ideas?

Sadly, this started happening to me yesterday after an upgrade.

My assumption is one of the packages I [we]? updated is the cause, but I have not yet narrowed it down.

Everything looks like it should be working: surround setup fully in tact, no muted devices or streams, levels bouncing in pavucontrol, the external amp switches to the correct surround format automatically as if it were receiving signal--but there's no sound to speakers.

Edit: alsa-card-profiles doesn't seem to be related (can't even find a reason why that package was installed). For the interim, other profiles seem to be working: if you need basic sound output, you can probably get that by switching to "digital stereo". In theory, this mode supports some pass-through options (under the "Advanced" drop-down under the device's entry in pavucontrol's "Output Devices" tab.); in practice I've never known them to work.

It is possible to pass-through without pulseaudio (ie, you must not only stop pulseaudio but prevent it from restarting itself), by using applications designed to do so. for example, I made an additional .desktop shortcut for mpv, adding these to the Exec= line:

--audio-spdif=ac3,dts,eac3 --af=lavcac3enc=tospdif=yes --ad-lavc-ac3drc=0 --audio-device=alsa/iec958:CARD=PCH,DEV=0

that is: use spdif for those formats, output libavc's ac3 output to spdif, level zero (disable support for) dynamic range compression (when ac3 contains drc info), output to iec958 (your device may vary).

Last edited by quequotion (2021-05-01 03:31:46)

Offline

#42 2021-05-01 09:43:43

AntiK
Member
Registered: 2016-03-07
Posts: 19

Re: A52 plugin with alsa-plugins >1.1.6

quequotion wrote:

if you need basic sound output, you can probably get that by switching to "digital stereo".

This is what I currently do. Pulseaudio passthrough of DD and DTS does indeed work for me.
But unfortunately I'm not very likely watching any movies on my PC anymore.
I need the surround sound for gaming.
And there are no games to my knowledge which support DD or DTS streams (sadly).

Hopefully this will be fixed by another package update by chance.
I will retry the digital surround sink whenever there is a sound related update.

Do you think it could have something to do with pipewire?
It came as a dependency for xdg-desktop-portal in my case...

Offline

#43 2021-05-01 12:18:21

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

Re: A52 plugin with alsa-plugins >1.1.6

AntiK wrote:

Do you think it could have something to do with pipewire?
It came as a dependency for xdg-desktop-portal in my case...

I certainly hope not. alsa-card-profiles was the only pipewire-related package I had installed, which is now removed, and seems to have no connection to this issue.

My worry is that, as often happens with FOSS technology standards, most developers will flock to the shiny new thing--whether it works or not--and never come back to the edge cases for which the old thing had buggy, but existing, support.

In theory the ALSA devs are porting their a52 plugin to libswresample or at least do not understand why that didn't work as a drop-in replacement for libavresample (the plugin's config parser fails somehow), but it doesn't seem like a high priority despite the huge number of people who need this.

Last edited by quequotion (2021-05-08 03:10:20)

Offline

#44 2021-05-01 17:08:16

AntiK
Member
Registered: 2016-03-07
Posts: 19

Re: A52 plugin with alsa-plugins >1.1.6

Well, I think I will get me a decent sound-card and go fully analog in the near future then.
It's a shame that I have to get new hardware, while my old setup is totally fine.
Just because software support ends...

Thank you very much for providing the workaround in the AUR.
At least I was able to use my digital surround setup a little longer :-)

Offline

#45 2021-05-05 09:55:15

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

Re: A52 plugin with alsa-plugins >1.1.6

AntiK wrote:

Thank you very much for providing the workaround in the AUR.
At least I was able to use my digital surround setup a little longer :-)

Just packaging smile

>my old setup is totally fine

I always have a backup emu10k1.

No one ever got back to its problems either.

Last edited by quequotion (2021-05-05 09:55:38)

Offline

#46 2021-05-05 15:46:04

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

Re: A52 plugin with alsa-plugins >1.1.6

@quequotion
Thank you for your work on this. I don't understand why there is a such big problem to use this plugin (in fact even in debian it is a way simpler - it is just packaged in libasound2-plugins package out of the box).
In arch we have to re-build those packages to be able to use the AC3.

After my recent full system upgrade unfortunately I am joining you guys sad
Reinstalling with your instruction as usual doesn't help - silent in speakers.

I have same problem as you guys:
1. speaker-test iterates over all channels but silent in speakers
2. I can even hear a crack/pop when starting and stopping speaker-test so it is definitely doing "something" or at least it is able to open the sound card, but the IEC958 stream is probably wrong...

I am using Cambridge Soundworks DTT3500 speakers.
When I use standard output instead of a52encode then it works OK but ofc only in stereo sad

I am not using pulseaudio at all - I was always trying to use native ALSA wherever possible.

regarding emu10k1:
I also have backup emu10k1 but it would be very hard for me because I have only single optical cable wired through the wall... besides it is a hardware fix for a software problem...

Maybe we have to downgrade some specific package to have it back working...

Offline

Board footer

Powered by FluxBB