• 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: Enable system volume when driver doesn't
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Enable system volume when driver doesn't


  • Subject: Re: Enable system volume when driver doesn't
  • From: "Mikael Hakman" <email@hidden>
  • Date: Wed, 19 Mar 2008 18:12:09 +0100
  • Organization: Datakonsulten AB

Cordially welcome to this thread, Stephane!

On March 18, 2008 12:08, Stéphane Letz wrote:

What kind of property the user-land driver would have to implement? Jeff can you help here?

As far as I can see, there are 10 related properties. 5 of these properties are on AudioVolumeControl object, which is a subclass of AudioLevelControl, in turn, a subclass of AudioControl. AudioVolumeControl objects are accessible from AudioDevice by kAudioObjectPropertyOwnedObjects property. As usual element 0 gives master control (if there is one) and the other numbers give controls for corresponding channels. I think one should use kAudioDevicePropertyScopeOutput as scope and kAudioVolumeControlClassID as qualifier to get them. I'm getting all objects for all devices by recursively getting kAudioObjectPropertyOwnedObjects with NULL qualifier in my test app. The 5 properties are:


   kAudioLevelControlPropertyScalarValue = 'lcsv',
   kAudioLevelControlPropertyDecibelValue = 'lcdv',
   kAudioLevelControlPropertyDecibelRange = 'lcdr',
   kAudioLevelControlPropertyConvertScalarToDecibels = 'lcsd',
   kAudioLevelControlPropertyConvertDecibelsToScalar = 'lcds'

Use global scope, element 0, no qualifier when accessing above. On my MBP using built-in analog output, the first 2 are read/write and the rest is read/only. The same gives on an iMac using Logitech Z-10 USB speakers. For built-in digital output there is no AudioVolumeControl at all. This could be the very first test if you implement virtual volume control in Jack. You need to plug in an optical jack into combined analog/digital output connector for digital output to appear (and analog output to disappear).

The other 5 properties which should behave exactly as above are on a corresponding AudioDevice object. As far as I can see, they are defined to other numbers than above but should do the same.

   kAudioDevicePropertyVolumeScalar = 'volm',
   kAudioDevicePropertyVolumeDecibels = 'vold',
   kAudioDevicePropertyVolumeRangeDecibels = 'vdb#',
   kAudioDevicePropertyVolumeScalarToDecibels = 'v2db',
   kAudioDevicePropertyVolumeDecibelsToScalar = 'db2v',

Use output scope, element 0 for master, element n for channel n on AudioDevice.

Neither built-in analog output nor Z-10 USB implement master controls but they implement volume control for left and right channel. OS X somehow figures this out and displays master volume control in menu bar (and also in Sound Preferences), it also reacts to Apple IR remote +/- buttons by increasing/decreasing the volume. Obviously it loops through channels and uses channel controls. I don't know whether this works with multi-channel devices too. In AMS you can see that left/right control is there but master is not.

Decibel range and therefore translations to/from scalar (0 - 1) are somewhat unclear. Also unclear is whether scalar values should be linear with respect to signal level or with respect to human perception of loudness. According to AMS, built-in output goes from -64 dB to 0 and Z-10 output from -41 to +3 dB. Theoretically, 16 bits format should give range -96 to 0 dB.

I'm sure Jeff has more up to date and detailed information on all above topics.

Current Jack on OSX maintainer is essentially one (me..) doing what I can, and perfectly knowing that things are far from perfect. I consider the jack server and JackRouter infrastructure to be quite solid now, and the real weakness being in the configuration tools and user experience (JackPilot)

What I said about Jack and/or open source wasn't by any way meant to be negative. On the contrary, I think Jack is a masterpiece of work. I just was unsure whether I could use it for my purposes.


But you're invited to participate in this open source project.

Would I become certain that I can use Jack in current project then I'm prepared to help, of course. I'll start with installing Jack and learning its setup.


/Mikael

_______________________________________________
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: Enable system volume when driver doesn't
      • From: Stéphane Letz <email@hidden>
References: 
 >Re: Enable system volume when driver doesn't (From: Stéphane Letz <email@hidden>)

  • Prev by Date: Re: Recording system audio
  • Next by Date: disabling NSButton?
  • Previous by thread: Re: Enable system volume when driver doesn't
  • Next by thread: Re: Enable system volume when driver doesn't
  • Index(es):
    • Date
    • Thread