summaryrefslogtreecommitdiff
path: root/sound/pci/hda/hda_generic.h
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2013-01-04 14:01:40 (GMT)
committerTakashi Iwai <tiwai@suse.de>2013-01-12 07:43:37 (GMT)
commit196c17668056ed5226070d06878242c116dfece2 (patch)
tree36fe0f1463d530d762d886cffff4cda258c03d62 /sound/pci/hda/hda_generic.h
parent05453b7e97996a37db4dd7b97a788124b117dbde (diff)
downloadlinux-196c17668056ed5226070d06878242c116dfece2.tar.xz
ALSA: hda - Manage using output/loopback path indices
Instead of search for the path with the certain route at each time, keep the path index for each output and loopback, and just use it when referred. In this implementation, the path index number begins with one, not zero (although I've been writing in C over decades). It's just to make the check for uninitialized values easier. So far, the input paths aren't handled with indices yet, but still picked up via snd_hda_get_nid_path() at each time. Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/hda/hda_generic.h')
-rw-r--r--sound/pci/hda/hda_generic.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/sound/pci/hda/hda_generic.h b/sound/pci/hda/hda_generic.h
index f1cae2e..71d409f 100644
--- a/sound/pci/hda/hda_generic.h
+++ b/sound/pci/hda/hda_generic.h
@@ -130,6 +130,13 @@ struct hda_gen_spec {
/* path list */
struct snd_array paths;
+ /* path indices */
+ int out_paths[AUTO_CFG_MAX_OUTS];
+ int hp_paths[AUTO_CFG_MAX_OUTS];
+ int speaker_paths[AUTO_CFG_MAX_OUTS];
+ int digout_paths[AUTO_CFG_MAX_OUTS];
+ int loopback_paths[HDA_MAX_NUM_INPUTS];
+
/* auto-mic stuff */
int am_num_entries;
struct automic_entry am_entry[MAX_AUTO_MIC_PINS];
@@ -198,6 +205,8 @@ int snd_hda_gen_init(struct hda_codec *codec);
struct nid_path *snd_hda_get_nid_path(struct hda_codec *codec,
hda_nid_t from_nid, hda_nid_t to_nid);
+int snd_hda_get_path_idx(struct hda_codec *codec, struct nid_path *path);
+struct nid_path *snd_hda_get_path_from_idx(struct hda_codec *codec, int idx);
enum {
HDA_PARSE_NO_AAMIX,