diff options
author | Takashi Iwai <tiwai@suse.de> | 2017-01-30 18:29:39 +0300 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2017-02-03 19:21:17 +0300 |
commit | f23df8071b178dcfa4f6014baf9323ddaa33e1fd (patch) | |
tree | 4439cb56232c6080437e35b50da514de756be0e5 /sound/x86/intel_hdmi_lpe_audio.h | |
parent | 76296ef0ecec9bb887be22105744e429c6a5422a (diff) | |
download | linux-f23df8071b178dcfa4f6014baf9323ddaa33e1fd.tar.xz |
ALSA: x86: Replace indirect register ops with direct calls
Now about the indirect register ops: they are replaced with direct
calls, too.
The read / write / modify ops are simply replaced with the
corresponding functions. The difference is that we calculate the
offset inside the function now. So all the had_config_offset
references in the caller side are dropped. This also simplifies the
DP-audio check in hdmi_audio_write() and hdmi_audio_rmw().
The hdmi_audio_get_register_base is dropped since it's no longer used
when the base address and config offset are referred in the read/write
functions.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/x86/intel_hdmi_lpe_audio.h')
-rw-r--r-- | sound/x86/intel_hdmi_lpe_audio.h | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/sound/x86/intel_hdmi_lpe_audio.h b/sound/x86/intel_hdmi_lpe_audio.h index 5d94aaf0b980..ea90cf919948 100644 --- a/sound/x86/intel_hdmi_lpe_audio.h +++ b/sound/x86/intel_hdmi_lpe_audio.h @@ -641,15 +641,6 @@ enum had_event_type { typedef int (*had_event_call_back) (enum had_event_type event_type, void *ctxt_info); -struct hdmi_audio_registers_ops { - int (*hdmi_audio_get_register_base)(u32 **reg_base, - u32 *config_offset); - int (*hdmi_audio_read_register)(u32 reg_addr, u32 *data); - int (*hdmi_audio_write_register)(u32 reg_addr, u32 data); - int (*hdmi_audio_read_modify)(u32 reg_addr, u32 data, - u32 mask); -}; - struct hdmi_audio_query_set_ops { int (*hdmi_audio_get_caps)(enum had_caps_list query_element, void *capabilties); @@ -674,10 +665,13 @@ void mid_hdmi_audio_resume(void *dev); void mid_hdmi_audio_signal_event(enum had_event_type event); int mid_hdmi_audio_setup( had_event_call_back audio_callbacks, - struct hdmi_audio_registers_ops *reg_ops, struct hdmi_audio_query_set_ops *query_ops); int mid_hdmi_audio_register( struct snd_intel_had_interface *driver, void *had_data); +int mid_hdmi_audio_read(u32 reg, u32 *val); +int mid_hdmi_audio_write(u32 reg, u32 val); +int mid_hdmi_audio_rmw(u32 reg, u32 val, u32 mask); + #endif |