aboutsummaryrefslogtreecommitdiff
path: root/include/sound
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2015-03-03 15:40:08 +0100
committerTakashi Iwai <tiwai@suse.de>2015-03-23 13:17:37 +0100
commit05852448690d7d810175f8ceccefba083525aa89 (patch)
tree32e68c37fca1c6ab3cbba4e0cc4a04debc4f7913 /include/sound
parent3256be6537751f65c76b3ecfbb4e667f87525a2f (diff)
ALSA: hda - Support indirect execution of verbs
Add an overriding exec_verb op to struct hdac_device so that the call via snd_hdac_exec_verb() can switch to a different route depending on the setup. The codec driver sets this field so that it can handle the errors or applying quirks appropriately. Furthermore, this mechanism will be used for smooth transition for the regmap support in later patches. Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'include/sound')
-rw-r--r--include/sound/hdaudio.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/sound/hdaudio.h b/include/sound/hdaudio.h
index 6ed2b421e29e..675614dc2b88 100644
--- a/include/sound/hdaudio.h
+++ b/include/sound/hdaudio.h
@@ -48,6 +48,10 @@ struct hdac_device {
const char *vendor_name; /* codec vendor name */
const char *chip_name; /* codec chip name */
+ /* verb exec op override */
+ int (*exec_verb)(struct hdac_device *dev, unsigned int cmd,
+ unsigned int flags, unsigned int *res);
+
/* widgets */
unsigned int num_nodes;
hda_nid_t start_nid, end_nid;
@@ -82,6 +86,8 @@ int snd_hdac_refresh_widgets(struct hdac_device *codec);
unsigned int snd_hdac_make_cmd(struct hdac_device *codec, hda_nid_t nid,
unsigned int verb, unsigned int parm);
+int snd_hdac_exec_verb(struct hdac_device *codec, unsigned int cmd,
+ unsigned int flags, unsigned int *res);
int snd_hdac_read(struct hdac_device *codec, hda_nid_t nid,
unsigned int verb, unsigned int parm, unsigned int *res);
int snd_hdac_read_parm(struct hdac_device *codec, hda_nid_t nid, int parm);