mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-11-04 13:30:08 -05:00
Allow hint for ctl, hwdep, timer and seq
Like pcm and rawmidi, each object parser needs to accept the hint component. Now a new local function _snd_conf_generic_id() was introduced to replace each call of "comment" and "type" field checks. Also, the two existing identical functions for pcm and rawmidi are removed and the new function is used commonly. Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
parent
46d98392d0
commit
7d9972c6ad
12 changed files with 25 additions and 54 deletions
|
|
@ -1302,3 +1302,16 @@ int snd_func_refer(snd_config_t **dst, snd_config_t *root, snd_config_t *src,
|
|||
#ifndef DOC_HIDDEN
|
||||
SND_DLSYM_BUILD_VERSION(snd_func_refer, SND_CONFIG_DLSYM_VERSION_EVALUATE);
|
||||
#endif
|
||||
|
||||
#ifndef DOC_HIDDEN
|
||||
int _snd_conf_generic_id(const char *id)
|
||||
{
|
||||
static const char ids[3][8] = { "comment", "type", "hint" };
|
||||
unsigned int k;
|
||||
for (k = 0; k < sizeof(ids) / sizeof(ids[0]); ++k) {
|
||||
if (strcmp(id, ids[k]) == 0)
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue