Home Home > GIT Browse > SLE15-AZURE
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2019-06-14 20:28:51 +0200
committerTakashi Iwai <tiwai@suse.de>2019-06-14 20:29:04 +0200
commit9fdbf1a78bfa60dd69e312c8fa261f81aed68c03 (patch)
treeaf6c0b69d734e18b589b91e83d2239364c48c67f
parent30cc945fe58190da4f7451945b1c1c3eb89712ab (diff)
ASoC: fsl_asrc: Fix the issue about unsupported rate
(bsc#1051510).
-rw-r--r--patches.drivers/ASoC-fsl_asrc-Fix-the-issue-about-unsupported-rate.patch45
-rw-r--r--series.conf1
2 files changed, 46 insertions, 0 deletions
diff --git a/patches.drivers/ASoC-fsl_asrc-Fix-the-issue-about-unsupported-rate.patch b/patches.drivers/ASoC-fsl_asrc-Fix-the-issue-about-unsupported-rate.patch
new file mode 100644
index 0000000000..31c316be52
--- /dev/null
+++ b/patches.drivers/ASoC-fsl_asrc-Fix-the-issue-about-unsupported-rate.patch
@@ -0,0 +1,45 @@
+From b06c58c2a1eed571ea2a6640fdb85b7b00196b1e Mon Sep 17 00:00:00 2001
+From: "S.j. Wang" <shengjiu.wang@nxp.com>
+Date: Wed, 15 May 2019 06:42:18 +0000
+Subject: [PATCH] ASoC: fsl_asrc: Fix the issue about unsupported rate
+Git-commit: b06c58c2a1eed571ea2a6640fdb85b7b00196b1e
+Patch-mainline: v5.2-rc5
+References: bsc#1051510
+
+When the output sample rate is [8kHz, 30kHz], the limitation
+of the supported ratio range is [1/24, 8]. In the driver
+we use (8kHz, 30kHz) instead of [8kHz, 30kHz].
+So this patch is to fix this issue and the potential rounding
+issue with divider.
+
+Fixes: fff6e03c7b65 ("ASoC: fsl_asrc: add support for 8-30kHz
+output sample rate")
+
+Cc: <stable@vger.kernel.org>
+Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
+Acked-by: Nicolin Chen <nicoleotsuka@gmail.com>
+Signed-off-by: Mark Brown <broonie@kernel.org>
+Acked-by: Takashi Iwai <tiwai@suse.de>
+
+---
+ sound/soc/fsl/fsl_asrc.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/sound/soc/fsl/fsl_asrc.c b/sound/soc/fsl/fsl_asrc.c
+index 0b937924d2e4..ea035c12a325 100644
+--- a/sound/soc/fsl/fsl_asrc.c
++++ b/sound/soc/fsl/fsl_asrc.c
+@@ -282,8 +282,8 @@ static int fsl_asrc_config_pair(struct fsl_asrc_pair *pair)
+ return -EINVAL;
+ }
+
+- if ((outrate > 8000 && outrate < 30000) &&
+- (outrate/inrate > 24 || inrate/outrate > 8)) {
++ if ((outrate >= 8000 && outrate <= 30000) &&
++ (outrate > 24 * inrate || inrate > 8 * outrate)) {
+ pair_err("exceed supported ratio range [1/24, 8] for \
+ inrate/outrate: %d/%d\n", inrate, outrate);
+ return -EINVAL;
+--
+2.16.4
+
diff --git a/series.conf b/series.conf
index 800f42bb4d..1ba30ed260 100644
--- a/series.conf
+++ b/series.conf
@@ -22431,6 +22431,7 @@
patches.drivers/ALSA-hda-realtek-Update-headset-mode-for-ALC256.patch
patches.drivers/ALSA-firewire-motu-fix-destruction-of-data-for-isoch.patch
patches.drivers/ALSA-oxfw-allow-PCM-capture-for-Stanton-SCS.1m.patch
+ patches.drivers/ASoC-fsl_asrc-Fix-the-issue-about-unsupported-rate.patch
# davem/net
patches.drivers/ibmvnic-Do-not-close-unopened-driver-during-reset.patch