summaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs/hdac_hda.h
diff options
context:
space:
mode:
authorRakesh Ughreja <rakesh.a.ughreja@intel.com>2018-08-22 22:25:03 +0200
committerMark Brown <broonie@kernel.org>2018-08-28 21:18:13 +0200
commit6bae5ea9498926440ffc883f3dbceb0adc65e492 (patch)
tree28f83dda3f2da9a5ff333fbd1675dbd5f186ba88 /sound/soc/codecs/hdac_hda.h
parentASoC: Intel: Skylake: use hda_bus instead of hdac_bus (diff)
downloadlinux-6bae5ea9498926440ffc883f3dbceb0adc65e492.tar.xz
linux-6bae5ea9498926440ffc883f3dbceb0adc65e492.zip
ASoC: hdac_hda: add asoc extension for legacy HDA codec drivers
This patch adds a kernel module which is used by the legacy HDA codec drivers as library. This implements hdac_ext_bus_ops to enable the reuse of legacy HDA codec drivers with ASoC platform drivers. Signed-off-by: Rakesh Ughreja <rakesh.a.ughreja@intel.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/codecs/hdac_hda.h')
-rw-r--r--sound/soc/codecs/hdac_hda.h24
1 files changed, 24 insertions, 0 deletions
diff --git a/sound/soc/codecs/hdac_hda.h b/sound/soc/codecs/hdac_hda.h
new file mode 100644
index 000000000000..e444ef593360
--- /dev/null
+++ b/sound/soc/codecs/hdac_hda.h
@@ -0,0 +1,24 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+/*
+ * Copyright(c) 2015-18 Intel Corporation.
+ */
+
+#ifndef __HDAC_HDA_H__
+#define __HDAC_HDA_H__
+
+struct hdac_hda_pcm {
+ int stream_tag[2];
+};
+
+struct hdac_hda_priv {
+ struct hda_codec codec;
+ struct hdac_hda_pcm pcm[2];
+};
+
+#define hdac_to_hda_priv(_hdac) \
+ container_of(_hdac, struct hdac_hda_priv, codec.core)
+#define hdac_to_hda_codec(_hdac) container_of(_hdac, struct hda_codec, core)
+
+struct hdac_ext_bus_ops *snd_soc_hdac_hda_get_ops(void);
+
+#endif /* __HDAC_HDA_H__ */