Author Topic: Should Feature Units define nothing for channels without controls?  (Read 4396 times)

jb

  • Member
  • ***
  • Posts: 26
If I have a stereo audio stream, and I want only a Master control for Volume/Mute in the Feature Unit (Master controls all channels simultaneously), do I need to define empty controls for the individual channels?

In other words, is this correct?

Code: [Select]
bmaControls:
 0x03    Channel(0) - Mute / Volume

Or should it properly be this?

Code: [Select]
bmaControls:
 0x03    Channel(0) - Mute / Volume
 0x00    Channel(1)
 0x00    Channel(2)

Both seem to work in various operating systems.

Jan Axelson

  • Administrator
  • Frequent Contributor
  • *****
  • Posts: 3033
    • Lakeview Research
Re: Should Feature Units define nothing for channels without controls?
« Reply #1 on: July 24, 2021, 09:35:15 pm »
The audio class spec says:

3.13.6 The Feature Unit (FU) is essentially a multi-channel processing unit that provides basic manipulation of multiple single-parameter Audio Controls on the incoming logical channels. For each logical channel, the Feature Unit optionally provides Audio Controls for the following features:
•   Mute
•   Volume
•   Tone Control (Bass, Mid, Treble)
•   Graphic Equalizer
•   Automatic Gain Control
•   Delay
•   Bass Boost
•   Loudness
•   Input Gain
•   Input Gain Pad
•   Phase Inverter
In addition, the Feature Unit optionally provides the above Audio Controls but now influencing all channels of the cluster at once. In this way, ‘master’ Controls can be implemented

The use of "optionally" to me says that a single control is sufficient.

I don't have direct experience with it however.

jb

  • Member
  • ***
  • Posts: 26
Re: Should Feature Units define nothing for channels without controls?
« Reply #2 on: August 02, 2021, 10:45:41 am »
Yes, but both of the above examples are using a single control, with Ch1 and Ch2 controls undefined.  I'm just not sure if I have to specify 0x00 for them or can leave them out entirely.

"The bmaControls() array is an array of bit-maps, each indicating the availability of certain audio Controls
for a specific logical channel or for the master channel 0. For future expandability, the number of bytes
occupied by each element (n) of the bmaControls() array is indicated in the bControlSize field. The
number of logical channels in the cluster is denoted by ch."

"bmaControls() is a (ch+1)-element array of 4-byte bitmaps, each containing a set of bit pairs. "

"bmaControls() is a (ch+1)-element array of 4-byte bitmaps, each following the same semantics as the bmControls
field in other descriptors."

So I guess it always has to be of length ch+1 and the unused channels should be blank 0x00?

Jan Axelson

  • Administrator
  • Frequent Contributor
  • *****
  • Posts: 3033
    • Lakeview Research
Re: Should Feature Units define nothing for channels without controls?
« Reply #3 on: August 03, 2021, 10:02:12 pm »
It sounds like that would work.