All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ASoC: ak4613: disable asymmetric audio interface format
@ 2017-04-27  5:22 ` Kuninori Morimoto
  0 siblings, 0 replies; 6+ messages in thread
From: Kuninori Morimoto @ 2017-04-27  5:22 UTC (permalink / raw)
  To: Mark Brown; +Cc: Linux-ALSA, Simon, linux-renesas-soc


From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

Asymmetric audio interface formats exist in ak4613 by same
register settings.

	Capture		Playback
	24bit LEFT_J	16bit RIGHT_J
	24bit LEFT_J	20bit RIGHT_J
	24bit LEFT_J	24bit RIGHT_J
	24bit LEFT_J	24bit LEFT_J
	24bit I2S	24bit I2S

These asymmetric formats makes driver / behavior difficult.
It is not HW limitation, but SW limitation. To makes code reading
easy, this patch doesn't remove code, but just comment out.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 sound/soc/codecs/ak4613.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/sound/soc/codecs/ak4613.c b/sound/soc/codecs/ak4613.c
index b2dfdde..9d2be7c 100644
--- a/sound/soc/codecs/ak4613.c
+++ b/sound/soc/codecs/ak4613.c
@@ -139,9 +139,9 @@ struct ak4613_priv {
 #define AUDIO_IFACE(b, fmt) { b, SND_SOC_DAIFMT_##fmt }
 static const struct ak4613_interface ak4613_iface[] = {
 	/* capture */				/* playback */
-	[0] = {	AUDIO_IFACE(24, LEFT_J),	AUDIO_IFACE(16, RIGHT_J) },
-	[1] = {	AUDIO_IFACE(24, LEFT_J),	AUDIO_IFACE(20, RIGHT_J) },
-	[2] = {	AUDIO_IFACE(24, LEFT_J),	AUDIO_IFACE(24, RIGHT_J) },
+/*	[0] = {	AUDIO_IFACE(24, LEFT_J),	AUDIO_IFACE(16, RIGHT_J) }, */
+/*	[1] = {	AUDIO_IFACE(24, LEFT_J),	AUDIO_IFACE(20, RIGHT_J) }, */
+/*	[2] = {	AUDIO_IFACE(24, LEFT_J),	AUDIO_IFACE(24, RIGHT_J) }, */
 	[3] = {	AUDIO_IFACE(24, LEFT_J),	AUDIO_IFACE(24, LEFT_J) },
 	[4] = {	AUDIO_IFACE(24, I2S),		AUDIO_IFACE(24, I2S) },
 };
@@ -262,7 +262,7 @@ static int ak4613_dai_set_fmt(struct snd_soc_dai *dai, unsigned int fmt)
 	fmt &= SND_SOC_DAIFMT_FORMAT_MASK;
 
 	switch (fmt) {
-	case SND_SOC_DAIFMT_RIGHT_J:
+/*	case SND_SOC_DAIFMT_RIGHT_J:*/
 	case SND_SOC_DAIFMT_LEFT_J:
 	case SND_SOC_DAIFMT_I2S:
 		priv->fmt = fmt;
@@ -420,7 +420,7 @@ static int ak4613_set_bias_level(struct snd_soc_codec *codec,
 				 SNDRV_PCM_RATE_96000  |\
 				 SNDRV_PCM_RATE_176400 |\
 				 SNDRV_PCM_RATE_192000)
-#define AK4613_PCM_FMTBIT	(SNDRV_PCM_FMTBIT_S16_LE |\
+#define AK4613_PCM_FMTBIT	(/*SNDRV_PCM_FMTBIT_S16_LE |*/ \
 				 SNDRV_PCM_FMTBIT_S24_LE)
 
 static struct snd_soc_dai_driver ak4613_dai = {
-- 
1.9.1

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

* [PATCH] ASoC: ak4613: disable asymmetric audio interface format
@ 2017-04-27  5:22 ` Kuninori Morimoto
  0 siblings, 0 replies; 6+ messages in thread
From: Kuninori Morimoto @ 2017-04-27  5:22 UTC (permalink / raw)
  To: Mark Brown; +Cc: Linux-ALSA, Simon, linux-renesas-soc


From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

Asymmetric audio interface formats exist in ak4613 by same
register settings.

	Capture		Playback
	24bit LEFT_J	16bit RIGHT_J
	24bit LEFT_J	20bit RIGHT_J
	24bit LEFT_J	24bit RIGHT_J
	24bit LEFT_J	24bit LEFT_J
	24bit I2S	24bit I2S

These asymmetric formats makes driver / behavior difficult.
It is not HW limitation, but SW limitation. To makes code reading
easy, this patch doesn't remove code, but just comment out.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 sound/soc/codecs/ak4613.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/sound/soc/codecs/ak4613.c b/sound/soc/codecs/ak4613.c
index b2dfdde..9d2be7c 100644
--- a/sound/soc/codecs/ak4613.c
+++ b/sound/soc/codecs/ak4613.c
@@ -139,9 +139,9 @@ struct ak4613_priv {
 #define AUDIO_IFACE(b, fmt) { b, SND_SOC_DAIFMT_##fmt }
 static const struct ak4613_interface ak4613_iface[] = {
 	/* capture */				/* playback */
-	[0] = {	AUDIO_IFACE(24, LEFT_J),	AUDIO_IFACE(16, RIGHT_J) },
-	[1] = {	AUDIO_IFACE(24, LEFT_J),	AUDIO_IFACE(20, RIGHT_J) },
-	[2] = {	AUDIO_IFACE(24, LEFT_J),	AUDIO_IFACE(24, RIGHT_J) },
+/*	[0] = {	AUDIO_IFACE(24, LEFT_J),	AUDIO_IFACE(16, RIGHT_J) }, */
+/*	[1] = {	AUDIO_IFACE(24, LEFT_J),	AUDIO_IFACE(20, RIGHT_J) }, */
+/*	[2] = {	AUDIO_IFACE(24, LEFT_J),	AUDIO_IFACE(24, RIGHT_J) }, */
 	[3] = {	AUDIO_IFACE(24, LEFT_J),	AUDIO_IFACE(24, LEFT_J) },
 	[4] = {	AUDIO_IFACE(24, I2S),		AUDIO_IFACE(24, I2S) },
 };
@@ -262,7 +262,7 @@ static int ak4613_dai_set_fmt(struct snd_soc_dai *dai, unsigned int fmt)
 	fmt &= SND_SOC_DAIFMT_FORMAT_MASK;
 
 	switch (fmt) {
-	case SND_SOC_DAIFMT_RIGHT_J:
+/*	case SND_SOC_DAIFMT_RIGHT_J:*/
 	case SND_SOC_DAIFMT_LEFT_J:
 	case SND_SOC_DAIFMT_I2S:
 		priv->fmt = fmt;
@@ -420,7 +420,7 @@ static int ak4613_set_bias_level(struct snd_soc_codec *codec,
 				 SNDRV_PCM_RATE_96000  |\
 				 SNDRV_PCM_RATE_176400 |\
 				 SNDRV_PCM_RATE_192000)
-#define AK4613_PCM_FMTBIT	(SNDRV_PCM_FMTBIT_S16_LE |\
+#define AK4613_PCM_FMTBIT	(/*SNDRV_PCM_FMTBIT_S16_LE |*/ \
 				 SNDRV_PCM_FMTBIT_S24_LE)
 
 static struct snd_soc_dai_driver ak4613_dai = {
-- 
1.9.1

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

* Re: [PATCH] ASoC: ak4613: disable asymmetric audio interface format
  2017-04-27  5:22 ` Kuninori Morimoto
@ 2017-04-30 12:52   ` Mark Brown
  -1 siblings, 0 replies; 6+ messages in thread
From: Mark Brown @ 2017-04-30 12:52 UTC (permalink / raw)
  To: Kuninori Morimoto; +Cc: Linux-ALSA, Simon, linux-renesas-soc

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

On Thu, Apr 27, 2017 at 05:22:51AM +0000, Kuninori Morimoto wrote:
> 
> From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> 
> Asymmetric audio interface formats exist in ak4613 by same
> register settings.

So long as nobody is actively using this disabling things is fine but
it's better to just remove the code rather than commenting it out,
people can always get the old code in git if they want.  Adding a
comment explaining why asymmetric modes aren't supported would eb good
though.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* Re: [PATCH] ASoC: ak4613: disable asymmetric audio interface format
@ 2017-04-30 12:52   ` Mark Brown
  0 siblings, 0 replies; 6+ messages in thread
From: Mark Brown @ 2017-04-30 12:52 UTC (permalink / raw)
  To: Kuninori Morimoto; +Cc: linux-renesas-soc, Linux-ALSA, Simon


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

On Thu, Apr 27, 2017 at 05:22:51AM +0000, Kuninori Morimoto wrote:
> 
> From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> 
> Asymmetric audio interface formats exist in ak4613 by same
> register settings.

So long as nobody is actively using this disabling things is fine but
it's better to just remove the code rather than commenting it out,
people can always get the old code in git if they want.  Adding a
comment explaining why asymmetric modes aren't supported would eb good
though.

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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



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

* Re: [PATCH] ASoC: ak4613: disable asymmetric audio interface format
  2017-04-30 12:52   ` Mark Brown
@ 2017-05-07 23:48     ` Kuninori Morimoto
  -1 siblings, 0 replies; 6+ messages in thread
From: Kuninori Morimoto @ 2017-05-07 23:48 UTC (permalink / raw)
  To: Mark Brown; +Cc: Linux-ALSA, Simon, linux-renesas-soc


Hi Mark

Thank you for your feedback

> > From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> > 
> > Asymmetric audio interface formats exist in ak4613 by same
> > register settings.
> 
> So long as nobody is actively using this disabling things is fine but
> it's better to just remove the code rather than commenting it out,
> people can always get the old code in git if they want.  Adding a
> comment explaining why asymmetric modes aren't supported would eb good
> though.

OK, thanks.
I will just remove these in v2 patch

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

* Re: [PATCH] ASoC: ak4613: disable asymmetric audio interface format
@ 2017-05-07 23:48     ` Kuninori Morimoto
  0 siblings, 0 replies; 6+ messages in thread
From: Kuninori Morimoto @ 2017-05-07 23:48 UTC (permalink / raw)
  To: Mark Brown; +Cc: Linux-ALSA, Simon, linux-renesas-soc


Hi Mark

Thank you for your feedback

> > From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> > 
> > Asymmetric audio interface formats exist in ak4613 by same
> > register settings.
> 
> So long as nobody is actively using this disabling things is fine but
> it's better to just remove the code rather than commenting it out,
> people can always get the old code in git if they want.  Adding a
> comment explaining why asymmetric modes aren't supported would eb good
> though.

OK, thanks.
I will just remove these in v2 patch

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

end of thread, other threads:[~2017-05-07 23:48 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-27  5:22 [PATCH] ASoC: ak4613: disable asymmetric audio interface format Kuninori Morimoto
2017-04-27  5:22 ` Kuninori Morimoto
2017-04-30 12:52 ` Mark Brown
2017-04-30 12:52   ` Mark Brown
2017-05-07 23:48   ` Kuninori Morimoto
2017-05-07 23:48     ` Kuninori Morimoto

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.