Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ASoC: hdac_hdmi: use set_stream() instead of set_tdm_slots()

hdac_hdmi was not updated to use set_stream() instead of set_tdm_slots()
in the original commit so HDMI no longer produces audio.

Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/regressions/CAJD_bPKQdtaExvVEKxhQ47G-ZXDA=k+gzhMJRHLBe=mysPnuKA@mail.gmail.com/
Fixes: 636110411ca7 ("ASoC: Intel/SOF: use set_stream() instead of set_tdm_slots() for HDAudio")
Signed-off-by: Jason Montleon <jmontleo@redhat.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20230324170711.2526-1-jmontleo@redhat.com
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Jason Montleon and committed by
Mark Brown
f6887a71 a4a32034

+11 -6
+11 -6
sound/soc/codecs/hdac_hdmi.c
··· 436 436 return 0; 437 437 } 438 438 439 - static int hdac_hdmi_set_tdm_slot(struct snd_soc_dai *dai, 440 - unsigned int tx_mask, unsigned int rx_mask, 441 - int slots, int slot_width) 439 + static int hdac_hdmi_set_stream(struct snd_soc_dai *dai, 440 + void *stream, int direction) 442 441 { 443 442 struct hdac_hdmi_priv *hdmi = snd_soc_dai_get_drvdata(dai); 444 443 struct hdac_device *hdev = hdmi->hdev; 445 444 struct hdac_hdmi_dai_port_map *dai_map; 446 445 struct hdac_hdmi_pcm *pcm; 446 + struct hdac_stream *hstream; 447 447 448 - dev_dbg(&hdev->dev, "%s: strm_tag: %d\n", __func__, tx_mask); 448 + if (!stream) 449 + return -EINVAL; 450 + 451 + hstream = (struct hdac_stream *)stream; 452 + 453 + dev_dbg(&hdev->dev, "%s: strm_tag: %d\n", __func__, hstream->stream_tag); 449 454 450 455 dai_map = &hdmi->dai_map[dai->id]; 451 456 452 457 pcm = hdac_hdmi_get_pcm_from_cvt(hdmi, dai_map->cvt); 453 458 454 459 if (pcm) 455 - pcm->stream_tag = (tx_mask << 4); 460 + pcm->stream_tag = (hstream->stream_tag << 4); 456 461 457 462 return 0; 458 463 } ··· 1549 1544 .startup = hdac_hdmi_pcm_open, 1550 1545 .shutdown = hdac_hdmi_pcm_close, 1551 1546 .hw_params = hdac_hdmi_set_hw_params, 1552 - .set_tdm_slot = hdac_hdmi_set_tdm_slot, 1547 + .set_stream = hdac_hdmi_set_stream, 1553 1548 }; 1554 1549 1555 1550 /*