diff options
author | Cezary Rojewski <cezary.rojewski@intel.com> | 2023-11-17 13:06:04 +0100 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2023-11-27 17:28:23 +0100 |
commit | cbc4ebb346162376377ee0a1074fc72d39cfbb51 (patch) | |
tree | 5558a9edab20ee35fe93a751721293a8c1e0b20c /sound/soc/codecs/hdac_hdmi.c | |
parent | 0bb0af123b0dbae3e3fad2166122777cf40abae4 (diff) |
ASoC: codecs: hdac_hdmi: Switch to new stream-format interface
To provide option for selecting different bit-per-sample than just the
maximum one, use the new format calculation mechanism.
Acked-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
Acked-by: Jaroslav Kysela <perex@perex.cz>
Link: https://lore.kernel.org/r/20231117120610.1755254-11-cezary.rojewski@intel.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/soc/codecs/hdac_hdmi.c')
-rw-r--r-- | sound/soc/codecs/hdac_hdmi.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/sound/soc/codecs/hdac_hdmi.c b/sound/soc/codecs/hdac_hdmi.c index 3e4f632d8665..b3b11225d483 100644 --- a/sound/soc/codecs/hdac_hdmi.c +++ b/sound/soc/codecs/hdac_hdmi.c @@ -468,13 +468,14 @@ static int hdac_hdmi_set_hw_params(struct snd_pcm_substream *substream, struct hdac_hdmi_priv *hdmi = snd_soc_dai_get_drvdata(dai); struct hdac_hdmi_dai_port_map *dai_map; struct hdac_hdmi_pcm *pcm; + unsigned int bits; int format; dai_map = &hdmi->dai_map[dai->id]; - format = snd_hdac_calc_stream_format(params_rate(hparams), - params_channels(hparams), params_format(hparams), - dai->driver->playback.sig_bits, 0); + bits = snd_hdac_stream_format_bits(params_format(hparams), SNDRV_PCM_SUBFORMAT_STD, + dai->driver->playback.sig_bits); + format = snd_hdac_stream_format(params_channels(hparams), bits, params_rate(hparams)); pcm = hdac_hdmi_get_pcm_from_cvt(hdmi, dai_map->cvt); if (!pcm) |