diff options
author | Takashi Iwai <tiwai@suse.de> | 2017-01-30 16:09:11 +0100 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2017-02-03 17:20:58 +0100 |
commit | 76296ef0ecec9bb887be22105744e429c6a5422a (patch) | |
tree | 727ab932eeee15771d5afe57a86100c7dee067c7 /sound/x86/intel_hdmi_audio.h | |
parent | ALSA: x86: Remove v1 ops and structs (diff) | |
download | linux-76296ef0ecec9bb887be22105744e429c6a5422a.tar.xz linux-76296ef0ecec9bb887be22105744e429c6a5422a.zip |
ALSA: x86: Drop indirect calls of had_ops
We have only a single implementation of had_ops, hence there is no
merit to use the indirect calls at all. Let's replace it with the
direct calls -- which allows the compiler more optimizations.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/x86/intel_hdmi_audio.h')
-rw-r--r-- | sound/x86/intel_hdmi_audio.h | 21 |
1 files changed, 3 insertions, 18 deletions
diff --git a/sound/x86/intel_hdmi_audio.h b/sound/x86/intel_hdmi_audio.h index 034b3873ffa1..394959f0bd2e 100644 --- a/sound/x86/intel_hdmi_audio.h +++ b/sound/x86/intel_hdmi_audio.h @@ -123,7 +123,6 @@ struct had_callback_ops { * @chmap: holds channel map info * @audio_reg_base: hdmi audio register base offset * @hw_silence: flag indicates SoC support for HW silence/Keep alive - * @ops: holds ops functions based on platform */ struct snd_intelhad { struct snd_card *card; @@ -149,25 +148,8 @@ struct snd_intelhad { unsigned int *audio_reg_base; unsigned int audio_cfg_offset; bool hw_silence; - struct had_ops *ops; }; -struct had_ops { - void (*enable_audio)(struct snd_pcm_substream *substream, - u8 enable); - void (*reset_audio)(u8 reset); - int (*prog_n)(u32 aud_samp_freq, u32 *n_param, - struct snd_intelhad *intelhaddata); - void (*prog_cts)(u32 aud_samp_freq, u32 tmds, u32 link_rate, - u32 n_param, struct snd_intelhad *intelhaddata); - int (*audio_ctrl)(struct snd_pcm_substream *substream, - struct snd_intelhad *intelhaddata); - void (*prog_dip)(struct snd_pcm_substream *substream, - struct snd_intelhad *intelhaddata); - void (*handle_underrun)(struct snd_intelhad *intelhaddata); -}; - - int had_event_handler(enum had_event_type event_type, void *data); int hdmi_audio_query(void *drv_data, struct hdmi_audio_event event); @@ -185,6 +167,9 @@ int snd_intelhad_invd_buffer(int start, int end); int snd_intelhad_read_len(struct snd_intelhad *intelhaddata); void had_build_channel_allocation_map(struct snd_intelhad *intelhaddata); +void snd_intelhad_enable_audio(struct snd_pcm_substream *substream, u8 enable); +void snd_intelhad_handle_underrun(struct snd_intelhad *intelhaddata); + /* Register access functions */ int had_get_hwstate(struct snd_intelhad *intelhaddata); int had_get_caps(enum had_caps_list query_element, void *capabilties); |