aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/hda/patch_sigmatel.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2013-01-11 11:40:31 -0500
committerTakashi Iwai <tiwai@suse.de>2013-01-12 02:44:47 -0500
commitbc759721fb44bc07e4f82445cc378a9d2724651f (patch)
tree6f096f37647a91f4cb5f6c4ceed9d07e08822682 /sound/pci/hda/patch_sigmatel.c
parent09b70e8509862debff5a033052f8adbd7402fa4e (diff)
ALSA: hda - Add snd_hda_get_int_hint() helper function
It'll be used in hda_generic.c, too. Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/hda/patch_sigmatel.c')
-rw-r--r--sound/pci/hda/patch_sigmatel.c22
1 files changed, 4 insertions, 18 deletions
diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c
index d3a81f10fe5c..9cc4cb9b4bd2 100644
--- a/sound/pci/hda/patch_sigmatel.c
+++ b/sound/pci/hda/patch_sigmatel.c
@@ -4295,24 +4295,10 @@ static void stac92xx_power_down(struct hda_codec *codec)
4295static void stac_toggle_power_map(struct hda_codec *codec, hda_nid_t nid, 4295static void stac_toggle_power_map(struct hda_codec *codec, hda_nid_t nid,
4296 int enable); 4296 int enable);
4297 4297
4298static inline int get_int_hint(struct hda_codec *codec, const char *key, 4298static inline bool get_int_hint(struct hda_codec *codec, const char *key,
4299 int *valp) 4299 int *valp)
4300{ 4300{
4301#ifdef CONFIG_SND_HDA_RECONFIG 4301 return !snd_hda_get_int_hint(codec, key, valp);
4302 const char *p;
4303 mutex_lock(&codec->user_mutex);
4304 p = snd_hda_get_hint(codec, key);
4305 if (p) {
4306 unsigned long val;
4307 if (!strict_strtoul(p, 0, &val)) {
4308 *valp = val;
4309 mutex_unlock(&codec->user_mutex);
4310 return 1;
4311 }
4312 }
4313 mutex_unlock(&codec->user_mutex);
4314#endif
4315 return 0;
4316} 4302}
4317 4303
4318/* override some hints from the hwdep entry */ 4304/* override some hints from the hwdep entry */