2022-10-28 12:19:32

by Amadeusz Sławiński

[permalink] [raw]
Subject: Re: [PATCH v1 2/2] ASoC: dmic: Add optional dmic selection

On 10/28/2022 12:24 PM, Ajye Huang wrote:
> Having two DMICs, a front DMIC and a rear DMIC,
> but only host audio input AUX port0 is used for these two Dmics.
> A "dmic_sel-gpios" property is used for a mixer control to switch
> the dmic signal source between the Front and Rear Dmic.
>
> usage: amixer -c0 cset name='Dmic Mux' 'FrontMic'
> usage: amixer -c0 cset name='Dmic Mux' 'RearMic'
>
> Refer to this one as an example,
> commit 3cfbf07c6d27
> ("ASoC: qcom: sc7180: Modify machine driver for 2mic")
>
> Signed-off-by: Ajye Huang <[email protected]>
> ---


I'm very suspicious of this patchset. As it is you add kcontrol which
won't take effect on most platforms making use of DMIC. It feels to me
that it is something you want to handle on machine driver side instead.



2022-10-28 13:00:32

by Ajye Huang

[permalink] [raw]
Subject: Re: [PATCH v1 2/2] ASoC: dmic: Add optional dmic selection

Hi Amadeusz,

Yes, the original version I tried the implementation on audio machine
driver, but one person gave me an idea for this dmic.c
Do you think it is appropriate on dmic.c?
If it isn't, I will add kcontrol into audio machine driver. thanks


On Fri, Oct 28, 2022 at 7:44 PM Amadeusz Sławiński
<[email protected]> wrote:
>
> On 10/28/2022 12:24 PM, Ajye Huang wrote:
> > Having two DMICs, a front DMIC and a rear DMIC,
> > but only host audio input AUX port0 is used for these two Dmics.
> > A "dmic_sel-gpios" property is used for a mixer control to switch
> > the dmic signal source between the Front and Rear Dmic.
> >
> > usage: amixer -c0 cset name='Dmic Mux' 'FrontMic'
> > usage: amixer -c0 cset name='Dmic Mux' 'RearMic'
> >
> > Refer to this one as an example,
> > commit 3cfbf07c6d27
> > ("ASoC: qcom: sc7180: Modify machine driver for 2mic")
> >
> > Signed-off-by: Ajye Huang <[email protected]>
> > ---
>
>
> I'm very suspicious of this patchset. As it is you add kcontrol which
> won't take effect on most platforms making use of DMIC. It feels to me
> that it is something you want to handle on machine driver side instead.
>

2022-10-28 13:50:36

by Mark Brown

[permalink] [raw]
Subject: Re: [PATCH v1 2/2] ASoC: dmic: Add optional dmic selection

On Fri, Oct 28, 2022 at 08:54:31PM +0800, Ajye Huang wrote:

> Yes, the original version I tried the implementation on audio machine
> driver, but one person gave me an idea for this dmic.c
> Do you think it is appropriate on dmic.c?
> If it isn't, I will add kcontrol into audio machine driver. thanks

It's definitely a better fit somewhere else - like I said in reply to
the DT binding it's really a mux that sits between the DMICs and the DAI
so that's probably where a generic version should be implemented.

Please don't top post, reply in line with needed context. This allows
readers to readily follow the flow of conversation and understand what
you are talking about and also helps ensure that everything in the
discussion is being addressed.


Attachments:
(No filename) (771.00 B)
signature.asc (499.00 B)
Download all attachments