alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] ASoC: imx-ssi: Remove mono support
@ 2012-08-07 19:51 Fabio Estevam
  2012-08-08 13:18 ` Gaëtan Carlier
  2012-08-08 13:30 ` Mark Brown
  0 siblings, 2 replies; 3+ messages in thread
From: Fabio Estevam @ 2012-08-07 19:51 UTC (permalink / raw)
  To: broonie; +Cc: Fabio Estevam, alsa-devel, kernel, gcembed

[-- Attachment #1: Type: text/plain, Size: 1263 bytes --]

From: Fabio Estevam <fabio.estevam@freescale.com>

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.

Reported-by: Gaëtan Carlier <gcembed@gmail.com>
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
---
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(-)

diff --git a/sound/soc/fsl/imx-ssi.c b/sound/soc/fsl/imx-ssi.c
index 3c520c4..7074ae6 100644
--- a/sound/soc/fsl/imx-ssi.c
+++ b/sound/soc/fsl/imx-ssi.c
@@ -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,
-- 
1.7.1


[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH v2] ASoC: imx-ssi: Remove mono support
  2012-08-07 19:51 [PATCH v2] ASoC: imx-ssi: Remove mono support Fabio Estevam
@ 2012-08-08 13:18 ` Gaëtan Carlier
  2012-08-08 13:30 ` Mark Brown
  1 sibling, 0 replies; 3+ messages in thread
From: Gaëtan Carlier @ 2012-08-08 13:18 UTC (permalink / raw)
  To: Fabio Estevam; +Cc: Fabio Estevam, alsa-devel, broonie, kernel

Hi,

On 08/07/2012 09:51 PM, Fabio Estevam wrote:
> From: Fabio Estevam <fabio.estevam@freescale.com>
>
> 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.
>
> Reported-by: Gaëtan Carlier <gcembed@gmail.com>
> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
> ---
> 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(-)
>
> diff --git a/sound/soc/fsl/imx-ssi.c b/sound/soc/fsl/imx-ssi.c
> index 3c520c4..7074ae6 100644
> --- a/sound/soc/fsl/imx-ssi.c
> +++ b/sound/soc/fsl/imx-ssi.c
> @@ -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,
>

On imx27_3ds board:

Tested-by: Gaëtan Carlier <gcembed@gmail.com>

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH v2] ASoC: imx-ssi: Remove mono support
  2012-08-07 19:51 [PATCH v2] ASoC: imx-ssi: Remove mono support Fabio Estevam
  2012-08-08 13:18 ` Gaëtan Carlier
@ 2012-08-08 13:30 ` Mark Brown
  1 sibling, 0 replies; 3+ messages in thread
From: Mark Brown @ 2012-08-08 13:30 UTC (permalink / raw)
  To: Fabio Estevam; +Cc: Fabio Estevam, alsa-devel, kernel, gcembed

On Tue, Aug 07, 2012 at 04:51:34PM -0300, Fabio Estevam wrote:
> From: Fabio Estevam <fabio.estevam@freescale.com>
> 
> Playing a mono track results in incorrect playback rate, ie, the audio
> is played at a faster rate.

Applied, thanks.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-08-08 13:01 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-08-07 19:51 [PATCH v2] ASoC: imx-ssi: Remove mono support Fabio Estevam
2012-08-08 13:18 ` Gaëtan Carlier
2012-08-08 13:30 ` Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).