aboutsummaryrefslogtreecommitdiffstats
path: root/include/drm
diff options
context:
space:
mode:
authorJyri Sarha <jsarha@ti.com>2016-08-09 22:00:04 +0300
committerRussell King <rmk+kernel@armlinux.org.uk>2016-09-07 13:10:10 +0100
commit95db3b255fde4e830e5f8cc011eb404023f669d4 (patch)
tree8f391121de132eeb37c4a114481886404e9c578a /include/drm
parentMerge commit 'efc9194bcff84' ("ASoC: hdmi-codec: callback function will be called with private data") into drm-tda998x-devel (diff)
downloadlinux-dev-95db3b255fde4e830e5f8cc011eb404023f669d4.tar.xz
linux-dev-95db3b255fde4e830e5f8cc011eb404023f669d4.zip
drm/i2c: tda998x: Improve tda998x_configure_audio() audio related pdata
Define struct tda998x_audio_params in include/drm/i2c/tda998x.h and use it in pdata and for tda998x_configure_audio() parameters. Also updates tda998x_write_aif() to take struct hdmi_audio_infoframe * directly as a parameter. Signed-off-by: Jyri Sarha <jsarha@ti.com> Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Diffstat (limited to 'include/drm')
-rw-r--r--include/drm/i2c/tda998x.h28
1 files changed, 18 insertions, 10 deletions
diff --git a/include/drm/i2c/tda998x.h b/include/drm/i2c/tda998x.h
index 3e419d92cf5a..a8dc06e67b03 100644
--- a/include/drm/i2c/tda998x.h
+++ b/include/drm/i2c/tda998x.h
@@ -1,6 +1,23 @@
#ifndef __DRM_I2C_TDA998X_H__
#define __DRM_I2C_TDA998X_H__
+#include <linux/hdmi.h>
+
+enum {
+ AFMT_UNUSED = 0,
+ AFMT_SPDIF = 1,
+ AFMT_I2S = 2,
+};
+
+struct tda998x_audio_params {
+ u8 config;
+ u8 format;
+ unsigned sample_width;
+ unsigned sample_rate;
+ struct hdmi_audio_infoframe cea;
+ u8 status[5];
+};
+
struct tda998x_encoder_params {
u8 swap_b:3;
u8 mirr_b:1;
@@ -15,16 +32,7 @@ struct tda998x_encoder_params {
u8 swap_e:3;
u8 mirr_e:1;
- u8 audio_cfg;
- u8 audio_clk_cfg;
- u8 audio_frame[6];
-
- enum {
- AFMT_SPDIF,
- AFMT_I2S
- } audio_format;
-
- unsigned audio_sample_rate;
+ struct tda998x_audio_params audio_params;
};
#endif