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

Jack ports - confusing numbering #5979

Open
mixxxbot opened this issue Aug 22, 2022 · 11 comments
Open

Jack ports - confusing numbering #5979

mixxxbot opened this issue Aug 22, 2022 · 11 comments

Comments

@mixxxbot
Copy link
Collaborator

Reported by: Michael-Z-Freeman
Date: 2011-09-02T13:17:15Z
Status: Triaged
Importance: Low
Launchpad Issue: lp839562
Tags: jack


Other Jack applications keep a consistent port numbering policy. This is usually from 1 upwards and matches both the internal application numbering of those ports and the numbering of those ports as they are shown in the QJackctl connections window. However Mixxx (1.9) numbers Jack ports from 1 upwards in it's preferences and shows the ports from 0 (zero) upwards in the JackQctl connections window. This is confusing.

There may also be a very similar issue with the numbering policy in Mixxx preferences. Ports are numbered 1/2, 2/3, 3/4 and so on. Should they be 1/2, 3/4, 5/6 ... ? There may be a reason for this in terms of Jack operation and port setup policy but I'm not sure.

@mixxxbot
Copy link
Collaborator Author

Commented by: bkgood
Date: 2011-09-20T03:12:25Z


I'm not sure how we're gonna fix this, PortAudio doesn't expose any functions to change port numbering with JACK (it only gives functions for changing the client name). Additionally, it seems that the counter used to number our jack ports isn't ever reset -- every time the jack connection is reopened, the numbers increase. This may require some work on the portaudio jack implementation.

There may also be a very similar issue with the numbering policy in Mixxx preferences. Ports are numbered 1/2, 2/3, 3/4 and so on. Should they be 1/2, 3/4, 5/6 ... ? There may be a reason for this in terms of Jack operation and port setup policy but I'm not sure.

This is done to accommodate monaural devices. For instance you might have a 1 channel input (a mic for instance) at channel one and then a stereo input at channels 2 and 3. If the numbering wasn't done like this, you'd be unable to configure this setup.

@mixxxbot
Copy link
Collaborator Author

Commented by: gavinlee303
Date: 2011-12-18T23:41:35Z


May I suggest at least having an informative client name, something along the lines of:

Mixxx:Master_left
Mixxx:Master_right
Mixxx:Headphones_left
Mixxx:Headphones_right
Mixxx:Deck1_left
Mixxx:Deck1_right
Mixxx:Deck2_left
Mixxx:Deck2_right

At least then it would bring some sanity when trying to attach mixxx outputs to another jack application, at the moment it is very confusing to know what Mixxx:out_1 through to Mixxx:out_? does.

Also I've come across something just now by trying to attach mixxx to another jack application, I have only master and headphones outputs enabled in mixxx settings. When I have Master set as system and channels 1-2 and Headphones on system channels 3-4 I only have 4 output ports showing in qjackctl. When I enable Headphones as system channels 5-6 I get 6 output ports in qjackctl. How come there are an extra 2 ports? This is very confusing. Not sure if this should be filed as a separate bug.

@mixxxbot
Copy link
Collaborator Author

Commented by: bkgood
Date: 2011-12-20T04:43:37Z


May I suggest at least having an informative client name, something along the lines of:

Unfortunately the client name is set per application -- so we can't have different client names for different streams in the same application.

Also I've come across something just now by trying to attach mixxx to another jack application, I have only master and headphones outputs enabled in mixxx settings. When I have Master set as system and channels 1-2 and Headphones on system channels 3-4 I only have 4 output ports showing in qjackctl. When I enable Headphones as system channels 5-6 I get 6 output ports in qjackctl. How come there are an extra 2 ports? This is very confusing. Not sure if this should be filed as a separate bug.

Off the top of my head I believe we have to open all those ports/'channels' to get to the higher-named ones, but I'll look into it.

Regarding this bug as a whole, I'll try to see about getting a portaudio change in this holiday.

@mixxxbot
Copy link
Collaborator Author

Commented by: daschuer
Date: 2013-04-26T22:00:44Z


This is somehow similar to Bug #⁠1172299
Bill, do you have any status updates?

@mixxxbot
Copy link
Collaborator Author

Commented by: bkgood
Date: 2013-04-28T00:01:18Z


Nope. no change from PA.

But it appears I'm collecting a pile of JACK-related bugs, so hoping to devote some time to the whole mess in the near future.

@mixxxbot
Copy link
Collaborator Author

Commented by: Michael-Z-Freeman
Date: 2013-04-28T12:14:13Z


I think I worked out an initial sane approach. The first thing to tackle (IMO) is making the port names in the drop down lists in the Mixxx Preferences for Jack match the names that are actually displayed by Jack. That way at least the user can refer back to Mixxx preferences to work out what the ports match to.

I think Mixxx needs to be clear on what it wants to do with Jack. Has this already been defined in some other document elsewhere ? Otherwise what is the proper place to submit this ? A blueprint ?

@mixxxbot
Copy link
Collaborator Author

Commented by: daschuer
Date: 2013-04-28T17:35:11Z


Yes, A blueprint is fine and if it becomes unhandy you could create a Wiki page on http://www.mixxx.org/wiki/doku.php/start and link it from the blueprint.

@mixxxbot
Copy link
Collaborator Author

Commented by: Michael-Z-Freeman
Date: 2013-04-28T20:29:41Z


OK, thanks. I'll put one in when I have some time. Cheers :)

@mixxxbot
Copy link
Collaborator Author

Commented by: stephane-2
Date: 2014-08-22T09:51:17Z


Looks like naming issues have been on the PortAudio TODO list as well:
https://www.assembla.com/code/portaudio/subversion/nodes/1932/portaudio/trunk/src/hostapi/jack/pa_jack.c#ln1208

It looks like the hostApiSpecificStreamInfo field in inputParameters/outpoutParameters in the call to Pa_OpenStream() (which itself pass them down to jack's OpenStream()) are currently unused but they would be the proper place to do this.
https://www.assembla.com/code/portaudio/subversion/nodes/1932/portaudio/trunk/src/hostapi/jack/pa_jack.c#ln1124
https://www.assembla.com/code/portaudio/subversion/nodes/1932/portaudio/trunk/src/hostapi/jack/pa_jack.c#ln1148

I imagine the code changes would be to add the structure in include/pa_jack.h, and modify src/hostapi/jack/pa_jack.c to use it (and fallback to the current snprintf() calls). However I don't see how to open a PortAudio "ticket" to submit those changes.

@mixxxbot
Copy link
Collaborator Author

Commented by: daschuer
Date: 2014-08-23T12:19:23Z


You may ask at the PortAudio mailing list
http://www.portaudio.com/contacts.html

@mixxxbot
Copy link
Collaborator Author

Commented by: rryan
Date: 2018-09-20T17:22:22Z


Due to lack of progress, marking Triaged and clearing assignee. Feel free to revert if it is in fact still in progress :).

@mixxxbot mixxxbot transferred this issue from another repository Aug 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant