diff options
author | Takashi Iwai <tiwai@suse.de> | 2009-03-02 14:25:17 +0100 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2009-03-02 17:28:54 +0100 |
commit | 43b62713f67d9f0655f3a61f5bd14d6297ddd3ce (patch) | |
tree | fd05fb617e177808c164371f4c596f6d7a087026 /sound/pci/hda/hda_local.h | |
parent | ALSA: hda - Don't return a fatal error at PCM-creation errors (diff) | |
download | linux-43b62713f67d9f0655f3a61f5bd14d6297ddd3ce.tar.xz linux-43b62713f67d9f0655f3a61f5bd14d6297ddd3ce.zip |
ALSA: hda - Add hint string helper functions
Added snd_hda_get_hint() and snd_hda_get_bool_hint() helper functions
to retrieve a hint value.
Internally, the hint is stored in a pair of two strings, key and val.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/hda/hda_local.h')
-rw-r--r-- | sound/pci/hda/hda_local.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/sound/pci/hda/hda_local.h b/sound/pci/hda/hda_local.h index 03ee9dd04913..27428c718fd7 100644 --- a/sound/pci/hda/hda_local.h +++ b/sound/pci/hda/hda_local.h @@ -433,6 +433,23 @@ static inline int snd_hda_hwdep_add_sysfs(struct hda_codec *codec) } #endif +#ifdef CONFIG_SND_HDA_RECONFIG +const char *snd_hda_get_hint(struct hda_codec *codec, const char *key); +int snd_hda_get_bool_hint(struct hda_codec *codec, const char *key); +#else +static inline +const char *snd_hda_get_hint(struct hda_codec *codec, const char *key) +{ + return NULL; +} + +static inline +int snd_hda_get_bool_hint(struct hda_codec *codec, const char *key) +{ + return -ENOENT; +} +#endif + /* * power-management */ |