OS X - Specifying CoreAudio devices

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

OS X - Specifying CoreAudio devices

Kito-2
Hello,

  When I invoke jackd-0.100.0 using the coreaudio driver it doesn't  
want to run when specifying a device using the -n argument, using the  
exact same command with the portaudio driver works as expected, as  
does letting the coreaudio driver use the default device. Are the  
device name semantics different between the 2 drivers? I poked around  
the source and also built with debug symbols, but still couldn't  
figure out what was going wrong...

   % jackd -Rv -d coreaudio -r 44100 -p 128 -o 8 -i 6 -n  
"AppleFWAudioEngineGUID:2975281954423158"
   getting driver descriptor from /usr/lib/jack/jack_coreaudio.so
   getting driver descriptor from /usr/lib/jack/jack_dummy.so
   getting driver descriptor from /usr/lib/jack/jack_portaudio.so
   jackd 0.100.0
   Copyright 2001-2005 Paul Davis and others.
   jackd comes with ABSOLUTELY NO WARRANTY
   This is free software, and you are welcome to redistribute it
   under certain conditions; see the file COPYING for details

   JACK compiled with POSIX SHM support.
   server `default' registered
   registered builtin port type 32 bit float mono audio
   loading driver ..
   new client: coreaudio, id = 1 type 1 @ 0x300fb0 fd = -1
   cannot load driver module coreaudio
   starting server engine shutdown
   freeing shared port segments
   stopping server thread
   last xrun delay: 0.000 usecs
   max delay reported by backend: 0.000 usecs
   freeing engine shared memory
   max usecs: 0.000, engine deleted
   no message buffer overruns
   cleaning up shared memory
   cleaning up files
   unregistering server `default'

I thought a possible workaround would be changing the default device  
system wide via System Preferences and just skipping the -n switch,  
but it still finds the Built-in Audio device first.

Any help is much appreciated.

--Kito



-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Jackit-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jackit-devel
Reply | Threaded
Open this post in threaded view
|

Re: OS X - Specifying CoreAudio devices

Stéphane Letz

Le 16 août 05 à 05:40, Kito a écrit :

> Hello,
>
>  When I invoke jackd-0.100.0 using the coreaudio driver it doesn't  
> want to run when specifying a device using the -n argument, using  
> the exact same command with the portaudio driver works as expected,  
> as does letting the coreaudio driver use the default device.

The way the coreaudio driver name is specified has been changed with  
Tiger.
Tigers defines a new notion of "aggregate audio device" (basically a  
way to combines several real devices to  be seen as a unique device  
for the application)
Because of that, the naming scheme used before to identify the wanted  
device was not reliable anymore. It has been changed to an "internal"  
name (kAudioDevicePropertyDeviceUID) that is persistent accross reboot.


> Are the device name semantics different between the 2 drivers? I  
> poked around the source and also built with debug symbols, but  
> still couldn't figure out what was going wrong...


Yes the device name semantics  is different between the 2 drivers  
since the PortAudio driver has not been changed...

>
>   % jackd -Rv -d coreaudio -r 44100 -p 128 -o 8 -i 6 -n  
> "AppleFWAudioEngineGUID:2975281954423158"
>   getting driver descriptor from /usr/lib/jack/jack_coreaudio.so
>   getting driver descriptor from /usr/lib/jack/jack_dummy.so
>   getting driver descriptor from /usr/lib/jack/jack_portaudio.so
>   jackd 0.100.0
>   Copyright 2001-2005 Paul Davis and others.
>   jackd comes with ABSOLUTELY NO WARRANTY
>   This is free software, and you are welcome to redistribute it
>   under certain conditions; see the file COPYING for details
>
>   JACK compiled with POSIX SHM support.
>   server `default' registered
>   registered builtin port type 32 bit float mono audio
>   loading driver ..
>   new client: coreaudio, id = 1 type 1 @ 0x300fb0 fd = -1
>   cannot load driver module coreaudio
>   starting server engine shutdown
>   freeing shared port segments
>   stopping server thread
>   last xrun delay: 0.000 usecs
>   max delay reported by backend: 0.000 usecs
>   freeing engine shared memory
>   max usecs: 0.000, engine deleted
>   no message buffer overruns
>   cleaning up shared memory
>   cleaning up files
>   unregistering server `default'

Does is work when using the JackPilot application?


>
> I thought a possible workaround would be changing the default  
> device system wide via System Preferences and just skipping the -n  
> switch, but it still finds the Built-in Audio device first.

I'll check that.

Stephane


-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Jackit-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jackit-devel
Reply | Threaded
Open this post in threaded view
|

Re: OS X - Specifying CoreAudio devices + CVS commit

Stéphane Letz
In reply to this post by Kito-2

Le 16 août 05 à 05:40, Kito a écrit :

> Hello,
>
>  When I invoke jackd-0.100.0 using the coreaudio driver it doesn't  
> want to run when specifying a device using the -n argument, using  
> the exact same command with the portaudio driver works as expected,  
> as does letting the coreaudio driver use the default device. Are  
> the device name semantics different between the 2 drivers? I poked  
> around the source and also built with debug symbols, but still  
> couldn't figure out what was going wrong...
>
>   % jackd -Rv -d coreaudio -r 44100 -p 128 -o 8 -i 6 -n  
> "AppleFWAudioEngineGUID:2975281954423158"
>   getting driver descriptor from /usr/lib/jack/jack_coreaudio.so
>   getting driver descriptor from /usr/lib/jack/jack_dummy.so
>   getting driver descriptor from /usr/lib/jack/jack_portaudio.so
>   jackd 0.100.0
>   Copyright 2001-2005 Paul Davis and others.
>   jackd comes with ABSOLUTELY NO WARRANTY
>   This is free software, and you are welcome to redistribute it
>   under certain conditions; see the file COPYING for details
>
>   JACK compiled with POSIX SHM support.
>   server `default' registered
>   registered builtin port type 32 bit float mono audio
>   loading driver ..
>   new client: coreaudio, id = 1 type 1 @ 0x300fb0 fd = -1
>   cannot load driver module coreaudio
>   starting server engine shutdown
>   freeing shared port segments
>   stopping server thread
>   last xrun delay: 0.000 usecs
>   max delay reported by backend: 0.000 usecs
>   freeing engine shared memory
>   max usecs: 0.000, engine deleted
>   no message buffer overruns
>   cleaning up shared memory
>   cleaning up files
>   unregistering server `default'
>
> I thought a possible workaround would be changing the default  
> device system wide via System Preferences and just skipping the -n  
> switch, but it still finds the Built-in Audio device first.
>
> Any help is much appreciated.
>
> --Kito
>

Here is a patch for coreaudio_driver.c that should address the  
default driver issue more cleanly: the default driver is now used if  
the driver specified with the -n option cannot be loaded for any reason.

Can you test it and report?

I  did also extend the driver parameter value to exceed 63  
characters  (in the jack/driver_interface.h file) for Jack 0.100  
release.....

#define JACK_DRIVER_PARAM_STRING_MAX  63

typedef union
{
   uint32_t  ui;
   int32_t   i;
   char      c;
   char      str[JACK_DRIVER_PARAM_STRING_MAX+1];
} jack_driver_param_value_t;

....but forget to commit in CVS. It's done now !

Stephane



patch.txt (12K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: OS X - Specifying CoreAudio devices + CVS commit

Kito-2

On Aug 16, 2005, at 5:44 AM, Stéphane Letz wrote:

>
> Here is a patch for coreaudio_driver.c that should address the  
> default driver issue more cleanly: the default driver is now used  
> if the driver specified with the -n option cannot be loaded for any  
> reason.
>
> Can you test it and report?
>

Ok, with no -n specified, jackd now correctly loads the default  
device as set in System Prefs, but using my same command:

   jackd -Rv -d coreaudio -r 44100 -p 128 -o 8 -i 6 -n  
"AppleFWAudioEngineGUID:2975281954423158"

Would only work if that device was set as default in Sys Prefs.  
Otherwise i get:

getting driver descriptor from /usr/lib/jack/jack_coreaudio.so
getting driver descriptor from /usr/lib/jack/jack_dummy.so
getting driver descriptor from /usr/lib/jack/jack_portaudio.so
jackd 0.100.0
Copyright 2001-2005 Paul Davis and others.
jackd comes with ABSOLUTELY NO WARRANTY
This is free software, and you are welcome to redistribute it
under certain conditions; see the file COPYING for details

JACK compiled with POSIX SHM support.
server `default' registered
registered builtin port type 32 bit float mono audio
loading driver ..
new client: coreaudio, id = 1 type 1 @ 0x300fb0 fd = -1
JCA: get_device_id_from_uid AppleFWAudioEngineGUID:29752819 0
JCA: get_default_device: input 272 ouput 272
JCA: Read nominalSampleRate 44100.000000
JCA: Read again nominalSampleRate 44100.000000
JCA: This device hasn't required output channels.
Cannot open the coreaudio driver
cannot load driver module coreaudio
starting server engine shutdown
freeing shared port segments
stopping server thread
last xrun delay: 0.000 usecs
max delay reported by backend: 0.000 usecs
freeing engine shared memory
max usecs: 0.000, engine deleted
no message buffer overruns
cleaning up shared memory
cleaning up files
unregistering server `default'

Thanks for the help, at least I finally get to see the FireBox+jackd  
working =) FWIW your JackPilot program seems to work as expected, but  
I have a couple headless macs I use for recording, so I just have ssh
+ecasound as an interface...

--Kito






-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Jackit-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jackit-devel
Reply | Threaded
Open this post in threaded view
|

Re: OS X - Specifying CoreAudio devices + CVS commit

Stéphane Letz

Le 17 août 05 à 00:45, Kito a écrit :

>
> On Aug 16, 2005, at 5:44 AM, Stéphane Letz wrote:
>
>
>>
>> Here is a patch for coreaudio_driver.c that should address the  
>> default driver issue more cleanly: the default driver is now used  
>> if the driver specified with the -n option cannot be loaded for  
>> any reason.
>>
>> Can you test it and report?
>>
>>
>
> Ok, with no -n specified, jackd now correctly loads the default  
> device as set in System Prefs, but using my same command:
>
>   jackd -Rv -d coreaudio -r 44100 -p 128 -o 8 -i 6 -n  
> "AppleFWAudioEngineGUID:2975281954423158"
>
> Would only work if that device was set as default in Sys Prefs.  
> Otherwise i get:
>
> getting driver descriptor from /usr/lib/jack/jack_coreaudio.so
> getting driver descriptor from /usr/lib/jack/jack_dummy.so
> getting driver descriptor from /usr/lib/jack/jack_portaudio.so
> jackd 0.100.0
> Copyright 2001-2005 Paul Davis and others.
> jackd comes with ABSOLUTELY NO WARRANTY
> This is free software, and you are welcome to redistribute it
> under certain conditions; see the file COPYING for details
>
> JACK compiled with POSIX SHM support.
> server `default' registered
> registered builtin port type 32 bit float mono audio
> loading driver ..
> new client: coreaudio, id = 1 type 1 @ 0x300fb0 fd = -1
> JCA: get_device_id_from_uid AppleFWAudioEngineGUID:29752819 0

You must also do a CVS update to get the #define  
JACK_DRIVER_PARAM_STRING_MAX  63 correction I've commited yesterday
(as you see your  "AppleFWAudioEngineGUID:29752819" string is broken  
at 31 characters... so the driver cannot be loaded.)

Please report if its works then

Stephane




-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Jackit-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jackit-devel
Reply | Threaded
Open this post in threaded view
|

Re: OS X - Specifying CoreAudio devices + CVS commit

Kito-2

On Aug 17, 2005, at 1:29 AM, Stéphane Letz wrote:

>
> Le 17 août 05 à 00:45, Kito a écrit :
>
>>
>> On Aug 16, 2005, at 5:44 AM, Stéphane Letz wrote:
>>
>>
>>>
>>> Here is a patch for coreaudio_driver.c that should address the  
>>> default driver issue more cleanly: the default driver is now used  
>>> if the driver specified with the -n option cannot be loaded for  
>>> any reason.
>>>
>>> Can you test it and report?
>>>
>>>
>>
>> Ok, with no -n specified, jackd now correctly loads the default  
>> device as set in System Prefs, but using my same command:
>>
>>   jackd -Rv -d coreaudio -r 44100 -p 128 -o 8 -i 6 -n  
>> "AppleFWAudioEngineGUID:2975281954423158"
>>
>> Would only work if that device was set as default in Sys Prefs.  
>> Otherwise i get:
>>
>> getting driver descriptor from /usr/lib/jack/jack_coreaudio.so
>> getting driver descriptor from /usr/lib/jack/jack_dummy.so
>> getting driver descriptor from /usr/lib/jack/jack_portaudio.so
>> jackd 0.100.0
>> Copyright 2001-2005 Paul Davis and others.
>> jackd comes with ABSOLUTELY NO WARRANTY
>> This is free software, and you are welcome to redistribute it
>> under certain conditions; see the file COPYING for details
>>
>> JACK compiled with POSIX SHM support.
>> server `default' registered
>> registered builtin port type 32 bit float mono audio
>> loading driver ..
>> new client: coreaudio, id = 1 type 1 @ 0x300fb0 fd = -1
>> JCA: get_device_id_from_uid AppleFWAudioEngineGUID:29752819 0
>
> You must also do a CVS update to get the #define  
> JACK_DRIVER_PARAM_STRING_MAX  63 correction I've commited yesterday
> (as you see your  "AppleFWAudioEngineGUID:29752819" string is  
> broken at 31 characters... so the driver cannot be loaded.)

Gah. Silly me looked right past that.

>
> Please report if its works then

Works perfectly now. Thanks a lot.

On a different note, would something like `jackd -d coreaudio --
listdevices` be a good idea? Its not always trivial figuring out the  
exact coreaudio device name.

--Kito

>
> Stephane
>
>
>
>
> -------------------------------------------------------
> SF.Net email is Sponsored by the Better Software Conference & EXPO
> September 19-22, 2005 * San Francisco, CA * Development Lifecycle  
> Practices
> Agile & Plan-Driven Development * Managing Projects & Teams *  
> Testing & QA
> Security * Process Improvement & Measurement * http://www.sqe.com/ 
> bsce5sf
> _______________________________________________
> Jackit-devel mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/jackit-devel



-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Jackit-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jackit-devel
Reply | Threaded
Open this post in threaded view
|

Re: OS X - Specifying CoreAudio devices + CVS commit

Kito-2
In reply to this post by Stéphane Letz
Oops, meant this for the list, sorry Stephane.

Begin forwarded message:

>
> On Aug 18, 2005, at 1:55 PM, Stéphane Letz wrote:
>
>>
>> Le 18 août 05 à 19:18, Kito a écrit :
>>
>>>
>>> On Aug 17, 2005, at 10:31 AM, Stéphane Letz wrote:
>>>
>>>
>>>>
>>>>
>>>>
>>>>>
>>>>> On a different note, would something like `jackd -d coreaudio --
>>>>> listdevices` be a good idea? Its not always trivial figuring  
>>>>> out the exact coreaudio device name.
>>>>>
>>>>> --Kito
>>>>>
>>>>>
>>>>>
>>>>
>>>> Send me a patch..... (-:
>>>>
>>>
>>> Ok, I started hacking on this, then got a little carried away and  
>>> wanted to do things like set the default device, display  
>>> available sample rates, etc....which is probably a little out of  
>>> the scope of jackd and the coreaudio driver, and might be better  
>>> suited as a seperate tool.
>>>
>>> What would you think about changing the -n option to use the  
>>> kAudioDevicePropertyDeviceName ?
>>>
>>>
>>>>
>>>> Stephane
>>>>
>>>
>>>
>>
>>
>> The problem with kAudioDevicePropertyDeviceName is that it returns  
>> a localized string.... ,not easy to handle.
>
> How right you are...I was naive in thinking it was trivial to  
> convert CFStrings to c strings. I found  
> CFStringGetFileSystemRepresentation
> which could be used, but its 10.4 specific, and I haven't gotten it  
> to actually work properly yet.
>
>> It was part of the reason to use the"more permanent"  
>> kAudioDevicePropertyDeviceUID  property.
>
> *nod*
>
>>
>> I guess a -l option that would print the list of all devices  
>> kAudioDevicePropertyDeviceUID would be good
>>
>>
>
> Ok, not being very familiar with the jack source quite yet (I'm  
> trying!), would that be an arg just to the coreaudio driver or  
> handled higher up like the -h switch? Could the -l option be  
> extended for alsa users to list alsa devices as well?
>
> Sorry to keep bugging you, just don't want to code a bunch of stuff  
> only to find out I went about it totally wrong...
>
> Thanks,
>
> --Kito
>
>> Stephane
>



-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Jackit-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jackit-devel