From: Tommaso Merciai <tommaso.merciai@amarulasolutions.com>
To: Mark Brown <broonie@kernel.org>
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: Fri, 13 May 2022 17:20:55 +0200 [thread overview]
Message-ID: <20220513152055.GI649073@tom-ThinkPad-T14s-Gen-2i> (raw)
In-Reply-To: <YnztJxdSFau6SYC5@sirena.org.uk>
On Thu, May 12, 2022 at 12:19:03PM +0100, Mark Brown wrote:
> On Thu, May 12, 2022 at 01:09:59PM +0200, Tommaso Merciai wrote:
> > On Thu, May 12, 2022 at 11:53:07AM +0100, Mark Brown wrote:
> > > On Thu, May 12, 2022 at 12:46:42PM +0200, Tommaso Merciai wrote:
> > > > On Thu, May 12, 2022 at 11:12:02AM +0100, Mark Brown wrote:
>
> > > > > These look like they should be DAPM controls since they're controlling
> > > > > audio routing but they're being added as regular controls.
>
> > > > Sorry again. You suggest to create a new structure for these entries,
> > > > for example:
>
> > > If that's how they fit into the routing for the device, yes - you'd need
> > > to define the bypass mixer as well and set up appropraite routes.
>
> > I added this reg as regular controls because this reg is pretty generic
> > as you can see this controll bypass of some output, not all.
> > What do you think about?
>
> That sounds exactly like a DAPM control, please make them DAPM controls.
Hi Mark,
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):
/* Out Mixer SPK */
static const struct snd_kcontrol_new max98088_output_bypass_spk_mixer_controls[] = {
SOC_DAPM_SINGLE("SPK Bypass Switch", M98088_REG_4A_CFG_BYPASS, 0, 1, 0),
};
/* Out Mixer REC */
static const struct snd_kcontrol_new max98088_output_bypass_rec_mixer_controls[] = {
SOC_DAPM_SINGLE("REC Bypass Switch", M98088_REG_4A_CFG_BYPASS, 1, 1, 0),
};
/* Out Mixer MIC */
static const struct snd_kcontrol_new max98088_output_bypass_mic_mixer_controls[] = {
SOC_DAPM_SINGLE("MIC2 Bypass Switch", M98088_REG_4A_CFG_BYPASS, 4, 1, 0),
};
/* Out Mixer INA */
static const struct snd_kcontrol_new max98088_output_bypass_ina_mixer_controls[] = {
SOC_DAPM_SINGLE("INA Bypass Switch", M98088_REG_4A_CFG_BYPASS, 7, 1, 0),
};
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?
Can you point me a similar bypass switch into the kernel to take as reference?
Thanks in advance
Regards,
Tommmaso
--
Tommaso Merciai
Embedded Linux Engineer
tommaso.merciai@amarulasolutions.com
__________________________________
Amarula Solutions SRL
Via Le Canevare 30, 31100 Treviso, Veneto, IT
T. +39 042 243 5310
info@amarulasolutions.com
www.amarulasolutions.com
next prev parent reply other threads:[~2022-05-13 15:21 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 [this message]
2022-05-16 11:57 ` Mark Brown
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=20220513152055.GI649073@tom-ThinkPad-T14s-Gen-2i \
--to=tommaso.merciai@amarulasolutions.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.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 \
/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®