Skip to contentSkip to conversation

ASoC: imx-ssi: Remove mono support

PATCH Applied Fabio Estevam 3 participants 3 messages Aug 7, 2012 – Aug 8, 2012

Subsystems (4)
lore
Share & tools
lore

Fabio Estevam

author reviewer
#0 lore raw

PATCH v2 1/1 ASoC: imx-ssi: Remove mono support

From: Fabio Estevam <[email protected]>

Playing a mono track results in incorrect playback rate, ie, the audio is played at a faster rate.

Remove mono support in the driver by setting 'channes_min' to dual-channel and this allows mono tracks to be played correctly.

---
Changes since v1:
- Also change 'channels_min' for the capture
- Improve the commit log

 sound/soc/fsl/imx-ssi.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
sound/soc/fsl/imx-ssi.c +3 -2
index 3c520c4..7074ae6 100644
@@ -380,13 +380,14 @@ static int imx_ssi_dai_probe(struct snd_soc_dai *dai)
 static struct snd_soc_dai_driver imx_ssi_dai = {
 	.probe = imx_ssi_dai_probe,
 	.playback = {
-		.channels_min = 1,
+		/* The SSI does not support monaural audio. */
+		.channels_min = 2,
 		.channels_max = 2,
 		.rates = SNDRV_PCM_RATE_8000_96000,
 		.formats = SNDRV_PCM_FMTBIT_S16_LE,
 	},
 	.capture = {
-		.channels_min = 1,
+		.channels_min = 2,
 		.channels_max = 2,
 		.rates = SNDRV_PCM_RATE_8000_96000,
 		.formats = SNDRV_PCM_FMTBIT_S16_LE,
Signature · 1 line
1.7.1
Tested-by on v2 1/1
#1 lore raw

Hi,

Quoted 29 lines · Fabio Estevam

From: Fabio Estevam <[email protected]>

Playing a mono track results in incorrect playback rate, ie, the audio is played at a faster rate.

Remove mono support in the driver by setting 'channes_min' to dual-channel and this allows mono tracks to be played correctly.

---
Changes since v1:
- Also change 'channels_min' for the capture
- Improve the commit log

  sound/soc/fsl/imx-ssi.c |    5 +++--
  1 files changed, 3 insertions(+), 2 deletions(-)
sound/soc/fsl/imx-ssi.c +2 -1
index 3c520c4..7074ae6 100644
@@ -380,13 +380,14 @@ static int imx_ssi_dai_probe(struct snd_soc_dai *dai)
  static struct snd_soc_dai_driver imx_ssi_dai = {
  	.probe = imx_ssi_dai_probe,
  	.playback = {
-		.channels_min = 1,
+		/* The SSI does not support monaural audio. */
+		.channels_min = 2,

sound/soc/fsl/imx-ssi.c static int imx_ssi_dai_probe(struct snd_soc_dai *dai) · line 393

Quoted 10 lines
sound/soc/fsl/imx-ssi.c +1 -1
  		.channels_max = 2,
  		.rates = SNDRV_PCM_RATE_8000_96000,
  		.formats = SNDRV_PCM_FMTBIT_S16_LE,
  	},
  	.capture = {
-		.channels_min = 1,
+		.channels_min = 2,
  		.channels_max = 2,
  		.rates = SNDRV_PCM_RATE_8000_96000,
  		.formats = SNDRV_PCM_FMTBIT_S16_LE,

On imx27_3ds board:

Regards,
Gaëtan Carlier
_______________________________________________
Alsa-devel mailing list
[email protected]
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel