Re: Mojave User Space Virtual Driver (HAL plugin) and enabling Microphone input
Re: Mojave User Space Virtual Driver (HAL plugin) and enabling Microphone input
- Subject: Re: Mojave User Space Virtual Driver (HAL plugin) and enabling Microphone input
- From: Eric Gorouben <email@hidden>
- Date: Wed, 22 May 2019 16:26:55 +0200
Hi Nicolas,
No need to apologise, of course, better avoiding misunderstandings.
You may be right: I didn't build _virtual_ drivers, so the problem is
different. There are many issues with this audio server driver plugin design,as
well as undocumented features and, well, everything is possible.
Sorry for having answered too quickly.
That said, I’ve often used popups, with CFUserNotificationDisplayNotice, in the
plugin without problems.
Best regards,
Eric
> Le 22 mai 2019 à 13:05, email@hidden a écrit :
>
> Hi Eric,
>
> Thank you for your quick feedback. I really apologise for having to ask this
> question, but can you confirm your drivers do actually read input via the
> core audio API on Mojave, when part of the /usr/sbin/coreaudiod daemon? I ask
> because this is specifically a Mojave issue, so any driver you wrote that
> worked in the past may have stopped working since Mojave. I did debug through
> my driver to find the samples coming out of the core audio api were
> unexpectedly silent, and did prove the same audio interface does work with a
> micro-phone-authorisation-enabled app. So the only reason I currently see for
> the samples received by the driver to be silent, but only on Mojave, is lack
> of micro-phone usage permission.
>
> Can anyone else confirm Eric’s assertion that this should work without
> explicit user permission on Mojave?
>
> Best Regards,
> Nicolas
>
>
>> On 22 May 2019, at 10:05, Eric Gorouben <email@hidden
>> <mailto:email@hidden>> wrote:
>>
>>
>> Hi Nicolas
>>
>> As far as I know, it is possible, and there is no necessary workaround. I’ve
>> written drivers for many devices using this API, and never had this problem.
>> There is probably another problem in your implementation.
>>
>> Good luck
>> Eric Gorouben
>>
>>> Le 22 mai 2019 à 10:51, email@hidden <mailto:email@hidden> a écrit :
>>>
>>> Hello esteemed colleagues,
>>>
>>> Context: Mojave has extra security in place that requires explicit user
>>> authorisation in order for an app to be allowed to received microphone
>>> input. If that permission is not present, then all input from *any* audio
>>> interface device is silenced when the app uses the core audio API to read
>>> input. In order to enable input, the app needs to use the appropriate
>>> notarisations or add a NSMicrophoneUsageDescription key to its plist. The
>>> first time the app is run, the user will then be shown a popup to ask if
>>> they wish to enable usage of the microphone by that app. That permission
>>> then gets stored into the permissions database and is resettable by the
>>> tccutil command line utility. So far so good.
>>>
>>> Now consider a user-space HAL-plugin virtual driver based on the
>>> coreaudio/AudioServerPlugin.h configuration. Since the driver is not a
>>> kext, it has to use user-space APIs to do anything with audio. But in order
>>> to read input via core audio api's, it has to have explicit user
>>> permission, which (as I understand it) is impossible to grant because the
>>> coreaudiod is forbidden from raising anything GUI or popup related: A
>>> Catch-22.
>>>
>>> So my question is pretty fundamental:
>>>
>>> Is it now impossible to read audio input in a user-space HAL plugin virtual
>>> driver in Mojave, or is there some hitherto undocumented driver-specific
>>> work-around that could enable audio input?
>>>
>>> If it is impossible by design rather than accident, I would appreciate an
>>> Apple-insider explaining the context of that design, because this would be
>>> a pretty fundamental downgrading of the HAL technology.
>>>
>>> Best Regards,
>>> Nicolas Haynes
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> Sonnox Ltd. Registered in England and Wales, number 05820431
>>> Registered Office:
>>> The Studio,
>>> Witney Lakes Resort,
>>> Downs Road,
>>> Witney. Oxfordshire. OX29 0SY
>>>
>>> www.sonnox.com
>>> <http://www.sonnox.com/>_______________________________________________
>>> Do not post admin requests to the list. They will be ignored.
>>> Coreaudio-api mailing list (email@hidden
>>> <mailto:email@hidden>)
>>> Help/Unsubscribe/Update your Subscription:
>>>
>>> This email sent to email@hidden <mailto:email@hidden>
>>
>>
>> _______________________________________________
>> Do not post admin requests to the list. They will be ignored.
>> Coreaudio-api mailing list (email@hidden
>> <mailto:email@hidden>)
>> Help/Unsubscribe/Update your Subscription:
>>
>> This email sent to email@hidden
>
>
>
> Sonnox Ltd. Registered in England and Wales, number 05820431
> Registered Office:
> The Studio,
> Witney Lakes Resort,
> Downs Road,
> Witney. Oxfordshire. OX29 0SY
>
> www.sonnox.com
> <http://www.sonnox.com/>_______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Coreaudio-api mailing list (email@hidden)
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden