diff options
author | Takashi Iwai <tiwai@suse.de> | 2007-08-10 11:03:40 -0400 |
---|---|---|
committer | Jaroslav Kysela <perex@perex.cz> | 2007-10-16 09:58:41 -0400 |
commit | b3ac56364126f78cae94eb2a75b72d9ea85aca9d (patch) | |
tree | 8f4865f1f888d612697452ab280922440e67e24f /sound/pci/hda/hda_codec.h | |
parent | 01751f54ff23b9d59e07f9c9ef189d4733525463 (diff) |
[ALSA] hda-codec - introduce command register cache
This patch adds the cache for codec command registers.
snd_hda_codec_write_cache() and snd_hda_sequence_write_cache() do
the write operations with caching, which values can be resumed via
snd_hda_codec_resume_cache().
The patch introduces only the framework, and no codec code is using
this cache yet. It'll be implemented in the following patch.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
Diffstat (limited to 'sound/pci/hda/hda_codec.h')
-rw-r--r-- | sound/pci/hda/hda_codec.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/sound/pci/hda/hda_codec.h b/sound/pci/hda/hda_codec.h index 1a69743160ce..ef94c9122c6d 100644 --- a/sound/pci/hda/hda_codec.h +++ b/sound/pci/hda/hda_codec.h | |||
@@ -570,6 +570,7 @@ struct hda_codec { | |||
570 | u32 *wcaps; | 570 | u32 *wcaps; |
571 | 571 | ||
572 | struct hda_cache_rec amp_cache; /* cache for amp access */ | 572 | struct hda_cache_rec amp_cache; /* cache for amp access */ |
573 | struct hda_cache_rec cmd_cache; /* cache for other commands */ | ||
573 | 574 | ||
574 | struct mutex spdif_mutex; | 575 | struct mutex spdif_mutex; |
575 | unsigned int spdif_status; /* IEC958 status bits */ | 576 | unsigned int spdif_status; /* IEC958 status bits */ |
@@ -620,6 +621,13 @@ void snd_hda_sequence_write(struct hda_codec *codec, | |||
620 | /* unsolicited event */ | 621 | /* unsolicited event */ |
621 | int snd_hda_queue_unsol_event(struct hda_bus *bus, u32 res, u32 res_ex); | 622 | int snd_hda_queue_unsol_event(struct hda_bus *bus, u32 res, u32 res_ex); |
622 | 623 | ||
624 | /* cached write */ | ||
625 | int snd_hda_codec_write_cache(struct hda_codec *codec, hda_nid_t nid, | ||
626 | int direct, unsigned int verb, unsigned int parm); | ||
627 | void snd_hda_sequence_write_cache(struct hda_codec *codec, | ||
628 | const struct hda_verb *seq); | ||
629 | void snd_hda_codec_resume_cache(struct hda_codec *codec); | ||
630 | |||
623 | /* | 631 | /* |
624 | * Mixer | 632 | * Mixer |
625 | */ | 633 | */ |