From 49df5be9231bc452e7cdee9c797b162a647beab6 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Mon, 1 May 2023 23:26:19 +0000 Subject: [PATCH] Revert "ASoC: hdac_hdmi: use set_stream() instead of set_tdm_slots()" This reverts commit acbbfdba9ca67ef6bc174a0a42666004aee4d931. The function this uses has been reverted from Android kernels, so revert this to fix the build problems in 5.10.178 Fixes: 791a854ae5a5 ("Linux 5.10.178") Change-Id: Id2c260f023e9e26ab2333a13ecf890f321f28af0 Signed-off-by: Greg Kroah-Hartman --- sound/soc/codecs/hdac_hdmi.c | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/sound/soc/codecs/hdac_hdmi.c b/sound/soc/codecs/hdac_hdmi.c index 6de3e47b92d8..2c1305bf0572 100644 --- a/sound/soc/codecs/hdac_hdmi.c +++ b/sound/soc/codecs/hdac_hdmi.c @@ -436,28 +436,23 @@ static int hdac_hdmi_setup_audio_infoframe(struct hdac_device *hdev, return 0; } -static int hdac_hdmi_set_stream(struct snd_soc_dai *dai, - void *stream, int direction) +static int hdac_hdmi_set_tdm_slot(struct snd_soc_dai *dai, + unsigned int tx_mask, unsigned int rx_mask, + int slots, int slot_width) { struct hdac_hdmi_priv *hdmi = snd_soc_dai_get_drvdata(dai); struct hdac_device *hdev = hdmi->hdev; struct hdac_hdmi_dai_port_map *dai_map; struct hdac_hdmi_pcm *pcm; - struct hdac_stream *hstream; - if (!stream) - return -EINVAL; - - hstream = (struct hdac_stream *)stream; - - dev_dbg(&hdev->dev, "%s: strm_tag: %d\n", __func__, hstream->stream_tag); + dev_dbg(&hdev->dev, "%s: strm_tag: %d\n", __func__, tx_mask); dai_map = &hdmi->dai_map[dai->id]; pcm = hdac_hdmi_get_pcm_from_cvt(hdmi, dai_map->cvt); if (pcm) - pcm->stream_tag = (hstream->stream_tag << 4); + pcm->stream_tag = (tx_mask << 4); return 0; } @@ -1549,7 +1544,7 @@ static const struct snd_soc_dai_ops hdmi_dai_ops = { .startup = hdac_hdmi_pcm_open, .shutdown = hdac_hdmi_pcm_close, .hw_params = hdac_hdmi_set_hw_params, - .set_stream = hdac_hdmi_set_stream, + .set_tdm_slot = hdac_hdmi_set_tdm_slot, }; /*