• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Allowing a user-space driver to be the default system
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Allowing a user-space driver to be the default system


  • Subject: Re: Allowing a user-space driver to be the default system
  • From: Stéphane Letz <email@hidden>
  • Date: Wed, 30 Mar 2005 14:50:45 +0200




On Mar 25, 2005, at 12:51 AM, Stéphane Letz wrote:

I'm also implementing the kAudioDevicePropertySupportsMixing
property for the Device (in DeviceGetProperty)
and our driver stream format is : kAudioFormatFlagIsPacked
| kLinearPCMFormatFlagIsFloat
| kAudioFormatFlagIsBigEndian
| kAudioFormatFlagIsNonInterleaved

The HAL does not use kAudioFormatFlagIsNonInterleaved, so you should not be using it either. It is an illegal format for IOProcs.

OK.


But it is not working... Thus i tried to implement also the
kAudioDevicePropertySupportsMixing property for the Stream (in
DeviceGetStreamProperty) but it is still not working....

That property is a device property. It should be present and implemented properly. Plus, the value has to be 1 indicating that mixing is enabled.

OK. It seems to be implemented correctly: i see the "Mixing on check button" when using HALLab




So I guess there is still something missing... Any idea?
(this default driver behaviour was correctly working under Jaguar
and stopped working under Panther....)

Your streams need to implement kAudioStreamPropertyTerminalType.

They are : using the INPUT_MICROPHONE and OUTPUT_SPEAKER values. I tried to just put 0 without much success.




Your devices need to implement kAudioDevicePropertyHogMode properly

My device also implements kAudioDevicePropertyHogMode and returns -1

and they can't be hogged.

I don't understand here. When using HALLab, I see that "Built-in audio" can be hogged. What do you mean by "they can't be hogged"?


My device *can* be selected as a default input/output/system using HALLAB and when i select it as default input/output/system, the property is notified to already running CoreAudio application that correctly switch to my device.

The only thing that does not work is that the "my device as default input/output/system" state is not properly saved in the system.
What else should I check?




Another question:
Our driver does not support changing some properties (with
DeviceSetProperty): for example it runs at only one possible sample
rate and one buffer size at a time. Thus it accepts
DeviceSetProperty for the exact buffersize and samplerate
internally supported, otherwise it returns an error. The question:
what is the correct error value that has to be returned?

I usually use kAudioHardwareUnknownPropertyError for property that
cannot be handled in set mode by our driver.  Is this correct? or
should it be kAudioHardwareIllegalOperationError or
kAudioDeviceUnsupportedFormatError sometimes?

The right error code is kAudioDeviceUnsupportedFormatError for setting an unsupported sample rate, but is kAudioHardwareIllegalOperationError for setting an unsupported buffer size.

--

Thanks.

Is there a precise list of error code that would have to be returned for each property?

Best Regards

Stephane Letz

_______________________________________________
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


  • Follow-Ups:
    • Re: Allowing a user-space driver to be the default system
      • From: Jeff Moore <email@hidden>
  • Prev by Date: Elementary CoreMIDI problem
  • Next by Date: Hardware buffer size
  • Previous by thread: Re: Allowing a user-space driver to be the default system
  • Next by thread: Re: Allowing a user-space driver to be the default system
  • Index(es):
    • Date
    • Thread