linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Chen-Yu Tsai <wens@csie.org>
To: "Mylène Josserand" <mylene.josserand@free-electrons.com>,
	"Maxime Ripard" <maxime.ripard@free-electrons.com>
Cc: Liam Girdwood <lgirdwood@gmail.com>,
	Mark Brown <broonie@kernel.org>, Rob Herring <robh+dt@kernel.org>,
	Mark Rutland <mark.rutland@arm.com>, Chen-Yu Tsai <wens@csie.org>,
	Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>,
	Linux-ALSA <alsa-devel@alsa-project.org>,
	devicetree <devicetree@vger.kernel.org>,
	linux-kernel <linux-kernel@vger.kernel.org>,
	linux-arm-kernel <linux-arm-kernel@lists.infradead.org>,
	Thomas Petazzoni <thomas.petazzoni@free-electrons.com>,
	Alexandre Belloni <alexandre.belloni@free-electrons.com>
Subject: Re: [PATCH 4/4] ASoC: sun8i-codec: Convert to use SND_SOC_DAPM_AIF_IN
Date: Mon, 6 Mar 2017 17:56:28 +0800	[thread overview]
Message-ID: <CAGb2v64Q0LysCPq2SpoNSqpyWDzNQ_CDhNipOGjW43dfnDABpw@mail.gmail.com> (raw)
In-Reply-To: <20170210094133.11382-5-mylene.josserand@free-electrons.com>

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
>

  reply	other threads:[~2017-03-06 10:04 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-10  9:41 [PATCH 0/4] ASoC: sun8i-codec: Clean-up Mylène Josserand
2017-02-10  9:41 ` [PATCH 1/4] ASoC: sun8i-codec: Remove analog "HP" widget Mylène Josserand
2017-02-12  6:38   ` Chen-Yu Tsai
2017-02-10  9:41 ` [PATCH 2/4] ASoC: sun8i-codec: Update mixer to use SOC_DAPM_DOUBLE Mylène Josserand
2017-02-12  6:39   ` Chen-Yu Tsai
     [not found]   ` <E1clbY9-0000DH-LY@finisterre>
2017-03-14  4:31     ` Applied "ASoC: sun8i-codec: Update mixer to use SOC_DAPM_DOUBLE" to the asoc tree Chen-Yu Tsai
2017-03-15 13:43       ` Mark Brown
2017-03-15 14:15         ` Chen-Yu Tsai
2017-03-16 14:06           ` Mark Brown
2017-03-17  8:13             ` Mylene Josserand
2017-02-10  9:41 ` [PATCH 3/4] ASoC: sun8i-codec: Convert to SOC_MIXER_ARRAY Mylène Josserand
2017-02-12  6:40   ` Chen-Yu Tsai
2017-02-10  9:41 ` [PATCH 4/4] ASoC: sun8i-codec: Convert to use SND_SOC_DAPM_AIF_IN Mylène Josserand
2017-03-06  9:56   ` Chen-Yu Tsai [this message]
2017-03-09  8:20     ` Mylene Josserand

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAGb2v64Q0LysCPq2SpoNSqpyWDzNQ_CDhNipOGjW43dfnDABpw@mail.gmail.com \
    --to=wens@csie.org \
    --cc=alexandre.belloni@free-electrons.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=lgirdwood@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=maxime.ripard@free-electrons.com \
    --cc=mylene.josserand@free-electrons.com \
    --cc=perex@perex.cz \
    --cc=robh+dt@kernel.org \
    --cc=thomas.petazzoni@free-electrons.com \
    --cc=tiwai@suse.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).