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


Groups > linux.kernel > #1603735 > unrolled thread

[PATCH v3 0/5] ASoC: sun8i-a33 clean-up for 4.11

Started byMylène Josserand <mylene.josserand@free-electrons.com>
First post2017-03-18 09:00 +0100
Last post2017-03-20 17:40 +0100
Articles 13 — 4 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH v3 0/5] ASoC: sun8i-a33 clean-up for 4.11 Mylène Josserand          <mylene.josserand@free-electrons.com> - 2017-03-18 09:00 +0100
    [PATCH v3 1/5] ASoC: sun8i-codec: Remove analog "HP" widget Mylène Josserand          <mylene.josserand@free-electrons.com> - 2017-03-18 09:00 +0100
      Re: [PATCH v3 1/5] ASoC: sun8i-codec: Remove analog "HP" widget Chen-Yu Tsai <wens@csie.org> - 2017-03-20 13:50 +0100
      Re: [PATCH v3 1/5] ASoC: sun8i-codec: Remove analog "HP" widget Mark Brown <broonie@kernel.org> - 2017-03-20 19:30 +0100
        Re: [PATCH v3 1/5] ASoC: sun8i-codec: Remove analog "HP" widget Mylene Josserand <mylene.josserand@free-electrons.com> - 2017-03-21 08:50 +0100
        Re: [PATCH v3 1/5] ASoC: sun8i-codec: Remove analog "HP" widget Mylene Josserand <mylene.josserand@free-electrons.com> - 2017-03-21 10:10 +0100
    [PATCH v3 2/5] ASoC: sun8i-codec: Update mixer to use SOC_DAPM_DOUBLE Mylène Josserand          <mylene.josserand@free-electrons.com> - 2017-03-18 09:00 +0100
      Re: [PATCH v3 2/5] ASoC: sun8i-codec: Update mixer to use SOC_DAPM_DOUBLE Chen-Yu Tsai <wens@csie.org> - 2017-03-20 12:50 +0100
        Re: [PATCH v3 2/5] ASoC: sun8i-codec: Update mixer to use  SOC_DAPM_DOUBLE Mylene Josserand <mylene.josserand@free-electrons.com> - 2017-03-20 17:00 +0100
    [PATCH v3 5/5] ARM: dts: sun8i: Update audio-routing with renamed widgets Mylène Josserand          <mylene.josserand@free-electrons.com> - 2017-03-18 10:00 +0100
      Re: [PATCH v3 5/5] ARM: dts: sun8i: Update audio-routing with  renamed widgets Mark Brown <broonie@kernel.org> - 2017-03-20 12:50 +0100
        Re: [PATCH v3 5/5] ARM: dts: sun8i: Update audio-routing with renamed widgets Chen-Yu Tsai <wens@csie.org> - 2017-03-20 13:00 +0100
          Re: [PATCH v3 5/5] ARM: dts: sun8i: Update audio-routing with  renamed widgets Mark Brown <broonie@kernel.org> - 2017-03-20 17:40 +0100

#1603735 — [PATCH v3 0/5] ASoC: sun8i-a33 clean-up for 4.11

FromMylène Josserand <mylene.josserand@free-electrons.com>
Date2017-03-18 09:00 +0100
Subject[PATCH v3 0/5] ASoC: sun8i-a33 clean-up for 4.11
Message-ID<tmhrj-30E-3@gated-at.bofh.it>
Hi everyone,

As discussed in this thread [1], here are a V3 of the cleanup series for
the sun8i-a33 driver (introduced in v4.11-rc1) as fixes for v4.11.

Based on: Linus repository - master branch
Last commit: 8841b5f0cd ("Merge tag 'nfs-for-4.11-2' of
     git://git.linux-nfs.org/projects/anna/linux-nfs")

Changes since v1 and v2:
	- Patch 01: No changes from v1, it applies directly
	- Patch 02: No changes from v1, it applies directly
	once patch 01 has been applied.
	- Patch 03: No changes from v2, it applies directly
	- Patch 04: Rebased on master branch
	- Patch 05: No changes from v2, it applies directly

Patch 01 removes some unnecessary widgets.
Patch 02 updates the driver to use SOC_DAPM_DOUBLE.
Patch 03 removes a space on a widget name that implies an error
on audio routing as the widget is unknown.
Patch 04 improves some widgets (names and types).
As widget names changed in patch 04, the patch 05 is needed to use
the same names on audio routing. Otherwise, the device tree for sun8i-a33
will be broken and the audio codec will not work.

Only patches 01 and 02 were initially wanted as fixes for v4.11 but, with Chen-Yu,
we thought that patch 03 and 04 could be also applied as fixes. As patch 04
creates a break with the device tree, I added patch 05 in this series.

Let me know what you think.

[1]: https://lkml.org/lkml/2017/3/14/4

Thank you in advance,

Best regards,

Mylène Josserand (5):
  ASoC: sun8i-codec: Remove analog "HP" widget
  ASoC: sun8i-codec: Update mixer to use SOC_DAPM_DOUBLE
  ASoC: sun8i-codec: Fix space on audio-routing widget
  ASoC: sun8i-codec: Convert to use SND_SOC_DAPM_AIF_IN
  ARM: dts: sun8i: Update audio-routing with renamed widgets

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

-- 
2.11.0

[toc] | [next] | [standalone]


#1603736 — [PATCH v3 1/5] ASoC: sun8i-codec: Remove analog "HP" widget

FromMylène Josserand <mylene.josserand@free-electrons.com>
Date2017-03-18 09:00 +0100
Subject[PATCH v3 1/5] ASoC: sun8i-codec: Remove analog "HP" widget
Message-ID<tmhrj-30E-9@gated-at.bofh.it>
In reply to#1603735
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

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


#1604518 — Re: [PATCH v3 1/5] ASoC: sun8i-codec: Remove analog "HP" widget

FromChen-Yu Tsai <wens@csie.org>
Date2017-03-20 13:50 +0100
SubjectRe: [PATCH v3 1/5] ASoC: sun8i-codec: Remove analog "HP" widget
Message-ID<tn4V5-4Nu-57@gated-at.bofh.it>
In reply to#1603736
On Sat, Mar 18, 2017 at 3:55 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>

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


#1605013 — Re: [PATCH v3 1/5] ASoC: sun8i-codec: Remove analog "HP" widget

FromMark Brown <broonie@kernel.org>
Date2017-03-20 19:30 +0100
SubjectRe: [PATCH v3 1/5] ASoC: sun8i-codec: Remove analog "HP" widget
Message-ID<tnae9-cZ-87@gated-at.bofh.it>
In reply to#1603736

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

On Sat, Mar 18, 2017 at 08:55:05AM +0100, Mylène Josserand 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.

I know I said to send against Linus' tree but it turns out this actually
conflicts with some of the existing fixes, please see my fixes/sunxi
branch and resend against that.  Sorry for the hassle here.

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


#1605378 — Re: [PATCH v3 1/5] ASoC: sun8i-codec: Remove analog "HP" widget

FromMylene Josserand <mylene.josserand@free-electrons.com>
Date2017-03-21 08:50 +0100
SubjectRe: [PATCH v3 1/5] ASoC: sun8i-codec: Remove analog "HP" widget
Message-ID<tnmIi-cd-23@gated-at.bofh.it>
In reply to#1605013
Hi Mark,

On 20/03/2017 18:39, Mark Brown wrote:
> On Sat, Mar 18, 2017 at 08:55:05AM +0100, Mylène Josserand 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.
>
> I know I said to send against Linus' tree but it turns out this actually
> conflicts with some of the existing fixes, please see my fixes/sunxi
> branch and resend against that.  Sorry for the hassle here.
>

Sure, no problem! I will rebase my V4 on your fixes/sunxi branch.

Best regards,

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

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


#1605443 — Re: [PATCH v3 1/5] ASoC: sun8i-codec: Remove analog "HP" widget

FromMylene Josserand <mylene.josserand@free-electrons.com>
Date2017-03-21 10:10 +0100
SubjectRe: [PATCH v3 1/5] ASoC: sun8i-codec: Remove analog "HP" widget
Message-ID<tnnXI-1cU-5@gated-at.bofh.it>
In reply to#1605013
Mark,

On 20/03/2017 18:39, Mark Brown wrote:
> On Sat, Mar 18, 2017 at 08:55:05AM +0100, Mylène Josserand 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.
>
> I know I said to send against Linus' tree but it turns out this actually
> conflicts with some of the existing fixes, please see my fixes/sunxi
> branch and resend against that.  Sorry for the hassle here.
>

It does not apply because my driver ("sun8i-codec") is, currently, not 
available in your fix/sunxi branch:

https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git/tree/sound/soc/sunxi?h=fix/sunxi

Should I apply the patches (which add my driver) as "dependencies" and 
indicate it in my cover letter? Let me know what I should do.

Thank you for the help!

Best regards,

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

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


#1603737 — [PATCH v3 2/5] ASoC: sun8i-codec: Update mixer to use SOC_DAPM_DOUBLE

FromMylène Josserand <mylene.josserand@free-electrons.com>
Date2017-03-18 09:00 +0100
Subject[PATCH v3 2/5] ASoC: sun8i-codec: Update mixer to use SOC_DAPM_DOUBLE
Message-ID<tmhrj-30E-11@gated-at.bofh.it>
In reply to#1603735
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

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


#1604434 — Re: [PATCH v3 2/5] ASoC: sun8i-codec: Update mixer to use SOC_DAPM_DOUBLE

FromChen-Yu Tsai <wens@csie.org>
Date2017-03-20 12:50 +0100
SubjectRe: [PATCH v3 2/5] ASoC: sun8i-codec: Update mixer to use SOC_DAPM_DOUBLE
Message-ID<tn3Z0-48j-23@gated-at.bofh.it>
In reply to#1603737
On Sat, Mar 18, 2017 at 3:55 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>
> ---
>  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 ",

The extra space fixed in the next patch could be squashed into this
patch. Otherwise,

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

> +         "Digital Right DAC"},
>  };
>
>  static struct snd_soc_dai_ops sun8i_codec_dai_ops = {
> --
> 2.11.0
>

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


#1604717 — Re: [PATCH v3 2/5] ASoC: sun8i-codec: Update mixer to use SOC_DAPM_DOUBLE

FromMylene Josserand <mylene.josserand@free-electrons.com>
Date2017-03-20 17:00 +0100
SubjectRe: [PATCH v3 2/5] ASoC: sun8i-codec: Update mixer to use SOC_DAPM_DOUBLE
Message-ID<tn7SW-6Ou-27@gated-at.bofh.it>
In reply to#1604434
Hi Chen-Yu,

On 20/03/2017 12:46, Chen-Yu Tsai wrote:
> On Sat, Mar 18, 2017 at 3:55 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>
>> ---
>>  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 ",
>
> The extra space fixed in the next patch could be squashed into this
> patch. Otherwise,

Oh, yes, sorry about that.

I will send a V4 with the fixes you pointed me on this series.

Thanks!

Best regards,

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

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


#1603742 — [PATCH v3 5/5] ARM: dts: sun8i: Update audio-routing with renamed widgets

FromMylène Josserand <mylene.josserand@free-electrons.com>
Date2017-03-18 10:00 +0100
Subject[PATCH v3 5/5] ARM: dts: sun8i: Update audio-routing with renamed widgets
Message-ID<tminn-3H1-3@gated-at.bofh.it>
In reply to#1603735
The digital AIF interfaces has been renamed in the sun8i audio codec
driver so the audio-routing in the device tree must be renamed too.

Signed-off-by: Mylène Josserand <mylene.josserand@free-electrons.com>
---
 arch/arm/boot/dts/sun8i-a33.dtsi | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm/boot/dts/sun8i-a33.dtsi b/arch/arm/boot/dts/sun8i-a33.dtsi
index 18c174fef84f..0467fb365bfc 100644
--- a/arch/arm/boot/dts/sun8i-a33.dtsi
+++ b/arch/arm/boot/dts/sun8i-a33.dtsi
@@ -113,8 +113,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 {
-- 
2.11.0

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


#1604427 — Re: [PATCH v3 5/5] ARM: dts: sun8i: Update audio-routing with renamed widgets

FromMark Brown <broonie@kernel.org>
Date2017-03-20 12:50 +0100
SubjectRe: [PATCH v3 5/5] ARM: dts: sun8i: Update audio-routing with renamed widgets
Message-ID<tn3Z0-48j-5@gated-at.bofh.it>
In reply to#1603742

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

On Sat, Mar 18, 2017 at 08:55:09AM +0100, Mylène Josserand wrote:
> The digital AIF interfaces has been renamed in the sun8i audio codec
> driver so the audio-routing in the device tree must be renamed too.

Given that these are fixes it probably makes sense that they all go in
together, can I get some acks for this and I'll apply it?

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


#1604441 — Re: [PATCH v3 5/5] ARM: dts: sun8i: Update audio-routing with renamed widgets

FromChen-Yu Tsai <wens@csie.org>
Date2017-03-20 13:00 +0100
SubjectRe: [PATCH v3 5/5] ARM: dts: sun8i: Update audio-routing with renamed widgets
Message-ID<tn48G-4dt-13@gated-at.bofh.it>
In reply to#1604427
On Mon, Mar 20, 2017 at 7:38 PM, Mark Brown <broonie@kernel.org> wrote:
> On Sat, Mar 18, 2017 at 08:55:09AM +0100, Mylène Josserand wrote:
>> The digital AIF interfaces has been renamed in the sun8i audio codec
>> driver so the audio-routing in the device tree must be renamed too.
>
> Given that these are fixes it probably makes sense that they all go in
> together, can I get some acks for this and I'll apply it?

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

Though this patch should go in through the arm-soc tree.

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


#1604769 — Re: [PATCH v3 5/5] ARM: dts: sun8i: Update audio-routing with renamed widgets

FromMark Brown <broonie@kernel.org>
Date2017-03-20 17:40 +0100
SubjectRe: [PATCH v3 5/5] ARM: dts: sun8i: Update audio-routing with renamed widgets
Message-ID<tn8vG-7pZ-71@gated-at.bofh.it>
In reply to#1604441

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

On Mon, Mar 20, 2017 at 07:53:37PM +0800, Chen-Yu Tsai wrote:
> On Mon, Mar 20, 2017 at 7:38 PM, Mark Brown <broonie@kernel.org> wrote:

> > Given that these are fixes it probably makes sense that they all go in
> > together, can I get some acks for this and I'll apply it?

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

> Though this patch should go in through the arm-soc tree.

Well, ideally but I'm not sure it's a super big deal to get the odd bit
coming through so long as it doesn't conflict, it's more of a big deal
to make sure that we don't get the ASoC side without the DT side and
vice versa.

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web