Commit 3b857472 authored by Yong Zhi's avatar Yong Zhi Committed by Mark Brown

ASoC: Intel: hdac_hdmi: Limit sampling rates at dai creation

Playback of 44.1Khz contents with HDMI plugged returns
"Invalid pipe config" because HDMI paths in the FW
topology are configured to operate at 48Khz.

This patch filters out sampling rates not supported
at hdac_hdmi_create_dais() to let user space SRC
to do the converting.
Signed-off-by: default avatarYong Zhi <yong.zhi@intel.com>
Reviewed-by: default avatarPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: default avatarTakashi Iwai <tiwai@suse.de>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent fc269c03
...@@ -1410,6 +1410,12 @@ static int hdac_hdmi_create_dais(struct hdac_device *hdev, ...@@ -1410,6 +1410,12 @@ static int hdac_hdmi_create_dais(struct hdac_device *hdev,
if (ret) if (ret)
return ret; return ret;
/* Filter out 44.1, 88.2 and 176.4Khz */
rates &= ~(SNDRV_PCM_RATE_44100 | SNDRV_PCM_RATE_88200 |
SNDRV_PCM_RATE_176400);
if (!rates)
return -EINVAL;
sprintf(dai_name, "intel-hdmi-hifi%d", i+1); sprintf(dai_name, "intel-hdmi-hifi%d", i+1);
hdmi_dais[i].name = devm_kstrdup(&hdev->dev, hdmi_dais[i].name = devm_kstrdup(&hdev->dev,
dai_name, GFP_KERNEL); dai_name, GFP_KERNEL);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment