All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/4] ASoC: sun8i-codec: Clean-up
@ 2017-02-10  9:41 ` Mylène Josserand
  0 siblings, 0 replies; 54+ messages in thread
From: Mylène Josserand @ 2017-02-10  9:41 UTC (permalink / raw)
  To: lgirdwood, broonie, robh+dt, mark.rutland, maxime.ripard, wens,
	perex, tiwai
  Cc: alsa-devel, devicetree, linux-kernel, linux-arm-kernel,
	thomas.petazzoni, mylene.josserand, alexandre.belloni

Hi all,

Thanks to Chen-Yu's review [1], here are some patches to clean-up
my sun8i A33 audio driver.

Patches tested on asoc/for-next branch with additionnal patches
to apply before:
https://patchwork.kernel.org/patch/9447631/
https://patchwork.kernel.org/patch/9423999/
https://patchwork.kernel.org/patch/9521121/
https://www.spinics.net/lists/arm-kernel/msg560091.html

Patch 1: Removes the HP widget which is available in the analog part.

Patch 2: Update the driver to use SOC_DAPM_DOUBLE and rename the
controls accordingly.

Patch 3: Convert SND_SOC_DAPM_MIXER to SOC_MIXER_ARRAY.

Patch 3: Convert SND_SOC_DAPM_DAC to SND_SOC_DAPM_AIF_IN definition.

The last Chen Yu's comments are still in progress (ie use of
set_pll and set_sysclk and reworking the audio route).

After this series, amixer commands to test an audio file:
	amixer set 'Headphone' 75%
	amixer set 'Headphone' on
	amixer set 'DAC' on
	amixer set 'AIF1 Slot 0 Digital DAC' on

[1] https://lkml.org/lkml/2017/2/7/103

Thank you in advance,
Best regards,

Mylène Josserand (4):
  ASoC: sun8i-codec: Remove analog "HP" widget
  ASoC: sun8i-codec: Update mixer to use SOC_DAPM_DOUBLE
  ASoC: sun8i-codec: Convert to SOC_MIXER_ARRAY
  ASoC: sun8i-codec: Convert to use SND_SOC_DAPM_AIF_IN

 arch/arm/boot/dts/sun8i-a33.dtsi |  4 +--
 sound/soc/sunxi/sun8i-codec.c    | 65 +++++++++++++++++-----------------------
 2 files changed, 30 insertions(+), 39 deletions(-)

-- 
2.11.0

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

* [PATCH 0/4] ASoC: sun8i-codec: Clean-up
@ 2017-02-10  9:41 ` Mylène Josserand
  0 siblings, 0 replies; 54+ messages in thread
From: Mylène Josserand @ 2017-02-10  9:41 UTC (permalink / raw)
  To: lgirdwood, broonie, robh+dt, mark.rutland, maxime.ripard, wens,
	perex, tiwai
  Cc: thomas.petazzoni, devicetree, alsa-devel, linux-kernel,
	alexandre.belloni, mylene.josserand, linux-arm-kernel

Hi all,

Thanks to Chen-Yu's review [1], here are some patches to clean-up
my sun8i A33 audio driver.

Patches tested on asoc/for-next branch with additionnal patches
to apply before:
https://patchwork.kernel.org/patch/9447631/
https://patchwork.kernel.org/patch/9423999/
https://patchwork.kernel.org/patch/9521121/
https://www.spinics.net/lists/arm-kernel/msg560091.html

Patch 1: Removes the HP widget which is available in the analog part.

Patch 2: Update the driver to use SOC_DAPM_DOUBLE and rename the
controls accordingly.

Patch 3: Convert SND_SOC_DAPM_MIXER to SOC_MIXER_ARRAY.

Patch 3: Convert SND_SOC_DAPM_DAC to SND_SOC_DAPM_AIF_IN definition.

The last Chen Yu's comments are still in progress (ie use of
set_pll and set_sysclk and reworking the audio route).

After this series, amixer commands to test an audio file:
	amixer set 'Headphone' 75%
	amixer set 'Headphone' on
	amixer set 'DAC' on
	amixer set 'AIF1 Slot 0 Digital DAC' on

[1] https://lkml.org/lkml/2017/2/7/103

Thank you in advance,
Best regards,

Mylène Josserand (4):
  ASoC: sun8i-codec: Remove analog "HP" widget
  ASoC: sun8i-codec: Update mixer to use SOC_DAPM_DOUBLE
  ASoC: sun8i-codec: Convert to SOC_MIXER_ARRAY
  ASoC: sun8i-codec: Convert to use SND_SOC_DAPM_AIF_IN

 arch/arm/boot/dts/sun8i-a33.dtsi |  4 +--
 sound/soc/sunxi/sun8i-codec.c    | 65 +++++++++++++++++-----------------------
 2 files changed, 30 insertions(+), 39 deletions(-)

-- 
2.11.0

_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

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

* [PATCH 0/4] ASoC: sun8i-codec: Clean-up
@ 2017-02-10  9:41 ` Mylène Josserand
  0 siblings, 0 replies; 54+ messages in thread
From: Mylène Josserand @ 2017-02-10  9:41 UTC (permalink / raw)
  To: linux-arm-kernel

Hi all,

Thanks to Chen-Yu's review [1], here are some patches to clean-up
my sun8i A33 audio driver.

Patches tested on asoc/for-next branch with additionnal patches
to apply before:
https://patchwork.kernel.org/patch/9447631/
https://patchwork.kernel.org/patch/9423999/
https://patchwork.kernel.org/patch/9521121/
https://www.spinics.net/lists/arm-kernel/msg560091.html

Patch 1: Removes the HP widget which is available in the analog part.

Patch 2: Update the driver to use SOC_DAPM_DOUBLE and rename the
controls accordingly.

Patch 3: Convert SND_SOC_DAPM_MIXER to SOC_MIXER_ARRAY.

Patch 3: Convert SND_SOC_DAPM_DAC to SND_SOC_DAPM_AIF_IN definition.

The last Chen Yu's comments are still in progress (ie use of
set_pll and set_sysclk and reworking the audio route).

After this series, amixer commands to test an audio file:
	amixer set 'Headphone' 75%
	amixer set 'Headphone' on
	amixer set 'DAC' on
	amixer set 'AIF1 Slot 0 Digital DAC' on

[1] https://lkml.org/lkml/2017/2/7/103

Thank you in advance,
Best regards,

Myl?ne Josserand (4):
  ASoC: sun8i-codec: Remove analog "HP" widget
  ASoC: sun8i-codec: Update mixer to use SOC_DAPM_DOUBLE
  ASoC: sun8i-codec: Convert to SOC_MIXER_ARRAY
  ASoC: sun8i-codec: Convert to use SND_SOC_DAPM_AIF_IN

 arch/arm/boot/dts/sun8i-a33.dtsi |  4 +--
 sound/soc/sunxi/sun8i-codec.c    | 65 +++++++++++++++++-----------------------
 2 files changed, 30 insertions(+), 39 deletions(-)

-- 
2.11.0

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

* [PATCH 1/4] ASoC: sun8i-codec: Remove analog "HP" widget
  2017-02-10  9:41 ` Mylène Josserand
  (?)
@ 2017-02-10  9:41   ` Mylène Josserand
  -1 siblings, 0 replies; 54+ messages in thread
From: Mylène Josserand @ 2017-02-10  9:41 UTC (permalink / raw)
  To: lgirdwood, broonie, robh+dt, mark.rutland, maxime.ripard, wens,
	perex, tiwai
  Cc: alsa-devel, devicetree, linux-kernel, linux-arm-kernel,
	thomas.petazzoni, mylene.josserand, alexandre.belloni

The "HP" widget is already present and take part to
the analog part (sun8i-codec-analog).

Remove it from the digital part as it is unnecessary.

Signed-off-by: Mylène Josserand <mylene.josserand@free-electrons.com>
---
 sound/soc/sunxi/sun8i-codec.c | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/sound/soc/sunxi/sun8i-codec.c b/sound/soc/sunxi/sun8i-codec.c
index b92bdc8361af..d60f6fbd36a2 100644
--- a/sound/soc/sunxi/sun8i-codec.c
+++ b/sound/soc/sunxi/sun8i-codec.c
@@ -321,8 +321,6 @@ static const struct snd_soc_dapm_widget sun8i_codec_dapm_widgets[] = {
 			    SUN8I_MOD_RST_CTL_AIF1, 0, NULL, 0),
 	SND_SOC_DAPM_SUPPLY("RST DAC", SUN8I_MOD_RST_CTL,
 			    SUN8I_MOD_RST_CTL_DAC, 0, NULL, 0),
-
-	SND_SOC_DAPM_OUTPUT("HP"),
 };
 
 static const struct snd_soc_dapm_route sun8i_codec_dapm_routes[] = {
@@ -344,10 +342,6 @@ static const struct snd_soc_dapm_route sun8i_codec_dapm_routes[] = {
 	/* DAC Mixer Routes */
 	{ "Left DAC Mixer", "LSlot 0", "Digital Left DAC"},
 	{ "Right DAC Mixer", "RSlot 0", "Digital Right DAC"},
-
-	/* End of route : HP out */
-	{ "HP", NULL, "Left DAC Mixer" },
-	{ "HP", NULL, "Right DAC Mixer" },
 };
 
 static struct snd_soc_dai_ops sun8i_codec_dai_ops = {
-- 
2.11.0

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

* [PATCH 1/4] ASoC: sun8i-codec: Remove analog "HP" widget
@ 2017-02-10  9:41   ` Mylène Josserand
  0 siblings, 0 replies; 54+ messages in thread
From: Mylène Josserand @ 2017-02-10  9:41 UTC (permalink / raw)
  To: lgirdwood, broonie, robh+dt, mark.rutland, maxime.ripard, wens,
	perex, tiwai
  Cc: thomas.petazzoni, devicetree, alsa-devel, linux-kernel,
	alexandre.belloni, mylene.josserand, linux-arm-kernel

The "HP" widget is already present and take part to
the analog part (sun8i-codec-analog).

Remove it from the digital part as it is unnecessary.

Signed-off-by: Mylène Josserand <mylene.josserand@free-electrons.com>
---
 sound/soc/sunxi/sun8i-codec.c | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/sound/soc/sunxi/sun8i-codec.c b/sound/soc/sunxi/sun8i-codec.c
index b92bdc8361af..d60f6fbd36a2 100644
--- a/sound/soc/sunxi/sun8i-codec.c
+++ b/sound/soc/sunxi/sun8i-codec.c
@@ -321,8 +321,6 @@ static const struct snd_soc_dapm_widget sun8i_codec_dapm_widgets[] = {
 			    SUN8I_MOD_RST_CTL_AIF1, 0, NULL, 0),
 	SND_SOC_DAPM_SUPPLY("RST DAC", SUN8I_MOD_RST_CTL,
 			    SUN8I_MOD_RST_CTL_DAC, 0, NULL, 0),
-
-	SND_SOC_DAPM_OUTPUT("HP"),
 };
 
 static const struct snd_soc_dapm_route sun8i_codec_dapm_routes[] = {
@@ -344,10 +342,6 @@ static const struct snd_soc_dapm_route sun8i_codec_dapm_routes[] = {
 	/* DAC Mixer Routes */
 	{ "Left DAC Mixer", "LSlot 0", "Digital Left DAC"},
 	{ "Right DAC Mixer", "RSlot 0", "Digital Right DAC"},
-
-	/* End of route : HP out */
-	{ "HP", NULL, "Left DAC Mixer" },
-	{ "HP", NULL, "Right DAC Mixer" },
 };
 
 static struct snd_soc_dai_ops sun8i_codec_dai_ops = {
-- 
2.11.0

_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

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

* [PATCH 1/4] ASoC: sun8i-codec: Remove analog "HP" widget
@ 2017-02-10  9:41   ` Mylène Josserand
  0 siblings, 0 replies; 54+ messages in thread
From: Mylène Josserand @ 2017-02-10  9:41 UTC (permalink / raw)
  To: linux-arm-kernel

The "HP" widget is already present and take part to
the analog part (sun8i-codec-analog).

Remove it from the digital part as it is unnecessary.

Signed-off-by: Myl?ne Josserand <mylene.josserand@free-electrons.com>
---
 sound/soc/sunxi/sun8i-codec.c | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/sound/soc/sunxi/sun8i-codec.c b/sound/soc/sunxi/sun8i-codec.c
index b92bdc8361af..d60f6fbd36a2 100644
--- a/sound/soc/sunxi/sun8i-codec.c
+++ b/sound/soc/sunxi/sun8i-codec.c
@@ -321,8 +321,6 @@ static const struct snd_soc_dapm_widget sun8i_codec_dapm_widgets[] = {
 			    SUN8I_MOD_RST_CTL_AIF1, 0, NULL, 0),
 	SND_SOC_DAPM_SUPPLY("RST DAC", SUN8I_MOD_RST_CTL,
 			    SUN8I_MOD_RST_CTL_DAC, 0, NULL, 0),
-
-	SND_SOC_DAPM_OUTPUT("HP"),
 };
 
 static const struct snd_soc_dapm_route sun8i_codec_dapm_routes[] = {
@@ -344,10 +342,6 @@ static const struct snd_soc_dapm_route sun8i_codec_dapm_routes[] = {
 	/* DAC Mixer Routes */
 	{ "Left DAC Mixer", "LSlot 0", "Digital Left DAC"},
 	{ "Right DAC Mixer", "RSlot 0", "Digital Right DAC"},
-
-	/* End of route : HP out */
-	{ "HP", NULL, "Left DAC Mixer" },
-	{ "HP", NULL, "Right DAC Mixer" },
 };
 
 static struct snd_soc_dai_ops sun8i_codec_dai_ops = {
-- 
2.11.0

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

* [PATCH 2/4] ASoC: sun8i-codec: Update mixer to use SOC_DAPM_DOUBLE
  2017-02-10  9:41 ` Mylène Josserand
  (?)
@ 2017-02-10  9:41   ` Mylène Josserand
  -1 siblings, 0 replies; 54+ messages in thread
From: Mylène Josserand @ 2017-02-10  9:41 UTC (permalink / raw)
  To: lgirdwood, broonie, robh+dt, mark.rutland, maxime.ripard, wens,
	perex, tiwai
  Cc: alsa-devel, devicetree, linux-kernel, linux-arm-kernel,
	thomas.petazzoni, mylene.josserand, alexandre.belloni

Update the driver to use the new SOC_DAPM_DOUBLE definition
on the digital DAC mixer.
Update the names accordingly as, when they are shared, the
controls are not prefixed with the widget's name anymore.

Signed-off-by: Mylène Josserand <mylene.josserand@free-electrons.com>
---
 sound/soc/sunxi/sun8i-codec.c | 45 ++++++++++++++++++++-----------------------
 1 file changed, 21 insertions(+), 24 deletions(-)

diff --git a/sound/soc/sunxi/sun8i-codec.c b/sound/soc/sunxi/sun8i-codec.c
index d60f6fbd36a2..107fa8213600 100644
--- a/sound/soc/sunxi/sun8i-codec.c
+++ b/sound/soc/sunxi/sun8i-codec.c
@@ -259,25 +259,20 @@ static int sun8i_codec_hw_params(struct snd_pcm_substream *substream,
 	return 0;
 }
 
-static const struct snd_kcontrol_new sun8i_output_left_mixer_controls[] = {
-	SOC_DAPM_SINGLE("LSlot 0", SUN8I_DAC_MXR_SRC,
-			SUN8I_DAC_MXR_SRC_DACL_MXR_SRC_AIF1DA0L, 1, 0),
-	SOC_DAPM_SINGLE("LSlot 1", SUN8I_DAC_MXR_SRC,
-			SUN8I_DAC_MXR_SRC_DACL_MXR_SRC_AIF1DA1L, 1, 0),
-	SOC_DAPM_SINGLE("DACL", SUN8I_DAC_MXR_SRC,
-			SUN8I_DAC_MXR_SRC_DACL_MXR_SRC_AIF2DACL, 1, 0),
-	SOC_DAPM_SINGLE("ADCL", SUN8I_DAC_MXR_SRC,
-			SUN8I_DAC_MXR_SRC_DACL_MXR_SRC_ADCL, 1, 0),
-};
-
-static const struct snd_kcontrol_new sun8i_output_right_mixer_controls[] = {
-	SOC_DAPM_SINGLE("RSlot 0", SUN8I_DAC_MXR_SRC,
+static const struct snd_kcontrol_new sun8i_dac_mixer_controls[] = {
+	SOC_DAPM_DOUBLE("AIF1 Slot 0 Digital DAC Playback Switch",
+			SUN8I_DAC_MXR_SRC,
+			SUN8I_DAC_MXR_SRC_DACL_MXR_SRC_AIF1DA0L,
 			SUN8I_DAC_MXR_SRC_DACR_MXR_SRC_AIF1DA0R, 1, 0),
-	SOC_DAPM_SINGLE("RSlot 1", SUN8I_DAC_MXR_SRC,
+	SOC_DAPM_DOUBLE("AIF1 Slot 1 Digital DAC Playback Switch",
+			SUN8I_DAC_MXR_SRC,
+			SUN8I_DAC_MXR_SRC_DACL_MXR_SRC_AIF1DA1L,
 			SUN8I_DAC_MXR_SRC_DACR_MXR_SRC_AIF1DA1R, 1, 0),
-	SOC_DAPM_SINGLE("DACR", SUN8I_DAC_MXR_SRC,
+	SOC_DAPM_DOUBLE("AIF2 Digital DAC Playback Switch", SUN8I_DAC_MXR_SRC,
+			SUN8I_DAC_MXR_SRC_DACL_MXR_SRC_AIF2DACL,
 			SUN8I_DAC_MXR_SRC_DACR_MXR_SRC_AIF2DACR, 1, 0),
-	SOC_DAPM_SINGLE("ADCR", SUN8I_DAC_MXR_SRC,
+	SOC_DAPM_DOUBLE("ADC Digital DAC Playback Switch", SUN8I_DAC_MXR_SRC,
+			SUN8I_DAC_MXR_SRC_DACL_MXR_SRC_ADCL,
 			SUN8I_DAC_MXR_SRC_DACR_MXR_SRC_ADCR, 1, 0),
 };
 
@@ -293,12 +288,12 @@ static const struct snd_soc_dapm_widget sun8i_codec_dapm_widgets[] = {
 			 SUN8I_AIF1_DACDAT_CTRL_AIF1_DA0R_ENA, 0),
 
 	/* DAC Mixers */
-	SND_SOC_DAPM_MIXER("Left DAC Mixer", SND_SOC_NOPM, 0, 0,
-			   sun8i_output_left_mixer_controls,
-			   ARRAY_SIZE(sun8i_output_left_mixer_controls)),
-	SND_SOC_DAPM_MIXER("Right DAC Mixer", SND_SOC_NOPM, 0, 0,
-			   sun8i_output_right_mixer_controls,
-			   ARRAY_SIZE(sun8i_output_right_mixer_controls)),
+	SND_SOC_DAPM_MIXER("Left Digital DAC Mixer", SND_SOC_NOPM, 0, 0,
+			   sun8i_dac_mixer_controls,
+			   ARRAY_SIZE(sun8i_dac_mixer_controls)),
+	SND_SOC_DAPM_MIXER("Right Digital DAC Mixer", SND_SOC_NOPM, 0, 0,
+			   sun8i_dac_mixer_controls,
+			   ARRAY_SIZE(sun8i_dac_mixer_controls)),
 
 	/* Clocks */
 	SND_SOC_DAPM_SUPPLY("MODCLK AFI1", SUN8I_MOD_CLK_ENA,
@@ -340,8 +335,10 @@ static const struct snd_soc_dapm_route sun8i_codec_dapm_routes[] = {
 	{ "Digital Right DAC", NULL, "DAC" },
 
 	/* DAC Mixer Routes */
-	{ "Left DAC Mixer", "LSlot 0", "Digital Left DAC"},
-	{ "Right DAC Mixer", "RSlot 0", "Digital Right DAC"},
+	{ "Left Digital DAC Mixer", "AIF1 Slot 0 Digital DAC Playback Switch",
+	  "Digital Left DAC"},
+	{ "Right Digital DAC Mixer", "AIF1 Slot 0 Digital DAC Playback Switch ",
+	  "Digital Right DAC"},
 };
 
 static struct snd_soc_dai_ops sun8i_codec_dai_ops = {
-- 
2.11.0

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

* [PATCH 2/4] ASoC: sun8i-codec: Update mixer to use SOC_DAPM_DOUBLE
@ 2017-02-10  9:41   ` Mylène Josserand
  0 siblings, 0 replies; 54+ messages in thread
From: Mylène Josserand @ 2017-02-10  9:41 UTC (permalink / raw)
  To: lgirdwood, broonie, robh+dt, mark.rutland, maxime.ripard, wens,
	perex, tiwai
  Cc: thomas.petazzoni, devicetree, alsa-devel, linux-kernel,
	alexandre.belloni, mylene.josserand, linux-arm-kernel

Update the driver to use the new SOC_DAPM_DOUBLE definition
on the digital DAC mixer.
Update the names accordingly as, when they are shared, the
controls are not prefixed with the widget's name anymore.

Signed-off-by: Mylène Josserand <mylene.josserand@free-electrons.com>
---
 sound/soc/sunxi/sun8i-codec.c | 45 ++++++++++++++++++++-----------------------
 1 file changed, 21 insertions(+), 24 deletions(-)

diff --git a/sound/soc/sunxi/sun8i-codec.c b/sound/soc/sunxi/sun8i-codec.c
index d60f6fbd36a2..107fa8213600 100644
--- a/sound/soc/sunxi/sun8i-codec.c
+++ b/sound/soc/sunxi/sun8i-codec.c
@@ -259,25 +259,20 @@ static int sun8i_codec_hw_params(struct snd_pcm_substream *substream,
 	return 0;
 }
 
-static const struct snd_kcontrol_new sun8i_output_left_mixer_controls[] = {
-	SOC_DAPM_SINGLE("LSlot 0", SUN8I_DAC_MXR_SRC,
-			SUN8I_DAC_MXR_SRC_DACL_MXR_SRC_AIF1DA0L, 1, 0),
-	SOC_DAPM_SINGLE("LSlot 1", SUN8I_DAC_MXR_SRC,
-			SUN8I_DAC_MXR_SRC_DACL_MXR_SRC_AIF1DA1L, 1, 0),
-	SOC_DAPM_SINGLE("DACL", SUN8I_DAC_MXR_SRC,
-			SUN8I_DAC_MXR_SRC_DACL_MXR_SRC_AIF2DACL, 1, 0),
-	SOC_DAPM_SINGLE("ADCL", SUN8I_DAC_MXR_SRC,
-			SUN8I_DAC_MXR_SRC_DACL_MXR_SRC_ADCL, 1, 0),
-};
-
-static const struct snd_kcontrol_new sun8i_output_right_mixer_controls[] = {
-	SOC_DAPM_SINGLE("RSlot 0", SUN8I_DAC_MXR_SRC,
+static const struct snd_kcontrol_new sun8i_dac_mixer_controls[] = {
+	SOC_DAPM_DOUBLE("AIF1 Slot 0 Digital DAC Playback Switch",
+			SUN8I_DAC_MXR_SRC,
+			SUN8I_DAC_MXR_SRC_DACL_MXR_SRC_AIF1DA0L,
 			SUN8I_DAC_MXR_SRC_DACR_MXR_SRC_AIF1DA0R, 1, 0),
-	SOC_DAPM_SINGLE("RSlot 1", SUN8I_DAC_MXR_SRC,
+	SOC_DAPM_DOUBLE("AIF1 Slot 1 Digital DAC Playback Switch",
+			SUN8I_DAC_MXR_SRC,
+			SUN8I_DAC_MXR_SRC_DACL_MXR_SRC_AIF1DA1L,
 			SUN8I_DAC_MXR_SRC_DACR_MXR_SRC_AIF1DA1R, 1, 0),
-	SOC_DAPM_SINGLE("DACR", SUN8I_DAC_MXR_SRC,
+	SOC_DAPM_DOUBLE("AIF2 Digital DAC Playback Switch", SUN8I_DAC_MXR_SRC,
+			SUN8I_DAC_MXR_SRC_DACL_MXR_SRC_AIF2DACL,
 			SUN8I_DAC_MXR_SRC_DACR_MXR_SRC_AIF2DACR, 1, 0),
-	SOC_DAPM_SINGLE("ADCR", SUN8I_DAC_MXR_SRC,
+	SOC_DAPM_DOUBLE("ADC Digital DAC Playback Switch", SUN8I_DAC_MXR_SRC,
+			SUN8I_DAC_MXR_SRC_DACL_MXR_SRC_ADCL,
 			SUN8I_DAC_MXR_SRC_DACR_MXR_SRC_ADCR, 1, 0),
 };
 
@@ -293,12 +288,12 @@ static const struct snd_soc_dapm_widget sun8i_codec_dapm_widgets[] = {
 			 SUN8I_AIF1_DACDAT_CTRL_AIF1_DA0R_ENA, 0),
 
 	/* DAC Mixers */
-	SND_SOC_DAPM_MIXER("Left DAC Mixer", SND_SOC_NOPM, 0, 0,
-			   sun8i_output_left_mixer_controls,
-			   ARRAY_SIZE(sun8i_output_left_mixer_controls)),
-	SND_SOC_DAPM_MIXER("Right DAC Mixer", SND_SOC_NOPM, 0, 0,
-			   sun8i_output_right_mixer_controls,
-			   ARRAY_SIZE(sun8i_output_right_mixer_controls)),
+	SND_SOC_DAPM_MIXER("Left Digital DAC Mixer", SND_SOC_NOPM, 0, 0,
+			   sun8i_dac_mixer_controls,
+			   ARRAY_SIZE(sun8i_dac_mixer_controls)),
+	SND_SOC_DAPM_MIXER("Right Digital DAC Mixer", SND_SOC_NOPM, 0, 0,
+			   sun8i_dac_mixer_controls,
+			   ARRAY_SIZE(sun8i_dac_mixer_controls)),
 
 	/* Clocks */
 	SND_SOC_DAPM_SUPPLY("MODCLK AFI1", SUN8I_MOD_CLK_ENA,
@@ -340,8 +335,10 @@ static const struct snd_soc_dapm_route sun8i_codec_dapm_routes[] = {
 	{ "Digital Right DAC", NULL, "DAC" },
 
 	/* DAC Mixer Routes */
-	{ "Left DAC Mixer", "LSlot 0", "Digital Left DAC"},
-	{ "Right DAC Mixer", "RSlot 0", "Digital Right DAC"},
+	{ "Left Digital DAC Mixer", "AIF1 Slot 0 Digital DAC Playback Switch",
+	  "Digital Left DAC"},
+	{ "Right Digital DAC Mixer", "AIF1 Slot 0 Digital DAC Playback Switch ",
+	  "Digital Right DAC"},
 };
 
 static struct snd_soc_dai_ops sun8i_codec_dai_ops = {
-- 
2.11.0

_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

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

* [PATCH 2/4] ASoC: sun8i-codec: Update mixer to use SOC_DAPM_DOUBLE
@ 2017-02-10  9:41   ` Mylène Josserand
  0 siblings, 0 replies; 54+ messages in thread
From: Mylène Josserand @ 2017-02-10  9:41 UTC (permalink / raw)
  To: linux-arm-kernel

Update the driver to use the new SOC_DAPM_DOUBLE definition
on the digital DAC mixer.
Update the names accordingly as, when they are shared, the
controls are not prefixed with the widget's name anymore.

Signed-off-by: Myl?ne Josserand <mylene.josserand@free-electrons.com>
---
 sound/soc/sunxi/sun8i-codec.c | 45 ++++++++++++++++++++-----------------------
 1 file changed, 21 insertions(+), 24 deletions(-)

diff --git a/sound/soc/sunxi/sun8i-codec.c b/sound/soc/sunxi/sun8i-codec.c
index d60f6fbd36a2..107fa8213600 100644
--- a/sound/soc/sunxi/sun8i-codec.c
+++ b/sound/soc/sunxi/sun8i-codec.c
@@ -259,25 +259,20 @@ static int sun8i_codec_hw_params(struct snd_pcm_substream *substream,
 	return 0;
 }
 
-static const struct snd_kcontrol_new sun8i_output_left_mixer_controls[] = {
-	SOC_DAPM_SINGLE("LSlot 0", SUN8I_DAC_MXR_SRC,
-			SUN8I_DAC_MXR_SRC_DACL_MXR_SRC_AIF1DA0L, 1, 0),
-	SOC_DAPM_SINGLE("LSlot 1", SUN8I_DAC_MXR_SRC,
-			SUN8I_DAC_MXR_SRC_DACL_MXR_SRC_AIF1DA1L, 1, 0),
-	SOC_DAPM_SINGLE("DACL", SUN8I_DAC_MXR_SRC,
-			SUN8I_DAC_MXR_SRC_DACL_MXR_SRC_AIF2DACL, 1, 0),
-	SOC_DAPM_SINGLE("ADCL", SUN8I_DAC_MXR_SRC,
-			SUN8I_DAC_MXR_SRC_DACL_MXR_SRC_ADCL, 1, 0),
-};
-
-static const struct snd_kcontrol_new sun8i_output_right_mixer_controls[] = {
-	SOC_DAPM_SINGLE("RSlot 0", SUN8I_DAC_MXR_SRC,
+static const struct snd_kcontrol_new sun8i_dac_mixer_controls[] = {
+	SOC_DAPM_DOUBLE("AIF1 Slot 0 Digital DAC Playback Switch",
+			SUN8I_DAC_MXR_SRC,
+			SUN8I_DAC_MXR_SRC_DACL_MXR_SRC_AIF1DA0L,
 			SUN8I_DAC_MXR_SRC_DACR_MXR_SRC_AIF1DA0R, 1, 0),
-	SOC_DAPM_SINGLE("RSlot 1", SUN8I_DAC_MXR_SRC,
+	SOC_DAPM_DOUBLE("AIF1 Slot 1 Digital DAC Playback Switch",
+			SUN8I_DAC_MXR_SRC,
+			SUN8I_DAC_MXR_SRC_DACL_MXR_SRC_AIF1DA1L,
 			SUN8I_DAC_MXR_SRC_DACR_MXR_SRC_AIF1DA1R, 1, 0),
-	SOC_DAPM_SINGLE("DACR", SUN8I_DAC_MXR_SRC,
+	SOC_DAPM_DOUBLE("AIF2 Digital DAC Playback Switch", SUN8I_DAC_MXR_SRC,
+			SUN8I_DAC_MXR_SRC_DACL_MXR_SRC_AIF2DACL,
 			SUN8I_DAC_MXR_SRC_DACR_MXR_SRC_AIF2DACR, 1, 0),
-	SOC_DAPM_SINGLE("ADCR", SUN8I_DAC_MXR_SRC,
+	SOC_DAPM_DOUBLE("ADC Digital DAC Playback Switch", SUN8I_DAC_MXR_SRC,
+			SUN8I_DAC_MXR_SRC_DACL_MXR_SRC_ADCL,
 			SUN8I_DAC_MXR_SRC_DACR_MXR_SRC_ADCR, 1, 0),
 };
 
@@ -293,12 +288,12 @@ static const struct snd_soc_dapm_widget sun8i_codec_dapm_widgets[] = {
 			 SUN8I_AIF1_DACDAT_CTRL_AIF1_DA0R_ENA, 0),
 
 	/* DAC Mixers */
-	SND_SOC_DAPM_MIXER("Left DAC Mixer", SND_SOC_NOPM, 0, 0,
-			   sun8i_output_left_mixer_controls,
-			   ARRAY_SIZE(sun8i_output_left_mixer_controls)),
-	SND_SOC_DAPM_MIXER("Right DAC Mixer", SND_SOC_NOPM, 0, 0,
-			   sun8i_output_right_mixer_controls,
-			   ARRAY_SIZE(sun8i_output_right_mixer_controls)),
+	SND_SOC_DAPM_MIXER("Left Digital DAC Mixer", SND_SOC_NOPM, 0, 0,
+			   sun8i_dac_mixer_controls,
+			   ARRAY_SIZE(sun8i_dac_mixer_controls)),
+	SND_SOC_DAPM_MIXER("Right Digital DAC Mixer", SND_SOC_NOPM, 0, 0,
+			   sun8i_dac_mixer_controls,
+			   ARRAY_SIZE(sun8i_dac_mixer_controls)),
 
 	/* Clocks */
 	SND_SOC_DAPM_SUPPLY("MODCLK AFI1", SUN8I_MOD_CLK_ENA,
@@ -340,8 +335,10 @@ static const struct snd_soc_dapm_route sun8i_codec_dapm_routes[] = {
 	{ "Digital Right DAC", NULL, "DAC" },
 
 	/* DAC Mixer Routes */
-	{ "Left DAC Mixer", "LSlot 0", "Digital Left DAC"},
-	{ "Right DAC Mixer", "RSlot 0", "Digital Right DAC"},
+	{ "Left Digital DAC Mixer", "AIF1 Slot 0 Digital DAC Playback Switch",
+	  "Digital Left DAC"},
+	{ "Right Digital DAC Mixer", "AIF1 Slot 0 Digital DAC Playback Switch ",
+	  "Digital Right DAC"},
 };
 
 static struct snd_soc_dai_ops sun8i_codec_dai_ops = {
-- 
2.11.0

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

* [PATCH 3/4] ASoC: sun8i-codec: Convert to SOC_MIXER_ARRAY
  2017-02-10  9:41 ` Mylène Josserand
  (?)
@ 2017-02-10  9:41   ` Mylène Josserand
  -1 siblings, 0 replies; 54+ messages in thread
From: Mylène Josserand @ 2017-02-10  9:41 UTC (permalink / raw)
  To: lgirdwood, broonie, robh+dt, mark.rutland, maxime.ripard, wens,
	perex, tiwai
  Cc: alsa-devel, devicetree, linux-kernel, linux-arm-kernel,
	thomas.petazzoni, mylene.josserand, alexandre.belloni

SOC_MIXER_ARRAY is a simplified function of SND_SOC_DAPM_MIXER
which handles automatically the ARRAY_SIZE of controls.

Update the driver to use SOC_MIXER_ARRAY.

Signed-off-by: Mylène Josserand <mylene.josserand@free-electrons.com>
---
 sound/soc/sunxi/sun8i-codec.c | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/sound/soc/sunxi/sun8i-codec.c b/sound/soc/sunxi/sun8i-codec.c
index 107fa8213600..a75a983974d9 100644
--- a/sound/soc/sunxi/sun8i-codec.c
+++ b/sound/soc/sunxi/sun8i-codec.c
@@ -288,12 +288,10 @@ static const struct snd_soc_dapm_widget sun8i_codec_dapm_widgets[] = {
 			 SUN8I_AIF1_DACDAT_CTRL_AIF1_DA0R_ENA, 0),
 
 	/* DAC Mixers */
-	SND_SOC_DAPM_MIXER("Left Digital DAC Mixer", SND_SOC_NOPM, 0, 0,
-			   sun8i_dac_mixer_controls,
-			   ARRAY_SIZE(sun8i_dac_mixer_controls)),
-	SND_SOC_DAPM_MIXER("Right Digital DAC Mixer", SND_SOC_NOPM, 0, 0,
-			   sun8i_dac_mixer_controls,
-			   ARRAY_SIZE(sun8i_dac_mixer_controls)),
+	SOC_MIXER_ARRAY("Left Digital DAC Mixer", SND_SOC_NOPM, 0, 0,
+			sun8i_dac_mixer_controls),
+	SOC_MIXER_ARRAY("Right Digital DAC Mixer", SND_SOC_NOPM, 0, 0,
+			sun8i_dac_mixer_controls),
 
 	/* Clocks */
 	SND_SOC_DAPM_SUPPLY("MODCLK AFI1", SUN8I_MOD_CLK_ENA,
-- 
2.11.0

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

* [PATCH 3/4] ASoC: sun8i-codec: Convert to SOC_MIXER_ARRAY
@ 2017-02-10  9:41   ` Mylène Josserand
  0 siblings, 0 replies; 54+ messages in thread
From: Mylène Josserand @ 2017-02-10  9:41 UTC (permalink / raw)
  To: lgirdwood, broonie, robh+dt, mark.rutland, maxime.ripard, wens,
	perex, tiwai
  Cc: thomas.petazzoni, devicetree, alsa-devel, linux-kernel,
	alexandre.belloni, mylene.josserand, linux-arm-kernel

SOC_MIXER_ARRAY is a simplified function of SND_SOC_DAPM_MIXER
which handles automatically the ARRAY_SIZE of controls.

Update the driver to use SOC_MIXER_ARRAY.

Signed-off-by: Mylène Josserand <mylene.josserand@free-electrons.com>
---
 sound/soc/sunxi/sun8i-codec.c | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/sound/soc/sunxi/sun8i-codec.c b/sound/soc/sunxi/sun8i-codec.c
index 107fa8213600..a75a983974d9 100644
--- a/sound/soc/sunxi/sun8i-codec.c
+++ b/sound/soc/sunxi/sun8i-codec.c
@@ -288,12 +288,10 @@ static const struct snd_soc_dapm_widget sun8i_codec_dapm_widgets[] = {
 			 SUN8I_AIF1_DACDAT_CTRL_AIF1_DA0R_ENA, 0),
 
 	/* DAC Mixers */
-	SND_SOC_DAPM_MIXER("Left Digital DAC Mixer", SND_SOC_NOPM, 0, 0,
-			   sun8i_dac_mixer_controls,
-			   ARRAY_SIZE(sun8i_dac_mixer_controls)),
-	SND_SOC_DAPM_MIXER("Right Digital DAC Mixer", SND_SOC_NOPM, 0, 0,
-			   sun8i_dac_mixer_controls,
-			   ARRAY_SIZE(sun8i_dac_mixer_controls)),
+	SOC_MIXER_ARRAY("Left Digital DAC Mixer", SND_SOC_NOPM, 0, 0,
+			sun8i_dac_mixer_controls),
+	SOC_MIXER_ARRAY("Right Digital DAC Mixer", SND_SOC_NOPM, 0, 0,
+			sun8i_dac_mixer_controls),
 
 	/* Clocks */
 	SND_SOC_DAPM_SUPPLY("MODCLK AFI1", SUN8I_MOD_CLK_ENA,
-- 
2.11.0


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH 3/4] ASoC: sun8i-codec: Convert to SOC_MIXER_ARRAY
@ 2017-02-10  9:41   ` Mylène Josserand
  0 siblings, 0 replies; 54+ messages in thread
From: Mylène Josserand @ 2017-02-10  9:41 UTC (permalink / raw)
  To: linux-arm-kernel

SOC_MIXER_ARRAY is a simplified function of SND_SOC_DAPM_MIXER
which handles automatically the ARRAY_SIZE of controls.

Update the driver to use SOC_MIXER_ARRAY.

Signed-off-by: Myl?ne Josserand <mylene.josserand@free-electrons.com>
---
 sound/soc/sunxi/sun8i-codec.c | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/sound/soc/sunxi/sun8i-codec.c b/sound/soc/sunxi/sun8i-codec.c
index 107fa8213600..a75a983974d9 100644
--- a/sound/soc/sunxi/sun8i-codec.c
+++ b/sound/soc/sunxi/sun8i-codec.c
@@ -288,12 +288,10 @@ static const struct snd_soc_dapm_widget sun8i_codec_dapm_widgets[] = {
 			 SUN8I_AIF1_DACDAT_CTRL_AIF1_DA0R_ENA, 0),
 
 	/* DAC Mixers */
-	SND_SOC_DAPM_MIXER("Left Digital DAC Mixer", SND_SOC_NOPM, 0, 0,
-			   sun8i_dac_mixer_controls,
-			   ARRAY_SIZE(sun8i_dac_mixer_controls)),
-	SND_SOC_DAPM_MIXER("Right Digital DAC Mixer", SND_SOC_NOPM, 0, 0,
-			   sun8i_dac_mixer_controls,
-			   ARRAY_SIZE(sun8i_dac_mixer_controls)),
+	SOC_MIXER_ARRAY("Left Digital DAC Mixer", SND_SOC_NOPM, 0, 0,
+			sun8i_dac_mixer_controls),
+	SOC_MIXER_ARRAY("Right Digital DAC Mixer", SND_SOC_NOPM, 0, 0,
+			sun8i_dac_mixer_controls),
 
 	/* Clocks */
 	SND_SOC_DAPM_SUPPLY("MODCLK AFI1", SUN8I_MOD_CLK_ENA,
-- 
2.11.0

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

* [PATCH 4/4] ASoC: sun8i-codec: Convert to use SND_SOC_DAPM_AIF_IN
  2017-02-10  9:41 ` Mylène Josserand
  (?)
@ 2017-02-10  9:41   ` Mylène Josserand
  -1 siblings, 0 replies; 54+ messages in thread
From: Mylène Josserand @ 2017-02-10  9:41 UTC (permalink / raw)
  To: lgirdwood, broonie, robh+dt, mark.rutland, maxime.ripard, wens,
	perex, tiwai
  Cc: alsa-devel, devicetree, linux-kernel, linux-arm-kernel,
	thomas.petazzoni, mylene.josserand, alexandre.belloni

Update the driver to use SND_SOC_DAPM_AIF_IN instead of
SND_SOC_DAPM_DAC.

Set the route names so it must be updated on the device tree too.

Signed-off-by: Mylène Josserand <mylene.josserand@free-electrons.com>
---
 arch/arm/boot/dts/sun8i-a33.dtsi |  4 ++--
 sound/soc/sunxi/sun8i-codec.c    | 20 +++++++++++---------
 2 files changed, 13 insertions(+), 11 deletions(-)

diff --git a/arch/arm/boot/dts/sun8i-a33.dtsi b/arch/arm/boot/dts/sun8i-a33.dtsi
index 4e34ec6613a0..e9e2e7312460 100644
--- a/arch/arm/boot/dts/sun8i-a33.dtsi
+++ b/arch/arm/boot/dts/sun8i-a33.dtsi
@@ -78,8 +78,8 @@
 		simple-audio-card,mclk-fs = <512>;
 		simple-audio-card,aux-devs = <&codec_analog>;
 		simple-audio-card,routing =
-			"Left DAC", "Digital Left DAC",
-			"Right DAC", "Digital Right DAC";
+			"Left DAC", "AIF1 Slot 0 Left",
+			"Right DAC", "AIF1 Slot 0 Right";
 		status = "disabled";
 
 		simple-audio-card,cpu {
diff --git a/sound/soc/sunxi/sun8i-codec.c b/sound/soc/sunxi/sun8i-codec.c
index a75a983974d9..9b15a5ee235f 100644
--- a/sound/soc/sunxi/sun8i-codec.c
+++ b/sound/soc/sunxi/sun8i-codec.c
@@ -281,11 +281,13 @@ static const struct snd_soc_dapm_widget sun8i_codec_dapm_widgets[] = {
 	SND_SOC_DAPM_SUPPLY("DAC", SUN8I_DAC_DIG_CTRL, SUN8I_DAC_DIG_CTRL_ENDA,
 			    0, NULL, 0),
 
-	/* Analog DAC */
-	SND_SOC_DAPM_DAC("Digital Left DAC", "Playback", SUN8I_AIF1_DACDAT_CTRL,
-			 SUN8I_AIF1_DACDAT_CTRL_AIF1_DA0L_ENA, 0),
-	SND_SOC_DAPM_DAC("Digital Right DAC", "Playback", SUN8I_AIF1_DACDAT_CTRL,
-			 SUN8I_AIF1_DACDAT_CTRL_AIF1_DA0R_ENA, 0),
+	/* Analog DAC AIF */
+	SND_SOC_DAPM_AIF_IN("AIF1 Slot 0 Left", "Playback", 0,
+			    SUN8I_AIF1_DACDAT_CTRL,
+			    SUN8I_AIF1_DACDAT_CTRL_AIF1_DA0L_ENA, 0),
+	SND_SOC_DAPM_AIF_IN("AIF1 Slot 0 Right", "Playback", 0,
+			    SUN8I_AIF1_DACDAT_CTRL,
+			    SUN8I_AIF1_DACDAT_CTRL_AIF1_DA0R_ENA, 0),
 
 	/* DAC Mixers */
 	SOC_MIXER_ARRAY("Left Digital DAC Mixer", SND_SOC_NOPM, 0, 0,
@@ -329,14 +331,14 @@ static const struct snd_soc_dapm_route sun8i_codec_dapm_routes[] = {
 	{ "DAC", NULL, "MODCLK DAC" },
 
 	/* DAC Routes */
-	{ "Digital Left DAC", NULL, "DAC" },
-	{ "Digital Right DAC", NULL, "DAC" },
+	{ "AIF1 Slot 0 Right", NULL, "DAC" },
+	{ "AIF1 Slot 0 Left", NULL, "DAC" },
 
 	/* DAC Mixer Routes */
 	{ "Left Digital DAC Mixer", "AIF1 Slot 0 Digital DAC Playback Switch",
-	  "Digital Left DAC"},
+	  "AIF1 Slot 0 Left"},
 	{ "Right Digital DAC Mixer", "AIF1 Slot 0 Digital DAC Playback Switch ",
-	  "Digital Right DAC"},
+	  "AIF1 Slot 0 Right"},
 };
 
 static struct snd_soc_dai_ops sun8i_codec_dai_ops = {
-- 
2.11.0

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

* [PATCH 4/4] ASoC: sun8i-codec: Convert to use SND_SOC_DAPM_AIF_IN
@ 2017-02-10  9:41   ` Mylène Josserand
  0 siblings, 0 replies; 54+ messages in thread
From: Mylène Josserand @ 2017-02-10  9:41 UTC (permalink / raw)
  To: lgirdwood, broonie, robh+dt, mark.rutland, maxime.ripard, wens,
	perex, tiwai
  Cc: thomas.petazzoni, devicetree, alsa-devel, linux-kernel,
	alexandre.belloni, mylene.josserand, linux-arm-kernel

Update the driver to use SND_SOC_DAPM_AIF_IN instead of
SND_SOC_DAPM_DAC.

Set the route names so it must be updated on the device tree too.

Signed-off-by: Mylène Josserand <mylene.josserand@free-electrons.com>
---
 arch/arm/boot/dts/sun8i-a33.dtsi |  4 ++--
 sound/soc/sunxi/sun8i-codec.c    | 20 +++++++++++---------
 2 files changed, 13 insertions(+), 11 deletions(-)

diff --git a/arch/arm/boot/dts/sun8i-a33.dtsi b/arch/arm/boot/dts/sun8i-a33.dtsi
index 4e34ec6613a0..e9e2e7312460 100644
--- a/arch/arm/boot/dts/sun8i-a33.dtsi
+++ b/arch/arm/boot/dts/sun8i-a33.dtsi
@@ -78,8 +78,8 @@
 		simple-audio-card,mclk-fs = <512>;
 		simple-audio-card,aux-devs = <&codec_analog>;
 		simple-audio-card,routing =
-			"Left DAC", "Digital Left DAC",
-			"Right DAC", "Digital Right DAC";
+			"Left DAC", "AIF1 Slot 0 Left",
+			"Right DAC", "AIF1 Slot 0 Right";
 		status = "disabled";
 
 		simple-audio-card,cpu {
diff --git a/sound/soc/sunxi/sun8i-codec.c b/sound/soc/sunxi/sun8i-codec.c
index a75a983974d9..9b15a5ee235f 100644
--- a/sound/soc/sunxi/sun8i-codec.c
+++ b/sound/soc/sunxi/sun8i-codec.c
@@ -281,11 +281,13 @@ static const struct snd_soc_dapm_widget sun8i_codec_dapm_widgets[] = {
 	SND_SOC_DAPM_SUPPLY("DAC", SUN8I_DAC_DIG_CTRL, SUN8I_DAC_DIG_CTRL_ENDA,
 			    0, NULL, 0),
 
-	/* Analog DAC */
-	SND_SOC_DAPM_DAC("Digital Left DAC", "Playback", SUN8I_AIF1_DACDAT_CTRL,
-			 SUN8I_AIF1_DACDAT_CTRL_AIF1_DA0L_ENA, 0),
-	SND_SOC_DAPM_DAC("Digital Right DAC", "Playback", SUN8I_AIF1_DACDAT_CTRL,
-			 SUN8I_AIF1_DACDAT_CTRL_AIF1_DA0R_ENA, 0),
+	/* Analog DAC AIF */
+	SND_SOC_DAPM_AIF_IN("AIF1 Slot 0 Left", "Playback", 0,
+			    SUN8I_AIF1_DACDAT_CTRL,
+			    SUN8I_AIF1_DACDAT_CTRL_AIF1_DA0L_ENA, 0),
+	SND_SOC_DAPM_AIF_IN("AIF1 Slot 0 Right", "Playback", 0,
+			    SUN8I_AIF1_DACDAT_CTRL,
+			    SUN8I_AIF1_DACDAT_CTRL_AIF1_DA0R_ENA, 0),
 
 	/* DAC Mixers */
 	SOC_MIXER_ARRAY("Left Digital DAC Mixer", SND_SOC_NOPM, 0, 0,
@@ -329,14 +331,14 @@ static const struct snd_soc_dapm_route sun8i_codec_dapm_routes[] = {
 	{ "DAC", NULL, "MODCLK DAC" },
 
 	/* DAC Routes */
-	{ "Digital Left DAC", NULL, "DAC" },
-	{ "Digital Right DAC", NULL, "DAC" },
+	{ "AIF1 Slot 0 Right", NULL, "DAC" },
+	{ "AIF1 Slot 0 Left", NULL, "DAC" },
 
 	/* DAC Mixer Routes */
 	{ "Left Digital DAC Mixer", "AIF1 Slot 0 Digital DAC Playback Switch",
-	  "Digital Left DAC"},
+	  "AIF1 Slot 0 Left"},
 	{ "Right Digital DAC Mixer", "AIF1 Slot 0 Digital DAC Playback Switch ",
-	  "Digital Right DAC"},
+	  "AIF1 Slot 0 Right"},
 };
 
 static struct snd_soc_dai_ops sun8i_codec_dai_ops = {
-- 
2.11.0

_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

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

* [PATCH 4/4] ASoC: sun8i-codec: Convert to use SND_SOC_DAPM_AIF_IN
@ 2017-02-10  9:41   ` Mylène Josserand
  0 siblings, 0 replies; 54+ messages in thread
From: Mylène Josserand @ 2017-02-10  9:41 UTC (permalink / raw)
  To: linux-arm-kernel

Update the driver to use SND_SOC_DAPM_AIF_IN instead of
SND_SOC_DAPM_DAC.

Set the route names so it must be updated on the device tree too.

Signed-off-by: Myl?ne Josserand <mylene.josserand@free-electrons.com>
---
 arch/arm/boot/dts/sun8i-a33.dtsi |  4 ++--
 sound/soc/sunxi/sun8i-codec.c    | 20 +++++++++++---------
 2 files changed, 13 insertions(+), 11 deletions(-)

diff --git a/arch/arm/boot/dts/sun8i-a33.dtsi b/arch/arm/boot/dts/sun8i-a33.dtsi
index 4e34ec6613a0..e9e2e7312460 100644
--- a/arch/arm/boot/dts/sun8i-a33.dtsi
+++ b/arch/arm/boot/dts/sun8i-a33.dtsi
@@ -78,8 +78,8 @@
 		simple-audio-card,mclk-fs = <512>;
 		simple-audio-card,aux-devs = <&codec_analog>;
 		simple-audio-card,routing =
-			"Left DAC", "Digital Left DAC",
-			"Right DAC", "Digital Right DAC";
+			"Left DAC", "AIF1 Slot 0 Left",
+			"Right DAC", "AIF1 Slot 0 Right";
 		status = "disabled";
 
 		simple-audio-card,cpu {
diff --git a/sound/soc/sunxi/sun8i-codec.c b/sound/soc/sunxi/sun8i-codec.c
index a75a983974d9..9b15a5ee235f 100644
--- a/sound/soc/sunxi/sun8i-codec.c
+++ b/sound/soc/sunxi/sun8i-codec.c
@@ -281,11 +281,13 @@ static const struct snd_soc_dapm_widget sun8i_codec_dapm_widgets[] = {
 	SND_SOC_DAPM_SUPPLY("DAC", SUN8I_DAC_DIG_CTRL, SUN8I_DAC_DIG_CTRL_ENDA,
 			    0, NULL, 0),
 
-	/* Analog DAC */
-	SND_SOC_DAPM_DAC("Digital Left DAC", "Playback", SUN8I_AIF1_DACDAT_CTRL,
-			 SUN8I_AIF1_DACDAT_CTRL_AIF1_DA0L_ENA, 0),
-	SND_SOC_DAPM_DAC("Digital Right DAC", "Playback", SUN8I_AIF1_DACDAT_CTRL,
-			 SUN8I_AIF1_DACDAT_CTRL_AIF1_DA0R_ENA, 0),
+	/* Analog DAC AIF */
+	SND_SOC_DAPM_AIF_IN("AIF1 Slot 0 Left", "Playback", 0,
+			    SUN8I_AIF1_DACDAT_CTRL,
+			    SUN8I_AIF1_DACDAT_CTRL_AIF1_DA0L_ENA, 0),
+	SND_SOC_DAPM_AIF_IN("AIF1 Slot 0 Right", "Playback", 0,
+			    SUN8I_AIF1_DACDAT_CTRL,
+			    SUN8I_AIF1_DACDAT_CTRL_AIF1_DA0R_ENA, 0),
 
 	/* DAC Mixers */
 	SOC_MIXER_ARRAY("Left Digital DAC Mixer", SND_SOC_NOPM, 0, 0,
@@ -329,14 +331,14 @@ static const struct snd_soc_dapm_route sun8i_codec_dapm_routes[] = {
 	{ "DAC", NULL, "MODCLK DAC" },
 
 	/* DAC Routes */
-	{ "Digital Left DAC", NULL, "DAC" },
-	{ "Digital Right DAC", NULL, "DAC" },
+	{ "AIF1 Slot 0 Right", NULL, "DAC" },
+	{ "AIF1 Slot 0 Left", NULL, "DAC" },
 
 	/* DAC Mixer Routes */
 	{ "Left Digital DAC Mixer", "AIF1 Slot 0 Digital DAC Playback Switch",
-	  "Digital Left DAC"},
+	  "AIF1 Slot 0 Left"},
 	{ "Right Digital DAC Mixer", "AIF1 Slot 0 Digital DAC Playback Switch ",
-	  "Digital Right DAC"},
+	  "AIF1 Slot 0 Right"},
 };
 
 static struct snd_soc_dai_ops sun8i_codec_dai_ops = {
-- 
2.11.0

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

* Re: [PATCH 1/4] ASoC: sun8i-codec: Remove analog "HP" widget
@ 2017-02-12  6:38     ` Chen-Yu Tsai
  0 siblings, 0 replies; 54+ messages in thread
From: Chen-Yu Tsai @ 2017-02-12  6:38 UTC (permalink / raw)
  To: Mylène Josserand
  Cc: Liam Girdwood, Mark Brown, Rob Herring, Mark Rutland,
	Maxime Ripard, Chen-Yu Tsai, Jaroslav Kysela, Takashi Iwai,
	Linux-ALSA, devicetree, linux-kernel, linux-arm-kernel,
	Thomas Petazzoni, Alexandre Belloni

On Fri, Feb 10, 2017 at 5:41 PM, Mylène Josserand
<mylene.josserand@free-electrons.com> wrote:
> The "HP" widget is already present and take part to
> the analog part (sun8i-codec-analog).
>
> Remove it from the digital part as it is unnecessary.
>
> Signed-off-by: Mylène Josserand <mylene.josserand@free-electrons.com>

Acked-by: Chen-Yu Tsai <wens@csie.org>

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

* Re: [PATCH 1/4] ASoC: sun8i-codec: Remove analog "HP" widget
@ 2017-02-12  6:38     ` Chen-Yu Tsai
  0 siblings, 0 replies; 54+ messages in thread
From: Chen-Yu Tsai @ 2017-02-12  6:38 UTC (permalink / raw)
  To: Mylène Josserand
  Cc: Liam Girdwood, Mark Brown, Rob Herring, Mark Rutland,
	Maxime Ripard, Chen-Yu Tsai, Jaroslav Kysela, Takashi Iwai,
	Linux-ALSA, devicetree, linux-kernel, linux-arm-kernel,
	Thomas Petazzoni, Alexandre Belloni

On Fri, Feb 10, 2017 at 5:41 PM, Mylène Josserand
<mylene.josserand-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org> wrote:
> The "HP" widget is already present and take part to
> the analog part (sun8i-codec-analog).
>
> Remove it from the digital part as it is unnecessary.
>
> Signed-off-by: Mylène Josserand <mylene.josserand-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>

Acked-by: Chen-Yu Tsai <wens-jdAy2FN1RRM@public.gmane.org>
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* [PATCH 1/4] ASoC: sun8i-codec: Remove analog "HP" widget
@ 2017-02-12  6:38     ` Chen-Yu Tsai
  0 siblings, 0 replies; 54+ messages in thread
From: Chen-Yu Tsai @ 2017-02-12  6:38 UTC (permalink / raw)
  To: linux-arm-kernel

On Fri, Feb 10, 2017 at 5:41 PM, Myl?ne Josserand
<mylene.josserand@free-electrons.com> wrote:
> The "HP" widget is already present and take part to
> the analog part (sun8i-codec-analog).
>
> Remove it from the digital part as it is unnecessary.
>
> Signed-off-by: Myl?ne Josserand <mylene.josserand@free-electrons.com>

Acked-by: Chen-Yu Tsai <wens@csie.org>

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

* Re: [PATCH 2/4] ASoC: sun8i-codec: Update mixer to use SOC_DAPM_DOUBLE
@ 2017-02-12  6:39     ` Chen-Yu Tsai
  0 siblings, 0 replies; 54+ messages in thread
From: Chen-Yu Tsai @ 2017-02-12  6:39 UTC (permalink / raw)
  To: Mylène Josserand
  Cc: Liam Girdwood, Mark Brown, Rob Herring, Mark Rutland,
	Maxime Ripard, Chen-Yu Tsai, Jaroslav Kysela, Takashi Iwai,
	Linux-ALSA, devicetree, linux-kernel, linux-arm-kernel,
	Thomas Petazzoni, Alexandre Belloni

On Fri, Feb 10, 2017 at 5:41 PM, Mylène Josserand
<mylene.josserand@free-electrons.com> wrote:
> Update the driver to use the new SOC_DAPM_DOUBLE definition
> on the digital DAC mixer.
> Update the names accordingly as, when they are shared, the
> controls are not prefixed with the widget's name anymore.
>
> Signed-off-by: Mylène Josserand <mylene.josserand@free-electrons.com>

Acked-by: Chen-Yu Tsai <wens@csie.org>

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

* Re: [PATCH 2/4] ASoC: sun8i-codec: Update mixer to use SOC_DAPM_DOUBLE
@ 2017-02-12  6:39     ` Chen-Yu Tsai
  0 siblings, 0 replies; 54+ messages in thread
From: Chen-Yu Tsai @ 2017-02-12  6:39 UTC (permalink / raw)
  To: Mylène Josserand
  Cc: Liam Girdwood, Mark Brown, Rob Herring, Mark Rutland,
	Maxime Ripard, Chen-Yu Tsai, Jaroslav Kysela, Takashi Iwai,
	Linux-ALSA, devicetree, linux-kernel, linux-arm-kernel,
	Thomas Petazzoni, Alexandre Belloni

On Fri, Feb 10, 2017 at 5:41 PM, Mylène Josserand
<mylene.josserand-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org> wrote:
> Update the driver to use the new SOC_DAPM_DOUBLE definition
> on the digital DAC mixer.
> Update the names accordingly as, when they are shared, the
> controls are not prefixed with the widget's name anymore.
>
> Signed-off-by: Mylène Josserand <mylene.josserand-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>

Acked-by: Chen-Yu Tsai <wens-jdAy2FN1RRM@public.gmane.org>
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* [PATCH 2/4] ASoC: sun8i-codec: Update mixer to use SOC_DAPM_DOUBLE
@ 2017-02-12  6:39     ` Chen-Yu Tsai
  0 siblings, 0 replies; 54+ messages in thread
From: Chen-Yu Tsai @ 2017-02-12  6:39 UTC (permalink / raw)
  To: linux-arm-kernel

On Fri, Feb 10, 2017 at 5:41 PM, Myl?ne Josserand
<mylene.josserand@free-electrons.com> wrote:
> Update the driver to use the new SOC_DAPM_DOUBLE definition
> on the digital DAC mixer.
> Update the names accordingly as, when they are shared, the
> controls are not prefixed with the widget's name anymore.
>
> Signed-off-by: Myl?ne Josserand <mylene.josserand@free-electrons.com>

Acked-by: Chen-Yu Tsai <wens@csie.org>

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

* Re: [PATCH 3/4] ASoC: sun8i-codec: Convert to SOC_MIXER_ARRAY
@ 2017-02-12  6:40     ` Chen-Yu Tsai
  0 siblings, 0 replies; 54+ messages in thread
From: Chen-Yu Tsai @ 2017-02-12  6:40 UTC (permalink / raw)
  To: Mylène Josserand
  Cc: Liam Girdwood, Mark Brown, Rob Herring, Mark Rutland,
	Maxime Ripard, Chen-Yu Tsai, Jaroslav Kysela, Takashi Iwai,
	Linux-ALSA, devicetree, linux-kernel, linux-arm-kernel,
	Thomas Petazzoni, Alexandre Belloni

On Fri, Feb 10, 2017 at 5:41 PM, Mylène Josserand
<mylene.josserand@free-electrons.com> wrote:
> SOC_MIXER_ARRAY is a simplified function of SND_SOC_DAPM_MIXER
> which handles automatically the ARRAY_SIZE of controls.
>
> Update the driver to use SOC_MIXER_ARRAY.
>
> Signed-off-by: Mylène Josserand <mylene.josserand@free-electrons.com>

Acked-by: Chen-Yu Tsai <wens@csie.org>

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

* Re: [PATCH 3/4] ASoC: sun8i-codec: Convert to SOC_MIXER_ARRAY
@ 2017-02-12  6:40     ` Chen-Yu Tsai
  0 siblings, 0 replies; 54+ messages in thread
From: Chen-Yu Tsai @ 2017-02-12  6:40 UTC (permalink / raw)
  To: Mylène Josserand
  Cc: Liam Girdwood, Mark Brown, Rob Herring, Mark Rutland,
	Maxime Ripard, Chen-Yu Tsai, Jaroslav Kysela, Takashi Iwai,
	Linux-ALSA, devicetree, linux-kernel, linux-arm-kernel,
	Thomas Petazzoni, Alexandre Belloni

On Fri, Feb 10, 2017 at 5:41 PM, Mylène Josserand
<mylene.josserand-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org> wrote:
> SOC_MIXER_ARRAY is a simplified function of SND_SOC_DAPM_MIXER
> which handles automatically the ARRAY_SIZE of controls.
>
> Update the driver to use SOC_MIXER_ARRAY.
>
> Signed-off-by: Mylène Josserand <mylene.josserand-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>

Acked-by: Chen-Yu Tsai <wens-jdAy2FN1RRM@public.gmane.org>
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* [PATCH 3/4] ASoC: sun8i-codec: Convert to SOC_MIXER_ARRAY
@ 2017-02-12  6:40     ` Chen-Yu Tsai
  0 siblings, 0 replies; 54+ messages in thread
From: Chen-Yu Tsai @ 2017-02-12  6:40 UTC (permalink / raw)
  To: linux-arm-kernel

On Fri, Feb 10, 2017 at 5:41 PM, Myl?ne Josserand
<mylene.josserand@free-electrons.com> wrote:
> SOC_MIXER_ARRAY is a simplified function of SND_SOC_DAPM_MIXER
> which handles automatically the ARRAY_SIZE of controls.
>
> Update the driver to use SOC_MIXER_ARRAY.
>
> Signed-off-by: Myl?ne Josserand <mylene.josserand@free-electrons.com>

Acked-by: Chen-Yu Tsai <wens@csie.org>

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

* Re: [PATCH 4/4] ASoC: sun8i-codec: Convert to use SND_SOC_DAPM_AIF_IN
  2017-02-10  9:41   ` Mylène Josserand
  (?)
@ 2017-03-06  9:56     ` Chen-Yu Tsai
  -1 siblings, 0 replies; 54+ messages in thread
From: Chen-Yu Tsai @ 2017-03-06  9:56 UTC (permalink / raw)
  To: Mylène Josserand, Maxime Ripard
  Cc: Liam Girdwood, Mark Brown, Rob Herring, Mark Rutland,
	Chen-Yu Tsai, Jaroslav Kysela, Takashi Iwai, Linux-ALSA,
	devicetree, linux-kernel, linux-arm-kernel, Thomas Petazzoni,
	Alexandre Belloni

On Fri, Feb 10, 2017 at 5:41 PM, Mylène Josserand
<mylene.josserand@free-electrons.com> wrote:
> Update the driver to use SND_SOC_DAPM_AIF_IN instead of
> SND_SOC_DAPM_DAC.
>
> Set the route names so it must be updated on the device tree too.
>
> Signed-off-by: Mylène Josserand <mylene.josserand@free-electrons.com>
> ---
>  arch/arm/boot/dts/sun8i-a33.dtsi |  4 ++--

This patch looks OK, but having the DTS changes in the same patch
probably isn't a good idea. I would really like to see this series
merged for 4.11, so we can expose a good mixer interface to userspace
during the first kernel release supporting the A33 codec. That likely
means some breakage between when the asoc bits and the dts bits land
though.

Maxime, any ideas?


Regards
ChenYu

>  sound/soc/sunxi/sun8i-codec.c    | 20 +++++++++++---------
>  2 files changed, 13 insertions(+), 11 deletions(-)
>
> diff --git a/arch/arm/boot/dts/sun8i-a33.dtsi b/arch/arm/boot/dts/sun8i-a33.dtsi
> index 4e34ec6613a0..e9e2e7312460 100644
> --- a/arch/arm/boot/dts/sun8i-a33.dtsi
> +++ b/arch/arm/boot/dts/sun8i-a33.dtsi
> @@ -78,8 +78,8 @@
>                 simple-audio-card,mclk-fs = <512>;
>                 simple-audio-card,aux-devs = <&codec_analog>;
>                 simple-audio-card,routing =
> -                       "Left DAC", "Digital Left DAC",
> -                       "Right DAC", "Digital Right DAC";
> +                       "Left DAC", "AIF1 Slot 0 Left",
> +                       "Right DAC", "AIF1 Slot 0 Right";
>                 status = "disabled";
>
>                 simple-audio-card,cpu {
> diff --git a/sound/soc/sunxi/sun8i-codec.c b/sound/soc/sunxi/sun8i-codec.c
> index a75a983974d9..9b15a5ee235f 100644
> --- a/sound/soc/sunxi/sun8i-codec.c
> +++ b/sound/soc/sunxi/sun8i-codec.c
> @@ -281,11 +281,13 @@ static const struct snd_soc_dapm_widget sun8i_codec_dapm_widgets[] = {
>         SND_SOC_DAPM_SUPPLY("DAC", SUN8I_DAC_DIG_CTRL, SUN8I_DAC_DIG_CTRL_ENDA,
>                             0, NULL, 0),
>
> -       /* Analog DAC */
> -       SND_SOC_DAPM_DAC("Digital Left DAC", "Playback", SUN8I_AIF1_DACDAT_CTRL,
> -                        SUN8I_AIF1_DACDAT_CTRL_AIF1_DA0L_ENA, 0),
> -       SND_SOC_DAPM_DAC("Digital Right DAC", "Playback", SUN8I_AIF1_DACDAT_CTRL,
> -                        SUN8I_AIF1_DACDAT_CTRL_AIF1_DA0R_ENA, 0),
> +       /* Analog DAC AIF */
> +       SND_SOC_DAPM_AIF_IN("AIF1 Slot 0 Left", "Playback", 0,
> +                           SUN8I_AIF1_DACDAT_CTRL,
> +                           SUN8I_AIF1_DACDAT_CTRL_AIF1_DA0L_ENA, 0),
> +       SND_SOC_DAPM_AIF_IN("AIF1 Slot 0 Right", "Playback", 0,
> +                           SUN8I_AIF1_DACDAT_CTRL,
> +                           SUN8I_AIF1_DACDAT_CTRL_AIF1_DA0R_ENA, 0),
>
>         /* DAC Mixers */
>         SOC_MIXER_ARRAY("Left Digital DAC Mixer", SND_SOC_NOPM, 0, 0,
> @@ -329,14 +331,14 @@ static const struct snd_soc_dapm_route sun8i_codec_dapm_routes[] = {
>         { "DAC", NULL, "MODCLK DAC" },
>
>         /* DAC Routes */
> -       { "Digital Left DAC", NULL, "DAC" },
> -       { "Digital Right DAC", NULL, "DAC" },
> +       { "AIF1 Slot 0 Right", NULL, "DAC" },
> +       { "AIF1 Slot 0 Left", NULL, "DAC" },
>
>         /* DAC Mixer Routes */
>         { "Left Digital DAC Mixer", "AIF1 Slot 0 Digital DAC Playback Switch",
> -         "Digital Left DAC"},
> +         "AIF1 Slot 0 Left"},
>         { "Right Digital DAC Mixer", "AIF1 Slot 0 Digital DAC Playback Switch ",
> -         "Digital Right DAC"},
> +         "AIF1 Slot 0 Right"},
>  };
>
>  static struct snd_soc_dai_ops sun8i_codec_dai_ops = {
> --
> 2.11.0
>

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

* Re: [PATCH 4/4] ASoC: sun8i-codec: Convert to use SND_SOC_DAPM_AIF_IN
@ 2017-03-06  9:56     ` Chen-Yu Tsai
  0 siblings, 0 replies; 54+ messages in thread
From: Chen-Yu Tsai @ 2017-03-06  9:56 UTC (permalink / raw)
  To: Mylène Josserand, Maxime Ripard
  Cc: Mark Rutland, devicetree, Linux-ALSA, linux-kernel, Takashi Iwai,
	Liam Girdwood, Rob Herring, Chen-Yu Tsai, Mark Brown,
	Alexandre Belloni, Thomas Petazzoni, linux-arm-kernel

On Fri, Feb 10, 2017 at 5:41 PM, Mylène Josserand
<mylene.josserand@free-electrons.com> wrote:
> Update the driver to use SND_SOC_DAPM_AIF_IN instead of
> SND_SOC_DAPM_DAC.
>
> Set the route names so it must be updated on the device tree too.
>
> Signed-off-by: Mylène Josserand <mylene.josserand@free-electrons.com>
> ---
>  arch/arm/boot/dts/sun8i-a33.dtsi |  4 ++--

This patch looks OK, but having the DTS changes in the same patch
probably isn't a good idea. I would really like to see this series
merged for 4.11, so we can expose a good mixer interface to userspace
during the first kernel release supporting the A33 codec. That likely
means some breakage between when the asoc bits and the dts bits land
though.

Maxime, any ideas?


Regards
ChenYu

>  sound/soc/sunxi/sun8i-codec.c    | 20 +++++++++++---------
>  2 files changed, 13 insertions(+), 11 deletions(-)
>
> diff --git a/arch/arm/boot/dts/sun8i-a33.dtsi b/arch/arm/boot/dts/sun8i-a33.dtsi
> index 4e34ec6613a0..e9e2e7312460 100644
> --- a/arch/arm/boot/dts/sun8i-a33.dtsi
> +++ b/arch/arm/boot/dts/sun8i-a33.dtsi
> @@ -78,8 +78,8 @@
>                 simple-audio-card,mclk-fs = <512>;
>                 simple-audio-card,aux-devs = <&codec_analog>;
>                 simple-audio-card,routing =
> -                       "Left DAC", "Digital Left DAC",
> -                       "Right DAC", "Digital Right DAC";
> +                       "Left DAC", "AIF1 Slot 0 Left",
> +                       "Right DAC", "AIF1 Slot 0 Right";
>                 status = "disabled";
>
>                 simple-audio-card,cpu {
> diff --git a/sound/soc/sunxi/sun8i-codec.c b/sound/soc/sunxi/sun8i-codec.c
> index a75a983974d9..9b15a5ee235f 100644
> --- a/sound/soc/sunxi/sun8i-codec.c
> +++ b/sound/soc/sunxi/sun8i-codec.c
> @@ -281,11 +281,13 @@ static const struct snd_soc_dapm_widget sun8i_codec_dapm_widgets[] = {
>         SND_SOC_DAPM_SUPPLY("DAC", SUN8I_DAC_DIG_CTRL, SUN8I_DAC_DIG_CTRL_ENDA,
>                             0, NULL, 0),
>
> -       /* Analog DAC */
> -       SND_SOC_DAPM_DAC("Digital Left DAC", "Playback", SUN8I_AIF1_DACDAT_CTRL,
> -                        SUN8I_AIF1_DACDAT_CTRL_AIF1_DA0L_ENA, 0),
> -       SND_SOC_DAPM_DAC("Digital Right DAC", "Playback", SUN8I_AIF1_DACDAT_CTRL,
> -                        SUN8I_AIF1_DACDAT_CTRL_AIF1_DA0R_ENA, 0),
> +       /* Analog DAC AIF */
> +       SND_SOC_DAPM_AIF_IN("AIF1 Slot 0 Left", "Playback", 0,
> +                           SUN8I_AIF1_DACDAT_CTRL,
> +                           SUN8I_AIF1_DACDAT_CTRL_AIF1_DA0L_ENA, 0),
> +       SND_SOC_DAPM_AIF_IN("AIF1 Slot 0 Right", "Playback", 0,
> +                           SUN8I_AIF1_DACDAT_CTRL,
> +                           SUN8I_AIF1_DACDAT_CTRL_AIF1_DA0R_ENA, 0),
>
>         /* DAC Mixers */
>         SOC_MIXER_ARRAY("Left Digital DAC Mixer", SND_SOC_NOPM, 0, 0,
> @@ -329,14 +331,14 @@ static const struct snd_soc_dapm_route sun8i_codec_dapm_routes[] = {
>         { "DAC", NULL, "MODCLK DAC" },
>
>         /* DAC Routes */
> -       { "Digital Left DAC", NULL, "DAC" },
> -       { "Digital Right DAC", NULL, "DAC" },
> +       { "AIF1 Slot 0 Right", NULL, "DAC" },
> +       { "AIF1 Slot 0 Left", NULL, "DAC" },
>
>         /* DAC Mixer Routes */
>         { "Left Digital DAC Mixer", "AIF1 Slot 0 Digital DAC Playback Switch",
> -         "Digital Left DAC"},
> +         "AIF1 Slot 0 Left"},
>         { "Right Digital DAC Mixer", "AIF1 Slot 0 Digital DAC Playback Switch ",
> -         "Digital Right DAC"},
> +         "AIF1 Slot 0 Right"},
>  };
>
>  static struct snd_soc_dai_ops sun8i_codec_dai_ops = {
> --
> 2.11.0
>
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

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

* [PATCH 4/4] ASoC: sun8i-codec: Convert to use SND_SOC_DAPM_AIF_IN
@ 2017-03-06  9:56     ` Chen-Yu Tsai
  0 siblings, 0 replies; 54+ messages in thread
From: Chen-Yu Tsai @ 2017-03-06  9:56 UTC (permalink / raw)
  To: linux-arm-kernel

On Fri, Feb 10, 2017 at 5:41 PM, Myl?ne Josserand
<mylene.josserand@free-electrons.com> wrote:
> Update the driver to use SND_SOC_DAPM_AIF_IN instead of
> SND_SOC_DAPM_DAC.
>
> Set the route names so it must be updated on the device tree too.
>
> Signed-off-by: Myl?ne Josserand <mylene.josserand@free-electrons.com>
> ---
>  arch/arm/boot/dts/sun8i-a33.dtsi |  4 ++--

This patch looks OK, but having the DTS changes in the same patch
probably isn't a good idea. I would really like to see this series
merged for 4.11, so we can expose a good mixer interface to userspace
during the first kernel release supporting the A33 codec. That likely
means some breakage between when the asoc bits and the dts bits land
though.

Maxime, any ideas?


Regards
ChenYu

>  sound/soc/sunxi/sun8i-codec.c    | 20 +++++++++++---------
>  2 files changed, 13 insertions(+), 11 deletions(-)
>
> diff --git a/arch/arm/boot/dts/sun8i-a33.dtsi b/arch/arm/boot/dts/sun8i-a33.dtsi
> index 4e34ec6613a0..e9e2e7312460 100644
> --- a/arch/arm/boot/dts/sun8i-a33.dtsi
> +++ b/arch/arm/boot/dts/sun8i-a33.dtsi
> @@ -78,8 +78,8 @@
>                 simple-audio-card,mclk-fs = <512>;
>                 simple-audio-card,aux-devs = <&codec_analog>;
>                 simple-audio-card,routing =
> -                       "Left DAC", "Digital Left DAC",
> -                       "Right DAC", "Digital Right DAC";
> +                       "Left DAC", "AIF1 Slot 0 Left",
> +                       "Right DAC", "AIF1 Slot 0 Right";
>                 status = "disabled";
>
>                 simple-audio-card,cpu {
> diff --git a/sound/soc/sunxi/sun8i-codec.c b/sound/soc/sunxi/sun8i-codec.c
> index a75a983974d9..9b15a5ee235f 100644
> --- a/sound/soc/sunxi/sun8i-codec.c
> +++ b/sound/soc/sunxi/sun8i-codec.c
> @@ -281,11 +281,13 @@ static const struct snd_soc_dapm_widget sun8i_codec_dapm_widgets[] = {
>         SND_SOC_DAPM_SUPPLY("DAC", SUN8I_DAC_DIG_CTRL, SUN8I_DAC_DIG_CTRL_ENDA,
>                             0, NULL, 0),
>
> -       /* Analog DAC */
> -       SND_SOC_DAPM_DAC("Digital Left DAC", "Playback", SUN8I_AIF1_DACDAT_CTRL,
> -                        SUN8I_AIF1_DACDAT_CTRL_AIF1_DA0L_ENA, 0),
> -       SND_SOC_DAPM_DAC("Digital Right DAC", "Playback", SUN8I_AIF1_DACDAT_CTRL,
> -                        SUN8I_AIF1_DACDAT_CTRL_AIF1_DA0R_ENA, 0),
> +       /* Analog DAC AIF */
> +       SND_SOC_DAPM_AIF_IN("AIF1 Slot 0 Left", "Playback", 0,
> +                           SUN8I_AIF1_DACDAT_CTRL,
> +                           SUN8I_AIF1_DACDAT_CTRL_AIF1_DA0L_ENA, 0),
> +       SND_SOC_DAPM_AIF_IN("AIF1 Slot 0 Right", "Playback", 0,
> +                           SUN8I_AIF1_DACDAT_CTRL,
> +                           SUN8I_AIF1_DACDAT_CTRL_AIF1_DA0R_ENA, 0),
>
>         /* DAC Mixers */
>         SOC_MIXER_ARRAY("Left Digital DAC Mixer", SND_SOC_NOPM, 0, 0,
> @@ -329,14 +331,14 @@ static const struct snd_soc_dapm_route sun8i_codec_dapm_routes[] = {
>         { "DAC", NULL, "MODCLK DAC" },
>
>         /* DAC Routes */
> -       { "Digital Left DAC", NULL, "DAC" },
> -       { "Digital Right DAC", NULL, "DAC" },
> +       { "AIF1 Slot 0 Right", NULL, "DAC" },
> +       { "AIF1 Slot 0 Left", NULL, "DAC" },
>
>         /* DAC Mixer Routes */
>         { "Left Digital DAC Mixer", "AIF1 Slot 0 Digital DAC Playback Switch",
> -         "Digital Left DAC"},
> +         "AIF1 Slot 0 Left"},
>         { "Right Digital DAC Mixer", "AIF1 Slot 0 Digital DAC Playback Switch ",
> -         "Digital Right DAC"},
> +         "AIF1 Slot 0 Right"},
>  };
>
>  static struct snd_soc_dai_ops sun8i_codec_dai_ops = {
> --
> 2.11.0
>

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

* Applied "ASoC: sun8i-codec: Convert to SOC_MIXER_ARRAY" to the asoc tree
  2017-02-10  9:41   ` Mylène Josserand
@ 2017-03-08 13:22     ` Mark Brown
  -1 siblings, 0 replies; 54+ messages in thread
From: Mark Brown @ 2017-03-08 13:22 UTC (permalink / raw)
  Cc: mark.rutland, thomas.petazzoni, alsa-devel, devicetree,
	linux-kernel, tiwai, lgirdwood, robh+dt, perex, wens, broonie,
	alexandre.belloni, maxime.ripard, mylene.josserand,
	linux-arm-kernel

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

The patch

   ASoC: sun8i-codec: Convert to SOC_MIXER_ARRAY

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 fa22ca4f905d7001ed966bc95bcffb890a1b8d73 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Myl=C3=A8ne=20Josserand?=
 <mylene.josserand@free-electrons.com>
Date: Fri, 10 Feb 2017 10:41:32 +0100
Subject: [PATCH] ASoC: sun8i-codec: Convert to SOC_MIXER_ARRAY
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

SOC_MIXER_ARRAY is a simplified function of SND_SOC_DAPM_MIXER
which handles automatically the ARRAY_SIZE of controls.

Update the driver to use SOC_MIXER_ARRAY.

Signed-off-by: Mylène Josserand <mylene.josserand@free-electrons.com>
Acked-by: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
 sound/soc/sunxi/sun8i-codec.c | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/sound/soc/sunxi/sun8i-codec.c b/sound/soc/sunxi/sun8i-codec.c
index 107fa8213600..a75a983974d9 100644
--- a/sound/soc/sunxi/sun8i-codec.c
+++ b/sound/soc/sunxi/sun8i-codec.c
@@ -288,12 +288,10 @@ static const struct snd_soc_dapm_widget sun8i_codec_dapm_widgets[] = {
 			 SUN8I_AIF1_DACDAT_CTRL_AIF1_DA0R_ENA, 0),
 
 	/* DAC Mixers */
-	SND_SOC_DAPM_MIXER("Left Digital DAC Mixer", SND_SOC_NOPM, 0, 0,
-			   sun8i_dac_mixer_controls,
-			   ARRAY_SIZE(sun8i_dac_mixer_controls)),
-	SND_SOC_DAPM_MIXER("Right Digital DAC Mixer", SND_SOC_NOPM, 0, 0,
-			   sun8i_dac_mixer_controls,
-			   ARRAY_SIZE(sun8i_dac_mixer_controls)),
+	SOC_MIXER_ARRAY("Left Digital DAC Mixer", SND_SOC_NOPM, 0, 0,
+			sun8i_dac_mixer_controls),
+	SOC_MIXER_ARRAY("Right Digital DAC Mixer", SND_SOC_NOPM, 0, 0,
+			sun8i_dac_mixer_controls),
 
 	/* Clocks */
 	SND_SOC_DAPM_SUPPLY("MODCLK AFI1", SUN8I_MOD_CLK_ENA,
-- 
2.11.0



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

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Applied "ASoC: sun8i-codec: Convert to SOC_MIXER_ARRAY" to the asoc tree
@ 2017-03-08 13:22     ` Mark Brown
  0 siblings, 0 replies; 54+ messages in thread
From: Mark Brown @ 2017-03-08 13:22 UTC (permalink / raw)
  To: linux-arm-kernel

The patch

   ASoC: sun8i-codec: Convert to SOC_MIXER_ARRAY

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 fa22ca4f905d7001ed966bc95bcffb890a1b8d73 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Myl=C3=A8ne=20Josserand?=
 <mylene.josserand@free-electrons.com>
Date: Fri, 10 Feb 2017 10:41:32 +0100
Subject: [PATCH] ASoC: sun8i-codec: Convert to SOC_MIXER_ARRAY
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

SOC_MIXER_ARRAY is a simplified function of SND_SOC_DAPM_MIXER
which handles automatically the ARRAY_SIZE of controls.

Update the driver to use SOC_MIXER_ARRAY.

Signed-off-by: Myl??ne Josserand <mylene.josserand@free-electrons.com>
Acked-by: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
 sound/soc/sunxi/sun8i-codec.c | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/sound/soc/sunxi/sun8i-codec.c b/sound/soc/sunxi/sun8i-codec.c
index 107fa8213600..a75a983974d9 100644
--- a/sound/soc/sunxi/sun8i-codec.c
+++ b/sound/soc/sunxi/sun8i-codec.c
@@ -288,12 +288,10 @@ static const struct snd_soc_dapm_widget sun8i_codec_dapm_widgets[] = {
 			 SUN8I_AIF1_DACDAT_CTRL_AIF1_DA0R_ENA, 0),
 
 	/* DAC Mixers */
-	SND_SOC_DAPM_MIXER("Left Digital DAC Mixer", SND_SOC_NOPM, 0, 0,
-			   sun8i_dac_mixer_controls,
-			   ARRAY_SIZE(sun8i_dac_mixer_controls)),
-	SND_SOC_DAPM_MIXER("Right Digital DAC Mixer", SND_SOC_NOPM, 0, 0,
-			   sun8i_dac_mixer_controls,
-			   ARRAY_SIZE(sun8i_dac_mixer_controls)),
+	SOC_MIXER_ARRAY("Left Digital DAC Mixer", SND_SOC_NOPM, 0, 0,
+			sun8i_dac_mixer_controls),
+	SOC_MIXER_ARRAY("Right Digital DAC Mixer", SND_SOC_NOPM, 0, 0,
+			sun8i_dac_mixer_controls),
 
 	/* Clocks */
 	SND_SOC_DAPM_SUPPLY("MODCLK AFI1", SUN8I_MOD_CLK_ENA,
-- 
2.11.0

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

* Applied "ASoC: sun8i-codec: Update mixer to use SOC_DAPM_DOUBLE" to the asoc tree
  2017-02-10  9:41   ` Mylène Josserand
@ 2017-03-08 13:22     ` Mark Brown
  -1 siblings, 0 replies; 54+ messages in thread
From: Mark Brown @ 2017-03-08 13:22 UTC (permalink / raw)
  Cc: mark.rutland, thomas.petazzoni, alsa-devel, devicetree,
	linux-kernel, tiwai, lgirdwood, robh+dt, perex, wens, broonie,
	alexandre.belloni, maxime.ripard, mylene.josserand,
	linux-arm-kernel

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

The patch

   ASoC: sun8i-codec: Update mixer to use SOC_DAPM_DOUBLE

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 ca14da6e611674cad275f29ac2aaf1e2eb427c6b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Myl=C3=A8ne=20Josserand?=
 <mylene.josserand@free-electrons.com>
Date: Fri, 10 Feb 2017 10:41:31 +0100
Subject: [PATCH] ASoC: sun8i-codec: Update mixer to use SOC_DAPM_DOUBLE
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Update the driver to use the new SOC_DAPM_DOUBLE definition
on the digital DAC mixer.
Update the names accordingly as, when they are shared, the
controls are not prefixed with the widget's name anymore.

Signed-off-by: Mylène Josserand <mylene.josserand@free-electrons.com>
Acked-by: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
 sound/soc/sunxi/sun8i-codec.c | 45 ++++++++++++++++++++-----------------------
 1 file changed, 21 insertions(+), 24 deletions(-)

diff --git a/sound/soc/sunxi/sun8i-codec.c b/sound/soc/sunxi/sun8i-codec.c
index d60f6fbd36a2..107fa8213600 100644
--- a/sound/soc/sunxi/sun8i-codec.c
+++ b/sound/soc/sunxi/sun8i-codec.c
@@ -259,25 +259,20 @@ static int sun8i_codec_hw_params(struct snd_pcm_substream *substream,
 	return 0;
 }
 
-static const struct snd_kcontrol_new sun8i_output_left_mixer_controls[] = {
-	SOC_DAPM_SINGLE("LSlot 0", SUN8I_DAC_MXR_SRC,
-			SUN8I_DAC_MXR_SRC_DACL_MXR_SRC_AIF1DA0L, 1, 0),
-	SOC_DAPM_SINGLE("LSlot 1", SUN8I_DAC_MXR_SRC,
-			SUN8I_DAC_MXR_SRC_DACL_MXR_SRC_AIF1DA1L, 1, 0),
-	SOC_DAPM_SINGLE("DACL", SUN8I_DAC_MXR_SRC,
-			SUN8I_DAC_MXR_SRC_DACL_MXR_SRC_AIF2DACL, 1, 0),
-	SOC_DAPM_SINGLE("ADCL", SUN8I_DAC_MXR_SRC,
-			SUN8I_DAC_MXR_SRC_DACL_MXR_SRC_ADCL, 1, 0),
-};
-
-static const struct snd_kcontrol_new sun8i_output_right_mixer_controls[] = {
-	SOC_DAPM_SINGLE("RSlot 0", SUN8I_DAC_MXR_SRC,
+static const struct snd_kcontrol_new sun8i_dac_mixer_controls[] = {
+	SOC_DAPM_DOUBLE("AIF1 Slot 0 Digital DAC Playback Switch",
+			SUN8I_DAC_MXR_SRC,
+			SUN8I_DAC_MXR_SRC_DACL_MXR_SRC_AIF1DA0L,
 			SUN8I_DAC_MXR_SRC_DACR_MXR_SRC_AIF1DA0R, 1, 0),
-	SOC_DAPM_SINGLE("RSlot 1", SUN8I_DAC_MXR_SRC,
+	SOC_DAPM_DOUBLE("AIF1 Slot 1 Digital DAC Playback Switch",
+			SUN8I_DAC_MXR_SRC,
+			SUN8I_DAC_MXR_SRC_DACL_MXR_SRC_AIF1DA1L,
 			SUN8I_DAC_MXR_SRC_DACR_MXR_SRC_AIF1DA1R, 1, 0),
-	SOC_DAPM_SINGLE("DACR", SUN8I_DAC_MXR_SRC,
+	SOC_DAPM_DOUBLE("AIF2 Digital DAC Playback Switch", SUN8I_DAC_MXR_SRC,
+			SUN8I_DAC_MXR_SRC_DACL_MXR_SRC_AIF2DACL,
 			SUN8I_DAC_MXR_SRC_DACR_MXR_SRC_AIF2DACR, 1, 0),
-	SOC_DAPM_SINGLE("ADCR", SUN8I_DAC_MXR_SRC,
+	SOC_DAPM_DOUBLE("ADC Digital DAC Playback Switch", SUN8I_DAC_MXR_SRC,
+			SUN8I_DAC_MXR_SRC_DACL_MXR_SRC_ADCL,
 			SUN8I_DAC_MXR_SRC_DACR_MXR_SRC_ADCR, 1, 0),
 };
 
@@ -293,12 +288,12 @@ static const struct snd_soc_dapm_widget sun8i_codec_dapm_widgets[] = {
 			 SUN8I_AIF1_DACDAT_CTRL_AIF1_DA0R_ENA, 0),
 
 	/* DAC Mixers */
-	SND_SOC_DAPM_MIXER("Left DAC Mixer", SND_SOC_NOPM, 0, 0,
-			   sun8i_output_left_mixer_controls,
-			   ARRAY_SIZE(sun8i_output_left_mixer_controls)),
-	SND_SOC_DAPM_MIXER("Right DAC Mixer", SND_SOC_NOPM, 0, 0,
-			   sun8i_output_right_mixer_controls,
-			   ARRAY_SIZE(sun8i_output_right_mixer_controls)),
+	SND_SOC_DAPM_MIXER("Left Digital DAC Mixer", SND_SOC_NOPM, 0, 0,
+			   sun8i_dac_mixer_controls,
+			   ARRAY_SIZE(sun8i_dac_mixer_controls)),
+	SND_SOC_DAPM_MIXER("Right Digital DAC Mixer", SND_SOC_NOPM, 0, 0,
+			   sun8i_dac_mixer_controls,
+			   ARRAY_SIZE(sun8i_dac_mixer_controls)),
 
 	/* Clocks */
 	SND_SOC_DAPM_SUPPLY("MODCLK AFI1", SUN8I_MOD_CLK_ENA,
@@ -340,8 +335,10 @@ static const struct snd_soc_dapm_route sun8i_codec_dapm_routes[] = {
 	{ "Digital Right DAC", NULL, "DAC" },
 
 	/* DAC Mixer Routes */
-	{ "Left DAC Mixer", "LSlot 0", "Digital Left DAC"},
-	{ "Right DAC Mixer", "RSlot 0", "Digital Right DAC"},
+	{ "Left Digital DAC Mixer", "AIF1 Slot 0 Digital DAC Playback Switch",
+	  "Digital Left DAC"},
+	{ "Right Digital DAC Mixer", "AIF1 Slot 0 Digital DAC Playback Switch ",
+	  "Digital Right DAC"},
 };
 
 static struct snd_soc_dai_ops sun8i_codec_dai_ops = {
-- 
2.11.0



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

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Applied "ASoC: sun8i-codec: Update mixer to use SOC_DAPM_DOUBLE" to the asoc tree
@ 2017-03-08 13:22     ` Mark Brown
  0 siblings, 0 replies; 54+ messages in thread
From: Mark Brown @ 2017-03-08 13:22 UTC (permalink / raw)
  To: linux-arm-kernel

The patch

   ASoC: sun8i-codec: Update mixer to use SOC_DAPM_DOUBLE

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 ca14da6e611674cad275f29ac2aaf1e2eb427c6b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Myl=C3=A8ne=20Josserand?=
 <mylene.josserand@free-electrons.com>
Date: Fri, 10 Feb 2017 10:41:31 +0100
Subject: [PATCH] ASoC: sun8i-codec: Update mixer to use SOC_DAPM_DOUBLE
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Update the driver to use the new SOC_DAPM_DOUBLE definition
on the digital DAC mixer.
Update the names accordingly as, when they are shared, the
controls are not prefixed with the widget's name anymore.

Signed-off-by: Myl??ne Josserand <mylene.josserand@free-electrons.com>
Acked-by: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
 sound/soc/sunxi/sun8i-codec.c | 45 ++++++++++++++++++++-----------------------
 1 file changed, 21 insertions(+), 24 deletions(-)

diff --git a/sound/soc/sunxi/sun8i-codec.c b/sound/soc/sunxi/sun8i-codec.c
index d60f6fbd36a2..107fa8213600 100644
--- a/sound/soc/sunxi/sun8i-codec.c
+++ b/sound/soc/sunxi/sun8i-codec.c
@@ -259,25 +259,20 @@ static int sun8i_codec_hw_params(struct snd_pcm_substream *substream,
 	return 0;
 }
 
-static const struct snd_kcontrol_new sun8i_output_left_mixer_controls[] = {
-	SOC_DAPM_SINGLE("LSlot 0", SUN8I_DAC_MXR_SRC,
-			SUN8I_DAC_MXR_SRC_DACL_MXR_SRC_AIF1DA0L, 1, 0),
-	SOC_DAPM_SINGLE("LSlot 1", SUN8I_DAC_MXR_SRC,
-			SUN8I_DAC_MXR_SRC_DACL_MXR_SRC_AIF1DA1L, 1, 0),
-	SOC_DAPM_SINGLE("DACL", SUN8I_DAC_MXR_SRC,
-			SUN8I_DAC_MXR_SRC_DACL_MXR_SRC_AIF2DACL, 1, 0),
-	SOC_DAPM_SINGLE("ADCL", SUN8I_DAC_MXR_SRC,
-			SUN8I_DAC_MXR_SRC_DACL_MXR_SRC_ADCL, 1, 0),
-};
-
-static const struct snd_kcontrol_new sun8i_output_right_mixer_controls[] = {
-	SOC_DAPM_SINGLE("RSlot 0", SUN8I_DAC_MXR_SRC,
+static const struct snd_kcontrol_new sun8i_dac_mixer_controls[] = {
+	SOC_DAPM_DOUBLE("AIF1 Slot 0 Digital DAC Playback Switch",
+			SUN8I_DAC_MXR_SRC,
+			SUN8I_DAC_MXR_SRC_DACL_MXR_SRC_AIF1DA0L,
 			SUN8I_DAC_MXR_SRC_DACR_MXR_SRC_AIF1DA0R, 1, 0),
-	SOC_DAPM_SINGLE("RSlot 1", SUN8I_DAC_MXR_SRC,
+	SOC_DAPM_DOUBLE("AIF1 Slot 1 Digital DAC Playback Switch",
+			SUN8I_DAC_MXR_SRC,
+			SUN8I_DAC_MXR_SRC_DACL_MXR_SRC_AIF1DA1L,
 			SUN8I_DAC_MXR_SRC_DACR_MXR_SRC_AIF1DA1R, 1, 0),
-	SOC_DAPM_SINGLE("DACR", SUN8I_DAC_MXR_SRC,
+	SOC_DAPM_DOUBLE("AIF2 Digital DAC Playback Switch", SUN8I_DAC_MXR_SRC,
+			SUN8I_DAC_MXR_SRC_DACL_MXR_SRC_AIF2DACL,
 			SUN8I_DAC_MXR_SRC_DACR_MXR_SRC_AIF2DACR, 1, 0),
-	SOC_DAPM_SINGLE("ADCR", SUN8I_DAC_MXR_SRC,
+	SOC_DAPM_DOUBLE("ADC Digital DAC Playback Switch", SUN8I_DAC_MXR_SRC,
+			SUN8I_DAC_MXR_SRC_DACL_MXR_SRC_ADCL,
 			SUN8I_DAC_MXR_SRC_DACR_MXR_SRC_ADCR, 1, 0),
 };
 
@@ -293,12 +288,12 @@ static const struct snd_soc_dapm_widget sun8i_codec_dapm_widgets[] = {
 			 SUN8I_AIF1_DACDAT_CTRL_AIF1_DA0R_ENA, 0),
 
 	/* DAC Mixers */
-	SND_SOC_DAPM_MIXER("Left DAC Mixer", SND_SOC_NOPM, 0, 0,
-			   sun8i_output_left_mixer_controls,
-			   ARRAY_SIZE(sun8i_output_left_mixer_controls)),
-	SND_SOC_DAPM_MIXER("Right DAC Mixer", SND_SOC_NOPM, 0, 0,
-			   sun8i_output_right_mixer_controls,
-			   ARRAY_SIZE(sun8i_output_right_mixer_controls)),
+	SND_SOC_DAPM_MIXER("Left Digital DAC Mixer", SND_SOC_NOPM, 0, 0,
+			   sun8i_dac_mixer_controls,
+			   ARRAY_SIZE(sun8i_dac_mixer_controls)),
+	SND_SOC_DAPM_MIXER("Right Digital DAC Mixer", SND_SOC_NOPM, 0, 0,
+			   sun8i_dac_mixer_controls,
+			   ARRAY_SIZE(sun8i_dac_mixer_controls)),
 
 	/* Clocks */
 	SND_SOC_DAPM_SUPPLY("MODCLK AFI1", SUN8I_MOD_CLK_ENA,
@@ -340,8 +335,10 @@ static const struct snd_soc_dapm_route sun8i_codec_dapm_routes[] = {
 	{ "Digital Right DAC", NULL, "DAC" },
 
 	/* DAC Mixer Routes */
-	{ "Left DAC Mixer", "LSlot 0", "Digital Left DAC"},
-	{ "Right DAC Mixer", "RSlot 0", "Digital Right DAC"},
+	{ "Left Digital DAC Mixer", "AIF1 Slot 0 Digital DAC Playback Switch",
+	  "Digital Left DAC"},
+	{ "Right Digital DAC Mixer", "AIF1 Slot 0 Digital DAC Playback Switch ",
+	  "Digital Right DAC"},
 };
 
 static struct snd_soc_dai_ops sun8i_codec_dai_ops = {
-- 
2.11.0

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

* Applied "ASoC: sun8i-codec: Remove analog "HP" widget" to the asoc tree
  2017-02-10  9:41   ` Mylène Josserand
@ 2017-03-08 13:22     ` Mark Brown
  -1 siblings, 0 replies; 54+ messages in thread
From: Mark Brown @ 2017-03-08 13:22 UTC (permalink / raw)
  Cc: mark.rutland, thomas.petazzoni, alsa-devel, devicetree,
	linux-kernel, tiwai, lgirdwood, robh+dt, perex, wens, broonie,
	alexandre.belloni, maxime.ripard, mylene.josserand,
	linux-arm-kernel

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

The patch

   ASoC: sun8i-codec: Remove analog "HP" widget

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 4aa8146c89f336230de7f449805bd0edfc878fd4 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Myl=C3=A8ne=20Josserand?=
 <mylene.josserand@free-electrons.com>
Date: Fri, 10 Feb 2017 10:41:30 +0100
Subject: [PATCH] ASoC: sun8i-codec: Remove analog "HP" widget
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

The "HP" widget is already present and take part to
the analog part (sun8i-codec-analog).

Remove it from the digital part as it is unnecessary.

Signed-off-by: Mylène Josserand <mylene.josserand@free-electrons.com>
Acked-by: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
 sound/soc/sunxi/sun8i-codec.c | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/sound/soc/sunxi/sun8i-codec.c b/sound/soc/sunxi/sun8i-codec.c
index b92bdc8361af..d60f6fbd36a2 100644
--- a/sound/soc/sunxi/sun8i-codec.c
+++ b/sound/soc/sunxi/sun8i-codec.c
@@ -321,8 +321,6 @@ static const struct snd_soc_dapm_widget sun8i_codec_dapm_widgets[] = {
 			    SUN8I_MOD_RST_CTL_AIF1, 0, NULL, 0),
 	SND_SOC_DAPM_SUPPLY("RST DAC", SUN8I_MOD_RST_CTL,
 			    SUN8I_MOD_RST_CTL_DAC, 0, NULL, 0),
-
-	SND_SOC_DAPM_OUTPUT("HP"),
 };
 
 static const struct snd_soc_dapm_route sun8i_codec_dapm_routes[] = {
@@ -344,10 +342,6 @@ static const struct snd_soc_dapm_route sun8i_codec_dapm_routes[] = {
 	/* DAC Mixer Routes */
 	{ "Left DAC Mixer", "LSlot 0", "Digital Left DAC"},
 	{ "Right DAC Mixer", "RSlot 0", "Digital Right DAC"},
-
-	/* End of route : HP out */
-	{ "HP", NULL, "Left DAC Mixer" },
-	{ "HP", NULL, "Right DAC Mixer" },
 };
 
 static struct snd_soc_dai_ops sun8i_codec_dai_ops = {
-- 
2.11.0



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

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Applied "ASoC: sun8i-codec: Remove analog "HP" widget" to the asoc tree
@ 2017-03-08 13:22     ` Mark Brown
  0 siblings, 0 replies; 54+ messages in thread
From: Mark Brown @ 2017-03-08 13:22 UTC (permalink / raw)
  To: linux-arm-kernel

The patch

   ASoC: sun8i-codec: Remove analog "HP" widget

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 4aa8146c89f336230de7f449805bd0edfc878fd4 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Myl=C3=A8ne=20Josserand?=
 <mylene.josserand@free-electrons.com>
Date: Fri, 10 Feb 2017 10:41:30 +0100
Subject: [PATCH] ASoC: sun8i-codec: Remove analog "HP" widget
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

The "HP" widget is already present and take part to
the analog part (sun8i-codec-analog).

Remove it from the digital part as it is unnecessary.

Signed-off-by: Myl??ne Josserand <mylene.josserand@free-electrons.com>
Acked-by: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
 sound/soc/sunxi/sun8i-codec.c | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/sound/soc/sunxi/sun8i-codec.c b/sound/soc/sunxi/sun8i-codec.c
index b92bdc8361af..d60f6fbd36a2 100644
--- a/sound/soc/sunxi/sun8i-codec.c
+++ b/sound/soc/sunxi/sun8i-codec.c
@@ -321,8 +321,6 @@ static const struct snd_soc_dapm_widget sun8i_codec_dapm_widgets[] = {
 			    SUN8I_MOD_RST_CTL_AIF1, 0, NULL, 0),
 	SND_SOC_DAPM_SUPPLY("RST DAC", SUN8I_MOD_RST_CTL,
 			    SUN8I_MOD_RST_CTL_DAC, 0, NULL, 0),
-
-	SND_SOC_DAPM_OUTPUT("HP"),
 };
 
 static const struct snd_soc_dapm_route sun8i_codec_dapm_routes[] = {
@@ -344,10 +342,6 @@ static const struct snd_soc_dapm_route sun8i_codec_dapm_routes[] = {
 	/* DAC Mixer Routes */
 	{ "Left DAC Mixer", "LSlot 0", "Digital Left DAC"},
 	{ "Right DAC Mixer", "RSlot 0", "Digital Right DAC"},
-
-	/* End of route : HP out */
-	{ "HP", NULL, "Left DAC Mixer" },
-	{ "HP", NULL, "Right DAC Mixer" },
 };
 
 static struct snd_soc_dai_ops sun8i_codec_dai_ops = {
-- 
2.11.0

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

* Re: [PATCH 4/4] ASoC: sun8i-codec: Convert to use SND_SOC_DAPM_AIF_IN
  2017-03-06  9:56     ` Chen-Yu Tsai
  (?)
@ 2017-03-09  8:20       ` Mylene Josserand
  -1 siblings, 0 replies; 54+ messages in thread
From: Mylene Josserand @ 2017-03-09  8:20 UTC (permalink / raw)
  To: Chen-Yu Tsai, Maxime Ripard
  Cc: Liam Girdwood, Mark Brown, Rob Herring, Mark Rutland,
	Jaroslav Kysela, Takashi Iwai, Linux-ALSA, devicetree,
	linux-kernel, linux-arm-kernel, Thomas Petazzoni,
	Alexandre Belloni

Hi Chen-Yu,

Thank you for the review.

On 06/03/2017 10:56, Chen-Yu Tsai wrote:
> On Fri, Feb 10, 2017 at 5:41 PM, Mylène Josserand
> <mylene.josserand@free-electrons.com> wrote:
>> Update the driver to use SND_SOC_DAPM_AIF_IN instead of
>> SND_SOC_DAPM_DAC.
>>
>> Set the route names so it must be updated on the device tree too.
>>
>> Signed-off-by: Mylène Josserand <mylene.josserand@free-electrons.com>
>> ---
>>  arch/arm/boot/dts/sun8i-a33.dtsi |  4 ++--
>
> This patch looks OK, but having the DTS changes in the same patch
> probably isn't a good idea. I would really like to see this series
> merged for 4.11, so we can expose a good mixer interface to userspace
> during the first kernel release supporting the A33 codec. That likely
> means some breakage between when the asoc bits and the dts bits land
> though.

Yes, as it means some breakage, I did not know if 2 patches will be fine 
or not.

>
> Maxime, any ideas?
>

I asked him directly and he agrees.

It is fine for me so I will send a v2 with this patch split.

Best regards,

-- 
Mylène Josserand, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com

>
> Regards
> ChenYu
>
>>  sound/soc/sunxi/sun8i-codec.c    | 20 +++++++++++---------
>>  2 files changed, 13 insertions(+), 11 deletions(-)
>>
>> diff --git a/arch/arm/boot/dts/sun8i-a33.dtsi b/arch/arm/boot/dts/sun8i-a33.dtsi
>> index 4e34ec6613a0..e9e2e7312460 100644
>> --- a/arch/arm/boot/dts/sun8i-a33.dtsi
>> +++ b/arch/arm/boot/dts/sun8i-a33.dtsi
>> @@ -78,8 +78,8 @@
>>                 simple-audio-card,mclk-fs = <512>;
>>                 simple-audio-card,aux-devs = <&codec_analog>;
>>                 simple-audio-card,routing =
>> -                       "Left DAC", "Digital Left DAC",
>> -                       "Right DAC", "Digital Right DAC";
>> +                       "Left DAC", "AIF1 Slot 0 Left",
>> +                       "Right DAC", "AIF1 Slot 0 Right";
>>                 status = "disabled";
>>
>>                 simple-audio-card,cpu {
>> diff --git a/sound/soc/sunxi/sun8i-codec.c b/sound/soc/sunxi/sun8i-codec.c
>> index a75a983974d9..9b15a5ee235f 100644
>> --- a/sound/soc/sunxi/sun8i-codec.c
>> +++ b/sound/soc/sunxi/sun8i-codec.c
>> @@ -281,11 +281,13 @@ static const struct snd_soc_dapm_widget sun8i_codec_dapm_widgets[] = {
>>         SND_SOC_DAPM_SUPPLY("DAC", SUN8I_DAC_DIG_CTRL, SUN8I_DAC_DIG_CTRL_ENDA,
>>                             0, NULL, 0),
>>
>> -       /* Analog DAC */
>> -       SND_SOC_DAPM_DAC("Digital Left DAC", "Playback", SUN8I_AIF1_DACDAT_CTRL,
>> -                        SUN8I_AIF1_DACDAT_CTRL_AIF1_DA0L_ENA, 0),
>> -       SND_SOC_DAPM_DAC("Digital Right DAC", "Playback", SUN8I_AIF1_DACDAT_CTRL,
>> -                        SUN8I_AIF1_DACDAT_CTRL_AIF1_DA0R_ENA, 0),
>> +       /* Analog DAC AIF */
>> +       SND_SOC_DAPM_AIF_IN("AIF1 Slot 0 Left", "Playback", 0,
>> +                           SUN8I_AIF1_DACDAT_CTRL,
>> +                           SUN8I_AIF1_DACDAT_CTRL_AIF1_DA0L_ENA, 0),
>> +       SND_SOC_DAPM_AIF_IN("AIF1 Slot 0 Right", "Playback", 0,
>> +                           SUN8I_AIF1_DACDAT_CTRL,
>> +                           SUN8I_AIF1_DACDAT_CTRL_AIF1_DA0R_ENA, 0),
>>
>>         /* DAC Mixers */
>>         SOC_MIXER_ARRAY("Left Digital DAC Mixer", SND_SOC_NOPM, 0, 0,
>> @@ -329,14 +331,14 @@ static const struct snd_soc_dapm_route sun8i_codec_dapm_routes[] = {
>>         { "DAC", NULL, "MODCLK DAC" },
>>
>>         /* DAC Routes */
>> -       { "Digital Left DAC", NULL, "DAC" },
>> -       { "Digital Right DAC", NULL, "DAC" },
>> +       { "AIF1 Slot 0 Right", NULL, "DAC" },
>> +       { "AIF1 Slot 0 Left", NULL, "DAC" },
>>
>>         /* DAC Mixer Routes */
>>         { "Left Digital DAC Mixer", "AIF1 Slot 0 Digital DAC Playback Switch",
>> -         "Digital Left DAC"},
>> +         "AIF1 Slot 0 Left"},
>>         { "Right Digital DAC Mixer", "AIF1 Slot 0 Digital DAC Playback Switch ",
>> -         "Digital Right DAC"},
>> +         "AIF1 Slot 0 Right"},
>>  };
>>
>>  static struct snd_soc_dai_ops sun8i_codec_dai_ops = {
>> --
>> 2.11.0
>>

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

* Re: [PATCH 4/4] ASoC: sun8i-codec: Convert to use SND_SOC_DAPM_AIF_IN
@ 2017-03-09  8:20       ` Mylene Josserand
  0 siblings, 0 replies; 54+ messages in thread
From: Mylene Josserand @ 2017-03-09  8:20 UTC (permalink / raw)
  To: Chen-Yu Tsai, Maxime Ripard
  Cc: Mark Rutland, devicetree, Linux-ALSA, linux-kernel, Takashi Iwai,
	Rob Herring, Liam Girdwood, Mark Brown, Alexandre Belloni,
	Thomas Petazzoni, linux-arm-kernel

Hi Chen-Yu,

Thank you for the review.

On 06/03/2017 10:56, Chen-Yu Tsai wrote:
> On Fri, Feb 10, 2017 at 5:41 PM, Mylène Josserand
> <mylene.josserand@free-electrons.com> wrote:
>> Update the driver to use SND_SOC_DAPM_AIF_IN instead of
>> SND_SOC_DAPM_DAC.
>>
>> Set the route names so it must be updated on the device tree too.
>>
>> Signed-off-by: Mylène Josserand <mylene.josserand@free-electrons.com>
>> ---
>>  arch/arm/boot/dts/sun8i-a33.dtsi |  4 ++--
>
> This patch looks OK, but having the DTS changes in the same patch
> probably isn't a good idea. I would really like to see this series
> merged for 4.11, so we can expose a good mixer interface to userspace
> during the first kernel release supporting the A33 codec. That likely
> means some breakage between when the asoc bits and the dts bits land
> though.

Yes, as it means some breakage, I did not know if 2 patches will be fine 
or not.

>
> Maxime, any ideas?
>

I asked him directly and he agrees.

It is fine for me so I will send a v2 with this patch split.

Best regards,

-- 
Mylène Josserand, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com

>
> Regards
> ChenYu
>
>>  sound/soc/sunxi/sun8i-codec.c    | 20 +++++++++++---------
>>  2 files changed, 13 insertions(+), 11 deletions(-)
>>
>> diff --git a/arch/arm/boot/dts/sun8i-a33.dtsi b/arch/arm/boot/dts/sun8i-a33.dtsi
>> index 4e34ec6613a0..e9e2e7312460 100644
>> --- a/arch/arm/boot/dts/sun8i-a33.dtsi
>> +++ b/arch/arm/boot/dts/sun8i-a33.dtsi
>> @@ -78,8 +78,8 @@
>>                 simple-audio-card,mclk-fs = <512>;
>>                 simple-audio-card,aux-devs = <&codec_analog>;
>>                 simple-audio-card,routing =
>> -                       "Left DAC", "Digital Left DAC",
>> -                       "Right DAC", "Digital Right DAC";
>> +                       "Left DAC", "AIF1 Slot 0 Left",
>> +                       "Right DAC", "AIF1 Slot 0 Right";
>>                 status = "disabled";
>>
>>                 simple-audio-card,cpu {
>> diff --git a/sound/soc/sunxi/sun8i-codec.c b/sound/soc/sunxi/sun8i-codec.c
>> index a75a983974d9..9b15a5ee235f 100644
>> --- a/sound/soc/sunxi/sun8i-codec.c
>> +++ b/sound/soc/sunxi/sun8i-codec.c
>> @@ -281,11 +281,13 @@ static const struct snd_soc_dapm_widget sun8i_codec_dapm_widgets[] = {
>>         SND_SOC_DAPM_SUPPLY("DAC", SUN8I_DAC_DIG_CTRL, SUN8I_DAC_DIG_CTRL_ENDA,
>>                             0, NULL, 0),
>>
>> -       /* Analog DAC */
>> -       SND_SOC_DAPM_DAC("Digital Left DAC", "Playback", SUN8I_AIF1_DACDAT_CTRL,
>> -                        SUN8I_AIF1_DACDAT_CTRL_AIF1_DA0L_ENA, 0),
>> -       SND_SOC_DAPM_DAC("Digital Right DAC", "Playback", SUN8I_AIF1_DACDAT_CTRL,
>> -                        SUN8I_AIF1_DACDAT_CTRL_AIF1_DA0R_ENA, 0),
>> +       /* Analog DAC AIF */
>> +       SND_SOC_DAPM_AIF_IN("AIF1 Slot 0 Left", "Playback", 0,
>> +                           SUN8I_AIF1_DACDAT_CTRL,
>> +                           SUN8I_AIF1_DACDAT_CTRL_AIF1_DA0L_ENA, 0),
>> +       SND_SOC_DAPM_AIF_IN("AIF1 Slot 0 Right", "Playback", 0,
>> +                           SUN8I_AIF1_DACDAT_CTRL,
>> +                           SUN8I_AIF1_DACDAT_CTRL_AIF1_DA0R_ENA, 0),
>>
>>         /* DAC Mixers */
>>         SOC_MIXER_ARRAY("Left Digital DAC Mixer", SND_SOC_NOPM, 0, 0,
>> @@ -329,14 +331,14 @@ static const struct snd_soc_dapm_route sun8i_codec_dapm_routes[] = {
>>         { "DAC", NULL, "MODCLK DAC" },
>>
>>         /* DAC Routes */
>> -       { "Digital Left DAC", NULL, "DAC" },
>> -       { "Digital Right DAC", NULL, "DAC" },
>> +       { "AIF1 Slot 0 Right", NULL, "DAC" },
>> +       { "AIF1 Slot 0 Left", NULL, "DAC" },
>>
>>         /* DAC Mixer Routes */
>>         { "Left Digital DAC Mixer", "AIF1 Slot 0 Digital DAC Playback Switch",
>> -         "Digital Left DAC"},
>> +         "AIF1 Slot 0 Left"},
>>         { "Right Digital DAC Mixer", "AIF1 Slot 0 Digital DAC Playback Switch ",
>> -         "Digital Right DAC"},
>> +         "AIF1 Slot 0 Right"},
>>  };
>>
>>  static struct snd_soc_dai_ops sun8i_codec_dai_ops = {
>> --
>> 2.11.0
>>
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

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

* [PATCH 4/4] ASoC: sun8i-codec: Convert to use SND_SOC_DAPM_AIF_IN
@ 2017-03-09  8:20       ` Mylene Josserand
  0 siblings, 0 replies; 54+ messages in thread
From: Mylene Josserand @ 2017-03-09  8:20 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Chen-Yu,

Thank you for the review.

On 06/03/2017 10:56, Chen-Yu Tsai wrote:
> On Fri, Feb 10, 2017 at 5:41 PM, Myl?ne Josserand
> <mylene.josserand@free-electrons.com> wrote:
>> Update the driver to use SND_SOC_DAPM_AIF_IN instead of
>> SND_SOC_DAPM_DAC.
>>
>> Set the route names so it must be updated on the device tree too.
>>
>> Signed-off-by: Myl?ne Josserand <mylene.josserand@free-electrons.com>
>> ---
>>  arch/arm/boot/dts/sun8i-a33.dtsi |  4 ++--
>
> This patch looks OK, but having the DTS changes in the same patch
> probably isn't a good idea. I would really like to see this series
> merged for 4.11, so we can expose a good mixer interface to userspace
> during the first kernel release supporting the A33 codec. That likely
> means some breakage between when the asoc bits and the dts bits land
> though.

Yes, as it means some breakage, I did not know if 2 patches will be fine 
or not.

>
> Maxime, any ideas?
>

I asked him directly and he agrees.

It is fine for me so I will send a v2 with this patch split.

Best regards,

-- 
Myl?ne Josserand, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com

>
> Regards
> ChenYu
>
>>  sound/soc/sunxi/sun8i-codec.c    | 20 +++++++++++---------
>>  2 files changed, 13 insertions(+), 11 deletions(-)
>>
>> diff --git a/arch/arm/boot/dts/sun8i-a33.dtsi b/arch/arm/boot/dts/sun8i-a33.dtsi
>> index 4e34ec6613a0..e9e2e7312460 100644
>> --- a/arch/arm/boot/dts/sun8i-a33.dtsi
>> +++ b/arch/arm/boot/dts/sun8i-a33.dtsi
>> @@ -78,8 +78,8 @@
>>                 simple-audio-card,mclk-fs = <512>;
>>                 simple-audio-card,aux-devs = <&codec_analog>;
>>                 simple-audio-card,routing =
>> -                       "Left DAC", "Digital Left DAC",
>> -                       "Right DAC", "Digital Right DAC";
>> +                       "Left DAC", "AIF1 Slot 0 Left",
>> +                       "Right DAC", "AIF1 Slot 0 Right";
>>                 status = "disabled";
>>
>>                 simple-audio-card,cpu {
>> diff --git a/sound/soc/sunxi/sun8i-codec.c b/sound/soc/sunxi/sun8i-codec.c
>> index a75a983974d9..9b15a5ee235f 100644
>> --- a/sound/soc/sunxi/sun8i-codec.c
>> +++ b/sound/soc/sunxi/sun8i-codec.c
>> @@ -281,11 +281,13 @@ static const struct snd_soc_dapm_widget sun8i_codec_dapm_widgets[] = {
>>         SND_SOC_DAPM_SUPPLY("DAC", SUN8I_DAC_DIG_CTRL, SUN8I_DAC_DIG_CTRL_ENDA,
>>                             0, NULL, 0),
>>
>> -       /* Analog DAC */
>> -       SND_SOC_DAPM_DAC("Digital Left DAC", "Playback", SUN8I_AIF1_DACDAT_CTRL,
>> -                        SUN8I_AIF1_DACDAT_CTRL_AIF1_DA0L_ENA, 0),
>> -       SND_SOC_DAPM_DAC("Digital Right DAC", "Playback", SUN8I_AIF1_DACDAT_CTRL,
>> -                        SUN8I_AIF1_DACDAT_CTRL_AIF1_DA0R_ENA, 0),
>> +       /* Analog DAC AIF */
>> +       SND_SOC_DAPM_AIF_IN("AIF1 Slot 0 Left", "Playback", 0,
>> +                           SUN8I_AIF1_DACDAT_CTRL,
>> +                           SUN8I_AIF1_DACDAT_CTRL_AIF1_DA0L_ENA, 0),
>> +       SND_SOC_DAPM_AIF_IN("AIF1 Slot 0 Right", "Playback", 0,
>> +                           SUN8I_AIF1_DACDAT_CTRL,
>> +                           SUN8I_AIF1_DACDAT_CTRL_AIF1_DA0R_ENA, 0),
>>
>>         /* DAC Mixers */
>>         SOC_MIXER_ARRAY("Left Digital DAC Mixer", SND_SOC_NOPM, 0, 0,
>> @@ -329,14 +331,14 @@ static const struct snd_soc_dapm_route sun8i_codec_dapm_routes[] = {
>>         { "DAC", NULL, "MODCLK DAC" },
>>
>>         /* DAC Routes */
>> -       { "Digital Left DAC", NULL, "DAC" },
>> -       { "Digital Right DAC", NULL, "DAC" },
>> +       { "AIF1 Slot 0 Right", NULL, "DAC" },
>> +       { "AIF1 Slot 0 Left", NULL, "DAC" },
>>
>>         /* DAC Mixer Routes */
>>         { "Left Digital DAC Mixer", "AIF1 Slot 0 Digital DAC Playback Switch",
>> -         "Digital Left DAC"},
>> +         "AIF1 Slot 0 Left"},
>>         { "Right Digital DAC Mixer", "AIF1 Slot 0 Digital DAC Playback Switch ",
>> -         "Digital Right DAC"},
>> +         "AIF1 Slot 0 Right"},
>>  };
>>
>>  static struct snd_soc_dai_ops sun8i_codec_dai_ops = {
>> --
>> 2.11.0
>>

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

* Re: Applied "ASoC: sun8i-codec: Update mixer to use SOC_DAPM_DOUBLE" to the asoc tree
  2017-03-08 13:22     ` Mark Brown
  (?)
@ 2017-03-14  4:31       ` Chen-Yu Tsai
  -1 siblings, 0 replies; 54+ messages in thread
From: Chen-Yu Tsai @ 2017-03-14  4:31 UTC (permalink / raw)
  To: Mark Brown
  Cc: Mylène Josserand, Chen-Yu Tsai, Liam Girdwood, Rob Herring,
	Mark Rutland, Maxime Ripard, Jaroslav Kysela, Takashi Iwai,
	Thomas Petazzoni, devicetree, Linux-ALSA, linux-kernel,
	Alexandre Belloni, linux-arm-kernel

Hi Mark,

On Wed, Mar 8, 2017 at 9:22 PM, Mark Brown <broonie@kernel.org> wrote:
> The patch
>
>    ASoC: sun8i-codec: Update mixer to use SOC_DAPM_DOUBLE
>
> 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 ca14da6e611674cad275f29ac2aaf1e2eb427c6b Mon Sep 17 00:00:00 2001
> From: =?UTF-8?q?Myl=C3=A8ne=20Josserand?=
>  <mylene.josserand@free-electrons.com>
> Date: Fri, 10 Feb 2017 10:41:31 +0100
> Subject: [PATCH] ASoC: sun8i-codec: Update mixer to use SOC_DAPM_DOUBLE
> MIME-Version: 1.0
> Content-Type: text/plain; charset=UTF-8
> Content-Transfer-Encoding: 8bit
>
> Update the driver to use the new SOC_DAPM_DOUBLE definition
> on the digital DAC mixer.
> Update the names accordingly as, when they are shared, the
> controls are not prefixed with the widget's name anymore.
>
> Signed-off-by: Mylène Josserand <mylene.josserand@free-electrons.com>
> Acked-by: Chen-Yu Tsai <wens@csie.org>
> Signed-off-by: Mark Brown <broonie@kernel.org>
> ---
>  sound/soc/sunxi/sun8i-codec.c | 45 ++++++++++++++++++++-----------------------
>  1 file changed, 21 insertions(+), 24 deletions(-)
>
> diff --git a/sound/soc/sunxi/sun8i-codec.c b/sound/soc/sunxi/sun8i-codec.c
> index d60f6fbd36a2..107fa8213600 100644
> --- a/sound/soc/sunxi/sun8i-codec.c
> +++ b/sound/soc/sunxi/sun8i-codec.c
> @@ -259,25 +259,20 @@ static int sun8i_codec_hw_params(struct snd_pcm_substream *substream,
>         return 0;
>  }
>
> -static const struct snd_kcontrol_new sun8i_output_left_mixer_controls[] = {
> -       SOC_DAPM_SINGLE("LSlot 0", SUN8I_DAC_MXR_SRC,
> -                       SUN8I_DAC_MXR_SRC_DACL_MXR_SRC_AIF1DA0L, 1, 0),
> -       SOC_DAPM_SINGLE("LSlot 1", SUN8I_DAC_MXR_SRC,
> -                       SUN8I_DAC_MXR_SRC_DACL_MXR_SRC_AIF1DA1L, 1, 0),
> -       SOC_DAPM_SINGLE("DACL", SUN8I_DAC_MXR_SRC,
> -                       SUN8I_DAC_MXR_SRC_DACL_MXR_SRC_AIF2DACL, 1, 0),
> -       SOC_DAPM_SINGLE("ADCL", SUN8I_DAC_MXR_SRC,
> -                       SUN8I_DAC_MXR_SRC_DACL_MXR_SRC_ADCL, 1, 0),
> -};
> -
> -static const struct snd_kcontrol_new sun8i_output_right_mixer_controls[] = {
> -       SOC_DAPM_SINGLE("RSlot 0", SUN8I_DAC_MXR_SRC,
> +static const struct snd_kcontrol_new sun8i_dac_mixer_controls[] = {
> +       SOC_DAPM_DOUBLE("AIF1 Slot 0 Digital DAC Playback Switch",
> +                       SUN8I_DAC_MXR_SRC,
> +                       SUN8I_DAC_MXR_SRC_DACL_MXR_SRC_AIF1DA0L,
>                         SUN8I_DAC_MXR_SRC_DACR_MXR_SRC_AIF1DA0R, 1, 0),
> -       SOC_DAPM_SINGLE("RSlot 1", SUN8I_DAC_MXR_SRC,
> +       SOC_DAPM_DOUBLE("AIF1 Slot 1 Digital DAC Playback Switch",
> +                       SUN8I_DAC_MXR_SRC,
> +                       SUN8I_DAC_MXR_SRC_DACL_MXR_SRC_AIF1DA1L,
>                         SUN8I_DAC_MXR_SRC_DACR_MXR_SRC_AIF1DA1R, 1, 0),
> -       SOC_DAPM_SINGLE("DACR", SUN8I_DAC_MXR_SRC,
> +       SOC_DAPM_DOUBLE("AIF2 Digital DAC Playback Switch", SUN8I_DAC_MXR_SRC,
> +                       SUN8I_DAC_MXR_SRC_DACL_MXR_SRC_AIF2DACL,
>                         SUN8I_DAC_MXR_SRC_DACR_MXR_SRC_AIF2DACR, 1, 0),
> -       SOC_DAPM_SINGLE("ADCR", SUN8I_DAC_MXR_SRC,
> +       SOC_DAPM_DOUBLE("ADC Digital DAC Playback Switch", SUN8I_DAC_MXR_SRC,
> +                       SUN8I_DAC_MXR_SRC_DACL_MXR_SRC_ADCL,
>                         SUN8I_DAC_MXR_SRC_DACR_MXR_SRC_ADCR, 1, 0),
>  };
>
> @@ -293,12 +288,12 @@ static const struct snd_soc_dapm_widget sun8i_codec_dapm_widgets[] = {
>                          SUN8I_AIF1_DACDAT_CTRL_AIF1_DA0R_ENA, 0),
>
>         /* DAC Mixers */
> -       SND_SOC_DAPM_MIXER("Left DAC Mixer", SND_SOC_NOPM, 0, 0,
> -                          sun8i_output_left_mixer_controls,
> -                          ARRAY_SIZE(sun8i_output_left_mixer_controls)),
> -       SND_SOC_DAPM_MIXER("Right DAC Mixer", SND_SOC_NOPM, 0, 0,
> -                          sun8i_output_right_mixer_controls,
> -                          ARRAY_SIZE(sun8i_output_right_mixer_controls)),
> +       SND_SOC_DAPM_MIXER("Left Digital DAC Mixer", SND_SOC_NOPM, 0, 0,
> +                          sun8i_dac_mixer_controls,
> +                          ARRAY_SIZE(sun8i_dac_mixer_controls)),
> +       SND_SOC_DAPM_MIXER("Right Digital DAC Mixer", SND_SOC_NOPM, 0, 0,
> +                          sun8i_dac_mixer_controls,
> +                          ARRAY_SIZE(sun8i_dac_mixer_controls)),

This patch changes the mixer controls exposed to user space.

This driver was just introduced in 4.11-rc1. Would it make sense to
merge these cleanup patches as fixes for 4.11, so we don't affect
userspace across kernel releases?

Thanks
ChenYu

>
>         /* Clocks */
>         SND_SOC_DAPM_SUPPLY("MODCLK AFI1", SUN8I_MOD_CLK_ENA,
> @@ -340,8 +335,10 @@ static const struct snd_soc_dapm_route sun8i_codec_dapm_routes[] = {
>         { "Digital Right DAC", NULL, "DAC" },
>
>         /* DAC Mixer Routes */
> -       { "Left DAC Mixer", "LSlot 0", "Digital Left DAC"},
> -       { "Right DAC Mixer", "RSlot 0", "Digital Right DAC"},
> +       { "Left Digital DAC Mixer", "AIF1 Slot 0 Digital DAC Playback Switch",
> +         "Digital Left DAC"},
> +       { "Right Digital DAC Mixer", "AIF1 Slot 0 Digital DAC Playback Switch ",
> +         "Digital Right DAC"},
>  };
>
>  static struct snd_soc_dai_ops sun8i_codec_dai_ops = {
> --
> 2.11.0
>

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

* Re: Applied "ASoC: sun8i-codec: Update mixer to use SOC_DAPM_DOUBLE" to the asoc tree
@ 2017-03-14  4:31       ` Chen-Yu Tsai
  0 siblings, 0 replies; 54+ messages in thread
From: Chen-Yu Tsai @ 2017-03-14  4:31 UTC (permalink / raw)
  To: Mark Brown
  Cc: Mylène Josserand, Chen-Yu Tsai, Liam Girdwood, Rob Herring,
	Mark Rutland, Maxime Ripard, Jaroslav Kysela, Takashi Iwai,
	Thomas Petazzoni, devicetree, Linux-ALSA, linux-kernel,
	Alexandre Belloni, linux-arm-kernel

Hi Mark,

On Wed, Mar 8, 2017 at 9:22 PM, Mark Brown <broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org> wrote:
> The patch
>
>    ASoC: sun8i-codec: Update mixer to use SOC_DAPM_DOUBLE
>
> 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 ca14da6e611674cad275f29ac2aaf1e2eb427c6b Mon Sep 17 00:00:00 2001
> From: =?UTF-8?q?Myl=C3=A8ne=20Josserand?=
>  <mylene.josserand-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
> Date: Fri, 10 Feb 2017 10:41:31 +0100
> Subject: [PATCH] ASoC: sun8i-codec: Update mixer to use SOC_DAPM_DOUBLE
> MIME-Version: 1.0
> Content-Type: text/plain; charset=UTF-8
> Content-Transfer-Encoding: 8bit
>
> Update the driver to use the new SOC_DAPM_DOUBLE definition
> on the digital DAC mixer.
> Update the names accordingly as, when they are shared, the
> controls are not prefixed with the widget's name anymore.
>
> Signed-off-by: Mylène Josserand <mylene.josserand-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
> Acked-by: Chen-Yu Tsai <wens-jdAy2FN1RRM@public.gmane.org>
> Signed-off-by: Mark Brown <broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
> ---
>  sound/soc/sunxi/sun8i-codec.c | 45 ++++++++++++++++++++-----------------------
>  1 file changed, 21 insertions(+), 24 deletions(-)
>
> diff --git a/sound/soc/sunxi/sun8i-codec.c b/sound/soc/sunxi/sun8i-codec.c
> index d60f6fbd36a2..107fa8213600 100644
> --- a/sound/soc/sunxi/sun8i-codec.c
> +++ b/sound/soc/sunxi/sun8i-codec.c
> @@ -259,25 +259,20 @@ static int sun8i_codec_hw_params(struct snd_pcm_substream *substream,
>         return 0;
>  }
>
> -static const struct snd_kcontrol_new sun8i_output_left_mixer_controls[] = {
> -       SOC_DAPM_SINGLE("LSlot 0", SUN8I_DAC_MXR_SRC,
> -                       SUN8I_DAC_MXR_SRC_DACL_MXR_SRC_AIF1DA0L, 1, 0),
> -       SOC_DAPM_SINGLE("LSlot 1", SUN8I_DAC_MXR_SRC,
> -                       SUN8I_DAC_MXR_SRC_DACL_MXR_SRC_AIF1DA1L, 1, 0),
> -       SOC_DAPM_SINGLE("DACL", SUN8I_DAC_MXR_SRC,
> -                       SUN8I_DAC_MXR_SRC_DACL_MXR_SRC_AIF2DACL, 1, 0),
> -       SOC_DAPM_SINGLE("ADCL", SUN8I_DAC_MXR_SRC,
> -                       SUN8I_DAC_MXR_SRC_DACL_MXR_SRC_ADCL, 1, 0),
> -};
> -
> -static const struct snd_kcontrol_new sun8i_output_right_mixer_controls[] = {
> -       SOC_DAPM_SINGLE("RSlot 0", SUN8I_DAC_MXR_SRC,
> +static const struct snd_kcontrol_new sun8i_dac_mixer_controls[] = {
> +       SOC_DAPM_DOUBLE("AIF1 Slot 0 Digital DAC Playback Switch",
> +                       SUN8I_DAC_MXR_SRC,
> +                       SUN8I_DAC_MXR_SRC_DACL_MXR_SRC_AIF1DA0L,
>                         SUN8I_DAC_MXR_SRC_DACR_MXR_SRC_AIF1DA0R, 1, 0),
> -       SOC_DAPM_SINGLE("RSlot 1", SUN8I_DAC_MXR_SRC,
> +       SOC_DAPM_DOUBLE("AIF1 Slot 1 Digital DAC Playback Switch",
> +                       SUN8I_DAC_MXR_SRC,
> +                       SUN8I_DAC_MXR_SRC_DACL_MXR_SRC_AIF1DA1L,
>                         SUN8I_DAC_MXR_SRC_DACR_MXR_SRC_AIF1DA1R, 1, 0),
> -       SOC_DAPM_SINGLE("DACR", SUN8I_DAC_MXR_SRC,
> +       SOC_DAPM_DOUBLE("AIF2 Digital DAC Playback Switch", SUN8I_DAC_MXR_SRC,
> +                       SUN8I_DAC_MXR_SRC_DACL_MXR_SRC_AIF2DACL,
>                         SUN8I_DAC_MXR_SRC_DACR_MXR_SRC_AIF2DACR, 1, 0),
> -       SOC_DAPM_SINGLE("ADCR", SUN8I_DAC_MXR_SRC,
> +       SOC_DAPM_DOUBLE("ADC Digital DAC Playback Switch", SUN8I_DAC_MXR_SRC,
> +                       SUN8I_DAC_MXR_SRC_DACL_MXR_SRC_ADCL,
>                         SUN8I_DAC_MXR_SRC_DACR_MXR_SRC_ADCR, 1, 0),
>  };
>
> @@ -293,12 +288,12 @@ static const struct snd_soc_dapm_widget sun8i_codec_dapm_widgets[] = {
>                          SUN8I_AIF1_DACDAT_CTRL_AIF1_DA0R_ENA, 0),
>
>         /* DAC Mixers */
> -       SND_SOC_DAPM_MIXER("Left DAC Mixer", SND_SOC_NOPM, 0, 0,
> -                          sun8i_output_left_mixer_controls,
> -                          ARRAY_SIZE(sun8i_output_left_mixer_controls)),
> -       SND_SOC_DAPM_MIXER("Right DAC Mixer", SND_SOC_NOPM, 0, 0,
> -                          sun8i_output_right_mixer_controls,
> -                          ARRAY_SIZE(sun8i_output_right_mixer_controls)),
> +       SND_SOC_DAPM_MIXER("Left Digital DAC Mixer", SND_SOC_NOPM, 0, 0,
> +                          sun8i_dac_mixer_controls,
> +                          ARRAY_SIZE(sun8i_dac_mixer_controls)),
> +       SND_SOC_DAPM_MIXER("Right Digital DAC Mixer", SND_SOC_NOPM, 0, 0,
> +                          sun8i_dac_mixer_controls,
> +                          ARRAY_SIZE(sun8i_dac_mixer_controls)),

This patch changes the mixer controls exposed to user space.

This driver was just introduced in 4.11-rc1. Would it make sense to
merge these cleanup patches as fixes for 4.11, so we don't affect
userspace across kernel releases?

Thanks
ChenYu

>
>         /* Clocks */
>         SND_SOC_DAPM_SUPPLY("MODCLK AFI1", SUN8I_MOD_CLK_ENA,
> @@ -340,8 +335,10 @@ static const struct snd_soc_dapm_route sun8i_codec_dapm_routes[] = {
>         { "Digital Right DAC", NULL, "DAC" },
>
>         /* DAC Mixer Routes */
> -       { "Left DAC Mixer", "LSlot 0", "Digital Left DAC"},
> -       { "Right DAC Mixer", "RSlot 0", "Digital Right DAC"},
> +       { "Left Digital DAC Mixer", "AIF1 Slot 0 Digital DAC Playback Switch",
> +         "Digital Left DAC"},
> +       { "Right Digital DAC Mixer", "AIF1 Slot 0 Digital DAC Playback Switch ",
> +         "Digital Right DAC"},
>  };
>
>  static struct snd_soc_dai_ops sun8i_codec_dai_ops = {
> --
> 2.11.0
>
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Applied "ASoC: sun8i-codec: Update mixer to use SOC_DAPM_DOUBLE" to the asoc tree
@ 2017-03-14  4:31       ` Chen-Yu Tsai
  0 siblings, 0 replies; 54+ messages in thread
From: Chen-Yu Tsai @ 2017-03-14  4:31 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Mark,

On Wed, Mar 8, 2017 at 9:22 PM, Mark Brown <broonie@kernel.org> wrote:
> The patch
>
>    ASoC: sun8i-codec: Update mixer to use SOC_DAPM_DOUBLE
>
> 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 ca14da6e611674cad275f29ac2aaf1e2eb427c6b Mon Sep 17 00:00:00 2001
> From: =?UTF-8?q?Myl=C3=A8ne=20Josserand?=
>  <mylene.josserand@free-electrons.com>
> Date: Fri, 10 Feb 2017 10:41:31 +0100
> Subject: [PATCH] ASoC: sun8i-codec: Update mixer to use SOC_DAPM_DOUBLE
> MIME-Version: 1.0
> Content-Type: text/plain; charset=UTF-8
> Content-Transfer-Encoding: 8bit
>
> Update the driver to use the new SOC_DAPM_DOUBLE definition
> on the digital DAC mixer.
> Update the names accordingly as, when they are shared, the
> controls are not prefixed with the widget's name anymore.
>
> Signed-off-by: Myl?ne Josserand <mylene.josserand@free-electrons.com>
> Acked-by: Chen-Yu Tsai <wens@csie.org>
> Signed-off-by: Mark Brown <broonie@kernel.org>
> ---
>  sound/soc/sunxi/sun8i-codec.c | 45 ++++++++++++++++++++-----------------------
>  1 file changed, 21 insertions(+), 24 deletions(-)
>
> diff --git a/sound/soc/sunxi/sun8i-codec.c b/sound/soc/sunxi/sun8i-codec.c
> index d60f6fbd36a2..107fa8213600 100644
> --- a/sound/soc/sunxi/sun8i-codec.c
> +++ b/sound/soc/sunxi/sun8i-codec.c
> @@ -259,25 +259,20 @@ static int sun8i_codec_hw_params(struct snd_pcm_substream *substream,
>         return 0;
>  }
>
> -static const struct snd_kcontrol_new sun8i_output_left_mixer_controls[] = {
> -       SOC_DAPM_SINGLE("LSlot 0", SUN8I_DAC_MXR_SRC,
> -                       SUN8I_DAC_MXR_SRC_DACL_MXR_SRC_AIF1DA0L, 1, 0),
> -       SOC_DAPM_SINGLE("LSlot 1", SUN8I_DAC_MXR_SRC,
> -                       SUN8I_DAC_MXR_SRC_DACL_MXR_SRC_AIF1DA1L, 1, 0),
> -       SOC_DAPM_SINGLE("DACL", SUN8I_DAC_MXR_SRC,
> -                       SUN8I_DAC_MXR_SRC_DACL_MXR_SRC_AIF2DACL, 1, 0),
> -       SOC_DAPM_SINGLE("ADCL", SUN8I_DAC_MXR_SRC,
> -                       SUN8I_DAC_MXR_SRC_DACL_MXR_SRC_ADCL, 1, 0),
> -};
> -
> -static const struct snd_kcontrol_new sun8i_output_right_mixer_controls[] = {
> -       SOC_DAPM_SINGLE("RSlot 0", SUN8I_DAC_MXR_SRC,
> +static const struct snd_kcontrol_new sun8i_dac_mixer_controls[] = {
> +       SOC_DAPM_DOUBLE("AIF1 Slot 0 Digital DAC Playback Switch",
> +                       SUN8I_DAC_MXR_SRC,
> +                       SUN8I_DAC_MXR_SRC_DACL_MXR_SRC_AIF1DA0L,
>                         SUN8I_DAC_MXR_SRC_DACR_MXR_SRC_AIF1DA0R, 1, 0),
> -       SOC_DAPM_SINGLE("RSlot 1", SUN8I_DAC_MXR_SRC,
> +       SOC_DAPM_DOUBLE("AIF1 Slot 1 Digital DAC Playback Switch",
> +                       SUN8I_DAC_MXR_SRC,
> +                       SUN8I_DAC_MXR_SRC_DACL_MXR_SRC_AIF1DA1L,
>                         SUN8I_DAC_MXR_SRC_DACR_MXR_SRC_AIF1DA1R, 1, 0),
> -       SOC_DAPM_SINGLE("DACR", SUN8I_DAC_MXR_SRC,
> +       SOC_DAPM_DOUBLE("AIF2 Digital DAC Playback Switch", SUN8I_DAC_MXR_SRC,
> +                       SUN8I_DAC_MXR_SRC_DACL_MXR_SRC_AIF2DACL,
>                         SUN8I_DAC_MXR_SRC_DACR_MXR_SRC_AIF2DACR, 1, 0),
> -       SOC_DAPM_SINGLE("ADCR", SUN8I_DAC_MXR_SRC,
> +       SOC_DAPM_DOUBLE("ADC Digital DAC Playback Switch", SUN8I_DAC_MXR_SRC,
> +                       SUN8I_DAC_MXR_SRC_DACL_MXR_SRC_ADCL,
>                         SUN8I_DAC_MXR_SRC_DACR_MXR_SRC_ADCR, 1, 0),
>  };
>
> @@ -293,12 +288,12 @@ static const struct snd_soc_dapm_widget sun8i_codec_dapm_widgets[] = {
>                          SUN8I_AIF1_DACDAT_CTRL_AIF1_DA0R_ENA, 0),
>
>         /* DAC Mixers */
> -       SND_SOC_DAPM_MIXER("Left DAC Mixer", SND_SOC_NOPM, 0, 0,
> -                          sun8i_output_left_mixer_controls,
> -                          ARRAY_SIZE(sun8i_output_left_mixer_controls)),
> -       SND_SOC_DAPM_MIXER("Right DAC Mixer", SND_SOC_NOPM, 0, 0,
> -                          sun8i_output_right_mixer_controls,
> -                          ARRAY_SIZE(sun8i_output_right_mixer_controls)),
> +       SND_SOC_DAPM_MIXER("Left Digital DAC Mixer", SND_SOC_NOPM, 0, 0,
> +                          sun8i_dac_mixer_controls,
> +                          ARRAY_SIZE(sun8i_dac_mixer_controls)),
> +       SND_SOC_DAPM_MIXER("Right Digital DAC Mixer", SND_SOC_NOPM, 0, 0,
> +                          sun8i_dac_mixer_controls,
> +                          ARRAY_SIZE(sun8i_dac_mixer_controls)),

This patch changes the mixer controls exposed to user space.

This driver was just introduced in 4.11-rc1. Would it make sense to
merge these cleanup patches as fixes for 4.11, so we don't affect
userspace across kernel releases?

Thanks
ChenYu

>
>         /* Clocks */
>         SND_SOC_DAPM_SUPPLY("MODCLK AFI1", SUN8I_MOD_CLK_ENA,
> @@ -340,8 +335,10 @@ static const struct snd_soc_dapm_route sun8i_codec_dapm_routes[] = {
>         { "Digital Right DAC", NULL, "DAC" },
>
>         /* DAC Mixer Routes */
> -       { "Left DAC Mixer", "LSlot 0", "Digital Left DAC"},
> -       { "Right DAC Mixer", "RSlot 0", "Digital Right DAC"},
> +       { "Left Digital DAC Mixer", "AIF1 Slot 0 Digital DAC Playback Switch",
> +         "Digital Left DAC"},
> +       { "Right Digital DAC Mixer", "AIF1 Slot 0 Digital DAC Playback Switch ",
> +         "Digital Right DAC"},
>  };
>
>  static struct snd_soc_dai_ops sun8i_codec_dai_ops = {
> --
> 2.11.0
>

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

* Re: Applied "ASoC: sun8i-codec: Update mixer to use SOC_DAPM_DOUBLE" to the asoc tree
  2017-03-14  4:31       ` Chen-Yu Tsai
  (?)
@ 2017-03-15 13:43         ` Mark Brown
  -1 siblings, 0 replies; 54+ messages in thread
From: Mark Brown @ 2017-03-15 13:43 UTC (permalink / raw)
  To: Chen-Yu Tsai
  Cc: Mylène Josserand, Liam Girdwood, Rob Herring, Mark Rutland,
	Maxime Ripard, Jaroslav Kysela, Takashi Iwai, Thomas Petazzoni,
	devicetree, Linux-ALSA, linux-kernel, Alexandre Belloni,
	linux-arm-kernel

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

On Tue, Mar 14, 2017 at 12:31:22PM +0800, Chen-Yu Tsai wrote:
> On Wed, Mar 8, 2017 at 9:22 PM, Mark Brown <broonie@kernel.org> wrote:

Please delete unneeded context from mails when replying.  Doing this
makes it much easier to find your reply in the message, helping ensure
it won't be missed by people scrolling through the irrelevant quoted
material.

> This patch changes the mixer controls exposed to user space.

> This driver was just introduced in 4.11-rc1. Would it make sense to
> merge these cleanup patches as fixes for 4.11, so we don't affect
> userspace across kernel releases?

It would but it doesn't pick over cleanly, it looks like it depends on
some of the other changes.

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

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

* Re: Applied "ASoC: sun8i-codec: Update mixer to use SOC_DAPM_DOUBLE" to the asoc tree
@ 2017-03-15 13:43         ` Mark Brown
  0 siblings, 0 replies; 54+ messages in thread
From: Mark Brown @ 2017-03-15 13:43 UTC (permalink / raw)
  To: Chen-Yu Tsai
  Cc: Mark Rutland, Thomas Petazzoni, Linux-ALSA, devicetree,
	linux-kernel, Takashi Iwai, Liam Girdwood, Rob Herring,
	Alexandre Belloni, Maxime Ripard, Mylène Josserand,
	linux-arm-kernel


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

On Tue, Mar 14, 2017 at 12:31:22PM +0800, Chen-Yu Tsai wrote:
> On Wed, Mar 8, 2017 at 9:22 PM, Mark Brown <broonie@kernel.org> wrote:

Please delete unneeded context from mails when replying.  Doing this
makes it much easier to find your reply in the message, helping ensure
it won't be missed by people scrolling through the irrelevant quoted
material.

> This patch changes the mixer controls exposed to user space.

> This driver was just introduced in 4.11-rc1. Would it make sense to
> merge these cleanup patches as fixes for 4.11, so we don't affect
> userspace across kernel releases?

It would but it doesn't pick over cleanly, it looks like it depends on
some of the other changes.

[-- 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] 54+ messages in thread

* Applied "ASoC: sun8i-codec: Update mixer to use SOC_DAPM_DOUBLE" to the asoc tree
@ 2017-03-15 13:43         ` Mark Brown
  0 siblings, 0 replies; 54+ messages in thread
From: Mark Brown @ 2017-03-15 13:43 UTC (permalink / raw)
  To: linux-arm-kernel

On Tue, Mar 14, 2017 at 12:31:22PM +0800, Chen-Yu Tsai wrote:
> On Wed, Mar 8, 2017 at 9:22 PM, Mark Brown <broonie@kernel.org> wrote:

Please delete unneeded context from mails when replying.  Doing this
makes it much easier to find your reply in the message, helping ensure
it won't be missed by people scrolling through the irrelevant quoted
material.

> This patch changes the mixer controls exposed to user space.

> This driver was just introduced in 4.11-rc1. Would it make sense to
> merge these cleanup patches as fixes for 4.11, so we don't affect
> userspace across kernel releases?

It would but it doesn't pick over cleanly, it looks like it depends on
some of the other changes.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20170315/e8c39855/attachment-0001.sig>

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

* Re: Applied "ASoC: sun8i-codec: Update mixer to use SOC_DAPM_DOUBLE" to the asoc tree
  2017-03-15 13:43         ` Mark Brown
  (?)
@ 2017-03-15 14:15           ` Chen-Yu Tsai
  -1 siblings, 0 replies; 54+ messages in thread
From: Chen-Yu Tsai @ 2017-03-15 14:15 UTC (permalink / raw)
  To: Mark Brown
  Cc: Chen-Yu Tsai, Mylène Josserand, Liam Girdwood, Rob Herring,
	Mark Rutland, Maxime Ripard, Jaroslav Kysela, Takashi Iwai,
	Thomas Petazzoni, devicetree, Linux-ALSA, linux-kernel,
	Alexandre Belloni, linux-arm-kernel

On Wed, Mar 15, 2017 at 9:43 PM, Mark Brown <broonie@kernel.org> wrote:
> On Tue, Mar 14, 2017 at 12:31:22PM +0800, Chen-Yu Tsai wrote:
>> On Wed, Mar 8, 2017 at 9:22 PM, Mark Brown <broonie@kernel.org> wrote:
>> This patch changes the mixer controls exposed to user space.
>
>> This driver was just introduced in 4.11-rc1. Would it make sense to
>> merge these cleanup patches as fixes for 4.11, so we don't affect
>> userspace across kernel releases?
>
> It would but it doesn't pick over cleanly, it looks like it depends on
> some of the other changes.

It depends on the second half of commit 4aa8146c89f3 ("ASoC: sun8i-codec:
Remove analog "HP" widget"), which is also a cleanup. Would it be OK
to pick these two over to fixes then? Or should we send a clean version
instead?

ChenYu

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

* Re: Applied "ASoC: sun8i-codec: Update mixer to use SOC_DAPM_DOUBLE" to the asoc tree
@ 2017-03-15 14:15           ` Chen-Yu Tsai
  0 siblings, 0 replies; 54+ messages in thread
From: Chen-Yu Tsai @ 2017-03-15 14:15 UTC (permalink / raw)
  To: Mark Brown
  Cc: Mark Rutland, Thomas Petazzoni, Linux-ALSA, devicetree,
	linux-kernel, Takashi Iwai, Liam Girdwood, Chen-Yu Tsai,
	Rob Herring, Alexandre Belloni, Maxime Ripard,
	Mylène Josserand, linux-arm-kernel

On Wed, Mar 15, 2017 at 9:43 PM, Mark Brown <broonie@kernel.org> wrote:
> On Tue, Mar 14, 2017 at 12:31:22PM +0800, Chen-Yu Tsai wrote:
>> On Wed, Mar 8, 2017 at 9:22 PM, Mark Brown <broonie@kernel.org> wrote:
>> This patch changes the mixer controls exposed to user space.
>
>> This driver was just introduced in 4.11-rc1. Would it make sense to
>> merge these cleanup patches as fixes for 4.11, so we don't affect
>> userspace across kernel releases?
>
> It would but it doesn't pick over cleanly, it looks like it depends on
> some of the other changes.

It depends on the second half of commit 4aa8146c89f3 ("ASoC: sun8i-codec:
Remove analog "HP" widget"), which is also a cleanup. Would it be OK
to pick these two over to fixes then? Or should we send a clean version
instead?

ChenYu

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

* Applied "ASoC: sun8i-codec: Update mixer to use SOC_DAPM_DOUBLE" to the asoc tree
@ 2017-03-15 14:15           ` Chen-Yu Tsai
  0 siblings, 0 replies; 54+ messages in thread
From: Chen-Yu Tsai @ 2017-03-15 14:15 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Mar 15, 2017 at 9:43 PM, Mark Brown <broonie@kernel.org> wrote:
> On Tue, Mar 14, 2017 at 12:31:22PM +0800, Chen-Yu Tsai wrote:
>> On Wed, Mar 8, 2017 at 9:22 PM, Mark Brown <broonie@kernel.org> wrote:
>> This patch changes the mixer controls exposed to user space.
>
>> This driver was just introduced in 4.11-rc1. Would it make sense to
>> merge these cleanup patches as fixes for 4.11, so we don't affect
>> userspace across kernel releases?
>
> It would but it doesn't pick over cleanly, it looks like it depends on
> some of the other changes.

It depends on the second half of commit 4aa8146c89f3 ("ASoC: sun8i-codec:
Remove analog "HP" widget"), which is also a cleanup. Would it be OK
to pick these two over to fixes then? Or should we send a clean version
instead?

ChenYu

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

* Re: Applied "ASoC: sun8i-codec: Update mixer to use SOC_DAPM_DOUBLE" to the asoc tree
  2017-03-15 14:15           ` Chen-Yu Tsai
@ 2017-03-16 14:06             ` Mark Brown
  -1 siblings, 0 replies; 54+ messages in thread
From: Mark Brown @ 2017-03-16 14:06 UTC (permalink / raw)
  To: Chen-Yu Tsai
  Cc: Mylène Josserand, Liam Girdwood, Rob Herring, Mark Rutland,
	Maxime Ripard, Jaroslav Kysela, Takashi Iwai, Thomas Petazzoni,
	devicetree, Linux-ALSA, linux-kernel, Alexandre Belloni,
	linux-arm-kernel

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

On Wed, Mar 15, 2017 at 10:15:22PM +0800, Chen-Yu Tsai wrote:

> It depends on the second half of commit 4aa8146c89f3 ("ASoC: sun8i-codec:
> Remove analog "HP" widget"), which is also a cleanup. Would it be OK
> to pick these two over to fixes then? Or should we send a clean version
> instead?

That also doesn't pick over cleanly, can you send a new version against
Linus' tree, that'll be easiest and safest I think.

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

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

* Applied "ASoC: sun8i-codec: Update mixer to use SOC_DAPM_DOUBLE" to the asoc tree
@ 2017-03-16 14:06             ` Mark Brown
  0 siblings, 0 replies; 54+ messages in thread
From: Mark Brown @ 2017-03-16 14:06 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Mar 15, 2017 at 10:15:22PM +0800, Chen-Yu Tsai wrote:

> It depends on the second half of commit 4aa8146c89f3 ("ASoC: sun8i-codec:
> Remove analog "HP" widget"), which is also a cleanup. Would it be OK
> to pick these two over to fixes then? Or should we send a clean version
> instead?

That also doesn't pick over cleanly, can you send a new version against
Linus' tree, that'll be easiest and safest I think.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20170316/69d56a4b/attachment.sig>

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

* Re: Applied "ASoC: sun8i-codec: Update mixer to use SOC_DAPM_DOUBLE" to the asoc tree
@ 2017-03-17  8:13               ` Mylene Josserand
  0 siblings, 0 replies; 54+ messages in thread
From: Mylene Josserand @ 2017-03-17  8:13 UTC (permalink / raw)
  To: Mark Brown, Chen-Yu Tsai
  Cc: Liam Girdwood, Rob Herring, Mark Rutland, Maxime Ripard,
	Jaroslav Kysela, Takashi Iwai, Thomas Petazzoni, devicetree,
	Linux-ALSA, linux-kernel, Alexandre Belloni, linux-arm-kernel

Hello,

On 16/03/2017 15:06, Mark Brown wrote:
> On Wed, Mar 15, 2017 at 10:15:22PM +0800, Chen-Yu Tsai wrote:
>
>> It depends on the second half of commit 4aa8146c89f3 ("ASoC: sun8i-codec:
>> Remove analog "HP" widget"), which is also a cleanup. Would it be OK
>> to pick these two over to fixes then? Or should we send a clean version
>> instead?
>
> That also doesn't pick over cleanly, can you send a new version against
> Linus' tree, that'll be easiest and safest I think.
>

No problem, I will do that.

Thank you!

Best regards,

-- 
Mylène Josserand, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com

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

* Re: Applied "ASoC: sun8i-codec: Update mixer to use SOC_DAPM_DOUBLE" to the asoc tree
@ 2017-03-17  8:13               ` Mylene Josserand
  0 siblings, 0 replies; 54+ messages in thread
From: Mylene Josserand @ 2017-03-17  8:13 UTC (permalink / raw)
  To: Mark Brown, Chen-Yu Tsai
  Cc: Liam Girdwood, Rob Herring, Mark Rutland, Maxime Ripard,
	Jaroslav Kysela, Takashi Iwai, Thomas Petazzoni, devicetree,
	Linux-ALSA, linux-kernel, Alexandre Belloni, linux-arm-kernel

Hello,

On 16/03/2017 15:06, Mark Brown wrote:
> On Wed, Mar 15, 2017 at 10:15:22PM +0800, Chen-Yu Tsai wrote:
>
>> It depends on the second half of commit 4aa8146c89f3 ("ASoC: sun8i-codec:
>> Remove analog "HP" widget"), which is also a cleanup. Would it be OK
>> to pick these two over to fixes then? Or should we send a clean version
>> instead?
>
> That also doesn't pick over cleanly, can you send a new version against
> Linus' tree, that'll be easiest and safest I think.
>

No problem, I will do that.

Thank you!

Best regards,

-- 
Mylène Josserand, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Applied "ASoC: sun8i-codec: Update mixer to use SOC_DAPM_DOUBLE" to the asoc tree
@ 2017-03-17  8:13               ` Mylene Josserand
  0 siblings, 0 replies; 54+ messages in thread
From: Mylene Josserand @ 2017-03-17  8:13 UTC (permalink / raw)
  To: linux-arm-kernel

Hello,

On 16/03/2017 15:06, Mark Brown wrote:
> On Wed, Mar 15, 2017 at 10:15:22PM +0800, Chen-Yu Tsai wrote:
>
>> It depends on the second half of commit 4aa8146c89f3 ("ASoC: sun8i-codec:
>> Remove analog "HP" widget"), which is also a cleanup. Would it be OK
>> to pick these two over to fixes then? Or should we send a clean version
>> instead?
>
> That also doesn't pick over cleanly, can you send a new version against
> Linus' tree, that'll be easiest and safest I think.
>

No problem, I will do that.

Thank you!

Best regards,

-- 
Myl?ne Josserand, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com

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

* Applied "ASoC: sun8i-codec: Update mixer to use SOC_DAPM_DOUBLE" to the asoc tree
  2017-02-10  9:41   ` Mylène Josserand
@ 2017-03-21 18:45     ` Mark Brown
  -1 siblings, 0 replies; 54+ messages in thread
From: Mark Brown @ 2017-03-21 18:45 UTC (permalink / raw)
  Cc: mark.rutland, thomas.petazzoni, alsa-devel, devicetree,
	linux-kernel, tiwai, lgirdwood, robh+dt, wens, broonie,
	alexandre.belloni, maxime.ripard, mylene.josserand,
	linux-arm-kernel

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

The patch

   ASoC: sun8i-codec: Update mixer to use SOC_DAPM_DOUBLE

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 649d55436137b397accb6a9d1b6975598c693bcd Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Myl=C3=A8ne=20Josserand?=
 <mylene.josserand@free-electrons.com>
Date: Sat, 18 Mar 2017 08:55:06 +0100
Subject: [PATCH] ASoC: sun8i-codec: Update mixer to use SOC_DAPM_DOUBLE
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Update the driver to use the new SOC_DAPM_DOUBLE definition
on the digital DAC mixer.
Update the names accordingly as, when they are shared, the
controls are not prefixed with the widget's name anymore.

Signed-off-by: Mylène Josserand <mylene.josserand@free-electrons.com>
Acked-by: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
 sound/soc/sunxi/sun8i-codec.c | 45 ++++++++++++++++++++-----------------------
 1 file changed, 21 insertions(+), 24 deletions(-)

diff --git a/sound/soc/sunxi/sun8i-codec.c b/sound/soc/sunxi/sun8i-codec.c
index d60f6fbd36a2..107fa8213600 100644
--- a/sound/soc/sunxi/sun8i-codec.c
+++ b/sound/soc/sunxi/sun8i-codec.c
@@ -259,25 +259,20 @@ static int sun8i_codec_hw_params(struct snd_pcm_substream *substream,
 	return 0;
 }
 
-static const struct snd_kcontrol_new sun8i_output_left_mixer_controls[] = {
-	SOC_DAPM_SINGLE("LSlot 0", SUN8I_DAC_MXR_SRC,
-			SUN8I_DAC_MXR_SRC_DACL_MXR_SRC_AIF1DA0L, 1, 0),
-	SOC_DAPM_SINGLE("LSlot 1", SUN8I_DAC_MXR_SRC,
-			SUN8I_DAC_MXR_SRC_DACL_MXR_SRC_AIF1DA1L, 1, 0),
-	SOC_DAPM_SINGLE("DACL", SUN8I_DAC_MXR_SRC,
-			SUN8I_DAC_MXR_SRC_DACL_MXR_SRC_AIF2DACL, 1, 0),
-	SOC_DAPM_SINGLE("ADCL", SUN8I_DAC_MXR_SRC,
-			SUN8I_DAC_MXR_SRC_DACL_MXR_SRC_ADCL, 1, 0),
-};
-
-static const struct snd_kcontrol_new sun8i_output_right_mixer_controls[] = {
-	SOC_DAPM_SINGLE("RSlot 0", SUN8I_DAC_MXR_SRC,
+static const struct snd_kcontrol_new sun8i_dac_mixer_controls[] = {
+	SOC_DAPM_DOUBLE("AIF1 Slot 0 Digital DAC Playback Switch",
+			SUN8I_DAC_MXR_SRC,
+			SUN8I_DAC_MXR_SRC_DACL_MXR_SRC_AIF1DA0L,
 			SUN8I_DAC_MXR_SRC_DACR_MXR_SRC_AIF1DA0R, 1, 0),
-	SOC_DAPM_SINGLE("RSlot 1", SUN8I_DAC_MXR_SRC,
+	SOC_DAPM_DOUBLE("AIF1 Slot 1 Digital DAC Playback Switch",
+			SUN8I_DAC_MXR_SRC,
+			SUN8I_DAC_MXR_SRC_DACL_MXR_SRC_AIF1DA1L,
 			SUN8I_DAC_MXR_SRC_DACR_MXR_SRC_AIF1DA1R, 1, 0),
-	SOC_DAPM_SINGLE("DACR", SUN8I_DAC_MXR_SRC,
+	SOC_DAPM_DOUBLE("AIF2 Digital DAC Playback Switch", SUN8I_DAC_MXR_SRC,
+			SUN8I_DAC_MXR_SRC_DACL_MXR_SRC_AIF2DACL,
 			SUN8I_DAC_MXR_SRC_DACR_MXR_SRC_AIF2DACR, 1, 0),
-	SOC_DAPM_SINGLE("ADCR", SUN8I_DAC_MXR_SRC,
+	SOC_DAPM_DOUBLE("ADC Digital DAC Playback Switch", SUN8I_DAC_MXR_SRC,
+			SUN8I_DAC_MXR_SRC_DACL_MXR_SRC_ADCL,
 			SUN8I_DAC_MXR_SRC_DACR_MXR_SRC_ADCR, 1, 0),
 };
 
@@ -293,12 +288,12 @@ static const struct snd_soc_dapm_widget sun8i_codec_dapm_widgets[] = {
 			 SUN8I_AIF1_DACDAT_CTRL_AIF1_DA0R_ENA, 0),
 
 	/* DAC Mixers */
-	SND_SOC_DAPM_MIXER("Left DAC Mixer", SND_SOC_NOPM, 0, 0,
-			   sun8i_output_left_mixer_controls,
-			   ARRAY_SIZE(sun8i_output_left_mixer_controls)),
-	SND_SOC_DAPM_MIXER("Right DAC Mixer", SND_SOC_NOPM, 0, 0,
-			   sun8i_output_right_mixer_controls,
-			   ARRAY_SIZE(sun8i_output_right_mixer_controls)),
+	SND_SOC_DAPM_MIXER("Left Digital DAC Mixer", SND_SOC_NOPM, 0, 0,
+			   sun8i_dac_mixer_controls,
+			   ARRAY_SIZE(sun8i_dac_mixer_controls)),
+	SND_SOC_DAPM_MIXER("Right Digital DAC Mixer", SND_SOC_NOPM, 0, 0,
+			   sun8i_dac_mixer_controls,
+			   ARRAY_SIZE(sun8i_dac_mixer_controls)),
 
 	/* Clocks */
 	SND_SOC_DAPM_SUPPLY("MODCLK AFI1", SUN8I_MOD_CLK_ENA,
@@ -340,8 +335,10 @@ static const struct snd_soc_dapm_route sun8i_codec_dapm_routes[] = {
 	{ "Digital Right DAC", NULL, "DAC" },
 
 	/* DAC Mixer Routes */
-	{ "Left DAC Mixer", "LSlot 0", "Digital Left DAC"},
-	{ "Right DAC Mixer", "RSlot 0", "Digital Right DAC"},
+	{ "Left Digital DAC Mixer", "AIF1 Slot 0 Digital DAC Playback Switch",
+	  "Digital Left DAC"},
+	{ "Right Digital DAC Mixer", "AIF1 Slot 0 Digital DAC Playback Switch ",
+	  "Digital Right DAC"},
 };
 
 static struct snd_soc_dai_ops sun8i_codec_dai_ops = {
-- 
2.11.0


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



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

* Applied "ASoC: sun8i-codec: Update mixer to use SOC_DAPM_DOUBLE" to the asoc tree
@ 2017-03-21 18:45     ` Mark Brown
  0 siblings, 0 replies; 54+ messages in thread
From: Mark Brown @ 2017-03-21 18:45 UTC (permalink / raw)
  To: linux-arm-kernel

The patch

   ASoC: sun8i-codec: Update mixer to use SOC_DAPM_DOUBLE

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 649d55436137b397accb6a9d1b6975598c693bcd Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Myl=C3=A8ne=20Josserand?=
 <mylene.josserand@free-electrons.com>
Date: Sat, 18 Mar 2017 08:55:06 +0100
Subject: [PATCH] ASoC: sun8i-codec: Update mixer to use SOC_DAPM_DOUBLE
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Update the driver to use the new SOC_DAPM_DOUBLE definition
on the digital DAC mixer.
Update the names accordingly as, when they are shared, the
controls are not prefixed with the widget's name anymore.

Signed-off-by: Myl??ne Josserand <mylene.josserand@free-electrons.com>
Acked-by: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
 sound/soc/sunxi/sun8i-codec.c | 45 ++++++++++++++++++++-----------------------
 1 file changed, 21 insertions(+), 24 deletions(-)

diff --git a/sound/soc/sunxi/sun8i-codec.c b/sound/soc/sunxi/sun8i-codec.c
index d60f6fbd36a2..107fa8213600 100644
--- a/sound/soc/sunxi/sun8i-codec.c
+++ b/sound/soc/sunxi/sun8i-codec.c
@@ -259,25 +259,20 @@ static int sun8i_codec_hw_params(struct snd_pcm_substream *substream,
 	return 0;
 }
 
-static const struct snd_kcontrol_new sun8i_output_left_mixer_controls[] = {
-	SOC_DAPM_SINGLE("LSlot 0", SUN8I_DAC_MXR_SRC,
-			SUN8I_DAC_MXR_SRC_DACL_MXR_SRC_AIF1DA0L, 1, 0),
-	SOC_DAPM_SINGLE("LSlot 1", SUN8I_DAC_MXR_SRC,
-			SUN8I_DAC_MXR_SRC_DACL_MXR_SRC_AIF1DA1L, 1, 0),
-	SOC_DAPM_SINGLE("DACL", SUN8I_DAC_MXR_SRC,
-			SUN8I_DAC_MXR_SRC_DACL_MXR_SRC_AIF2DACL, 1, 0),
-	SOC_DAPM_SINGLE("ADCL", SUN8I_DAC_MXR_SRC,
-			SUN8I_DAC_MXR_SRC_DACL_MXR_SRC_ADCL, 1, 0),
-};
-
-static const struct snd_kcontrol_new sun8i_output_right_mixer_controls[] = {
-	SOC_DAPM_SINGLE("RSlot 0", SUN8I_DAC_MXR_SRC,
+static const struct snd_kcontrol_new sun8i_dac_mixer_controls[] = {
+	SOC_DAPM_DOUBLE("AIF1 Slot 0 Digital DAC Playback Switch",
+			SUN8I_DAC_MXR_SRC,
+			SUN8I_DAC_MXR_SRC_DACL_MXR_SRC_AIF1DA0L,
 			SUN8I_DAC_MXR_SRC_DACR_MXR_SRC_AIF1DA0R, 1, 0),
-	SOC_DAPM_SINGLE("RSlot 1", SUN8I_DAC_MXR_SRC,
+	SOC_DAPM_DOUBLE("AIF1 Slot 1 Digital DAC Playback Switch",
+			SUN8I_DAC_MXR_SRC,
+			SUN8I_DAC_MXR_SRC_DACL_MXR_SRC_AIF1DA1L,
 			SUN8I_DAC_MXR_SRC_DACR_MXR_SRC_AIF1DA1R, 1, 0),
-	SOC_DAPM_SINGLE("DACR", SUN8I_DAC_MXR_SRC,
+	SOC_DAPM_DOUBLE("AIF2 Digital DAC Playback Switch", SUN8I_DAC_MXR_SRC,
+			SUN8I_DAC_MXR_SRC_DACL_MXR_SRC_AIF2DACL,
 			SUN8I_DAC_MXR_SRC_DACR_MXR_SRC_AIF2DACR, 1, 0),
-	SOC_DAPM_SINGLE("ADCR", SUN8I_DAC_MXR_SRC,
+	SOC_DAPM_DOUBLE("ADC Digital DAC Playback Switch", SUN8I_DAC_MXR_SRC,
+			SUN8I_DAC_MXR_SRC_DACL_MXR_SRC_ADCL,
 			SUN8I_DAC_MXR_SRC_DACR_MXR_SRC_ADCR, 1, 0),
 };
 
@@ -293,12 +288,12 @@ static const struct snd_soc_dapm_widget sun8i_codec_dapm_widgets[] = {
 			 SUN8I_AIF1_DACDAT_CTRL_AIF1_DA0R_ENA, 0),
 
 	/* DAC Mixers */
-	SND_SOC_DAPM_MIXER("Left DAC Mixer", SND_SOC_NOPM, 0, 0,
-			   sun8i_output_left_mixer_controls,
-			   ARRAY_SIZE(sun8i_output_left_mixer_controls)),
-	SND_SOC_DAPM_MIXER("Right DAC Mixer", SND_SOC_NOPM, 0, 0,
-			   sun8i_output_right_mixer_controls,
-			   ARRAY_SIZE(sun8i_output_right_mixer_controls)),
+	SND_SOC_DAPM_MIXER("Left Digital DAC Mixer", SND_SOC_NOPM, 0, 0,
+			   sun8i_dac_mixer_controls,
+			   ARRAY_SIZE(sun8i_dac_mixer_controls)),
+	SND_SOC_DAPM_MIXER("Right Digital DAC Mixer", SND_SOC_NOPM, 0, 0,
+			   sun8i_dac_mixer_controls,
+			   ARRAY_SIZE(sun8i_dac_mixer_controls)),
 
 	/* Clocks */
 	SND_SOC_DAPM_SUPPLY("MODCLK AFI1", SUN8I_MOD_CLK_ENA,
@@ -340,8 +335,10 @@ static const struct snd_soc_dapm_route sun8i_codec_dapm_routes[] = {
 	{ "Digital Right DAC", NULL, "DAC" },
 
 	/* DAC Mixer Routes */
-	{ "Left DAC Mixer", "LSlot 0", "Digital Left DAC"},
-	{ "Right DAC Mixer", "RSlot 0", "Digital Right DAC"},
+	{ "Left Digital DAC Mixer", "AIF1 Slot 0 Digital DAC Playback Switch",
+	  "Digital Left DAC"},
+	{ "Right Digital DAC Mixer", "AIF1 Slot 0 Digital DAC Playback Switch ",
+	  "Digital Right DAC"},
 };
 
 static struct snd_soc_dai_ops sun8i_codec_dai_ops = {
-- 
2.11.0

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

* Applied "ASoC: sun8i-codec: Remove analog "HP" widget" to the asoc tree
  2017-02-10  9:41   ` Mylène Josserand
@ 2017-03-21 18:45     ` Mark Brown
  -1 siblings, 0 replies; 54+ messages in thread
From: Mark Brown @ 2017-03-21 18:45 UTC (permalink / raw)
  Cc: mark.rutland, thomas.petazzoni, alsa-devel, devicetree,
	linux-kernel, tiwai, lgirdwood, robh+dt, wens, broonie,
	alexandre.belloni, maxime.ripard, mylene.josserand,
	linux-arm-kernel

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

The patch

   ASoC: sun8i-codec: Remove analog "HP" widget

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 a82f16188a32a3c889916c582ea2d9188e3c2734 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Myl=C3=A8ne=20Josserand?=
 <mylene.josserand@free-electrons.com>
Date: Sat, 18 Mar 2017 08:55:05 +0100
Subject: [PATCH] ASoC: sun8i-codec: Remove analog "HP" widget
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

The "HP" widget is already present and take part to
the analog part (sun8i-codec-analog).

Remove it from the digital part as it is unnecessary.

Signed-off-by: Mylène Josserand <mylene.josserand@free-electrons.com>
Acked-by: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
 sound/soc/sunxi/sun8i-codec.c | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/sound/soc/sunxi/sun8i-codec.c b/sound/soc/sunxi/sun8i-codec.c
index b92bdc8361af..d60f6fbd36a2 100644
--- a/sound/soc/sunxi/sun8i-codec.c
+++ b/sound/soc/sunxi/sun8i-codec.c
@@ -321,8 +321,6 @@ static const struct snd_soc_dapm_widget sun8i_codec_dapm_widgets[] = {
 			    SUN8I_MOD_RST_CTL_AIF1, 0, NULL, 0),
 	SND_SOC_DAPM_SUPPLY("RST DAC", SUN8I_MOD_RST_CTL,
 			    SUN8I_MOD_RST_CTL_DAC, 0, NULL, 0),
-
-	SND_SOC_DAPM_OUTPUT("HP"),
 };
 
 static const struct snd_soc_dapm_route sun8i_codec_dapm_routes[] = {
@@ -344,10 +342,6 @@ static const struct snd_soc_dapm_route sun8i_codec_dapm_routes[] = {
 	/* DAC Mixer Routes */
 	{ "Left DAC Mixer", "LSlot 0", "Digital Left DAC"},
 	{ "Right DAC Mixer", "RSlot 0", "Digital Right DAC"},
-
-	/* End of route : HP out */
-	{ "HP", NULL, "Left DAC Mixer" },
-	{ "HP", NULL, "Right DAC Mixer" },
 };
 
 static struct snd_soc_dai_ops sun8i_codec_dai_ops = {
-- 
2.11.0


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



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

* Applied "ASoC: sun8i-codec: Remove analog "HP" widget" to the asoc tree
@ 2017-03-21 18:45     ` Mark Brown
  0 siblings, 0 replies; 54+ messages in thread
From: Mark Brown @ 2017-03-21 18:45 UTC (permalink / raw)
  To: linux-arm-kernel

The patch

   ASoC: sun8i-codec: Remove analog "HP" widget

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 a82f16188a32a3c889916c582ea2d9188e3c2734 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Myl=C3=A8ne=20Josserand?=
 <mylene.josserand@free-electrons.com>
Date: Sat, 18 Mar 2017 08:55:05 +0100
Subject: [PATCH] ASoC: sun8i-codec: Remove analog "HP" widget
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

The "HP" widget is already present and take part to
the analog part (sun8i-codec-analog).

Remove it from the digital part as it is unnecessary.

Signed-off-by: Myl??ne Josserand <mylene.josserand@free-electrons.com>
Acked-by: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
 sound/soc/sunxi/sun8i-codec.c | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/sound/soc/sunxi/sun8i-codec.c b/sound/soc/sunxi/sun8i-codec.c
index b92bdc8361af..d60f6fbd36a2 100644
--- a/sound/soc/sunxi/sun8i-codec.c
+++ b/sound/soc/sunxi/sun8i-codec.c
@@ -321,8 +321,6 @@ static const struct snd_soc_dapm_widget sun8i_codec_dapm_widgets[] = {
 			    SUN8I_MOD_RST_CTL_AIF1, 0, NULL, 0),
 	SND_SOC_DAPM_SUPPLY("RST DAC", SUN8I_MOD_RST_CTL,
 			    SUN8I_MOD_RST_CTL_DAC, 0, NULL, 0),
-
-	SND_SOC_DAPM_OUTPUT("HP"),
 };
 
 static const struct snd_soc_dapm_route sun8i_codec_dapm_routes[] = {
@@ -344,10 +342,6 @@ static const struct snd_soc_dapm_route sun8i_codec_dapm_routes[] = {
 	/* DAC Mixer Routes */
 	{ "Left DAC Mixer", "LSlot 0", "Digital Left DAC"},
 	{ "Right DAC Mixer", "RSlot 0", "Digital Right DAC"},
-
-	/* End of route : HP out */
-	{ "HP", NULL, "Left DAC Mixer" },
-	{ "HP", NULL, "Right DAC Mixer" },
 };
 
 static struct snd_soc_dai_ops sun8i_codec_dai_ops = {
-- 
2.11.0

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

end of thread, other threads:[~2017-03-21 18:45 UTC | newest]

Thread overview: 54+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-02-10  9:41 [PATCH 0/4] ASoC: sun8i-codec: Clean-up Mylène Josserand
2017-02-10  9:41 ` Mylène Josserand
2017-02-10  9:41 ` Mylène Josserand
2017-02-10  9:41 ` [PATCH 1/4] ASoC: sun8i-codec: Remove analog "HP" widget Mylène Josserand
2017-02-10  9:41   ` Mylène Josserand
2017-02-10  9:41   ` Mylène Josserand
2017-02-12  6:38   ` Chen-Yu Tsai
2017-02-12  6:38     ` Chen-Yu Tsai
2017-02-12  6:38     ` Chen-Yu Tsai
2017-03-08 13:22   ` Applied "ASoC: sun8i-codec: Remove analog "HP" widget" to the asoc tree Mark Brown
2017-03-08 13:22     ` Mark Brown
2017-03-21 18:45   ` Mark Brown
2017-03-21 18:45     ` Mark Brown
2017-02-10  9:41 ` [PATCH 2/4] ASoC: sun8i-codec: Update mixer to use SOC_DAPM_DOUBLE Mylène Josserand
2017-02-10  9:41   ` Mylène Josserand
2017-02-10  9:41   ` Mylène Josserand
2017-02-12  6:39   ` Chen-Yu Tsai
2017-02-12  6:39     ` Chen-Yu Tsai
2017-02-12  6:39     ` Chen-Yu Tsai
2017-03-08 13:22   ` Applied "ASoC: sun8i-codec: Update mixer to use SOC_DAPM_DOUBLE" to the asoc tree Mark Brown
2017-03-08 13:22     ` Mark Brown
2017-03-14  4:31     ` Chen-Yu Tsai
2017-03-14  4:31       ` Chen-Yu Tsai
2017-03-14  4:31       ` Chen-Yu Tsai
2017-03-15 13:43       ` Mark Brown
2017-03-15 13:43         ` Mark Brown
2017-03-15 13:43         ` Mark Brown
2017-03-15 14:15         ` Chen-Yu Tsai
2017-03-15 14:15           ` Chen-Yu Tsai
2017-03-15 14:15           ` Chen-Yu Tsai
2017-03-16 14:06           ` Mark Brown
2017-03-16 14:06             ` Mark Brown
2017-03-17  8:13             ` Mylene Josserand
2017-03-17  8:13               ` Mylene Josserand
2017-03-17  8:13               ` Mylene Josserand
2017-03-21 18:45   ` Mark Brown
2017-03-21 18:45     ` Mark Brown
2017-02-10  9:41 ` [PATCH 3/4] ASoC: sun8i-codec: Convert to SOC_MIXER_ARRAY Mylène Josserand
2017-02-10  9:41   ` Mylène Josserand
2017-02-10  9:41   ` Mylène Josserand
2017-02-12  6:40   ` Chen-Yu Tsai
2017-02-12  6:40     ` Chen-Yu Tsai
2017-02-12  6:40     ` Chen-Yu Tsai
2017-03-08 13:22   ` Applied "ASoC: sun8i-codec: Convert to SOC_MIXER_ARRAY" to the asoc tree Mark Brown
2017-03-08 13:22     ` Mark Brown
2017-02-10  9:41 ` [PATCH 4/4] ASoC: sun8i-codec: Convert to use SND_SOC_DAPM_AIF_IN Mylène Josserand
2017-02-10  9:41   ` Mylène Josserand
2017-02-10  9:41   ` Mylène Josserand
2017-03-06  9:56   ` Chen-Yu Tsai
2017-03-06  9:56     ` Chen-Yu Tsai
2017-03-06  9:56     ` Chen-Yu Tsai
2017-03-09  8:20     ` Mylene Josserand
2017-03-09  8:20       ` Mylene Josserand
2017-03-09  8:20       ` Mylene Josserand

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.