mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-15 20:36:49 +07:00
7e567624dc
Register ASoC HDMI codec for audio functionality and adds device tree binding for audio configuration. With the registered HDMI codec the tda998x node can be used like a regular codec node in ASoC card configurations. HDMI audio info-frame and audio stream header is generated by the ASoC HDMI codec. The codec also applies constraints for available sample-rates based on Edid Like Data from the display. The device tree binding document has been updated [1]. Part of this patch has been inspired by Jean Francoise's "drm/i2c: tda998x: Add support of a DT graph of ports"-patch [2]. There may still be some identical lines left from the original patch and some of the ideas have come from there. [1] Documentation/devicetree/bindings/display/bridge/tda998x.txt [2] http://mailman.alsa-project.org/pipermail/alsa-devel/2015-July/095255.html Signed-off-by: Jyri Sarha <jsarha@ti.com> Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
40 lines
619 B
C
40 lines
619 B
C
#ifndef __DRM_I2C_TDA998X_H__
|
|
#define __DRM_I2C_TDA998X_H__
|
|
|
|
#include <linux/hdmi.h>
|
|
#include <dt-bindings/display/tda998x.h>
|
|
|
|
enum {
|
|
AFMT_UNUSED = 0,
|
|
AFMT_SPDIF = TDA998x_SPDIF,
|
|
AFMT_I2S = TDA998x_I2S,
|
|
};
|
|
|
|
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;
|
|
u8 swap_a:3;
|
|
u8 mirr_a:1;
|
|
u8 swap_d:3;
|
|
u8 mirr_d:1;
|
|
u8 swap_c:3;
|
|
u8 mirr_c:1;
|
|
u8 swap_f:3;
|
|
u8 mirr_f:1;
|
|
u8 swap_e:3;
|
|
u8 mirr_e:1;
|
|
|
|
struct tda998x_audio_params audio_params;
|
|
};
|
|
|
|
#endif
|