Uses the drm eld core framework to apply rate, channel and format constraint.
Even though the channel constraint is based on ELD, infoframe is set with stereo only. Multichannel support will be added later.
Signed-off-by: Subhransu S. Prusty subhransu.s.prusty@intel.com Signed-off-by: Vinod Koul vinod.koul@intel.com --- sound/soc/codecs/Kconfig | 1 + sound/soc/codecs/hdac_hdmi.c | 7 +++---- 2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/sound/soc/codecs/Kconfig b/sound/soc/codecs/Kconfig index 8bba374..3c26df3 100644 --- a/sound/soc/codecs/Kconfig +++ b/sound/soc/codecs/Kconfig @@ -472,6 +472,7 @@ config SND_SOC_GTM601 config SND_SOC_HDAC_HDMI tristate select SND_HDA_EXT_CORE + select SND_PCM_ELD select HDMI
config SND_SOC_ICS43432 diff --git a/sound/soc/codecs/hdac_hdmi.c b/sound/soc/codecs/hdac_hdmi.c index 203c99f..55db686 100644 --- a/sound/soc/codecs/hdac_hdmi.c +++ b/sound/soc/codecs/hdac_hdmi.c @@ -26,6 +26,7 @@ #include <sound/soc.h> #include <sound/hdaudio_ext.h> #include <sound/hda_i915.h> +#include <sound/pcm_drm_eld.h> #include "../../hda/local.h"
#define AMP_OUT_MUTE 0xb080 @@ -281,10 +282,8 @@ static int hdac_hdmi_pcm_open(struct snd_pcm_substream *substream, snd_hdac_codec_write(&hdac->hdac, dai_map->pin->nid, 0, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE);
- snd_pcm_hw_constraint_step(substream->runtime, 0, - SNDRV_PCM_HW_PARAM_CHANNELS, 2); - - return 0; + return snd_pcm_hw_constraint_eld(substream->runtime, + dai_map->pin->eld.eld_buffer); }
static void hdac_hdmi_pcm_close(struct snd_pcm_substream *substream,