public inbox for devicetree@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/3] ASoC: sun8i-codec: Clean-up
@ 2017-03-09  9:55 Mylène Josserand
  2017-03-09  9:56 ` [PATCH v2 1/3] ASoC: sun8i-codec: Fix space on audio-routing widget Mylène Josserand
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Mylène Josserand @ 2017-03-09  9:55 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

Hello everyone,

Thanks to Chen-Yu's review [1], a first version of this patchset to
clean-up my sun8i A33 audio driver has been sent and merged.
One patch [2] needs a rework so this cover-letter is for its V2.

Changes with v1:
	- Remove patches 01, 02 and 03 as they are merged in asoc/for-next.
	- Added a patch to fix an error on an widget name
	- Split the patch 04 into two patches to separate the device tree
	modifications with the codec driver's one.

Patches tested on asoc/for-next branch, last commit: 698b3eb9af.

Patch 1: Fix a dapm routing error because of an unwanted space.
Patch 2: Convert SND_SOC_DAPM_DAC to SND_SOC_DAPM_AIF_IN definition.
The AIF interfaces are renamed to be more precise.
Patch 3: Update the audio-routing's device tree to use the AIF interfaces
renamed in patch 01.

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
[2] https://patchwork.kernel.org/patch/9566325/

Thank you in advance,
Best regards,

Mylène Josserand (3):
  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    | 22 ++++++++++++----------
 2 files changed, 14 insertions(+), 12 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] 9+ messages in thread
* [PATCH v3 4/5] ASoC: sun8i-codec: Convert to use SND_SOC_DAPM_AIF_IN
@ 2017-03-18  7:55 Mylène Josserand
  2017-03-21 18:45 ` Applied "ASoC: sun8i-codec: Convert to use SND_SOC_DAPM_AIF_IN" to the asoc tree Mark Brown
  0 siblings, 1 reply; 9+ messages in thread
From: Mylène Josserand @ 2017-03-18  7:55 UTC (permalink / raw)
  To: lgirdwood, broonie, perex, tiwai, maxime.ripard, wens, robh+dt,
	mark.rutland
  Cc: thomas.petazzoni, devicetree, alsa-devel, linux-kernel,
	alexandre.belloni, Mylène Josserand, linux-arm-kernel

Update the driver to use SND_SOC_DAPM_AIF_IN instead of
SND_SOC_DAPM_DAC.
Rename the interface's widgets to be more precise on which slot
the interface is connected.

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

diff --git a/sound/soc/sunxi/sun8i-codec.c b/sound/soc/sunxi/sun8i-codec.c
index adb13fbd2006..7527ba29a5a0 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 */
 	SND_SOC_DAPM_MIXER("Left Digital DAC Mixer", SND_SOC_NOPM, 0, 0,
@@ -331,14 +333,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] 9+ messages in thread

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

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-03-09  9:55 [PATCH v2 0/3] ASoC: sun8i-codec: Clean-up Mylène Josserand
2017-03-09  9:56 ` [PATCH v2 1/3] ASoC: sun8i-codec: Fix space on audio-routing widget Mylène Josserand
2017-03-15 18:13   ` Applied "ASoC: sun8i-codec: Fix space on audio-routing widget" to the asoc tree Mark Brown
2017-03-21 18:45   ` Mark Brown
2017-03-09  9:56 ` [PATCH v2 2/3] ASoC: sun8i-codec: Convert to use SND_SOC_DAPM_AIF_IN Mylène Josserand
2017-03-15 18:13   ` Applied "ASoC: sun8i-codec: Convert to use SND_SOC_DAPM_AIF_IN" to the asoc tree Mark Brown
2017-03-09  9:56 ` [PATCH v2 3/3] ARM: dts: sun8i: Update audio-routing with renamed widgets Mylène Josserand
2017-03-21 18:45   ` Applied "ARM: dts: sun8i: Update audio-routing with renamed widgets" to the asoc tree Mark Brown
  -- strict thread matches above, loose matches on Subject: below --
2017-03-18  7:55 [PATCH v3 4/5] ASoC: sun8i-codec: Convert to use SND_SOC_DAPM_AIF_IN Mylène Josserand
2017-03-21 18:45 ` Applied "ASoC: sun8i-codec: Convert to use SND_SOC_DAPM_AIF_IN" to the asoc tree Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox