Skip to content
This repository has been archived by the owner on Aug 21, 2023. It is now read-only.

cadence: Add option to set pulseaudio channels manually #62

Open
nick87720z opened this issue Jul 12, 2013 · 7 comments
Open

cadence: Add option to set pulseaudio channels manually #62

nick87720z opened this issue Jul 12, 2013 · 7 comments

Comments

@nick87720z
Copy link

There was question, on irc, about how to set pulse channels to 2, while default was 8 (suround 7.1) — same as channels number in jack master output. This was necessary for some applications (chrome).
From #kxstudio channel:

[12.07.13 21:31:12] <triune> be a way to specify the number of channels on startup
[12.07.13 21:31:45] <triune> maybe this is a pulseaudio question or cadence question... hmmm

Finally solution was:

[12.07.13 22:01:45] <nick87720z> now we have ticket for new option in cadence
[12.07.13 22:02:45] <triune> oh wait
[12.07.13 22:02:47] <triune> that worked!
[12.07.13 22:02:55] <triune> killall -9 pulseaudio
[12.07.13 22:02:57] <triune> pactl load-module module-jack-sink channels=2
[12.07.13 22:03:05] <triune> then started pulseaudio with cadence again

I failed to reproduce same sequence, because after pulseaudio killing pactl did not start new instance and thus failed to contact daemon. But it would be nice to just move line, loading "module-jack-sink" from play.pa script, shipped with cadence, to pulse-jack script, completing it with necessary argument.
Same option would be added for "module-load module-jack-source" line as well.

@falkTX
Copy link
Owner

falkTX commented Jul 15, 2013

I guess I can add such option below the "playback only" checkbox.

But I wonder, should we force 2 channels by default?

@danielwe
Copy link

An option to set the number of channels on the pulseaudio bridge would be greatly appreciated! For default behavior, either enforcing 2 channels or letting module-jack-(sink|source) default on their own (like they're doing now) would be fine.

@nick87720z
Copy link
Author

nick87720z commented Aug 17, 2017

Tried hard to remember, what problem was in 2013.... )
Probably it is user-specific, or already fixed in pa or jack.
On my laptop PA always starts in stereo mode. I have Intel-HDA audio, supporting stereo, and inactive HDMI with profiles list from stereo to 7.1.

p.s. May be also auto-detection mode, to set channels number same, as in "system" jack object.
p.p.s. At this moment i don't even use cadence jack ctl tool, instead using qjackctl, or sometimes catching jack autostart.

@danielwe
Copy link

I use the NI Komplete Audio 6 with 6 outputs: 2 pairs of analog channels, and SPDIF. When pulseaudio is started from cadence, it sees jack presenting a generic 6-port interface and loads a 5.1 surround configuration. This isn't what I want; I only have a stereo pair of monitors/headphones on the main analog out from the sound card.

The problem arises when pulseaudio tries to be clever and remix everything to 5.1, including a crossover to send LF to the subwoofer channel. My current solution is to disable all remixing by adding the following to ~/.pulse/default.conf:

enable-remixing = no
enable-lfe-remixing = no

This works as long as all pulseaudio clients are stereo only, but if I happen to stumble upon any surround content it won't be downmixed to 2 channels.

The better solution would be to explicitly limit the pulseaudio-jack sink to any given number of channels, regardless of what the audio interface happens to support. This should be as simple as adding a switch somewhere in the command or config involved in loading pulseaudio and it's modules.

Yeah, qjackctl is a completely different story, so not surprising that you're not experiencing these issues. I guess both solutions have their pros and cons.

@nicola-lunghi
Copy link

+1 to this

I have an edirol ua101 and pulseaudio detect it as a multi channel audio device
the problem is that the monitor are connected to the monitor mix that is a "mix" of all the input channel so I get voice cancellation effects and all sort of strange things

@markjfisher
Copy link

markjfisher commented Oct 25, 2018

Another +1 here, I've just connected my laptop to a Focusrite 6i6 v2, which presents as 6 channels, so Pulseaudio is presenting as 5.1 and auto connecting all channels. as shown below:

image

but i'd really just like pulse to think it's a 2 channel system.
I've manually removed 4 of the channels in the setup, but will get issues as apps that see 5.1 will probably try and use that setup.

@markjfisher
Copy link

I found I could add channels=2 to the defaults to work around this, but also extended it to create multiple sinks/sources by amending cadence-pulse2jack. I've created #234 to talk about it.

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

No branches or pull requests

5 participants