Re: [PATCH v2 2/2] ASoC: qcom: sc7180: Modify machine driver for 2mic

2020-11-01 Thread ajye huang
Hi, Tzung-Bi I will release v3 version base on your suggestion Thank you for your reply Ajye Tzung-Bi Shih 於 2020年10月30日 週五 下午7:19寫道: > > On Fri, Oct 30, 2020 at 6:55 PM Ajye Huang > wrote: > > But dmic_get() will need dmic_switch, should i keep dmic_switch? > > I see. I overlooked it. You ca

Re: [PATCH v2 2/2] ASoC: qcom: sc7180: Modify machine driver for 2mic

2020-10-30 Thread Tzung-Bi Shih
On Fri, Oct 30, 2020 at 6:55 PM Ajye Huang wrote: > But dmic_get() will need dmic_switch, should i keep dmic_switch? I see. I overlooked it. You can keep the dmic_switch for this purpose or just call gpiod_get_value_cansleep().

Re: [PATCH v2 2/2] ASoC: qcom: sc7180: Modify machine driver for 2mic

2020-10-30 Thread Ajye Huang
On Fri, Oct 30, 2020 at 5:23 PM Tzung-Bi Shih wrote: > > On Fri, Oct 30, 2020 at 3:57 PM Ajye Huang wrote: > > +static struct gpio_desc *dmic_sel; > > +static int dmic_switch; > > If you really need them, you should put them in struct sc7180_snd_data. > Thank you, I will do it. > > +static int dm

Re: [PATCH v2 2/2] ASoC: qcom: sc7180: Modify machine driver for 2mic

2020-10-30 Thread Tzung-Bi Shih
On Fri, Oct 30, 2020 at 3:57 PM Ajye Huang wrote: > +static struct gpio_desc *dmic_sel; > +static int dmic_switch; If you really need them, you should put them in struct sc7180_snd_data. > +static int dmic_set(struct snd_kcontrol *kcontrol, > + struct snd_ctl_elem_value *ucontr

[PATCH v2 2/2] ASoC: qcom: sc7180: Modify machine driver for 2mic

2020-10-30 Thread Ajye Huang
In addition, having mixer control to switch between DMICs by using "dmic-gpios" property. Refer to this one as an example, commit b7a742cff3f6 ("ASoC: AMD: Use mixer control to switch between DMICs") Signed-off-by: Ajye Huang --- sound/soc/qcom/sc7180.c | 59