diff options
author | Kai Vehmanen <kai.vehmanen@linux.intel.com> | 2019-10-29 15:40:10 +0200 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2019-10-29 17:31:50 +0000 |
commit | 608b8c36c37114289e3ea328783161f542fdf71d (patch) | |
tree | fd5070cbe34a9f65c73081cfc6900401c55e45e6 /sound/soc/codecs/hdac_hda.h | |
parent | 2a2edfbbfee47947dd05f5860c66c0e80ee5e09d (diff) | |
download | linux-608b8c36c37114289e3ea328783161f542fdf71d.tar.gz |
ASoC: hdac_hda: add support for HDMI/DP as a HDA codec
Handle all HDA codecs using same logic, including HDMI/DP.
Call to snd_hda_codec_build_controls() is delayed for HDMI/DP HDA
devices. This is needed to discover the PCM device numbers as
defined in topology.
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Reviewed-by: Takashi Iwai <tiwai@suse.de>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20191029134017.18901-3-kai.vehmanen@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.h | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/sound/soc/codecs/hdac_hda.h b/sound/soc/codecs/hdac_hda.h index 6b1bd4f428e7..e145cec085b8 100644 --- a/sound/soc/codecs/hdac_hda.h +++ b/sound/soc/codecs/hdac_hda.h @@ -6,6 +6,16 @@ #ifndef __HDAC_HDA_H__ #define __HDAC_HDA_H__ +enum { + HDAC_ANALOG_DAI_ID = 0, + HDAC_DIGITAL_DAI_ID, + HDAC_ALT_ANALOG_DAI_ID, + HDAC_HDMI_0_DAI_ID, + HDAC_HDMI_1_DAI_ID, + HDAC_HDMI_2_DAI_ID, + HDAC_LAST_DAI_ID = HDAC_HDMI_2_DAI_ID, +}; + struct hdac_hda_pcm { int stream_tag[2]; unsigned int format_val[2]; @@ -13,7 +23,8 @@ struct hdac_hda_pcm { struct hdac_hda_priv { struct hda_codec codec; - struct hdac_hda_pcm pcm[2]; + struct hdac_hda_pcm pcm[HDAC_LAST_DAI_ID]; + bool need_display_power; }; #define hdac_to_hda_priv(_hdac) \ |