You are not logged in.

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

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

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: 115

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: 16

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: 115

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: 16

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: 11,851

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: 16

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: 16

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: 115

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: 16

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: 764
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

Board footer

Powered by FluxBB