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

Qualified ALSA device names break opening of ALSA control device #60

Closed
pauldavisthefirst opened this issue Feb 18, 2014 · 4 comments
Closed

Comments

@pauldavisthefirst
Copy link

1.9.8 does not appropriately handle ALSA device names when attempting to open the control device.

If the device name is given as "hw:PCH,0", the same name is used to try to open the control device. this will fail, because the name should be "hw:PCH".

The following code from jack1 takes a PCM device name and returns the appropriate control device name:

static char*
get_control_device_name(const char * device_name)
{
char * ctl_name;
const char * comma;

/* the user wants a hw or plughw device, the ctl name
 * should be hw:x where x is the card identification.
 * We skip the subdevice suffix that starts with comma */

if (strncasecmp(device_name, "plughw:", 7) == 0) {
    /* skip the "plug" prefix" */
    device_name += 4;
}

comma = strchr(device_name, ',');
if (comma == NULL) {
    ctl_name = strdup(device_name);
    if (ctl_name == NULL) {
        jack_error("strdup(\"%s\") failed.", device_name);
    }
} else {
    ctl_name = strndup(device_name, comma - device_name);
    if (ctl_name == NULL) {
        jack_error("strndup(\"%s\", %u) failed.", device_name, (unsigned int)(comma - device_name));
    }
}

return ctl_name;

}

@pauldavisthefirst
Copy link
Author

Since Ardour3 preferentially uses ALSA card names instead of numbers, and also qualifies the device with the device number, this means that Ardour3 cannot start Jack2 under its own control with the ALSA backend.

@sletz
Copy link
Member

sletz commented Feb 18, 2014

What about git version? Nedko any idea?

Thanks.

Stéphane

Le 18 févr. 2014 à 18:33, pauldavisthefirst notifications@github.com a écrit :

Since Ardour3 preferentially uses ALSA card names instead of numbers, and also qualifies the device with the device number, this means that Ardour3 cannot start Jack2 under its own control with the ALSA backend.


Reply to this email directly or view it on GitHub.

@nedko
Copy link
Contributor

nedko commented Feb 19, 2014

I think this is fixed more than a year ago, with b3394f4
The fix is in 1.9.9.5

@nedko
Copy link
Contributor

nedko commented Feb 19, 2014

the jack1 version is actually a port from jack2, see e02d7358da82a84647cb5cd71de23a75640ef506

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

3 participants