]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blobdiff - sound/soc/fsl/fsl_ssi.c
Merge remote-tracking branches 'asoc/topic/fsl-ssi', 'asoc/topic/hi6220' and 'asoc...
[mirror_ubuntu-bionic-kernel.git] / sound / soc / fsl / fsl_ssi.c
index fde08660b63be270f95436424e32e443bdb8a0de..173cb8496641353b63177acba147278541c36370 100644 (file)
@@ -35,6 +35,7 @@
 #include <linux/module.h>
 #include <linux/interrupt.h>
 #include <linux/clk.h>
+#include <linux/ctype.h>
 #include <linux/device.h>
 #include <linux/delay.h>
 #include <linux/slab.h>
 #include "fsl_ssi.h"
 #include "imx-pcm.h"
 
-/**
- * FSLSSI_I2S_RATES: sample rates supported by the I2S
- *
- * This driver currently only supports the SSI running in I2S slave mode,
- * which means the codec determines the sample rate.  Therefore, we tell
- * ALSA that we support all rates and let the codec driver decide what rates
- * are really supported.
- */
-#define FSLSSI_I2S_RATES SNDRV_PCM_RATE_CONTINUOUS
-
 /**
  * FSLSSI_I2S_FORMATS: audio formats supported by the SSI
  *
@@ -1212,14 +1203,14 @@ static struct snd_soc_dai_driver fsl_ssi_dai_template = {
                .stream_name = "CPU-Playback",
                .channels_min = 1,
                .channels_max = 32,
-               .rates = FSLSSI_I2S_RATES,
+               .rates = SNDRV_PCM_RATE_CONTINUOUS,
                .formats = FSLSSI_I2S_FORMATS,
        },
        .capture = {
                .stream_name = "CPU-Capture",
                .channels_min = 1,
                .channels_max = 32,
-               .rates = FSLSSI_I2S_RATES,
+               .rates = SNDRV_PCM_RATE_CONTINUOUS,
                .formats = FSLSSI_I2S_FORMATS,
        },
        .ops = &fsl_ssi_dai_ops,
@@ -1325,14 +1316,10 @@ static struct snd_ac97_bus_ops fsl_ssi_ac97_ops = {
  */
 static void make_lowercase(char *s)
 {
-       char *p = s;
-       char c;
-
-       while ((c = *p)) {
-               if ((c >= 'A') && (c <= 'Z'))
-                       *p = c + ('a' - 'A');
-               p++;
-       }
+       if (!s)
+               return;
+       for (; *s; s++)
+               *s = tolower(*s);
 }
 
 static int fsl_ssi_imx_probe(struct platform_device *pdev,