aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/hda/hda_codec.h
diff options
context:
space:
mode:
Diffstat (limited to 'sound/pci/hda/hda_codec.h')
-rw-r--r--sound/pci/hda/hda_codec.h24
1 files changed, 16 insertions, 8 deletions
diff --git a/sound/pci/hda/hda_codec.h b/sound/pci/hda/hda_codec.h
index 1370e346bf34..1a69743160ce 100644
--- a/sound/pci/hda/hda_codec.h
+++ b/sound/pci/hda/hda_codec.h
@@ -480,12 +480,24 @@ struct hda_codec_ops {
480}; 480};
481 481
482/* record for amp information cache */ 482/* record for amp information cache */
483struct hda_amp_info { 483struct hda_cache_head {
484 u32 key; /* hash key */ 484 u32 key; /* hash key */
485 u16 val; /* assigned value */
486 u16 next; /* next link; -1 = terminal */
487};
488
489struct hda_amp_info {
490 struct hda_cache_head head;
485 u32 amp_caps; /* amp capabilities */ 491 u32 amp_caps; /* amp capabilities */
486 u16 vol[2]; /* current volume & mute */ 492 u16 vol[2]; /* current volume & mute */
487 u16 status; /* update flag */ 493};
488 u16 next; /* next link */ 494
495struct hda_cache_rec {
496 u16 hash[64]; /* hash table for index */
497 unsigned int num_entries; /* number of assigned entries */
498 unsigned int size; /* allocated size */
499 unsigned int record_size; /* record size (including header) */
500 void *buffer; /* hash table entries */
489}; 501};
490 502
491/* PCM callbacks */ 503/* PCM callbacks */
@@ -557,11 +569,7 @@ struct hda_codec {
557 hda_nid_t start_nid; 569 hda_nid_t start_nid;
558 u32 *wcaps; 570 u32 *wcaps;
559 571
560 /* hash for amp access */ 572 struct hda_cache_rec amp_cache; /* cache for amp access */
561 u16 amp_hash[32];
562 int num_amp_entries;
563 int amp_info_size;
564 struct hda_amp_info *amp_info;
565 573
566 struct mutex spdif_mutex; 574 struct mutex spdif_mutex;
567 unsigned int spdif_status; /* IEC958 status bits */ 575 unsigned int spdif_status; /* IEC958 status bits */