aboutsummaryrefslogtreecommitdiffstats
path: root/include/sound
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2015-02-26 02:54:56 -0500
committerTakashi Iwai <tiwai@suse.de>2015-03-23 08:19:40 -0400
commitfaa75f8a2edf005a5caf43be4875ffeeb9bcb498 (patch)
tree5158cb6255a448080b16c376b1006e8e29f946aa /include/sound
parenteeecd9d10d3da0b9efd6f58fad55c4355dcc246a (diff)
ALSA: hda - Use regmap for parameter caches, too
The amp hash table was used for recording the cached reads of some capability values like pin caps or amp caps. Now all these are moved to regmap as well. One addition to the regmap helper is codec->caps_overwriting flag. This is set in snd_hdac_override_parm(), and the regmap helper accepts any register while this flag is set, so that it can overwrite even the read-only verb like AC_VERB_PARAMETERS. The flag is cleared immediately in snd_hdac_override_parm(), as it's a once-off flag. Along with these changes, the no longer needed amp hash and relevant fields are removed from hda_codec struct now. Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'include/sound')
-rw-r--r--include/sound/hdaudio.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/sound/hdaudio.h b/include/sound/hdaudio.h
index 65ea6429f3a7..ce7d8d1f59c6 100644
--- a/include/sound/hdaudio.h
+++ b/include/sound/hdaudio.h
@@ -76,6 +76,7 @@ struct hdac_device {
76 /* regmap */ 76 /* regmap */
77 struct regmap *regmap; 77 struct regmap *regmap;
78 bool lazy_cache:1; /* don't wake up for writes */ 78 bool lazy_cache:1; /* don't wake up for writes */
79 bool caps_overwriting:1; /* caps overwrite being in process */
79}; 80};
80 81
81/* device/driver type used for matching */ 82/* device/driver type used for matching */
@@ -109,6 +110,8 @@ int _snd_hdac_read_parm(struct hdac_device *codec, hda_nid_t nid, int parm,
109 unsigned int *res); 110 unsigned int *res);
110int snd_hdac_read_parm_uncached(struct hdac_device *codec, hda_nid_t nid, 111int snd_hdac_read_parm_uncached(struct hdac_device *codec, hda_nid_t nid,
111 int parm); 112 int parm);
113int snd_hdac_override_parm(struct hdac_device *codec, hda_nid_t nid,
114 unsigned int parm, unsigned int val);
112int snd_hdac_get_connections(struct hdac_device *codec, hda_nid_t nid, 115int snd_hdac_get_connections(struct hdac_device *codec, hda_nid_t nid,
113 hda_nid_t *conn_list, int max_conns); 116 hda_nid_t *conn_list, int max_conns);
114int snd_hdac_get_sub_nodes(struct hdac_device *codec, hda_nid_t nid, 117int snd_hdac_get_sub_nodes(struct hdac_device *codec, hda_nid_t nid,