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@xxxxxxxxx> Signed-off-by: Vinod Koul <vinod.koul@xxxxxxxxx> --- 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 c0c5c8e..f805cb6 100644 --- a/sound/soc/codecs/Kconfig +++ b/sound/soc/codecs/Kconfig @@ -486,6 +486,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 65796ce..d891ad7 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 @@ -356,10 +357,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, -- 1.9.1 _______________________________________________ dri-devel mailing list dri-devel@xxxxxxxxxxxxxxxxxxxxx http://lists.freedesktop.org/mailman/listinfo/dri-devel