From 05852448690d7d810175f8ceccefba083525aa89 Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Tue, 3 Mar 2015 15:40:08 +0100 Subject: 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 --- include/sound/hdaudio.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'include/sound/hdaudio.h') 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); -- cgit v1.2.3