summaryrefslogtreecommitdiff
path: root/sound/x86/intel_hdmi_lpe_audio.h
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2017-01-31 13:52:22 +0100
committerTakashi Iwai <tiwai@suse.de>2017-02-03 17:31:35 +0100
commitda8648097497505d05d8cff6892351f99c029791 (patch)
tree4e107ece33e302157501cb7636f66556ee0babe5 /sound/x86/intel_hdmi_lpe_audio.h
parenteeb756c5bf7566fd79312798a32f59e594688b79 (diff)
ALSA: x86: Flatten two abstraction layers
This is the final stage for a big clean-up series. Here we flatten the two layers into one. Formerly, the implementation was split to HDMI "shell" that talks with the platform device, and HDMI audio part that communicates via caps and other event handlers. All these would be good if there were multiple instantiations or if there were data protection. But neither are true in our case. That said, it'll be easier to have a flat driver structure in the end. In this patch, the former struct hdmi_lpe_audio_ctx is forged into the existing struct snd_intelhad. The latter has already a few members that are basically the copy from the former. Only a few new members for the lowlevel I/O are added by this change. Then, the had_get_caps() and had_set_caps() are simply replaced with the direct calls to copy the data in the struct fields. Also, the had_event_handler() calls are replaced with the direct call for each event as well. 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.h23
1 files changed, 1 insertions, 22 deletions
diff --git a/sound/x86/intel_hdmi_lpe_audio.h b/sound/x86/intel_hdmi_lpe_audio.h
index a9d51b7c5bae..8f320b4aa3b7 100644
--- a/sound/x86/intel_hdmi_lpe_audio.h
+++ b/sound/x86/intel_hdmi_lpe_audio.h
@@ -27,12 +27,11 @@
#include <sound/initval.h>
#include <linux/version.h>
#include <linux/pm_runtime.h>
+#include <linux/platform_device.h>
#include <sound/asoundef.h>
#include <sound/control.h>
#include <sound/pcm.h>
-struct platform_device;
-
#define AUD_CONFIG_VALID_BIT (1<<9)
#define AUD_CONFIG_DP_MODE (1<<15)
#define AUD_CONFIG_BLOCK_BIT (1<<7)
@@ -636,24 +635,4 @@ enum had_event_type {
HAD_EVENT_QUERY_IS_AUDIO_SUSPENDED,
};
-/*
- * HDMI Display Controller Audio Interface
- *
- */
-struct hdmi_audio_event {
- int type;
-};
-
-int mid_hdmi_audio_read(struct platform_device *pdev, u32 reg, u32 *val);
-int mid_hdmi_audio_write(struct platform_device *pdev, u32 reg, u32 val);
-int mid_hdmi_audio_rmw(struct platform_device *pdev,
- u32 reg, u32 val, u32 mask);
-
-int mid_hdmi_audio_get_caps(struct platform_device *pdev,
- enum had_caps_list get_element,
- void *capabilities);
-int mid_hdmi_audio_set_caps(struct platform_device *pdev,
- enum had_caps_list set_element,
- void *capabilties);
-
#endif