* [PATCH v3 1/2] ASoC: fsl_ssi: Remove FSLSSI_I2S_RATES definition
@ 2017-04-05 19:44 Fabio Estevam
2017-04-05 19:44 ` [PATCH v3 2/2] ASoC: fsl_ssi: Use the tolower() function Fabio Estevam
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Fabio Estevam @ 2017-04-05 19:44 UTC (permalink / raw)
To: broonie; +Cc: nicoleotsuka, Fabio Estevam, alsa-devel, timur
From: Fabio Estevam <fabio.estevam@nxp.com>
The comment for the FSLSSI_I2S_RATES definition states that the
driver currently only supports I2S slave mode, which is no longer
correct.
As FSLSSI_I2S_RATES is the same as the standard SNDRV_PCM_RATE_CONTINUOUS,
just remove its definition and its comments to make the code simpler.
Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
---
Chnages since v1:
- Simply remove FSLSSI_I2S_RATES
sound/soc/fsl/fsl_ssi.c | 14 ++------------
1 file changed, 2 insertions(+), 12 deletions(-)
diff --git a/sound/soc/fsl/fsl_ssi.c b/sound/soc/fsl/fsl_ssi.c
index fde08660..0b74d1c 100644
--- a/sound/soc/fsl/fsl_ssi.c
+++ b/sound/soc/fsl/fsl_ssi.c
@@ -55,16 +55,6 @@
#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
*
* The SSI has a limitation in that the samples must be in the same byte
@@ -1212,14 +1202,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,
--
2.7.4
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH v3 2/2] ASoC: fsl_ssi: Use the tolower() function
2017-04-05 19:44 [PATCH v3 1/2] ASoC: fsl_ssi: Remove FSLSSI_I2S_RATES definition Fabio Estevam
@ 2017-04-05 19:44 ` Fabio Estevam
2017-04-05 19:51 ` Timur Tabi
2017-04-05 19:51 ` [PATCH v3 1/2] ASoC: fsl_ssi: Remove FSLSSI_I2S_RATES definition Timur Tabi
2017-04-10 18:42 ` Applied "ASoC: fsl_ssi: Remove FSLSSI_I2S_RATES definition" to the asoc tree Mark Brown
2 siblings, 1 reply; 5+ messages in thread
From: Fabio Estevam @ 2017-04-05 19:44 UTC (permalink / raw)
To: broonie; +Cc: nicoleotsuka, Fabio Estevam, alsa-devel, timur
From: Fabio Estevam <fabio.estevam@nxp.com>
Code can be simplified by using the standard tolower() funtion.
Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
---
Changes since v2:
- None
sound/soc/fsl/fsl_ssi.c | 13 +++++--------
1 file changed, 5 insertions(+), 8 deletions(-)
diff --git a/sound/soc/fsl/fsl_ssi.c b/sound/soc/fsl/fsl_ssi.c
index 0b74d1c..173cb84 100644
--- a/sound/soc/fsl/fsl_ssi.c
+++ b/sound/soc/fsl/fsl_ssi.c
@@ -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>
@@ -1315,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,
--
2.7.4
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH v3 1/2] ASoC: fsl_ssi: Remove FSLSSI_I2S_RATES definition
2017-04-05 19:44 [PATCH v3 1/2] ASoC: fsl_ssi: Remove FSLSSI_I2S_RATES definition Fabio Estevam
2017-04-05 19:44 ` [PATCH v3 2/2] ASoC: fsl_ssi: Use the tolower() function Fabio Estevam
@ 2017-04-05 19:51 ` Timur Tabi
2017-04-10 18:42 ` Applied "ASoC: fsl_ssi: Remove FSLSSI_I2S_RATES definition" to the asoc tree Mark Brown
2 siblings, 0 replies; 5+ messages in thread
From: Timur Tabi @ 2017-04-05 19:51 UTC (permalink / raw)
To: Fabio Estevam, broonie; +Cc: nicoleotsuka, Fabio Estevam, alsa-devel
On 04/05/2017 02:44 PM, Fabio Estevam wrote:
>
> The comment for the FSLSSI_I2S_RATES definition states that the
> driver currently only supports I2S slave mode, which is no longer
> correct.
>
> As FSLSSI_I2S_RATES is the same as the standard SNDRV_PCM_RATE_CONTINUOUS,
> just remove its definition and its comments to make the code simpler.
>
> Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
ACK
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v3 2/2] ASoC: fsl_ssi: Use the tolower() function
2017-04-05 19:44 ` [PATCH v3 2/2] ASoC: fsl_ssi: Use the tolower() function Fabio Estevam
@ 2017-04-05 19:51 ` Timur Tabi
0 siblings, 0 replies; 5+ messages in thread
From: Timur Tabi @ 2017-04-05 19:51 UTC (permalink / raw)
To: Fabio Estevam, broonie; +Cc: nicoleotsuka, Fabio Estevam, alsa-devel
On 04/05/2017 02:44 PM, Fabio Estevam wrote:
> From: Fabio Estevam <fabio.estevam@nxp.com>
>
> Code can be simplified by using the standard tolower() funtion.
>
> Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
ACK
^ permalink raw reply [flat|nested] 5+ messages in thread
* Applied "ASoC: fsl_ssi: Remove FSLSSI_I2S_RATES definition" to the asoc tree
2017-04-05 19:44 [PATCH v3 1/2] ASoC: fsl_ssi: Remove FSLSSI_I2S_RATES definition Fabio Estevam
2017-04-05 19:44 ` [PATCH v3 2/2] ASoC: fsl_ssi: Use the tolower() function Fabio Estevam
2017-04-05 19:51 ` [PATCH v3 1/2] ASoC: fsl_ssi: Remove FSLSSI_I2S_RATES definition Timur Tabi
@ 2017-04-10 18:42 ` Mark Brown
2 siblings, 0 replies; 5+ messages in thread
From: Mark Brown @ 2017-04-10 18:42 UTC (permalink / raw)
To: Fabio Estevam; +Cc: nicoleotsuka, alsa-devel, broonie, timur
The patch
ASoC: fsl_ssi: Remove FSLSSI_I2S_RATES definition
has been applied to the asoc tree at
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git
All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying
to this mail.
Thanks,
Mark
>From 580556774ad33adf427765d560f95f66cb01c295 Mon Sep 17 00:00:00 2001
From: Fabio Estevam <fabio.estevam@nxp.com>
Date: Wed, 5 Apr 2017 16:44:05 -0300
Subject: [PATCH] ASoC: fsl_ssi: Remove FSLSSI_I2S_RATES definition
The comment for the FSLSSI_I2S_RATES definition states that the
driver currently only supports I2S slave mode, which is no longer
correct.
As FSLSSI_I2S_RATES is the same as the standard SNDRV_PCM_RATE_CONTINUOUS,
just remove its definition and its comments to make the code simpler.
Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
Acked-by: Timur Tabi <timur@tabi.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
sound/soc/fsl/fsl_ssi.c | 14 ++------------
1 file changed, 2 insertions(+), 12 deletions(-)
diff --git a/sound/soc/fsl/fsl_ssi.c b/sound/soc/fsl/fsl_ssi.c
index 50349437d961..184a47360f84 100644
--- a/sound/soc/fsl/fsl_ssi.c
+++ b/sound/soc/fsl/fsl_ssi.c
@@ -55,16 +55,6 @@
#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
*
* The SSI has a limitation in that the samples must be in the same byte
@@ -1217,14 +1207,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,
--
2.11.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
end of thread, other threads:[~2017-04-10 18:43 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-05 19:44 [PATCH v3 1/2] ASoC: fsl_ssi: Remove FSLSSI_I2S_RATES definition Fabio Estevam
2017-04-05 19:44 ` [PATCH v3 2/2] ASoC: fsl_ssi: Use the tolower() function Fabio Estevam
2017-04-05 19:51 ` Timur Tabi
2017-04-05 19:51 ` [PATCH v3 1/2] ASoC: fsl_ssi: Remove FSLSSI_I2S_RATES definition Timur Tabi
2017-04-10 18:42 ` Applied "ASoC: fsl_ssi: Remove FSLSSI_I2S_RATES definition" to the asoc tree Mark Brown
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.