diff options
author | Yong Zhi <yong.zhi@intel.com> | 2018-08-07 12:19:16 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-11-25 09:52:08 +0100 |
commit | 19223f9d87c7888353177727f1359d4eddcef376 (patch) | |
tree | 8f4fd4e58b6fe5b39f1ff66f04131eb60f7e8e85 /sound | |
parent | 782f1f81e7a4bd76b9667a37dd56de148d693f49 (diff) |
ASoC: Intel: hdac_hdmi: Limit sampling rates at dai creation
[ Upstream commit 3b857472f34faa7d11001afa5e158833812c98d7 ]
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: Yong Zhi <yong.zhi@intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'sound')
-rw-r--r-- | sound/soc/codecs/hdac_hdmi.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sound/soc/codecs/hdac_hdmi.c b/sound/soc/codecs/hdac_hdmi.c index c602c4960924..88355d1719a3 100644 --- a/sound/soc/codecs/hdac_hdmi.c +++ b/sound/soc/codecs/hdac_hdmi.c @@ -1267,6 +1267,12 @@ static int hdac_hdmi_create_dais(struct hdac_device *hdac, if (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); hdmi_dais[i].name = devm_kstrdup(&hdac->dev, dai_name, GFP_KERNEL); |