Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pulse audio playback wrong connection #395

Open
ericct opened this issue Feb 9, 2025 · 4 comments
Open

Pulse audio playback wrong connection #395

ericct opened this issue Feb 9, 2025 · 4 comments

Comments

@ericct
Copy link

ericct commented Feb 9, 2025

Hello,

I'm a total beginner, so it may be a usage problem. I was trying to reproduce the tutorial example (to4chan), without success.
Using CamillaDSP, v3.0.0 on Fedora core 41.

I've tried to simplify and understand the issue. I'm using an even simpler configuration (just copy 2 to 2 channels, but it's the same with the to4chan):

---
title: "Dummy"
description: "Dummy"

devices:
  samplerate: 44100
  chunksize: 1024
  capture:
    type: Pulse
    channels: 2
    device: "InputSink.monitor"
    format: S16LE
  playback:
    type: Pulse
    channels: 2
    device: "OutputSink.playback"
    format: S16LE

mixers:
  to2chan:
    description: "Expand 2 channels to... 2"
    channels:
      in: 2
      out: 2
    mapping:
      - dest: 0
        sources:
          - channel: 0
            gain: 0
            inverted: false
      - dest: 1
        sources:
          - channel: 1
            gain: 0
            inverted: false

pipeline:
  - type: Mixer
    name: to2chan

I've created the pulse audio nodes with

pactl load-module module-null-sink sink-name=OutputSink channels=2 sink_properties=device.description=OutputSink
pactl load-module module-null-sink sink-name=InputSink channels=2 sink_properties=device.description=InputSink

The nodes are created and when connecting to real source and sink it's OK.

I start CamillaDSP with ~/camilladsp/bin/camilladsp config1.yml It creates 2 new PA nodes CamillaDSP (for input and output), and while the output node has property target.object set to OutputSink.playback (as per configuration), it is linked to InputSink.playback.

If I manually correct this, I can have sound, but with a large delay (I'm opening another issue for this separated problem for clarity).

Unfortunately, I have 0 knowledge of PA, Pipewire. So I do not know at which stage it fails. Have you already seen this? Is the CamillaDSP usage correct here?

Thanks!

@HEnquist
Copy link
Owner

Are you using pulseaudio or pipewire? I will try to take a look but may take some time before I get to it. You can also try asking in this thread at diyAudio, maybe someone already knows something: https://www.diyaudio.com/community/threads/camilladsp-cross-platform-iir-and-fir-engine-for-crossovers-room-correction-etc.349818/

I have never tried using pulseaudio for both capture and playback simultaneously, so I don't really know what to expect. To be honest, the pulseaudio backend has never really gotten the attention it needs, and now it has fallen quite far behind the others in functionality.
The plan is to add a new backend for pipewire, and once that is working, drop support for both pulse and jack.

@ericct
Copy link
Author

ericct commented Feb 11, 2025

Hello,

I'm using pipewire on Fedora 41, but it's not clear at all what is pipewire and what is pulseaudio under the hood. I've noticed that I've made a typo in the pactl command to create the sinks: it's sink_name and not sink-name. Now, the connections are OK, but I have to select InputSink.monitor and OutputSink (no .playback).

But it does not work (delay, or no sound at all on an Ubuntu 24.04 just tested). A few results:

  • if I connect to the monitor port of CamillaDSP input device, the stream is present;
  • if I replace the capture by a white noise generator, it flows down to the output - it works, at least for calibration purposes!

I will continue testing different coombinations (see if I can get rid of pipewire to be just on top of pulseaudio), and I'll join the discussion on diyAudio to seek for more help.

Thanks!

@HEnquist
Copy link
Owner

It's can install either Pulse or Pipewire, there is no way to have both. But it's a bit confusing since Pipewire implements the PulseAudio api for backward compatibility. Applications and tools using Pulse should (in theory) not notice any difference between a real pulse server and the one offered by Pipewire.

Do your Fedora and ubuntu systems use the same Pipewire version? You can check with pactl info.

I don't know if it's still like that, but in the early days of Pipewire the distros provided packages for both, so it was fairly easy to replace it with pulseaudio.

@ericct
Copy link
Author

ericct commented Feb 26, 2025

Hello,

Sorry, I had no time to further test before. I've managed to remove Pipewire (eventually!) and I confirm that it works now. I have other concerns on another machine, recently upgraded, with Pipewire breaking certain settings. It works for the standard set-up but not (yet?) for more specific ones (multiple cards, specific channel routings, aso).

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants