Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1396956 > unrolled thread

[PATCH 0/9] ASoC: es8328 codec improvements

Started byJohn Keeping <john@metanate.com>
First post2016-05-09 13:30 +0200
Last post2016-05-13 10:00 +0200
Articles 9 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH 0/9] ASoC: es8328 codec improvements John Keeping <john@metanate.com> - 2016-05-09 13:30 +0200
    [PATCH 6/9] ASoC: es8328: Move sample size setup to hw_params John Keeping <john@metanate.com> - 2016-05-09 13:30 +0200
      Applied "ASoC: es8328: Move sample size setup to hw_params" to the asoc tree Mark Brown <broonie@kernel.org> - 2016-05-10 21:00 +0200
    [PATCH 5/9] ASoC: es8328: Use more suitable definition for mic bias John Keeping <john@metanate.com> - 2016-05-09 13:30 +0200
      Re: [PATCH 5/9] ASoC: es8328: Use more suitable definition for mic  bias Mark Brown <broonie@kernel.org> - 2016-05-10 20:00 +0200
        Re: [PATCH 5/9] ASoC: es8328: Use more suitable definition for mic  bias John Keeping <john@metanate.com> - 2016-05-12 13:10 +0200
          Re: [PATCH 5/9] ASoC: es8328: Use more suitable definition for mic  bias Mark Brown <broonie@kernel.org> - 2016-05-12 13:20 +0200
            [PATCH] ASoC: dapm: deprecate MICBIAS widget type John Keeping <john@metanate.com> - 2016-05-12 15:00 +0200
          Applied "ASoC: dapm: deprecate MICBIAS widget type" to the asoc tree Mark Brown <broonie@kernel.org> - 2016-05-13 10:00 +0200

#1396956 — [PATCH 0/9] ASoC: es8328 codec improvements

FromJohn Keeping <john@metanate.com>
Date2016-05-09 13:30 +0200
Subject[PATCH 0/9] ASoC: es8328 codec improvements
Message-ID<rwRxT-4vq-3@gated-at.bofh.it>
The first 4 patches are bug fixes, then the next 4 add support for more
sample rates and formats.

The final patch I'm slightly unsure about since the hardware does allow
different playback and capture rates, but it only allows 8kHz and 48kHz
or 8.0182kHz and 44.1kHz, all other rates have to be symmetric.

All of these patches have been tested on a Radxa Rock2 Square with
rockchip-i2s.

John Keeping (9):
  ASoC: es8328: Move clock setup to hw_params
  ASoC: es8328: Fix ADC format setup
  ASoC: es8328: Fix mask for VMIDSEL
  ASoC: es8328: Use single R/W for regmap
  ASoC: es8328: Use more suitable definition for mic bias
  ASoC: es8328: Move sample size setup to hw_params
  ASoC: es8328: Support more sample formats
  ASoC: es8328: Support more sample rates
  ASoC: es8328: Set symmetric rates

 sound/soc/codecs/es8328.c | 198 +++++++++++++++++++++++++++++++++++-----------
 sound/soc/codecs/es8328.h |  23 ++++--
 2 files changed, 168 insertions(+), 53 deletions(-)

-- 
2.8.0.rc4.238.g874082a

[toc] | [next] | [standalone]


#1396957 — [PATCH 6/9] ASoC: es8328: Move sample size setup to hw_params

FromJohn Keeping <john@metanate.com>
Date2016-05-09 13:30 +0200
Subject[PATCH 6/9] ASoC: es8328: Move sample size setup to hw_params
Message-ID<rwRxU-4vq-29@gated-at.bofh.it>
In reply to#1396956
This is a refactor in preparation for supporting more sample sizes which
has no functional change.

Signed-off-by: John Keeping <john@metanate.com>
---
 sound/soc/codecs/es8328.c | 19 ++++++++++++++-----
 sound/soc/codecs/es8328.h |  4 ++++
 2 files changed, 18 insertions(+), 5 deletions(-)

diff --git a/sound/soc/codecs/es8328.c b/sound/soc/codecs/es8328.c
index 8661d1837422..31c90ef9abf2 100644
--- a/sound/soc/codecs/es8328.c
+++ b/sound/soc/codecs/es8328.c
@@ -482,9 +482,16 @@ static int es8328_hw_params(struct snd_pcm_substream *substream,
 			ratio = mclk_ratios[i].ratio;
 
 	if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) {
+		snd_soc_update_bits(codec, ES8328_DACCONTROL1,
+				ES8328_DACCONTROL1_DACWL_MASK,
+				ES8328_DACCONTROL1_DACWL_16);
+
 		es8328->playback_fs = params_rate(params);
 		es8328_set_deemph(codec);
-	}
+	} else
+		snd_soc_update_bits(codec, ES8328_ADCCONTROL4,
+				ES8328_ADCCONTROL4_ADCWL_MASK,
+				ES8328_ADCCONTROL4_ADCWL_16);
 
 	return snd_soc_update_bits(codec, reg, ES8328_RATEMASK, ratio);
 }
@@ -493,8 +500,8 @@ static int es8328_set_dai_fmt(struct snd_soc_dai *codec_dai,
 		unsigned int fmt)
 {
 	struct snd_soc_codec *codec = codec_dai->codec;
-	u8 dac_mode = ES8328_DACCONTROL1_DACWL_16;
-	u8 adc_mode = ES8328_ADCCONTROL4_ADCWL_16;
+	u8 dac_mode = 0;
+	u8 adc_mode = 0;
 
 	/* set master/slave audio interface */
 	if ((fmt & SND_SOC_DAIFMT_MASTER_MASK) != SND_SOC_DAIFMT_CBM_CFM)
@@ -522,8 +529,10 @@ static int es8328_set_dai_fmt(struct snd_soc_dai *codec_dai,
 	if ((fmt & SND_SOC_DAIFMT_INV_MASK) != SND_SOC_DAIFMT_NB_NF)
 		return -EINVAL;
 
-	snd_soc_write(codec, ES8328_DACCONTROL1, dac_mode);
-	snd_soc_write(codec, ES8328_ADCCONTROL4, adc_mode);
+	snd_soc_update_bits(codec, ES8328_DACCONTROL1,
+			ES8328_DACCONTROL1_DACFORMAT_MASK, dac_mode);
+	snd_soc_update_bits(codec, ES8328_ADCCONTROL4,
+			ES8328_ADCCONTROL4_ADCFORMAT_MASK, adc_mode);
 
 	/* Master serial port mode, with BCLK generated automatically */
 	snd_soc_update_bits(codec, ES8328_MASTERMODE,
diff --git a/sound/soc/codecs/es8328.h b/sound/soc/codecs/es8328.h
index 8bc79fff0218..9c33d8bda859 100644
--- a/sound/soc/codecs/es8328.h
+++ b/sound/soc/codecs/es8328.h
@@ -86,6 +86,7 @@ int es8328_probe(struct device *dev, struct regmap *regmap);
 #define ES8328_ADCCONTROL3	0x0b
 
 #define ES8328_ADCCONTROL4	0x0c
+#define ES8328_ADCCONTROL4_ADCFORMAT_MASK (3 << 0)
 #define ES8328_ADCCONTROL4_ADCFORMAT_I2S (0 << 0)
 #define ES8328_ADCCONTROL4_ADCFORMAT_LJUST (1 << 0)
 #define ES8328_ADCCONTROL4_ADCFORMAT_RJUST (2 << 0)
@@ -95,6 +96,7 @@ int es8328_probe(struct device *dev, struct regmap *regmap);
 #define ES8328_ADCCONTROL4_ADCWL_18 (2 << 2)
 #define ES8328_ADCCONTROL4_ADCWL_16 (3 << 2)
 #define ES8328_ADCCONTROL4_ADCWL_32 (4 << 2)
+#define ES8328_ADCCONTROL4_ADCWL_MASK (7 << 2)
 #define ES8328_ADCCONTROL4_ADCLRP_I2S_POL_NORMAL (0 << 5)
 #define ES8328_ADCCONTROL4_ADCLRP_I2S_POL_INV (1 << 5)
 #define ES8328_ADCCONTROL4_ADCLRP_PCM_MSB_CLK2 (0 << 5)
@@ -124,6 +126,7 @@ int es8328_probe(struct device *dev, struct regmap *regmap);
 #define ES8328_ADCCONTROL14	0x16
 
 #define ES8328_DACCONTROL1	0x17
+#define ES8328_DACCONTROL1_DACFORMAT_MASK (3 << 1)
 #define ES8328_DACCONTROL1_DACFORMAT_I2S (0 << 1)
 #define ES8328_DACCONTROL1_DACFORMAT_LJUST (1 << 1)
 #define ES8328_DACCONTROL1_DACFORMAT_RJUST (2 << 1)
@@ -133,6 +136,7 @@ int es8328_probe(struct device *dev, struct regmap *regmap);
 #define ES8328_DACCONTROL1_DACWL_18 (2 << 3)
 #define ES8328_DACCONTROL1_DACWL_16 (3 << 3)
 #define ES8328_DACCONTROL1_DACWL_32 (4 << 3)
+#define ES8328_DACCONTROL1_DACWL_MASK (7 << 3)
 #define ES8328_DACCONTROL1_DACLRP_I2S_POL_NORMAL (0 << 6)
 #define ES8328_DACCONTROL1_DACLRP_I2S_POL_INV (1 << 6)
 #define ES8328_DACCONTROL1_DACLRP_PCM_MSB_CLK2 (0 << 6)
-- 
2.8.0.rc4.238.g874082a

[toc] | [prev] | [next] | [standalone]


#1398416 — Applied "ASoC: es8328: Move sample size setup to hw_params" to the asoc tree

FromMark Brown <broonie@kernel.org>
Date2016-05-10 21:00 +0200
SubjectApplied "ASoC: es8328: Move sample size setup to hw_params" to the asoc tree
Message-ID<rxl2W-8tq-29@gated-at.bofh.it>
In reply to#1396957
The patch

   ASoC: es8328: Move sample size setup to hw_params

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 8865c95e43257e6676bc0f6b042ecce17eff74fe Mon Sep 17 00:00:00 2001
From: John Keeping <john@metanate.com>
Date: Mon, 9 May 2016 12:24:34 +0100
Subject: [PATCH] ASoC: es8328: Move sample size setup to hw_params

This is a refactor in preparation for supporting more sample sizes which
has no functional change.

Signed-off-by: John Keeping <john@metanate.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
 sound/soc/codecs/es8328.c | 19 ++++++++++++++-----
 sound/soc/codecs/es8328.h |  4 ++++
 2 files changed, 18 insertions(+), 5 deletions(-)

diff --git a/sound/soc/codecs/es8328.c b/sound/soc/codecs/es8328.c
index d580300d9220..c5a36e65fc40 100644
--- a/sound/soc/codecs/es8328.c
+++ b/sound/soc/codecs/es8328.c
@@ -482,9 +482,16 @@ static int es8328_hw_params(struct snd_pcm_substream *substream,
 			ratio = mclk_ratios[i].ratio;
 
 	if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) {
+		snd_soc_update_bits(codec, ES8328_DACCONTROL1,
+				ES8328_DACCONTROL1_DACWL_MASK,
+				ES8328_DACCONTROL1_DACWL_16);
+
 		es8328->playback_fs = params_rate(params);
 		es8328_set_deemph(codec);
-	}
+	} else
+		snd_soc_update_bits(codec, ES8328_ADCCONTROL4,
+				ES8328_ADCCONTROL4_ADCWL_MASK,
+				ES8328_ADCCONTROL4_ADCWL_16);
 
 	return snd_soc_update_bits(codec, reg, ES8328_RATEMASK, ratio);
 }
@@ -493,8 +500,8 @@ static int es8328_set_dai_fmt(struct snd_soc_dai *codec_dai,
 		unsigned int fmt)
 {
 	struct snd_soc_codec *codec = codec_dai->codec;
-	u8 dac_mode = ES8328_DACCONTROL1_DACWL_16;
-	u8 adc_mode = ES8328_ADCCONTROL4_ADCWL_16;
+	u8 dac_mode = 0;
+	u8 adc_mode = 0;
 
 	/* set master/slave audio interface */
 	if ((fmt & SND_SOC_DAIFMT_MASTER_MASK) != SND_SOC_DAIFMT_CBM_CFM)
@@ -522,8 +529,10 @@ static int es8328_set_dai_fmt(struct snd_soc_dai *codec_dai,
 	if ((fmt & SND_SOC_DAIFMT_INV_MASK) != SND_SOC_DAIFMT_NB_NF)
 		return -EINVAL;
 
-	snd_soc_write(codec, ES8328_DACCONTROL1, dac_mode);
-	snd_soc_write(codec, ES8328_ADCCONTROL4, adc_mode);
+	snd_soc_update_bits(codec, ES8328_DACCONTROL1,
+			ES8328_DACCONTROL1_DACFORMAT_MASK, dac_mode);
+	snd_soc_update_bits(codec, ES8328_ADCCONTROL4,
+			ES8328_ADCCONTROL4_ADCFORMAT_MASK, adc_mode);
 
 	/* Master serial port mode, with BCLK generated automatically */
 	snd_soc_update_bits(codec, ES8328_MASTERMODE,
diff --git a/sound/soc/codecs/es8328.h b/sound/soc/codecs/es8328.h
index 8bc79fff0218..9c33d8bda859 100644
--- a/sound/soc/codecs/es8328.h
+++ b/sound/soc/codecs/es8328.h
@@ -86,6 +86,7 @@ int es8328_probe(struct device *dev, struct regmap *regmap);
 #define ES8328_ADCCONTROL3	0x0b
 
 #define ES8328_ADCCONTROL4	0x0c
+#define ES8328_ADCCONTROL4_ADCFORMAT_MASK (3 << 0)
 #define ES8328_ADCCONTROL4_ADCFORMAT_I2S (0 << 0)
 #define ES8328_ADCCONTROL4_ADCFORMAT_LJUST (1 << 0)
 #define ES8328_ADCCONTROL4_ADCFORMAT_RJUST (2 << 0)
@@ -95,6 +96,7 @@ int es8328_probe(struct device *dev, struct regmap *regmap);
 #define ES8328_ADCCONTROL4_ADCWL_18 (2 << 2)
 #define ES8328_ADCCONTROL4_ADCWL_16 (3 << 2)
 #define ES8328_ADCCONTROL4_ADCWL_32 (4 << 2)
+#define ES8328_ADCCONTROL4_ADCWL_MASK (7 << 2)
 #define ES8328_ADCCONTROL4_ADCLRP_I2S_POL_NORMAL (0 << 5)
 #define ES8328_ADCCONTROL4_ADCLRP_I2S_POL_INV (1 << 5)
 #define ES8328_ADCCONTROL4_ADCLRP_PCM_MSB_CLK2 (0 << 5)
@@ -124,6 +126,7 @@ int es8328_probe(struct device *dev, struct regmap *regmap);
 #define ES8328_ADCCONTROL14	0x16
 
 #define ES8328_DACCONTROL1	0x17
+#define ES8328_DACCONTROL1_DACFORMAT_MASK (3 << 1)
 #define ES8328_DACCONTROL1_DACFORMAT_I2S (0 << 1)
 #define ES8328_DACCONTROL1_DACFORMAT_LJUST (1 << 1)
 #define ES8328_DACCONTROL1_DACFORMAT_RJUST (2 << 1)
@@ -133,6 +136,7 @@ int es8328_probe(struct device *dev, struct regmap *regmap);
 #define ES8328_DACCONTROL1_DACWL_18 (2 << 3)
 #define ES8328_DACCONTROL1_DACWL_16 (3 << 3)
 #define ES8328_DACCONTROL1_DACWL_32 (4 << 3)
+#define ES8328_DACCONTROL1_DACWL_MASK (7 << 3)
 #define ES8328_DACCONTROL1_DACLRP_I2S_POL_NORMAL (0 << 6)
 #define ES8328_DACCONTROL1_DACLRP_I2S_POL_INV (1 << 6)
 #define ES8328_DACCONTROL1_DACLRP_PCM_MSB_CLK2 (0 << 6)
-- 
2.8.1

[toc] | [prev] | [next] | [standalone]


#1396958 — [PATCH 5/9] ASoC: es8328: Use more suitable definition for mic bias

FromJohn Keeping <john@metanate.com>
Date2016-05-09 13:30 +0200
Subject[PATCH 5/9] ASoC: es8328: Use more suitable definition for mic bias
Message-ID<rwRxU-4vq-31@gated-at.bofh.it>
In reply to#1396956
Signed-off-by: John Keeping <john@metanate.com>
---
 sound/soc/codecs/es8328.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/sound/soc/codecs/es8328.c b/sound/soc/codecs/es8328.c
index d580300d9220..8661d1837422 100644
--- a/sound/soc/codecs/es8328.c
+++ b/sound/soc/codecs/es8328.c
@@ -287,8 +287,8 @@ static const struct snd_soc_dapm_widget es8328_dapm_widgets[] = {
 	SND_SOC_DAPM_ADC("Left ADC", "Left Capture", ES8328_ADCPOWER,
 			ES8328_ADCPOWER_ADCL_OFF, 1),
 
-	SND_SOC_DAPM_SUPPLY("Mic Bias", ES8328_ADCPOWER,
-			ES8328_ADCPOWER_MIC_BIAS_OFF, 1, NULL, 0),
+	SND_SOC_DAPM_MICBIAS("Mic Bias", ES8328_ADCPOWER,
+			ES8328_ADCPOWER_MIC_BIAS_OFF, 1),
 	SND_SOC_DAPM_SUPPLY("Mic Bias Gen", ES8328_ADCPOWER,
 			ES8328_ADCPOWER_ADC_BIAS_GEN_OFF, 1, NULL, 0),
 
-- 
2.8.0.rc4.238.g874082a

[toc] | [prev] | [next] | [standalone]


#1398370 — Re: [PATCH 5/9] ASoC: es8328: Use more suitable definition for mic bias

FromMark Brown <broonie@kernel.org>
Date2016-05-10 20:00 +0200
SubjectRe: [PATCH 5/9] ASoC: es8328: Use more suitable definition for mic bias
Message-ID<rxk6S-7xI-17@gated-at.bofh.it>
In reply to#1396958

[Multipart message — attachments visible in raw view] — view raw

On Mon, May 09, 2016 at 12:24:33PM +0100, John Keeping wrote:

> -	SND_SOC_DAPM_SUPPLY("Mic Bias", ES8328_ADCPOWER,
> -			ES8328_ADCPOWER_MIC_BIAS_OFF, 1, NULL, 0),
> +	SND_SOC_DAPM_MICBIAS("Mic Bias", ES8328_ADCPOWER,
> +			ES8328_ADCPOWER_MIC_BIAS_OFF, 1),

No, this is broken.  The specialist MICBIAS widget is legacy and should
not be used.

[toc] | [prev] | [next] | [standalone]


#1399921 — Re: [PATCH 5/9] ASoC: es8328: Use more suitable definition for mic bias

FromJohn Keeping <john@metanate.com>
Date2016-05-12 13:10 +0200
SubjectRe: [PATCH 5/9] ASoC: es8328: Use more suitable definition for mic bias
Message-ID<rxWFb-4nU-9@gated-at.bofh.it>
In reply to#1398370
On Tue, 10 May 2016 18:53:35 +0100, Mark Brown wrote:

> On Mon, May 09, 2016 at 12:24:33PM +0100, John Keeping wrote:
> 
> > -	SND_SOC_DAPM_SUPPLY("Mic Bias", ES8328_ADCPOWER,
> > -			ES8328_ADCPOWER_MIC_BIAS_OFF, 1, NULL, 0),
> > +	SND_SOC_DAPM_MICBIAS("Mic Bias", ES8328_ADCPOWER,
> > +			ES8328_ADCPOWER_MIC_BIAS_OFF, 1),  
> 
> No, this is broken.  The specialist MICBIAS widget is legacy and should
> not be used.

OK, this can be dropped.  Would you consider doing something like the
patch below?

The only reference I can find to MICBIAS being legacy is in commit
086d7f804e26 ("ASoC: Convert WM8962 MICBIAS to a supply widget",
2011-09-23) and some following commits, there don't seem to be any
comments in the documentation indicating that it's not to be used.

-- >8 --
diff --git a/include/sound/soc-dapm.h b/include/sound/soc-dapm.h
index 97069466c38d..3101d53468aa 100644
--- a/include/sound/soc-dapm.h
+++ b/include/sound/soc-dapm.h
@@ -100,6 +100,7 @@ struct device;
 {       .id = snd_soc_dapm_mixer_named_ctl, .name = wname, \
 	SND_SOC_DAPM_INIT_REG_VAL(wreg, wshift, winvert), \
 	.kcontrol_news = wcontrols, .num_kcontrols = wncontrols}
+/* DEPRECATED: use SND_SOC_DAPM_SUPPLY */
 #define SND_SOC_DAPM_MICBIAS(wname, wreg, wshift, winvert) \
 {	.id = snd_soc_dapm_micbias, .name = wname, \
 	SND_SOC_DAPM_INIT_REG_VAL(wreg, wshift, winvert), \
@@ -473,7 +474,7 @@ enum snd_soc_dapm_type {
 	snd_soc_dapm_out_drv,			/* output driver */
 	snd_soc_dapm_adc,			/* analog to digital converter */
 	snd_soc_dapm_dac,			/* digital to analog converter */
-	snd_soc_dapm_micbias,		/* microphone bias (power) */
+	snd_soc_dapm_micbias,		/* microphone bias (power) - DEPRECATED: use snd_soc_dapm_supply */
 	snd_soc_dapm_mic,			/* microphone */
 	snd_soc_dapm_hp,			/* headphones */
 	snd_soc_dapm_spk,			/* speaker */

[toc] | [prev] | [next] | [standalone]


#1399929 — Re: [PATCH 5/9] ASoC: es8328: Use more suitable definition for mic bias

FromMark Brown <broonie@kernel.org>
Date2016-05-12 13:20 +0200
SubjectRe: [PATCH 5/9] ASoC: es8328: Use more suitable definition for mic bias
Message-ID<rxWOS-4u5-21@gated-at.bofh.it>
In reply to#1399921

[Multipart message — attachments visible in raw view] — view raw

On Thu, May 12, 2016 at 12:01:31PM +0100, John Keeping wrote:

> OK, this can be dropped.  Would you consider doing something like the
> patch below?

Documentation/SubmittingPatches.

[toc] | [prev] | [next] | [standalone]


#1400049 — [PATCH] ASoC: dapm: deprecate MICBIAS widget type

FromJohn Keeping <john@metanate.com>
Date2016-05-12 15:00 +0200
Subject[PATCH] ASoC: dapm: deprecate MICBIAS widget type
Message-ID<rxYnE-61H-19@gated-at.bofh.it>
In reply to#1399929
Commit 086d7f804e26 ("ASoC: Convert WM8962 MICBIAS to a supply widget",
2011-09-23) says:

	A supply widget is generally clearer than a MICBIAS widget and a
	mic bias is just a type of supply so use a supply widget for the
	MICBIAS. This also avoids confusion with the routing when
	connected to multiple inputs.

but this has never been documented as a policy.  Add some comments to
make it clear.

Signed-off-by: John Keeping <john@metanate.com>
---
 include/sound/soc-dapm.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/include/sound/soc-dapm.h b/include/sound/soc-dapm.h
index 97069466c38d..3101d53468aa 100644
--- a/include/sound/soc-dapm.h
+++ b/include/sound/soc-dapm.h
@@ -100,6 +100,7 @@ struct device;
 {       .id = snd_soc_dapm_mixer_named_ctl, .name = wname, \
 	SND_SOC_DAPM_INIT_REG_VAL(wreg, wshift, winvert), \
 	.kcontrol_news = wcontrols, .num_kcontrols = wncontrols}
+/* DEPRECATED: use SND_SOC_DAPM_SUPPLY */
 #define SND_SOC_DAPM_MICBIAS(wname, wreg, wshift, winvert) \
 {	.id = snd_soc_dapm_micbias, .name = wname, \
 	SND_SOC_DAPM_INIT_REG_VAL(wreg, wshift, winvert), \
@@ -473,7 +474,7 @@ enum snd_soc_dapm_type {
 	snd_soc_dapm_out_drv,			/* output driver */
 	snd_soc_dapm_adc,			/* analog to digital converter */
 	snd_soc_dapm_dac,			/* digital to analog converter */
-	snd_soc_dapm_micbias,		/* microphone bias (power) */
+	snd_soc_dapm_micbias,		/* microphone bias (power) - DEPRECATED: use snd_soc_dapm_supply */
 	snd_soc_dapm_mic,			/* microphone */
 	snd_soc_dapm_hp,			/* headphones */
 	snd_soc_dapm_spk,			/* speaker */
-- 
2.8.2.565.gdb84f68.dirty

[toc] | [prev] | [next] | [standalone]


#1400576 — Applied "ASoC: dapm: deprecate MICBIAS widget type" to the asoc tree

FromMark Brown <broonie@kernel.org>
Date2016-05-13 10:00 +0200
SubjectApplied "ASoC: dapm: deprecate MICBIAS widget type" to the asoc tree
Message-ID<rygaT-7tc-49@gated-at.bofh.it>
In reply to#1399921
The patch

   ASoC: dapm: deprecate MICBIAS widget type

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 32902177f7f6ae70e1d5e71d935aa1bfcae7f01c Mon Sep 17 00:00:00 2001
From: John Keeping <john@metanate.com>
Date: Thu, 12 May 2016 13:55:53 +0100
Subject: [PATCH] ASoC: dapm: deprecate MICBIAS widget type

Commit 086d7f804e26 ("ASoC: Convert WM8962 MICBIAS to a supply widget",
2011-09-23) says:

	A supply widget is generally clearer than a MICBIAS widget and a
	mic bias is just a type of supply so use a supply widget for the
	MICBIAS. This also avoids confusion with the routing when
	connected to multiple inputs.

but this has never been documented as a policy.  Add some comments to
make it clear.

Signed-off-by: John Keeping <john@metanate.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
 include/sound/soc-dapm.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/include/sound/soc-dapm.h b/include/sound/soc-dapm.h
index 97069466c38d..3101d53468aa 100644
--- a/include/sound/soc-dapm.h
+++ b/include/sound/soc-dapm.h
@@ -100,6 +100,7 @@ struct device;
 {       .id = snd_soc_dapm_mixer_named_ctl, .name = wname, \
 	SND_SOC_DAPM_INIT_REG_VAL(wreg, wshift, winvert), \
 	.kcontrol_news = wcontrols, .num_kcontrols = wncontrols}
+/* DEPRECATED: use SND_SOC_DAPM_SUPPLY */
 #define SND_SOC_DAPM_MICBIAS(wname, wreg, wshift, winvert) \
 {	.id = snd_soc_dapm_micbias, .name = wname, \
 	SND_SOC_DAPM_INIT_REG_VAL(wreg, wshift, winvert), \
@@ -473,7 +474,7 @@ enum snd_soc_dapm_type {
 	snd_soc_dapm_out_drv,			/* output driver */
 	snd_soc_dapm_adc,			/* analog to digital converter */
 	snd_soc_dapm_dac,			/* digital to analog converter */
-	snd_soc_dapm_micbias,		/* microphone bias (power) */
+	snd_soc_dapm_micbias,		/* microphone bias (power) - DEPRECATED: use snd_soc_dapm_supply */
 	snd_soc_dapm_mic,			/* microphone */
 	snd_soc_dapm_hp,			/* headphones */
 	snd_soc_dapm_spk,			/* speaker */
-- 
2.8.1

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web