io-audio

Start one or more audio drivers

Note: You must be root to start this manager.

Syntax:

io-audio [-c config_file] [-d driver [opt[,opt...]]] [-l level]
         [-m opt[,opt...]] [-o opt[,opt...]] [-U string] [v[v]...]

Runs on:

QNX Neutrino

Options:

-c config_file
(QNX Software Development Platform 6.6 io-audio patch [patch ID 4510] or later) Load the specified configuration file. For more information, see "Configuration file," below.
-d driver [opt[,opt...]]
Load the specified driver and pass it the given driver options. The driver name is the name of the shared object without the deva-ctrl- prefix and the .so extension. For example, to load the deva-ctrl-4dwave.so shared object, specify 4dwave as the driver name.

All audio drivers support the following card options:

cap_name=name
The symbolic name to assign to the PCM capture device.
dindex=number
The device number that additional following options apply to.
play_name=name
The symbolic name to assign to the PCM playback device.
unit=number
The card number to mount the driver as.

You can start more than one driver by using multiple -d command-line options. For information on the drivers and any specific options, see the entries for the deva-ctrl-* shared objects.

-l level
Explicitly set the level of output verbosity. You can also use the -v[v...] option to specify verbosity.
-m opt[,opt...]
Memory options. The opt variable can be any of the following:
pool_size=kbytes
The size of the DMA memory pool to create, in KB. The default is 0 KB.
pool_name=string
The name of a shared memory object or (in QNX Software Development Platform 6.6 io-audio patch [patch ID 4510] or later) typed memory object to map and use as DMA memory pool. This object must be physically contiguous memory.
Note: If the pool name is a reference to a typed memory object, then you must also provide the pool_size. If the pool name is a reference to a shared memory object, then the pool is automatically sized to be the size of the object.
-o opt[,opt...]
Global options to apply to all drivers (specified with the -d option) that follow on the command line. The opt variable can be any of the following:
config_write_delay=time
The time in seconds after the last change before sound card settings are written to disk. The default value is -1, which prevents the settings from ever being written.
data_thread_prio=priority
The priority of the software mixer thread. The default is 25; values that are outside the priority range for the round-robin scheduler are discarded.
disable_sw_mixer
On cards that have only a single channel in hardware, don't use software techniques to increase the maximum number of playing channels. By default, the software mixer is enabled.
intr_thread_prio=priority
Set the priority of the interrupt service threads. The default is 50; values that are outside the priority range for the round-robin scheduler are discarded.
max_dma_buf_size=size
The maximum size, in kilobytes, for the DMA buffer. The default is 256 KB; io-audio uses a minimum size of 16 KB.
sw_mixer_rate=[FAHQ|FA|Lvalue]
Set the method of selecting the sampling frequency used by the PCM software mixing device if the underlying hardware device supports multiple rates:
  • FAHQ (First Active High Quality) — select the highest HW-supported sample rate that best fits the first active clients requested rate (all subsequent subchannels will be locked to the active rate).
  • FA (First Active) — select the sample rate based on the First Active client's requested sample rate; all subsequent subchannels are locked to the active rate.
  • Lvalue — lock the sample rate to the rate specified by value, regardless of the client's requested rate.

The default is FAHQ.

sw_mixer_samples=num
Adjust the fragment size used by the software mixer to something other than the default of 1024 samples. Here's an example of how to calculate the value to pass in with this option:

sw_mixer_samples = sample_rate (in samples per second) * fragment_length (in seconds)

In QNX Neutrino 6.6 or later, sw_mixer_samples is the number of samples per channel.

-U string
(QNX Neutrino 6.6 or later) Once running, run as the specified user, so that the program doesn't need to run as root. The string can be in one of these forms:
  • uid[:gid[,sup_gid]*]
  • user_name[,sup_gid]*

In the second form, the primary group is the one specified for user_name in /etc/passwd.

-v[v...]
Increase the level of output verbosity. Additional v characters increase the verbosity. You can also use the -l option to specify verbosity.

Description:

The io-audio manager provides support for dynamically loaded audio-driver modules. This utility enables you to load the audio drivers specified by the -d options when you start io-audio.

Note: Graphics drivers run at a higher priority than applications, but they shouldn't run at a higher priority than the audio, or else breaks in the audio occur. You can use the on command to adjust the priorities of the audio and graphics drivers.

Once io-audio has started, you can dynamically load and unload drivers using the mount and umount commands. For example, this command:

io-audio -dvortex -daudiopci

gives the same result as this sequence:

io-audio
mount -T io-audio vortex
mount -T io-audio audiopci
Note: When searching for shared objects, the io-audio manager uses the LD_LIBRARY_PATH environment variable.

To unload a module, use a command like this:

umount /dev/snd/controlC0

Configuration file

(QNX Software Development Platform 6.6 io-audio patch [patch ID 4510] or later) The configuration file is optional, but is easier to use and more flexible than the corresponding command-line options. In order to load a configuration file, specify the -c configuration_file_path option when you start io-audio. Global and memory options provided on the command line override the corresponding configuration file settings. However if you specify deva-* shared objects both on the the command line (via the -d option) and in the configuration file (via [CTRL] sections), each is treated as an individual and independent request to load or mount a driver.

Options from the [CTRL] section take precedence over options defined (and supported) in both the [GLOBAL] and [CTRL] sections. Global options provided via the command line (-o) are also overridden by options defined in the [CTRL] section in the configuration file. In general, we recommend that you limit the use of [GLOBAL] options and use the options under the [CTRL] section.

The standard location for this file is /etc/system/config/audio/io-audio_platformVariant.conf. If an error occurs while parsing the configuration file, io-audio won't start.

When you're using indexed PCM mixer or input splitter keys, the index is that of the parent PCM device that the mixer/splitter is being created for, not the index of the mixer/splitter PCM device that's being created.

The general syntax is as follows:

#
Anything after a number sign on a line is considered a comment.
[ name ]
A string enclosed in square brackets indicates the start of a section.
  • The name is case-insensitive.
  • Leading and trailing spaces are removed, but white space is allowed within the name.
  • Extra characters other than comments after the closing bracket cause the section to be discarded.
  • Duplicated section names are allowed. However unless the section specifically specifies multiples (see below), in most cases only the keys in the first section of that name in the file are used. The Acoustic Control Server section is an exception to this; multiple ACS sections will cause an error.
key = value
A key-value pair.
  • The key is case-insensitive.
  • The value is case-sensitive
  • Leading and trailing spaces are removed from the key and value.
  • A key must have a value; a value must have a key.
  • White space within a key or value causes the key-value pair to be discarded.
  • All valid key-value pairs are associated with the section preceding them in the file.
  • If there are multiple keys of the same name within a section, the value of the last key in the section is used.
  • An indexed key is a key with "_index" suffix appended to the key name (e.g., key_1).
  • Nonindexed key values apply globally for the section that they're defined in. You can override this value on a device-by-device basis with indexed keys.
  • Key/value pairs at the start of the file (before a section has been specified), or after an invalid section are discarded.
  • (QNX Software Development Platform 6.6 io-audio patch [patch ID 4687] or later) If you specify an ampersand (&) before the key name, the value is appended to the key's current value. For example, the following:
    options=,dindex=1,play_name=defaultp
    &options=,dindex=2,cap_name=defaultc
    is the same as:
    options=dindex=1,play_name=defaultp,dindex=2,cap_name=defaultc

[GLOBAL] section

The keys in the [GLOBAL] section include the following:

Key Default Description
config_write_delay -1 The time in seconds after last change before soundcard settings are written to disk. The default value of -1 prevents the settings from ever being written.
max_dma_buf_size 256 The maximum DMA buffer size, in KB. The minimum value for this parameter is 16 KB.
status_accuracy 25 Status accuracy in milliseconds
disable_sw_mixer 0 Disable the PCM Software mixer (0 / 1). If 0, a PCM Software mixer (sw_mixer) is instantiated.

If 1, don't use software techniques to increase the maximum number of playing channels on cards that have only a single channel in hardware.

You should specify this in the [CTRL] section for each card rather than at this point, to simplify enabling/disabling of the sw_mixer on a card-by-card basis.

sw_mixer_ms None The mixer fragment size, in milliseconds. There is no default; this key isn't used if you don't specify a value. You can also set this in the [CTRL] section for each card.

This parameter overrides sw_mixer_samples. See also ms_frag_period in the [AFM] or [ACS] section.

sw_mixer_samples 1024

The mixer fragment size, in samples per voice. This is the deprecated method of specifying the mixer fragment size (overridden by sw_mixer_ms if specified).

Because you cannot use a samples value to specify the fragment size the PCM input splitter uses, if you use the input splitter, you cannot use this option to specify the fragment size the PCM software mixer uses.

The minimum is 64 bytes, and the maximum 512 KB.

sw_mixer_rate FAHQ The method for setting the sw mixer sample rate. If the underlying hardware supports multiple sample rates, the rate method is used to select which sample rate used to configure the PCM Software mixer:
  • FAHQ — First Active, High Quality (44.1Khz and above)
  • FA — First Active
  • Lvalue — locked to the specified rate, where value is in the range 100–200000.

Note the "first active" refers to the sample rate requested by the first active client.

intr_thread_prio 50 The interrupt service thread's priority. The value is discarded if it isn't within the valid range of round-robin priorities.
data_thread_prio 25 The minimum thread priority. The value is discarded if it isn't within the valid range of round-robin priorities.
verbosity 0 The logging verbosity level, using a bit-masked log level:
  • Bit 0 DRIVER — Debug information from drivers. (e.g., you can also use INTERRUPT or CODEC for driver-level debug information).
  • Bit 1 CONTROL — Debug information from the control path, state machine, etc.
  • Bit 2 PCM — Logs control type information.
  • Bit 3 MIXER — Mixer related debug debug information, such as volume and mute controls. Debug information from mixer DLL and codec level deva-* DLLs.
  • Bit 4 IO_ADO — High-level Audio library debug information.
  • Bit 5 RESMGR — Debug information from the resource manager (resmgr_*) callbacks.
  • Bit 6 POWER — Debug information related to power management.
  • Bit 7 MISC — Miscellaneous debug information.
  • Bit 8 CODEC — Codec-level debug information from the PCM software mixer and deva-* DLLs.
  • Bit 30 INTERRUPT — Interrupt handler debug information. (dma_interrupt, deva interrupt callbacks, etc.)
  • Bit 31 MEMORY — Memory allocation debug information.
pool_name None The name of a shared memory or typed memory object to map and use as a DMA memory pool. The object must be physically contiguous memory.

If the pool_name refers to typed memory, then you must also provide the pool_size option. If the pool_name refers to a shared memory object, then the pool is automatically sized to the size of the object (pool_size is ignored if provided). The io-audio manager first tries to open the name as typed memory; if this fails, it tries to open the name as a shared memory object.

pool_size   The size of the DMA memory pool to create, in KB. If no pool_name is provided, then an anonymous object is created to the pool_size specified. If the pool_name refers to typed memory, then you must also provide the pool_size.
pcmPreferredp None The name of the preferred playback device; that is, the device opened with snd_pcm_open_preferred() when SND_PCM_OPEN_PLAYBACK is specified

io-audio first parses the file /dev/snd/preferences, if it exists, for the preferred device. If no device is specified in this file or the device can't be found, the io-audio service attempts to set the preferred device using this option. If this option isn't specified or the device cannot be found, the first valid playback device (based on the deva-* load order) is used.

pcmPreferredc None The name of preferred capture device; that is, the device opened with snd_pcm_open_preferred() when SND_PCM_OPEN_CAPTURE is specified.

io-audio first parses the file /dev/snd/preferences, if it exists, for the preferred device. If no device is specified in this file or the device can't be found, the io-audio service attempts to set the preferred device using this option. If this option isn't specified or the device cannot be found, the first valid playback device (based on the deva-* load order) is used.

[CTRL] section(s)

The keys in the [CTRL] section include the following:

Key Default Description
name None The name of the sound card HW interface DLL. Required; omit the deva-ctrl- prefix and the .so suffix when you're specifying the driver name.
options None Driver-specific options as documented for the soundcard DLL.
As part of the card options, the following options can be specified for each PCM device:
  • dindex — the device number to which the following options apply
  • cap_name — the PCM capture device alias
  • play_name — the PCM playback device alias
  • unit — the card number to mount the driver as
For example, the following creates an alias for the capture aand playback PCM device interfaces for device number 2 to devC and devP, respectively.
options=dindex=2,cap_name=devC,play_name=devP
input_splitter_enable 0 Enable or disable the input splitter on PCM devices that have a capture device (0 / 1). You can append a _index suffix to the key to target the option at a specific PCM device. If you specify this parameter without an index suffix, the value applies to every capture-capable PCM device under the card created by this section.

If you specify this parameter with an index suffix, then the applied value (0/1) takes effect only for the PCM device specified by the index, overriding the value specified by an instance of the key without an index suffix.

You must specify this parameter if multiple AFMs are capturing simultaneously from the same capture device on this sound card.

To ensure that the input splitter can route data to a PCM software mixer device, both devices (input_splitter and PCM software mixer) must operate at the same data fragment size, which you set via the sw_mixer_ms option, and thus the sw_mixer_ms option is required when you're using the input splitter (even if the PCM software mixer device isn't being used).

Note: PCM input splitter may not support all the audio drivers that your BSP provides. If the driver is not supported, io-audio fails and a failure message is written to the system log. For help getting your PCM to support a specific driver, contact your QNX representative.
input_splitter_name splitterCxDxc The symbolic name for the input splitter device. You can append a _index suffix to the key to target the option at a specific PCM device. You can use the symbolic name instead of the PCM device name in the configuration file to simplify AFM device assignments.

If you create multiple splitters and this key is provided without an index suffix, then a name collision occurs, and the input splitter creation fails.

disable_sw_mixer 0 Disable the sw mixer (0 / 1). You can append a _index suffix to the key to target the option at a specific PCM device.

If the value of this parameter is 0, a PCM Software mixer (sw_mixer) is instantiated. If it's 1, io-audio doesn't use software techniques to increase the maximum number of playing channels on cards that have only a single channel in hardware.

This parameter must be 0 if AFMs are playing simultaneously to the same playback device on this sound card.

For a Bluetooth device, this should be 1 (disable sw mixer).

This parameter overrides the corresponding option from the [GLOBAL] section or the command line for this card.

Note: If you use the QNX Acoustic Management Platform 2.0, this parameter must be 0 if AFMs are playing simultaneously to the same playback device on this sound card.
sw_mixer_ms None The mixer fragment size, in milliseconds. No default and this isn't used if a value isn't specified. An optional _index suffix can be appended to the key to target the option at a specific PCM device.

This parameter overrides the corresponding option from the [GLOBAL] section or the command line for this card.

  • You must specify this parameter if any AFMs are configured to play back through the PCM software mixer on this card.
  • This parameter overrides sw_mixer_samples. See also ms_frag_period in the [AFM] or [ACS] section.
sw_mixer_samples 1024 The mixer fragment size, in samples per voice. You can append a _index suffix to the key to target the option at a specific PCM device. This is the deprecated method of specifying the mixer fragment size (overridden by sw_mixer_ms if specified); you should use it only when you aren't using AFMs. The minimum is 64 bytes; the maximum 512 KB.

This parameter overrides the corresponding option from the [GLOBAL] section or the command line for this card.

Note: This key isn't valid when you're using the QNX Acoustics Management Platform 2.0.
sw_mixer_rate FAHQ The sw mixer sample rate. You can append a _index suffix to the key to target the option at a specific PCM device. If the underlying hardware supports multiple sample rates, the rate method is used to select which sample rate is used to configure the sw_mixer:
  • FAHQ — First Active, High Quality (44.1Khz and above)
  • FA — First Active
  • Lvalue — locked to specified rate, where value is in the range 100–200000

Note that First Active refers to the sample rate requested by the first active client.

This parameter overrides the corresponding option from the [GLOBAL] section or the command line for this card.

sw_mixer_play_name swmixCxDxp The symbolic name for sw_mixer pcm device. You can append a _index suffix to the key to target the option at a specific PCM device. You can use the symbolic name instead of the PCM device name in the configuration file to simplify AFM device assignments. If you create multiple PCM mixers, and you provide this key without an index suffix, then a name collision occurs, and the PCM mixer creation fails.
sw_mixer_cap_name swmixCxDxc The symbolic name for sw_mixer PCM reference device(s). You can append a _index suffix to the key to target the option at a specific PCM device. You can use the symbolic name instead of the PCM device name in the configuration file to simplify AFM device assignments. If you create multiple PCM mixers, and you provide this key without an index suffix, then a name collision occurs, and the PCM mixer creation fails.
sw_mixer_limiter 0 (QNX Software Development Platform 6.6 io-audio patch [patch ID 4687] or later) Enable the PCM software mixer limiter. You can append a _index suffix to the key to target the option at a specific PCM device.

If 1, enable a 1 ms soft look-ahead limiter on the main media mixing path through the PCM software mixer.

If 0, media streams are strictly added and hard-clamped

sw_mixer_max_references 0 The maximum number of media references available for capture from the sw_mixer. You can append a _index suffix to the key to target the option at a specific PCM device. Values greater than 10 are limited to 10.
afm_mixer_enable 0 Enable mixing of the AFM outputs separately from the media streams (0 / 1) in the PCM software mixer. You can append a _index suffix to the key to target the option at a specific PCM device. If the value of this parameter is 0, the AFM mixer is disabled; if it's 1, the AFM mixer is enabled. This value is discarded if there are no configured AFMs.
afm_mixer_max_references 0 The maximum number of AFM references available for capture from the AFM mixer. You can append a _index suffix to the key to target the option at a specific PCM device. This value is discarded unless afm_mixer_enable is 1 and there are configured AFMs. This value should be equal to or greater than the total number of AFM references required by all configured AFMs and ACS.

The use of a reference with the Voice AFM is optional and depends on whether pcm_ref_capture is specified (see below).

Values greater than 10 are limited to 10.

afm_mixer_atten_disable 0 (QNX Software Development Platform 6.6 io-audio patch [patch ID 4687] or later) Disable AFM mixer attenuation. You can append a _index suffix to the key to target the option at a specific PCM device. This value is discarded unless afm_mixer_enable is 1 and there are configured AFMs.

Normally when the AFM mixer is enabled, there's an implicit 6 dB attenuation of both the main (media) and the AFM mixing paths in the PCM mixer, so that the combined output of these two paths will never need to be clamped, avoiding the audio artifacts which could arise when performing acoustic echo cancellation.

This implicit attenuation can be disabled for target systems where it is known that the AFM audio and media playback will never run concurrently. This can be true in systems where only the voice AFM is integrated. However if you're integrating ASD or ICC, which do typically run concurrently with media playback, you shouldn't use this key.

If 1, the AFM mixer attenuation is disabled. If 0, the AFM mixer attenuation is enabled.

max_concurrent_afms 0 (QNX Software Development Platform 6.6 io-audio patch [patch ID 4687] or later) The maximum number of AFMs that are expected to be concurrently active. You can append a _index suffix to the key to target the option at a specific PCM device. This value is discarded unless afm_mixer_enable is 1 and there are configured AFMs.

Normally the AFM mixer gain is 1/afm_cnt to avoid clipping (non-linearity) when mixing, where afm_cnt is the number of AFMs that have a pcm_local_playback device and an afm (default) sw_mixer_route. However if it's known that AFMs are not going to be used concurrently, or if the AFMs are tuned correctly, this restriction can be overridden to a value less than afm_cnt. If 0, the value is ignored.

[AFM] section(s)

The [AFM] section is available for use only if you've installed the QNX Software Development Platform 6.6 io-audio patch (patch ID 4687) and QNX Acoustic Management Platform 2.0.

The keys in the [AFM] section include the following. The keys in this section that are prefixed with ap_ apply only to acoustic AFMs. Acoustic AFMs are associated with an acoustic processing library, such as Voice (QNX Acoustics for Voice), ICC (QNX In-Car Communication), and ASD (QNX Active Sound Design).

Key Default Description
name None The name of the DLL, which is usually an AMP (Acoustic Management Platform) functional module (AFM); this parameter is required and must be one of the following modular libraries:
  • icc — QNX In-Car Communications (ICC) that provides algorithms to improve the ease of communication between passengers within a vehicle.
  • voice — QNX Acoustics for Voice (Voice) that provides algorithms to detect and extract voice from conditions that have lots of noise (wind, road, etc.).
  • asd — QNX Active Sound Design (ASD) to use active-noise cancellation to reduce engine tones, as well as, synthesize sound to support a manufacturer's vision of what their vehicle should sound like.
  • bridge — bridges audio inputs to audio outputs and assumes the clocking for the inputs and outputs is synchronized
Omit the deva-afm- prefix and the .so suffix when specifying the module name (e.g., icc corresponds to deva-afm-icc.so.
pcm_local_capture None The name of the local capture device. Required for all AFMs.
pcm_local_playback None The name of the local playback device. Required for all AFMs.
pcm_remote_capture None The name of the remote capture device. Required for the Voice AFM.
pcm_remote_playback None The name of the remote playback device. Required for the Voice AFM.
pcm_ref_capture None The name of the acoustic reference capture device. For ICC, if the value is loopback rather than a PCM device name, the ICC output is routed internally to the ICC reference input. Required for the ICC AFM; optional for the Voice AFM.
pcm_media_capture None The name of the media reference capture device. Optional for the ICC AFM.
map_mic_X A 1:1 mapping of the capture voice to library input (e.g., map_mic_0 = 0, map_mic_1 = 1, etc.) Map the capture voice to the acoustic processing microphone input X.
  • Library inputs and capture voices are 0-based.
  • Only one map to a single capture voice is allowed per library input.
  • You must map all library inputs or none.
  • Maps for unused library inputs are ignored.

The Bridge AFM is a special case, since this is a mapping from capture voice to playback voice (rather than library input), so there are exceptions to the above:

  • Maps to multiple playback voices are allowed per capture voice.
  • Not all capture voices need to be mapped.
map_spk_X A 1:1 mapping of library output to playback voice (e.g., map_spk_0=0,map_spk_1=1, etc.). Map acoustic processing speaker output X to playback voice(s); you can specify multiple voices, separated by commas.
  • Library outputs and playback voices are 0-based.
  • Maps to multiple voices are allowed per library output.
  • You must map all library outputs or none.
  • Maps for unused library outputs are ignored.
  • Maps for nonexistent playback voices are ignored.

Note that when acoustic library volume/mute control is enabled (enable_vol_ctl) for an AFM, these keys are used to instantiate the corresponding mixer controls, so they're parsed on io-audio boot when the AFM is loaded. If there are errors, io-audio won't start.

If there is no acoustic volume control, these keys are parsed when the AFM is started. If there are errors, the AFM won't start.

map_ref_X A 1:1 mapping of acoustic reference voice to library reference input (i.e., map_ref_0=0, map_ref_1=1, etc.) Map the acoustic reference voice to acoustic processing reference input X. ICC and Voice AFMs only.
  • Library inputs and capture voices are 0-based.
  • Only one map to a single capture voice is allowed per library input.
  • You must map all library inputs or none.
  • Maps for unused library inputs are ignored.

These keys are parsed when the AFM is started; if there are errors, the AFM won't start.

map_media_ref_X A 1:1 mapping of media reference voice to library external reference input (i.e., map_media_ref_0=0, map_media_ref_1=1, etc.) Map media reference voice to acoustic processing external reference input X. ICC AFM only.
  • Library inputs and capture voices are 0-based.
  • Maps for unused library inputs are ignored.

These keys are parsed when the AFM is started; if there are errors, the AFM won't start.

ap_dlname The acoustic processing DLL name corresponding to the AFM type:
  • voice: libqwa_qvp.so
  • icc: libqwa_icc.so
  • asd: libqwa_asd.so
Acoustic processing library .so name
ap_qcf_default None The path to the default acoustic tuning file; /etc/acoustic is the recommended directory for the tuning file (e.g., ap_qcf_default=/etc/acoustic/handsfree.qcf).
ap_qcf_mode None The path to the acoustic tuning file when the mode string is set with snd_afm_set_audio_mode()
ap_gran_syn_dir_default None (QNX Software Development Platform 6.6 io-audio patch [patch ID 4687] or later) The path to the directory containing the acoustic granular synthesis files. ASD AFM only.
ap_gran_syn_dir_mode None (QNX Software Development Platform 6.6 io-audio patch [patch ID 4687] or later) The path to the directory containing the granular synthesis audio configuration file when the mode string is set with snd_afm_set_audio_mode(). ASD AFM only.
ap_calib_default None The path to the acoustic calibration file. ASD AFM only.
ap_calib_mode None The path to the acoustic calibration file when the mode string is set with snd_afm_set_audio_mode(). ASD AFM only.
ap_dataset_qcf_name None The path to the dataset qcf to apply when the dataset name string is set with snd_afm_load_ap_dataset().
ap_enable_diagnostics 0 Enable acoustic library diagnostics; ICC and Voice AFMs only.

If 0, the baseline settings don't turn on diagnostics in the acoustic library. If 1, the baseline settings enable the diagnostics module in the acoustic library. Note that the baseline settings can be overridden by the qcf file.

enable_pass_through 0 Enable pass through (0 / 1). If 0, the acoustic processing library is used. If 1, the acoustic processing library isn't loaded nor used and the audio data is copied from the input to the output of the AFMs.
Note: This option can result in extreme feedback in the case of the ICC and Bridge AFMs.
pcm_play_name voicep The symbolic name for the PCM interface published for playback. Voice AFM only.
pcm_cap_name voicec The symbolic name for the PCM interface published for capture. Voice AFM only.
pcm_disable 0 Disable PCM interface (0 / 1). Voice AFM only. If 0, the voice pcm interface is enabled; if 1, it's disabled.
sw_mixer_route afm The route to use when mixing playback audio (main or afm) in the PCM softare mixer.
  • When the value is afm, playback audio is through the AFM mixer path in the PCM software mixer.
  • When the value is main, playback audio is through the main (media) path in the PCM software mixer.

Normally this value would not be specified and default to afm. You typically use main with the Bridge AFM, where acoustic processing isn't performed and the output is expected to be included in the main (media) reference.

ms_frag_period sw_mixer_ms (when the local playback device is a PCM Software Mixer device) The fragment size, in milliseconds, to use for audio hardware interfacing. You must specify this parameter if the local playback device isn't a PCM Software Mixer device.

When the local playback device is a PCM Software Mixer device, must be a multiple of sw_mixer_ms.

You must always specify this parameter for the Bridge AFM.

The acoustic library fragment period must be a multiple of this value (and implicitly of sw_mixer_ms).

slip_guard_frags 1 (QNX Software Development Platform 6.6 io-audio patch [patch ID 4687] or later) Extra frags to ensure consistent startup timing without slippage. 1 frag = maximum of ms_frag_period (in [AFM] section) or acoustic library fragment period.
enable_vol_ctl 0 Enable acoustic library volume/mute control; ICC and Voice AFMs only.

If 0, volume control using the acoustic library gain control is disabled. If 1, a mixer interface that uses the acoustic library gain control (ICC gain or Voice Receive Gain) to adjust the volume is published.

enable_mute_ctl_only 0 Enable only the acoustic library mute control; ICC and Voice AFMs only.

If 0, mute control using the acoustic library gain control is disabled. If 1, a mixer interface that uses the acoustic library mute control to adjust the mute is published.

If both enable_vol_ctl and enable_mute_ctl_only are set to 1, enable_vol_ctl takes precedence.

You'd use this key if you needed mute control, but the library qcf configuration file is used to set a fixed library gain value.

max_vol_db_X
  • ICC: 20 dB
  • Voice: 10 dB
The maximum output fixed gain setting for speaker output X corresponding to 100% volume set with mix_ctl. ICC and Voice AFMs only; ignored if enable_vol_ctl = 0.

This parameter must be >= min_vol_db. If this value is set beyond the ICC/QVP library maximum of 40 dB, a warning is logged, but the value is accepted.

min_vol_db_X
  • ICC: -10 dB
  • Voice: -20 dB
The minimum output fixed gain setting for speaker output X corresponding to 0% volume set with mix_ctl. ICC and Voice AFMs only; ignored if enable_vol_ctl = 0.

This parameter must be <= max_vol_db. If this value is set beyond the ICC/QVP library minimum of -30 dB, a warning is logged, but the value is accepted.

init_vol_X
  • ICC: 35
  • Voice:100
The initial mix_ctl volume setting at boot (0-100) for speaker output X. ICC and Voice AFMs only; ignored if enable_vol_ctl = 0. The value is clamped between 0 and 100 if out of range.
start_on_boot 0 If 1, start the AFM when io-audio starts, after all cards and AFMs have been successfully loaded; if 0, the AFM is idle after io-audio starts.
master capture (QNX Software Development Platform 6.6 io-audio patch [patch ID 4687] or later) Master channel for bridge audio transfer; Bridge AFM only.

The Bridge is an AFM that connects audio between two devices. For example, it captures audio from a microphone input and plays it out to a speaker output. It times itself on the hardware capture and playback interrupts.

The Bridge can use only capture interrupts, playback interrupts, or both for timing. When capture or playback is specified as a value for this key, input is captured and played out when an interrupt occurs on a specified channel. When both is specified, both capture and playback interrupts are used. Audio is input when a capture interrupt occurs and played out when a playback interrupt occurs.

resync_on_xrun 0 (QNX Software Development Platform 6.6 io-audio patch [patch ID 4687] or later) Force audio resynchronization when an overrun or an underrun occurs; Bridge AFM only.

When set to 1, audio is restarted when overrun or underrun is detected. When set to 0, no correction will be performed if an overrun or underrun is detected.

artifact_protection 0 (QNX Software Development Platform 6.6 io-audio patch [patch ID 4687] or later) Clear the capture buffer before advancing internal references (pointers) to it. Bridge AFM only.

When set to 1, once capture audio is written to the playback buffer, clear and silence the capture buffer. This prevents stale data from being left behind. When set to 0, the capture buffer isn't overwritten with silence.

cardname_override 0 (QNX Software Development Platform 6.6 io-audio patch [patch ID 4687] or later) String override for the card name (e.g., icc, voice, bridge) used by the snd_card_name() in utilities such as afm_ctl or mix_ctl to access the AFM.

This key can be used to differentiate between AFMs if there are multiple AFMs of the same type configured. For example, if there are multiple bridges, their names could be overwritten to bridge1, bridge2 and so forth, and accessed with afm_ctl -a bridge1 or afm_ctl -a bridge2.

Overriding the cardname also impacts the name of the resource file used to store the card mixer settings when deva-util-restore.so is being used. By default, the restore files are named Afm cardname @ cardnumberio-ado-cfg. For example, Afm Icc @ 4.io-ado-cfg. If you override the cardname to my_newname, the restore file would be renamed to my_newname @ 4.io-ado-cfg.

pcm_mode_remote_frags 1 (QNX Software Development Platform 6.6 io-audio patch [patch ID 4687] or later) Number of remote fragments used for Voice PCM mode, which are used to compensate for variable-interrupt timing. Voice AFM only.

This key/value fair can be used to compensate for variable interrupt timing. For example, if local card interrupts occurs in a cycle of 12ms/18ms/18ms, instead of 16 ms, data may be dropped. Increasing the number of remote fragments to be 2 (or higher) compensates for this inconsistency at a the cost of a higher round trip latency.

[ACS] section(s)

The [ACS] section is available for use only if you've installed QNX Software Development Platform 6.6 io-audio patch (patch ID 4687) and the QNX Acoustic Management Platform 2.0.

The keys in the [ACS] section include the following:

Key Default Description
name None The name of the link. This is a required key.

The deva-acs- prefix and the .so suffix are omitted when specifying the module name. For example, link corrsponds to deva-acs-link.so. The link module is a special type of AFM that integrates the Acoustic Control Server (ACS) for tuning purposes; it performs no acoustic processing.

enable_acs 0 Enable ACS link; required.

If 1, deva_afm_link is loaded, and ACS is available to be started. If 0, deva_afm_link isn't loaded, and ACS can't be started.

ms_frag_period None. The fragment size to use for ACS audio tapping. When the local playback device is a PCM software mixer device, this period must be a multiple of the sw_mixer_ms value. This is a required key.
server_port 4000 The ACS TCP/IP server port; required.
tap_split_cap None The name of the splitter PCM device for ACS audio tapping; normally the same as the pcm_local_capture device used by the acoustic AFMs.
tap_media_ref None The name of the media PCM device for ACS audio tapping; normally the same as the pcm_media_capture device used by ICC.

Here's an example of a configuration file:

[global]
verbosity=3
sw_mixer_ms=2

########################################
# On-board audio
########################################
# This card's PCM software mixer and input splitter will be the preferred devices
[ctrl]
name=your_driver_name
options=your_driver_specific_options
input_splitter_enable=1
sw_mixer_ms=16

Examples:

Start io-audio, loading the configuration from a file:

io-audio -c /etc/system/config/audio/io-audio.conf

Provide support for Aureal Vortex sound card:

io-audio -vv -d vortex

Load the AudioPCI driver, specifying the size of the DMA memory pool as 500 KB:

io-audio -vv -m pool_size=500 -d audiopci

Lock the sample rate to 8 KHz (if the hardware supports 8 KHz natively):

io-audio -o sw_mixer_rate=L8000 -d my_audio_driver

Start an audio driver, specifying the card options:

io-audio -d my_audio_driver \
cap_name=capture,play_name=playback_hw,dindex=1,play_name=playback_pcm_mixer

The /dev/snd directory will look something like this:

# ls -l /dev/snd
total 0
lrw-rw-rw-  1 root      root              0 May 31 11:11 capture -> pcmC0D0c
-rw-rw-rw-  1 root      root              0 May 31 11:11 controlC0
-rw-rw-rw-  1 root      root              0 May 31 11:11 mixerC0D0
-rw-rw-rw-  1 root      root              0 May 31 11:11 pcmC0D0c
-rw-rw-rw-  1 root      root              0 May 31 11:11 pcmC0D0p
-rw-rw-rw-  1 root      root              0 May 31 11:11 pcmC0D1p
lrw-rw-rw-  1 root      root              0 May 31 11:11 pcmPreferredc -> pcmC0D0c
lrw-rw-rw-  1 root      root              0 May 31 11:11 pcmPreferredp -> pcmC0D1p
lrw-rw-rw-  1 root      root              0 May 31 11:11 playback_pcm_mixer -> pcmC0D1p
lrw-rw-rw-  1 root      root              0 May 31 11:11 playback_hw -> pcmC0D0p

Files:

In addition to the deva-ctrl-* drivers, the io-audio command can load the following shared objects:

deva-mixer-ac97.so
Mixer DLL for the AC97 codec.
deva-mixer-ak4531.so
Mixer DLL for the AK4531 codec.
deva-mixer-hda.so
Mixer DLL for High Definition Audio codecs.
deva-util-restore.so
Shared object used to restore an audio driver's state.