Operating systems, development tools, and professional services
for connected embedded systems
for connected embedded systems
![]() |
![]() |
![]() |
![]() |
snd_switch_t
Information about a mixer's switch
Synopsis:
typedef struct snd_switch
{
int32_t iface;
int32_t device;
int32_t channel;
uint8_t name[36];
uint32_t type;
uint32_t subtype;
union
{
uint32_t enable:1;
struct
{
uint8_t data;
uint8_t low;
uint8_t high;
}
byte;
struct
{
uint16_t data;
uint16_t low;
uint16_t high;
}
word;
struct
{
uint32_t data;
uint32_t low;
uint32_t high;
}
dword;
struct
{
uint32_t data;
uint32_t items[30];
uint32_t items_cnt;
}
list;
struct
{
uint8_t selection;
char strings[11][11];
uint8_t strings_cnt;
}
string_11;
}
value;
}
Description:
The snd_switch_t structure describes the switches for a mixer. You can fill this structure by calling snd_ctl_mixer_switch_read().
The members include:
- iface
- The audio interface associated with the switch.
- device
- The device number associated with the switch.
- channel
- Currently only set to “0”.
- name
- The text name of the switch.
- type
- The kind of switch. The following types are supported:
- SND_SW_TYPE_BOOLEAN
- A simple on and off switch. See the enable union member.
- SND_TYPE_BYTE
- An 8-bit value constrained between a minimum and maximum setting. See the byte union member.
- SND_TYPE_WORD
- A 16-bit value constrained between a minimum and maximum setting. See the word union member.
- SND_TYPE_DWORD
- A 32-bit value constrained between a minimum and maximum setting. See the dword union member.
- SND_TYPE_LIST
- A 32-bit value selected from a list of values. See the list union member. The items_cnt argument is the number of valid items in the array.
- SND_TYPE_STRING_11
- An array of string selections with a maximum length of 11 bytes. The strings_cnt argument is the number of valid strings in the array. The selection argument is the index of the selected string.
- subtype
- The switch's subtype. The following types are supported:
- SND_SW_SUBTYPE_DEC
- Display the value in decimal notation.
- SND_SW_SUBTYPE_HEXA
- Display the value in hexadecimal notation.
Classification:
QNX Neutrino
See also:
snd_ctl_mixer_switch_read(), snd_ctl_mixer_switch_write()
![]() |
![]() |
![]() |
![]() |

![[Previous]](../prev.gif)
![[Contents]](../contents.gif)
![[Index]](../keyword_index.gif)
![[Next]](../next.gif)