alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
From: Samuel Holland <samuel@sholland.org>
To: Mark Brown <broonie@kernel.org>,
	Liam Girdwood <lgirdwood@gmail.com>,
	Rob Herring <robh+dt@kernel.org>,
	Mark Rutland <mark.rutland@arm.com>,
	Maxime Ripard <mripard@kernel.org>, Chen-Yu Tsai <wens@csie.org>,
	Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>
Cc: Ondrej Jirman <megous@megous.com>,
	devicetree@vger.kernel.org, alsa-devel@alsa-project.org,
	Samuel Holland <samuel@sholland.org>,
	linux-kernel@vger.kernel.org,
	Vasily Khoruzhick <anarsoul@gmail.com>,
	linux-arm-kernel@lists.infradead.org
Subject: [PATCH 3/7] ASoC: sun8i-codec: Add missing mixer routes
Date: Sat, 25 Jul 2020 20:25:53 -0500	[thread overview]
Message-ID: <20200726012557.38282-4-samuel@sholland.org> (raw)
In-Reply-To: <20200726012557.38282-1-samuel@sholland.org>

The sun8i-codec driver provides ALSA controls for enabling/disabling
each of the inputs to the AIF1 Slot 0 and DAC mixers. For two of these
inputs (ADC->DAC and AIF1 DA0->AIF1 AD0), the audio source is
implemented, so the mixer inputs can be used.

However, because the DAPM routes are missing, these mixer inputs only
work when both the source and the mixer happen to be part of other
active audio paths. Adding the appropriate routes makes these ALSA
controls function all of the time.

Signed-off-by: Samuel Holland <samuel@sholland.org>
---
 sound/soc/sunxi/sun8i-codec.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/sound/soc/sunxi/sun8i-codec.c b/sound/soc/sunxi/sun8i-codec.c
index ffeac150c086..a75be9e82d22 100644
--- a/sound/soc/sunxi/sun8i-codec.c
+++ b/sound/soc/sunxi/sun8i-codec.c
@@ -490,14 +490,20 @@ static const struct snd_soc_dapm_route sun8i_codec_dapm_routes[] = {
 
 	/* DAC Mixer Routes */
 	{ "Left Digital DAC Mixer", "AIF1 Slot 0 Digital DAC Playback Switch", "AIF1 DA0L" },
+	{ "Left Digital DAC Mixer", "ADC Digital DAC Playback Switch", "ADCL" },
+
 	{ "Right Digital DAC Mixer", "AIF1 Slot 0 Digital DAC Playback Switch", "AIF1 DA0R" },
+	{ "Right Digital DAC Mixer", "ADC Digital DAC Playback Switch", "ADCR" },
 
 	/* ADC Routes */
 	{ "AIF1 AD0L", NULL, "Left Digital ADC Mixer" },
 	{ "AIF1 AD0R", NULL, "Right Digital ADC Mixer" },
 
 	/* ADC Mixer Routes */
+	{ "Left Digital ADC Mixer", "AIF1 Slot 0 Digital ADC Capture Switch", "AIF1 DA0L" },
 	{ "Left Digital ADC Mixer", "AIF1 Data Digital ADC Capture Switch", "ADCL" },
+
+	{ "Right Digital ADC Mixer", "AIF1 Slot 0 Digital ADC Capture Switch", "AIF1 DA0R" },
 	{ "Right Digital ADC Mixer", "AIF1 Data Digital ADC Capture Switch", "ADCR" },
 };
 
-- 
2.26.2


  parent reply	other threads:[~2020-07-26  1:29 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-26  1:25 [PATCH 0/7] Allwinner A64 digital audio codec fixes Samuel Holland
2020-07-26  1:25 ` [PATCH 1/7] ASoC: dt-bindings: Add a new compatible for the A64 codec Samuel Holland
2020-07-31 20:20   ` Rob Herring
2020-07-26  1:25 ` [PATCH 2/7] ASoC: sun8i-codec: Fix DAPM to match the hardware topology Samuel Holland
2020-07-26  1:25 ` Samuel Holland [this message]
2020-07-26  1:25 ` [PATCH 4/7] ASoC: sun8i-codec: Add a quirk for LRCK inversion Samuel Holland
2020-07-26  1:25 ` [PATCH 5/7] ARM: dts: sun8i: a33: Update codec widget names Samuel Holland
2020-07-26  1:25 ` [PATCH 6/7] arm64: dts: allwinner: a64: " Samuel Holland
2020-07-26  1:25 ` [PATCH 7/7] arm64: dts: allwinner: a64: Update the audio codec compatible Samuel Holland
2020-08-18 16:54 ` [PATCH 0/7] Allwinner A64 digital audio codec fixes Mark Brown
2020-08-24 14:03   ` Maxime Ripard
2020-08-25 15:36     ` Mark Brown
2020-08-28 10:08       ` Maxime Ripard
2020-08-28 10:49 ` Maxime Ripard
2020-08-28 11:05   ` Ricard Wanderlof

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=20200726012557.38282-4-samuel@sholland.org \
    --to=samuel@sholland.org \
    --cc=alsa-devel@alsa-project.org \
    --cc=anarsoul@gmail.com \
    --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=megous@megous.com \
    --cc=mripard@kernel.org \
    --cc=perex@perex.cz \
    --cc=robh+dt@kernel.org \
    --cc=tiwai@suse.com \
    --cc=wens@csie.org \
    /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).