All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] ASoC: tlv320aic3x: Correct S24_3LE support
@ 2014-06-26  5:06 Peter Ujfalusi
  2014-06-26  5:06 ` [PATCH 2/2] ASoC: tlv320aic3x: Add support for S24_LE format Peter Ujfalusi
  2014-06-30 14:52 ` [PATCH 1/2] ASoC: tlv320aic3x: Correct S24_3LE support Mark Brown
  0 siblings, 2 replies; 3+ messages in thread
From: Peter Ujfalusi @ 2014-06-26  5:06 UTC (permalink / raw)
  To: Mark Brown, Liam Girdwood; +Cc: alsa-devel

Correct the hw_params callback to configure the codec correctly in case of
S24_3LE format since in case of S24_3LE the codec has been configured to
16bit format mode.
S24_LE is not defined as supported format for the codec.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
---
 sound/soc/codecs/tlv320aic3x.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/soc/codecs/tlv320aic3x.c b/sound/soc/codecs/tlv320aic3x.c
index e12fafbb1e09..5360772bc1ad 100644
--- a/sound/soc/codecs/tlv320aic3x.c
+++ b/sound/soc/codecs/tlv320aic3x.c
@@ -879,7 +879,7 @@ static int aic3x_hw_params(struct snd_pcm_substream *substream,
 	case SNDRV_PCM_FORMAT_S20_3LE:
 		data |= (0x01 << 4);
 		break;
-	case SNDRV_PCM_FORMAT_S24_LE:
+	case SNDRV_PCM_FORMAT_S24_3LE:
 		data |= (0x02 << 4);
 		break;
 	case SNDRV_PCM_FORMAT_S32_LE:
-- 
2.0.0

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

* [PATCH 2/2] ASoC: tlv320aic3x: Add support for S24_LE format
  2014-06-26  5:06 [PATCH 1/2] ASoC: tlv320aic3x: Correct S24_3LE support Peter Ujfalusi
@ 2014-06-26  5:06 ` Peter Ujfalusi
  2014-06-30 14:52 ` [PATCH 1/2] ASoC: tlv320aic3x: Correct S24_3LE support Mark Brown
  1 sibling, 0 replies; 3+ messages in thread
From: Peter Ujfalusi @ 2014-06-26  5:06 UTC (permalink / raw)
  To: Mark Brown, Liam Girdwood; +Cc: alsa-devel

The codec need to be configured to 24bit mode in case of S24_LE format.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
---
 sound/soc/codecs/tlv320aic3x.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/sound/soc/codecs/tlv320aic3x.c b/sound/soc/codecs/tlv320aic3x.c
index 5360772bc1ad..d275890a6827 100644
--- a/sound/soc/codecs/tlv320aic3x.c
+++ b/sound/soc/codecs/tlv320aic3x.c
@@ -880,6 +880,7 @@ static int aic3x_hw_params(struct snd_pcm_substream *substream,
 		data |= (0x01 << 4);
 		break;
 	case SNDRV_PCM_FORMAT_S24_3LE:
+	case SNDRV_PCM_FORMAT_S24_LE:
 		data |= (0x02 << 4);
 		break;
 	case SNDRV_PCM_FORMAT_S32_LE:
@@ -1194,7 +1195,8 @@ static int aic3x_set_bias_level(struct snd_soc_codec *codec,
 
 #define AIC3X_RATES	SNDRV_PCM_RATE_8000_96000
 #define AIC3X_FORMATS	(SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S20_3LE | \
-			 SNDRV_PCM_FMTBIT_S24_3LE | SNDRV_PCM_FMTBIT_S32_LE)
+			 SNDRV_PCM_FMTBIT_S24_3LE | SNDRV_PCM_FMTBIT_S24_LE | \
+			 SNDRV_PCM_FMTBIT_S32_LE)
 
 static const struct snd_soc_dai_ops aic3x_dai_ops = {
 	.hw_params	= aic3x_hw_params,
-- 
2.0.0

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

* Re: [PATCH 1/2] ASoC: tlv320aic3x: Correct S24_3LE support
  2014-06-26  5:06 [PATCH 1/2] ASoC: tlv320aic3x: Correct S24_3LE support Peter Ujfalusi
  2014-06-26  5:06 ` [PATCH 2/2] ASoC: tlv320aic3x: Add support for S24_LE format Peter Ujfalusi
@ 2014-06-30 14:52 ` Mark Brown
  1 sibling, 0 replies; 3+ messages in thread
From: Mark Brown @ 2014-06-30 14:52 UTC (permalink / raw)
  To: Peter Ujfalusi; +Cc: alsa-devel, Liam Girdwood


[-- Attachment #1.1: Type: text/plain, Size: 319 bytes --]

On Thu, Jun 26, 2014 at 08:06:55AM +0300, Peter Ujfalusi wrote:
> Correct the hw_params callback to configure the codec correctly in case of
> S24_3LE format since in case of S24_3LE the codec has been configured to
> 16bit format mode.
> S24_LE is not defined as supported format for the codec.

Applied both, thanks.

[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

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



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

end of thread, other threads:[~2014-06-30 14:53 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-06-26  5:06 [PATCH 1/2] ASoC: tlv320aic3x: Correct S24_3LE support Peter Ujfalusi
2014-06-26  5:06 ` [PATCH 2/2] ASoC: tlv320aic3x: Add support for S24_LE format Peter Ujfalusi
2014-06-30 14:52 ` [PATCH 1/2] ASoC: tlv320aic3x: Correct S24_3LE support 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.