Set the routing between the hardware and the acoustic processing inputs and outputs.
Synopsis:
#include <acoustic/hf.h>
int ioap_hf_route(int apd,
ioap_io_map_t* map);
Arguments:
- apd
- The handle to io-acoustic.
- map
- Pointer to an ioap_map_io_t structure specifying the new routing.
Description:
The ioap_hf_route() function modifies the audio routing between the hardware and the
acoustic processing inputs and outputs.
If the call to ioap_hf_route() fails, the routing is unchanged. If the call is
successful, the system maintains the routing even after ioap_hf_stop() has been called; that is, the new routing will be kept until
the next call to ioap_hf_route(), or a system restart.
Routing is defined in the structure ioap_map_io_t, and must respect the following rules:
- The number of devices must be greater than zero (0).
- For any device, routed channels must be either all input or all output.
- Channels used must be contiguous; you may not use channel 2 if you haven't used channel 1.
- Routes must be contiguous; you may not specify IOAP_SPKR_OUT_2 if you haven't also
specified IOAP_SPKR_OUT_1.
- Duplicate inputs or outputs aren't allowed.
For more information about the default routing, see Configuring io-acoustic. For information about the current routing
configuration, call ioap_hf_setup().
Returns:
- 0
- Success
- -1
- An error occurred (errno is set).
Errors:
- E2BIG
- Too many input or output groups were specified, or there are too many channels in a hardware
group.
- EACCESS
- Attempt to modify routing while data is being processed.
- EINVAL
- Invalid handle or null pointer argument.
- EIO
- The channel mapping is not contiguous, or a required channel is missing.
- ENOMEM
- No memory available for data structures.
- EINOTSUP
- Invalid I/O type.
Classification:
QNX Neutrino
| Safety: |
|
| Interrupt handler |
No |
| Signal handler |
No |
| Thread |
Yes |