mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Mark Brown <broonie@kernel.org>
To: Tommaso Merciai <tommaso.merciai@amarulasolutions.com>
Cc: linux-amarula@amarulasolutions.com, linuxfancy@googlegroups.com,
	Liam Girdwood <lgirdwood@gmail.com>,
	Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>,
	alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] ASoC: max98088: add support for reg_4a_cfg_bypass reg
Date: Mon, 16 May 2022 12:57:56 +0100	[thread overview]
Message-ID: <YoI8RJc17naBOlaO@sirena.org.uk> (raw)
In-Reply-To: <20220513152055.GI649073@tom-ThinkPad-T14s-Gen-2i>

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

On Fri, May 13, 2022 at 05:20:55PM +0200, Tommaso Merciai wrote:
> On Thu, May 12, 2022 at 12:19:03PM +0100, Mark Brown wrote:

> > That sounds exactly like a DAPM control, please make them DAPM controls.

> Sorry again, but I'm quite new on alsa subsystem. I need an help on figuring out
> on how to implements your solution. From what you suggest I got that I need to create
> a bypass mixer for every switch (4 -> SPK, REC, MIC2, INA):

It depends how the audio is routed - that would be a fairly unusual
structure for hardware but it's possible.  Often bypass paths feed into
mixers that have other, non-bypass paths.

> After that, I need to route the new control mixers on the switch:

>  {"Out Mixer SPK", "SPK Bypass Switch", "RECN"},
>  {"Out Mixer REC", "REC Bypass Switch", "RECP"},
>  {"Out Mixer MIC", "MIC2 Bypass Switch", "MIC1"},
>  {"Out Mixer INA", "INA Bypass Switch", "INA"},

> Then route the bypass switch to the new output:
> 
>  {"SPKL", NULL, "SPK Bypass Switch"},
>  {"RECN", NULL, "REC Bypass Switch"},
>  {"MIC2", NULL, "MIC2 Bypass Switch"},
>  {"MIC1", NULL, "INA Bypass Switch"},

> I'm in the right way? What do you think about?

That's pretty much it if they're a bunch of separate things.

> Can you point me a similar bypass switch into the kernel to take as reference?

If you search for "Bypass" in sound/soc/codecs you'll see a bunch of
examples - a lot of the Wolfson devices have bypass paths for example.
You'll see that for example with wm9713 the bypass paths go into mixers
that have other inputs rather than being totally separate things - I see
that this device has things like "Right SPK Mixer" which look like they
might fit here.

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

      reply	other threads:[~2022-05-16 11:58 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-12  7:43 Tommaso Merciai
2022-05-12 10:12 ` Mark Brown
2022-05-12 10:31   ` Tommaso Merciai
2022-05-12 10:46   ` Tommaso Merciai
2022-05-12 10:53     ` Mark Brown
2022-05-12 11:09       ` Tommaso Merciai
2022-05-12 11:19         ` Mark Brown
2022-05-12 11:27           ` Tommaso Merciai
2022-05-13 15:20           ` Tommaso Merciai
2022-05-16 11:57             ` Mark Brown [this message]

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=YoI8RJc17naBOlaO@sirena.org.uk \
    --to=broonie@kernel.org \
    --cc=alsa-devel@alsa-project.org \
    --cc=lgirdwood@gmail.com \
    --cc=linux-amarula@amarulasolutions.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxfancy@googlegroups.com \
    --cc=perex@perex.cz \
    --cc=tiwai@suse.com \
    --cc=tommaso.merciai@amarulasolutions.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

all inboxes | Powered by JetHome®