aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/hda/hda_codec.h
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2013-01-03 09:25:11 -0500
committerTakashi Iwai <tiwai@suse.de>2013-01-12 02:43:23 -0500
commitee8e765b0b6c9274e255025318cf8da1a3e30d45 (patch)
tree18848d00ad22031a21fbd4c98e2f7a212e48f643 /sound/pci/hda/hda_codec.h
parent9cc159c6647f505be1205eb5e3fc3b1f84e1d4fd (diff)
ALSA: hda - Revive snd_hda_get_conn_list()
Manage the connection list cache using linked lists instead of snd_array, and revive snd_hda_get_conn_list() again, so that we don't have to keep the expanded values locally. This will reduce the stack usage by recursive call of snd_hda_get_conn_index() or parse_nid_path() of the generic parser. The list management doesn't include any mutex protection, thus the caller needs to take care of race appropriately. Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/hda/hda_codec.h')
-rw-r--r--sound/pci/hda/hda_codec.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/sound/pci/hda/hda_codec.h b/sound/pci/hda/hda_codec.h
index 9f241d1af38c..93ec747ce904 100644
--- a/sound/pci/hda/hda_codec.h
+++ b/sound/pci/hda/hda_codec.h
@@ -831,7 +831,7 @@ struct hda_codec {
831 struct hda_cache_rec amp_cache; /* cache for amp access */ 831 struct hda_cache_rec amp_cache; /* cache for amp access */
832 struct hda_cache_rec cmd_cache; /* cache for other commands */ 832 struct hda_cache_rec cmd_cache; /* cache for other commands */
833 833
834 struct snd_array conn_lists; /* connection-list array */ 834 struct list_head conn_list; /* linked-list of connection-list */
835 835
836 struct mutex spdif_mutex; 836 struct mutex spdif_mutex;
837 struct mutex control_mutex; 837 struct mutex control_mutex;
@@ -944,6 +944,8 @@ snd_hda_get_num_conns(struct hda_codec *codec, hda_nid_t nid)
944} 944}
945int snd_hda_get_raw_connections(struct hda_codec *codec, hda_nid_t nid, 945int snd_hda_get_raw_connections(struct hda_codec *codec, hda_nid_t nid,
946 hda_nid_t *conn_list, int max_conns); 946 hda_nid_t *conn_list, int max_conns);
947int snd_hda_get_conn_list(struct hda_codec *codec, hda_nid_t nid,
948 const hda_nid_t **listp);
947int snd_hda_override_conn_list(struct hda_codec *codec, hda_nid_t nid, int nums, 949int snd_hda_override_conn_list(struct hda_codec *codec, hda_nid_t nid, int nums,
948 const hda_nid_t *list); 950 const hda_nid_t *list);
949int snd_hda_get_conn_index(struct hda_codec *codec, hda_nid_t mux, 951int snd_hda_get_conn_index(struct hda_codec *codec, hda_nid_t mux,