All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v6 0/2] Modify documentation and machine driver for mt8186_rt1019_rt5682s sound card
@ 2022-11-02 12:59 ` Ajye Huang
  0 siblings, 0 replies; 24+ messages in thread
From: Ajye Huang @ 2022-11-02 12:59 UTC (permalink / raw)
  To: linux-kernel
  Cc: Mark Brown, Liam Girdwood, Krzysztof Kozlowski, Rob Herring,
	linux-mediatek, chunxu . li, Takashi Iwai, Jaroslav Kysela,
	Jiaxin Yu, Matthias Brugger, AngeloGioacchino Del Regno,
	Ajye Huang, Nícolas F . R . A . Prado, linux-arm-kernel,
	devicetree, alsa-devel

v6:
- dmic codec driver: 
  - Modify "FrontMic" to "Front Mic" and "RearMic" to "Rear Mic"
    to consisit with commit 3cfbf07c6d27 mentioned in description.

v5:
- Documentation: 
  - Add #include <dt-bindings/gpio/gpio.h> in order to use
    GPIO_ACTIVE_HIGH.
  - Remove the change-id in message.

v4:
- Documentation: 
  - Fix the FATAL ERROR: Unable to parse input tree.

v3:
- Documentation: 
  - Add an explain example in description.
  - Add the pinctrl-name and pinctrl id in its example.

v2:
- dmic codec driver: 
  - Remove the unnecessary use of_property_read_bool()

v1:
- Documentation: Add dmic-gpios optional prop for two DMICs case.
- dmic codec driver: 
  - "dmic-gpios" property is used for amixer control to switch
     the dmic signal source between the Front and Rear Dmic.

Thanks for the review!

Ajye Huang (2):
  ASoC: mediatek: dt-bindings: modify machine bindings for two MICs case
  ASoC: mediatek: mt8186-rt5682: Modify machine driver for two DMICs
    case

 .../sound/mt8186-mt6366-rt1019-rt5682s.yaml   |  14 ++-
 .../mt8186/mt8186-mt6366-rt1019-rt5682s.c     | 102 +++++++++++++++++-
 2 files changed, 114 insertions(+), 2 deletions(-)

-- 
2.25.1


^ permalink raw reply	[flat|nested] 24+ messages in thread

* [PATCH v6 0/2] Modify documentation and machine driver for mt8186_rt1019_rt5682s sound card
@ 2022-11-02 12:59 ` Ajye Huang
  0 siblings, 0 replies; 24+ messages in thread
From: Ajye Huang @ 2022-11-02 12:59 UTC (permalink / raw)
  To: linux-kernel
  Cc: devicetree, alsa-devel, chunxu . li,
	Nícolas F . R . A . Prado, Mark Brown, Ajye Huang,
	Liam Girdwood, Jiaxin Yu, Takashi Iwai, Rob Herring,
	linux-mediatek, Krzysztof Kozlowski, Matthias Brugger,
	linux-arm-kernel, AngeloGioacchino Del Regno

v6:
- dmic codec driver: 
  - Modify "FrontMic" to "Front Mic" and "RearMic" to "Rear Mic"
    to consisit with commit 3cfbf07c6d27 mentioned in description.

v5:
- Documentation: 
  - Add #include <dt-bindings/gpio/gpio.h> in order to use
    GPIO_ACTIVE_HIGH.
  - Remove the change-id in message.

v4:
- Documentation: 
  - Fix the FATAL ERROR: Unable to parse input tree.

v3:
- Documentation: 
  - Add an explain example in description.
  - Add the pinctrl-name and pinctrl id in its example.

v2:
- dmic codec driver: 
  - Remove the unnecessary use of_property_read_bool()

v1:
- Documentation: Add dmic-gpios optional prop for two DMICs case.
- dmic codec driver: 
  - "dmic-gpios" property is used for amixer control to switch
     the dmic signal source between the Front and Rear Dmic.

Thanks for the review!

Ajye Huang (2):
  ASoC: mediatek: dt-bindings: modify machine bindings for two MICs case
  ASoC: mediatek: mt8186-rt5682: Modify machine driver for two DMICs
    case

 .../sound/mt8186-mt6366-rt1019-rt5682s.yaml   |  14 ++-
 .../mt8186/mt8186-mt6366-rt1019-rt5682s.c     | 102 +++++++++++++++++-
 2 files changed, 114 insertions(+), 2 deletions(-)

-- 
2.25.1


^ permalink raw reply	[flat|nested] 24+ messages in thread

* [PATCH v6 0/2] Modify documentation and machine driver for mt8186_rt1019_rt5682s sound card
@ 2022-11-02 12:59 ` Ajye Huang
  0 siblings, 0 replies; 24+ messages in thread
From: Ajye Huang @ 2022-11-02 12:59 UTC (permalink / raw)
  To: linux-kernel
  Cc: Mark Brown, Liam Girdwood, Krzysztof Kozlowski, Rob Herring,
	linux-mediatek, chunxu . li, Takashi Iwai, Jaroslav Kysela,
	Jiaxin Yu, Matthias Brugger, AngeloGioacchino Del Regno,
	Ajye Huang, Nícolas F . R . A . Prado, linux-arm-kernel,
	devicetree, alsa-devel

v6:
- dmic codec driver: 
  - Modify "FrontMic" to "Front Mic" and "RearMic" to "Rear Mic"
    to consisit with commit 3cfbf07c6d27 mentioned in description.

v5:
- Documentation: 
  - Add #include <dt-bindings/gpio/gpio.h> in order to use
    GPIO_ACTIVE_HIGH.
  - Remove the change-id in message.

v4:
- Documentation: 
  - Fix the FATAL ERROR: Unable to parse input tree.

v3:
- Documentation: 
  - Add an explain example in description.
  - Add the pinctrl-name and pinctrl id in its example.

v2:
- dmic codec driver: 
  - Remove the unnecessary use of_property_read_bool()

v1:
- Documentation: Add dmic-gpios optional prop for two DMICs case.
- dmic codec driver: 
  - "dmic-gpios" property is used for amixer control to switch
     the dmic signal source between the Front and Rear Dmic.

Thanks for the review!

Ajye Huang (2):
  ASoC: mediatek: dt-bindings: modify machine bindings for two MICs case
  ASoC: mediatek: mt8186-rt5682: Modify machine driver for two DMICs
    case

 .../sound/mt8186-mt6366-rt1019-rt5682s.yaml   |  14 ++-
 .../mt8186/mt8186-mt6366-rt1019-rt5682s.c     | 102 +++++++++++++++++-
 2 files changed, 114 insertions(+), 2 deletions(-)

-- 
2.25.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 24+ messages in thread

* [PATCH v6 1/2] ASoC: mediatek: dt-bindings: modify machine bindings for two MICs case
  2022-11-02 12:59 ` Ajye Huang
  (?)
@ 2022-11-02 12:59   ` Ajye Huang
  -1 siblings, 0 replies; 24+ messages in thread
From: Ajye Huang @ 2022-11-02 12:59 UTC (permalink / raw)
  To: linux-kernel
  Cc: Mark Brown, Liam Girdwood, Krzysztof Kozlowski, Rob Herring,
	linux-mediatek, chunxu . li, Takashi Iwai, Jaroslav Kysela,
	Jiaxin Yu, Matthias Brugger, AngeloGioacchino Del Regno,
	Ajye Huang, Nícolas F . R . A . Prado, linux-arm-kernel,
	devicetree, alsa-devel

Add a property "dmic-gpios" for switching between two MICs.

Signed-off-by: Ajye Huang <ajye_huang@compal.corp-partner.google.com>
---
 .../sound/mt8186-mt6366-rt1019-rt5682s.yaml        | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/sound/mt8186-mt6366-rt1019-rt5682s.yaml b/Documentation/devicetree/bindings/sound/mt8186-mt6366-rt1019-rt5682s.yaml
index 4fc5b045d3cf..9d3139990237 100644
--- a/Documentation/devicetree/bindings/sound/mt8186-mt6366-rt1019-rt5682s.yaml
+++ b/Documentation/devicetree/bindings/sound/mt8186-mt6366-rt1019-rt5682s.yaml
@@ -21,6 +21,13 @@ properties:
     $ref: "/schemas/types.yaml#/definitions/phandle"
     description: The phandle of MT8186 ASoC platform.
 
+  dmic-gpios:
+    maxItems: 1
+    description:
+      dmic-gpios optional prop for switching between two DMICs.
+      Ex, the GPIO can control a MUX HW component to select
+      dmic clk and data form a Front or Rear dmic.
+
   headset-codec:
     type: object
     additionalProperties: false
@@ -63,14 +70,19 @@ required:
 
 examples:
   - |
+    #include <dt-bindings/gpio/gpio.h>
 
     sound: mt8186-sound {
         compatible = "mediatek,mt8186-mt6366-rt1019-rt5682s-sound";
         mediatek,platform = <&afe>;
         pinctrl-names = "aud_clk_mosi_off",
-                        "aud_clk_mosi_on";
+                        "aud_clk_mosi_on",
+                        "aud_gpio_dmic_sec";
         pinctrl-0 = <&aud_clk_mosi_off>;
         pinctrl-1 = <&aud_clk_mosi_on>;
+        pinctrl-2 = <&aud_gpio_dmic_sec>;
+
+        dmic-gpios = <&pio 23 GPIO_ACTIVE_HIGH>;
 
         headset-codec {
             sound-dai = <&rt5682s>;
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 24+ messages in thread

* [PATCH v6 1/2] ASoC: mediatek: dt-bindings: modify machine bindings for two MICs case
@ 2022-11-02 12:59   ` Ajye Huang
  0 siblings, 0 replies; 24+ messages in thread
From: Ajye Huang @ 2022-11-02 12:59 UTC (permalink / raw)
  To: linux-kernel
  Cc: devicetree, alsa-devel, chunxu . li,
	Nícolas F . R . A . Prado, Mark Brown, Ajye Huang,
	Liam Girdwood, Jiaxin Yu, Takashi Iwai, Rob Herring,
	linux-mediatek, Krzysztof Kozlowski, Matthias Brugger,
	linux-arm-kernel, AngeloGioacchino Del Regno

Add a property "dmic-gpios" for switching between two MICs.

Signed-off-by: Ajye Huang <ajye_huang@compal.corp-partner.google.com>
---
 .../sound/mt8186-mt6366-rt1019-rt5682s.yaml        | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/sound/mt8186-mt6366-rt1019-rt5682s.yaml b/Documentation/devicetree/bindings/sound/mt8186-mt6366-rt1019-rt5682s.yaml
index 4fc5b045d3cf..9d3139990237 100644
--- a/Documentation/devicetree/bindings/sound/mt8186-mt6366-rt1019-rt5682s.yaml
+++ b/Documentation/devicetree/bindings/sound/mt8186-mt6366-rt1019-rt5682s.yaml
@@ -21,6 +21,13 @@ properties:
     $ref: "/schemas/types.yaml#/definitions/phandle"
     description: The phandle of MT8186 ASoC platform.
 
+  dmic-gpios:
+    maxItems: 1
+    description:
+      dmic-gpios optional prop for switching between two DMICs.
+      Ex, the GPIO can control a MUX HW component to select
+      dmic clk and data form a Front or Rear dmic.
+
   headset-codec:
     type: object
     additionalProperties: false
@@ -63,14 +70,19 @@ required:
 
 examples:
   - |
+    #include <dt-bindings/gpio/gpio.h>
 
     sound: mt8186-sound {
         compatible = "mediatek,mt8186-mt6366-rt1019-rt5682s-sound";
         mediatek,platform = <&afe>;
         pinctrl-names = "aud_clk_mosi_off",
-                        "aud_clk_mosi_on";
+                        "aud_clk_mosi_on",
+                        "aud_gpio_dmic_sec";
         pinctrl-0 = <&aud_clk_mosi_off>;
         pinctrl-1 = <&aud_clk_mosi_on>;
+        pinctrl-2 = <&aud_gpio_dmic_sec>;
+
+        dmic-gpios = <&pio 23 GPIO_ACTIVE_HIGH>;
 
         headset-codec {
             sound-dai = <&rt5682s>;
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 24+ messages in thread

* [PATCH v6 1/2] ASoC: mediatek: dt-bindings: modify machine bindings for two MICs case
@ 2022-11-02 12:59   ` Ajye Huang
  0 siblings, 0 replies; 24+ messages in thread
From: Ajye Huang @ 2022-11-02 12:59 UTC (permalink / raw)
  To: linux-kernel
  Cc: Mark Brown, Liam Girdwood, Krzysztof Kozlowski, Rob Herring,
	linux-mediatek, chunxu . li, Takashi Iwai, Jaroslav Kysela,
	Jiaxin Yu, Matthias Brugger, AngeloGioacchino Del Regno,
	Ajye Huang, Nícolas F . R . A . Prado, linux-arm-kernel,
	devicetree, alsa-devel

Add a property "dmic-gpios" for switching between two MICs.

Signed-off-by: Ajye Huang <ajye_huang@compal.corp-partner.google.com>
---
 .../sound/mt8186-mt6366-rt1019-rt5682s.yaml        | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/sound/mt8186-mt6366-rt1019-rt5682s.yaml b/Documentation/devicetree/bindings/sound/mt8186-mt6366-rt1019-rt5682s.yaml
index 4fc5b045d3cf..9d3139990237 100644
--- a/Documentation/devicetree/bindings/sound/mt8186-mt6366-rt1019-rt5682s.yaml
+++ b/Documentation/devicetree/bindings/sound/mt8186-mt6366-rt1019-rt5682s.yaml
@@ -21,6 +21,13 @@ properties:
     $ref: "/schemas/types.yaml#/definitions/phandle"
     description: The phandle of MT8186 ASoC platform.
 
+  dmic-gpios:
+    maxItems: 1
+    description:
+      dmic-gpios optional prop for switching between two DMICs.
+      Ex, the GPIO can control a MUX HW component to select
+      dmic clk and data form a Front or Rear dmic.
+
   headset-codec:
     type: object
     additionalProperties: false
@@ -63,14 +70,19 @@ required:
 
 examples:
   - |
+    #include <dt-bindings/gpio/gpio.h>
 
     sound: mt8186-sound {
         compatible = "mediatek,mt8186-mt6366-rt1019-rt5682s-sound";
         mediatek,platform = <&afe>;
         pinctrl-names = "aud_clk_mosi_off",
-                        "aud_clk_mosi_on";
+                        "aud_clk_mosi_on",
+                        "aud_gpio_dmic_sec";
         pinctrl-0 = <&aud_clk_mosi_off>;
         pinctrl-1 = <&aud_clk_mosi_on>;
+        pinctrl-2 = <&aud_gpio_dmic_sec>;
+
+        dmic-gpios = <&pio 23 GPIO_ACTIVE_HIGH>;
 
         headset-codec {
             sound-dai = <&rt5682s>;
-- 
2.25.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 24+ messages in thread

* [PATCH v6 2/2] ASoC: mediatek: mt8186-rt5682: Modify machine driver for two DMICs case
  2022-11-02 12:59 ` Ajye Huang
  (?)
@ 2022-11-02 12:59   ` Ajye Huang
  -1 siblings, 0 replies; 24+ messages in thread
From: Ajye Huang @ 2022-11-02 12:59 UTC (permalink / raw)
  To: linux-kernel
  Cc: Mark Brown, Liam Girdwood, Krzysztof Kozlowski, Rob Herring,
	linux-mediatek, chunxu . li, Takashi Iwai, Jaroslav Kysela,
	Jiaxin Yu, Matthias Brugger, AngeloGioacchino Del Regno,
	Ajye Huang, Nícolas F . R . A . Prado, linux-arm-kernel,
	devicetree, alsa-devel

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-gpios" property is used for a mixer control to switch
the dmic signal source between the Front and Rear Dmic.

Refer to this one as an example,
commit 3cfbf07c6d27
("ASoC: qcom: sc7180: Modify machine driver for 2mic")

Signed-off-by: Ajye Huang <ajye_huang@compal.corp-partner.google.com>
---
 .../mt8186/mt8186-mt6366-rt1019-rt5682s.c     | 102 +++++++++++++++++-
 1 file changed, 101 insertions(+), 1 deletion(-)

diff --git a/sound/soc/mediatek/mt8186/mt8186-mt6366-rt1019-rt5682s.c b/sound/soc/mediatek/mt8186/mt8186-mt6366-rt1019-rt5682s.c
index 2414c5b77233..16d834f3153d 100644
--- a/sound/soc/mediatek/mt8186/mt8186-mt6366-rt1019-rt5682s.c
+++ b/sound/soc/mediatek/mt8186/mt8186-mt6366-rt1019-rt5682s.c
@@ -7,6 +7,8 @@
 // Author: Jiaxin Yu <jiaxin.yu@mediatek.com>
 //
 
+#include <linux/gpio.h>
+#include <linux/gpio/consumer.h>
 #include <linux/input.h>
 #include <linux/module.h>
 #include <linux/of_device.h>
@@ -39,6 +41,8 @@
 
 struct mt8186_mt6366_rt1019_rt5682s_priv {
 	struct snd_soc_jack headset_jack, hdmi_jack;
+	struct gpio_desc *dmic_sel;
+	int dmic_switch;
 };
 
 /* Headset jack detection DAPM pins */
@@ -68,6 +72,94 @@ static struct snd_soc_codec_conf mt8186_mt6366_rt1019_rt5682s_codec_conf[] = {
 	},
 };
 
+static int dmic_get(struct snd_kcontrol *kcontrol,
+		    struct snd_ctl_elem_value *ucontrol)
+{
+	struct snd_soc_dapm_context *dapm = snd_soc_dapm_kcontrol_dapm(kcontrol);
+	struct mtk_soc_card_data *soc_card_data =
+		snd_soc_card_get_drvdata(dapm->card);
+	struct mt8186_mt6366_rt1019_rt5682s_priv *priv = soc_card_data->mach_priv;
+
+	ucontrol->value.integer.value[0] = priv->dmic_switch;
+	return 0;
+}
+
+static int dmic_set(struct snd_kcontrol *kcontrol,
+		    struct snd_ctl_elem_value *ucontrol)
+{
+	struct snd_soc_dapm_context *dapm = snd_soc_dapm_kcontrol_dapm(kcontrol);
+	struct mtk_soc_card_data *soc_card_data =
+		snd_soc_card_get_drvdata(dapm->card);
+	struct mt8186_mt6366_rt1019_rt5682s_priv *priv = soc_card_data->mach_priv;
+
+	priv->dmic_switch = ucontrol->value.integer.value[0];
+	if (priv->dmic_sel) {
+		gpiod_set_value(priv->dmic_sel, priv->dmic_switch);
+		dev_info(dapm->card->dev, "dmic_set_value %d\n",
+			 priv->dmic_switch);
+	}
+	return 0;
+}
+
+static const char * const dmic_mux_text[] = {
+	"Front Mic",
+	"Rear Mic",
+};
+
+static SOC_ENUM_SINGLE_DECL(mt8186_dmic_enum,
+			    SND_SOC_NOPM, 0, dmic_mux_text);
+
+static const struct snd_kcontrol_new mt8186_dmic_mux_control =
+	SOC_DAPM_ENUM_EXT("DMIC Select Mux", mt8186_dmic_enum,
+			  dmic_get, dmic_set);
+
+static const struct snd_soc_dapm_widget dmic_widgets[] = {
+	SND_SOC_DAPM_MIC("DMIC", NULL),
+	SND_SOC_DAPM_MUX("Dmic Mux", SND_SOC_NOPM, 0, 0, &mt8186_dmic_mux_control),
+};
+
+static const struct snd_soc_dapm_route dmic_map[] = {
+	/* digital mics */
+	{"Dmic Mux", "Front Mic", "DMIC"},
+	{"Dmic Mux", "Rear Mic", "DMIC"},
+};
+
+static int primary_codec_init(struct snd_soc_pcm_runtime *rtd)
+{
+	struct snd_soc_card *card = rtd->card;
+	struct mtk_soc_card_data *soc_card_data = snd_soc_card_get_drvdata(card);
+	struct mt8186_mt6366_rt1019_rt5682s_priv *priv = soc_card_data->mach_priv;
+	int ret;
+
+	ret = mt8186_mt6366_init(rtd);
+
+	if (ret) {
+		dev_err(card->dev, "mt8186_mt6366_init failed: %d\n", ret);
+		return ret;
+	}
+
+	if (!priv->dmic_sel) {
+		dev_info(card->dev, "dmic_sel is null\n");
+		return ret;
+	}
+
+	ret = snd_soc_dapm_new_controls(&card->dapm, dmic_widgets,
+					ARRAY_SIZE(dmic_widgets));
+	if (ret) {
+		dev_err(card->dev, "DMic widget addition failed: %d\n", ret);
+		/* Don't need to add routes if widget addition failed */
+		return ret;
+	}
+
+	ret = snd_soc_dapm_add_routes(&card->dapm, dmic_map,
+				      ARRAY_SIZE(dmic_map));
+
+	if (ret)
+		dev_err(card->dev, "DMic map addition failed: %d\n", ret);
+
+	return ret;
+}
+
 static int mt8186_rt5682s_init(struct snd_soc_pcm_runtime *rtd)
 {
 	struct snd_soc_component *cmpnt_afe =
@@ -775,7 +867,7 @@ static struct snd_soc_dai_link mt8186_mt6366_rt1019_rt5682s_dai_links[] = {
 		.dpcm_playback = 1,
 		.dpcm_capture = 1,
 		.ignore_suspend = 1,
-		.init = mt8186_mt6366_init,
+		.init = primary_codec_init,
 		SND_SOC_DAILINK_REG(adda),
 	},
 	{
@@ -1015,6 +1107,14 @@ static int mt8186_mt6366_rt1019_rt5682s_dev_probe(struct platform_device *pdev)
 
 	soc_card_data->mach_priv = mach_priv;
 
+	mach_priv->dmic_sel = devm_gpiod_get_optional(&pdev->dev,
+						      "dmic", GPIOD_OUT_LOW);
+	if (IS_ERR(mach_priv->dmic_sel)) {
+		dev_err(&pdev->dev, "DMIC gpio failed err=%ld\n",
+			PTR_ERR(mach_priv->dmic_sel));
+		return PTR_ERR(mach_priv->dmic_sel);
+	}
+
 	adsp_node = of_parse_phandle(pdev->dev.of_node, "mediatek,adsp", 0);
 	if (adsp_node) {
 		struct mtk_sof_priv *sof_priv;
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 24+ messages in thread

* [PATCH v6 2/2] ASoC: mediatek: mt8186-rt5682: Modify machine driver for two DMICs case
@ 2022-11-02 12:59   ` Ajye Huang
  0 siblings, 0 replies; 24+ messages in thread
From: Ajye Huang @ 2022-11-02 12:59 UTC (permalink / raw)
  To: linux-kernel
  Cc: devicetree, alsa-devel, chunxu . li,
	Nícolas F . R . A . Prado, Mark Brown, Ajye Huang,
	Liam Girdwood, Jiaxin Yu, Takashi Iwai, Rob Herring,
	linux-mediatek, Krzysztof Kozlowski, Matthias Brugger,
	linux-arm-kernel, AngeloGioacchino Del Regno

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-gpios" property is used for a mixer control to switch
the dmic signal source between the Front and Rear Dmic.

Refer to this one as an example,
commit 3cfbf07c6d27
("ASoC: qcom: sc7180: Modify machine driver for 2mic")

Signed-off-by: Ajye Huang <ajye_huang@compal.corp-partner.google.com>
---
 .../mt8186/mt8186-mt6366-rt1019-rt5682s.c     | 102 +++++++++++++++++-
 1 file changed, 101 insertions(+), 1 deletion(-)

diff --git a/sound/soc/mediatek/mt8186/mt8186-mt6366-rt1019-rt5682s.c b/sound/soc/mediatek/mt8186/mt8186-mt6366-rt1019-rt5682s.c
index 2414c5b77233..16d834f3153d 100644
--- a/sound/soc/mediatek/mt8186/mt8186-mt6366-rt1019-rt5682s.c
+++ b/sound/soc/mediatek/mt8186/mt8186-mt6366-rt1019-rt5682s.c
@@ -7,6 +7,8 @@
 // Author: Jiaxin Yu <jiaxin.yu@mediatek.com>
 //
 
+#include <linux/gpio.h>
+#include <linux/gpio/consumer.h>
 #include <linux/input.h>
 #include <linux/module.h>
 #include <linux/of_device.h>
@@ -39,6 +41,8 @@
 
 struct mt8186_mt6366_rt1019_rt5682s_priv {
 	struct snd_soc_jack headset_jack, hdmi_jack;
+	struct gpio_desc *dmic_sel;
+	int dmic_switch;
 };
 
 /* Headset jack detection DAPM pins */
@@ -68,6 +72,94 @@ static struct snd_soc_codec_conf mt8186_mt6366_rt1019_rt5682s_codec_conf[] = {
 	},
 };
 
+static int dmic_get(struct snd_kcontrol *kcontrol,
+		    struct snd_ctl_elem_value *ucontrol)
+{
+	struct snd_soc_dapm_context *dapm = snd_soc_dapm_kcontrol_dapm(kcontrol);
+	struct mtk_soc_card_data *soc_card_data =
+		snd_soc_card_get_drvdata(dapm->card);
+	struct mt8186_mt6366_rt1019_rt5682s_priv *priv = soc_card_data->mach_priv;
+
+	ucontrol->value.integer.value[0] = priv->dmic_switch;
+	return 0;
+}
+
+static int dmic_set(struct snd_kcontrol *kcontrol,
+		    struct snd_ctl_elem_value *ucontrol)
+{
+	struct snd_soc_dapm_context *dapm = snd_soc_dapm_kcontrol_dapm(kcontrol);
+	struct mtk_soc_card_data *soc_card_data =
+		snd_soc_card_get_drvdata(dapm->card);
+	struct mt8186_mt6366_rt1019_rt5682s_priv *priv = soc_card_data->mach_priv;
+
+	priv->dmic_switch = ucontrol->value.integer.value[0];
+	if (priv->dmic_sel) {
+		gpiod_set_value(priv->dmic_sel, priv->dmic_switch);
+		dev_info(dapm->card->dev, "dmic_set_value %d\n",
+			 priv->dmic_switch);
+	}
+	return 0;
+}
+
+static const char * const dmic_mux_text[] = {
+	"Front Mic",
+	"Rear Mic",
+};
+
+static SOC_ENUM_SINGLE_DECL(mt8186_dmic_enum,
+			    SND_SOC_NOPM, 0, dmic_mux_text);
+
+static const struct snd_kcontrol_new mt8186_dmic_mux_control =
+	SOC_DAPM_ENUM_EXT("DMIC Select Mux", mt8186_dmic_enum,
+			  dmic_get, dmic_set);
+
+static const struct snd_soc_dapm_widget dmic_widgets[] = {
+	SND_SOC_DAPM_MIC("DMIC", NULL),
+	SND_SOC_DAPM_MUX("Dmic Mux", SND_SOC_NOPM, 0, 0, &mt8186_dmic_mux_control),
+};
+
+static const struct snd_soc_dapm_route dmic_map[] = {
+	/* digital mics */
+	{"Dmic Mux", "Front Mic", "DMIC"},
+	{"Dmic Mux", "Rear Mic", "DMIC"},
+};
+
+static int primary_codec_init(struct snd_soc_pcm_runtime *rtd)
+{
+	struct snd_soc_card *card = rtd->card;
+	struct mtk_soc_card_data *soc_card_data = snd_soc_card_get_drvdata(card);
+	struct mt8186_mt6366_rt1019_rt5682s_priv *priv = soc_card_data->mach_priv;
+	int ret;
+
+	ret = mt8186_mt6366_init(rtd);
+
+	if (ret) {
+		dev_err(card->dev, "mt8186_mt6366_init failed: %d\n", ret);
+		return ret;
+	}
+
+	if (!priv->dmic_sel) {
+		dev_info(card->dev, "dmic_sel is null\n");
+		return ret;
+	}
+
+	ret = snd_soc_dapm_new_controls(&card->dapm, dmic_widgets,
+					ARRAY_SIZE(dmic_widgets));
+	if (ret) {
+		dev_err(card->dev, "DMic widget addition failed: %d\n", ret);
+		/* Don't need to add routes if widget addition failed */
+		return ret;
+	}
+
+	ret = snd_soc_dapm_add_routes(&card->dapm, dmic_map,
+				      ARRAY_SIZE(dmic_map));
+
+	if (ret)
+		dev_err(card->dev, "DMic map addition failed: %d\n", ret);
+
+	return ret;
+}
+
 static int mt8186_rt5682s_init(struct snd_soc_pcm_runtime *rtd)
 {
 	struct snd_soc_component *cmpnt_afe =
@@ -775,7 +867,7 @@ static struct snd_soc_dai_link mt8186_mt6366_rt1019_rt5682s_dai_links[] = {
 		.dpcm_playback = 1,
 		.dpcm_capture = 1,
 		.ignore_suspend = 1,
-		.init = mt8186_mt6366_init,
+		.init = primary_codec_init,
 		SND_SOC_DAILINK_REG(adda),
 	},
 	{
@@ -1015,6 +1107,14 @@ static int mt8186_mt6366_rt1019_rt5682s_dev_probe(struct platform_device *pdev)
 
 	soc_card_data->mach_priv = mach_priv;
 
+	mach_priv->dmic_sel = devm_gpiod_get_optional(&pdev->dev,
+						      "dmic", GPIOD_OUT_LOW);
+	if (IS_ERR(mach_priv->dmic_sel)) {
+		dev_err(&pdev->dev, "DMIC gpio failed err=%ld\n",
+			PTR_ERR(mach_priv->dmic_sel));
+		return PTR_ERR(mach_priv->dmic_sel);
+	}
+
 	adsp_node = of_parse_phandle(pdev->dev.of_node, "mediatek,adsp", 0);
 	if (adsp_node) {
 		struct mtk_sof_priv *sof_priv;
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 24+ messages in thread

* [PATCH v6 2/2] ASoC: mediatek: mt8186-rt5682: Modify machine driver for two DMICs case
@ 2022-11-02 12:59   ` Ajye Huang
  0 siblings, 0 replies; 24+ messages in thread
From: Ajye Huang @ 2022-11-02 12:59 UTC (permalink / raw)
  To: linux-kernel
  Cc: Mark Brown, Liam Girdwood, Krzysztof Kozlowski, Rob Herring,
	linux-mediatek, chunxu . li, Takashi Iwai, Jaroslav Kysela,
	Jiaxin Yu, Matthias Brugger, AngeloGioacchino Del Regno,
	Ajye Huang, Nícolas F . R . A . Prado, linux-arm-kernel,
	devicetree, alsa-devel

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-gpios" property is used for a mixer control to switch
the dmic signal source between the Front and Rear Dmic.

Refer to this one as an example,
commit 3cfbf07c6d27
("ASoC: qcom: sc7180: Modify machine driver for 2mic")

Signed-off-by: Ajye Huang <ajye_huang@compal.corp-partner.google.com>
---
 .../mt8186/mt8186-mt6366-rt1019-rt5682s.c     | 102 +++++++++++++++++-
 1 file changed, 101 insertions(+), 1 deletion(-)

diff --git a/sound/soc/mediatek/mt8186/mt8186-mt6366-rt1019-rt5682s.c b/sound/soc/mediatek/mt8186/mt8186-mt6366-rt1019-rt5682s.c
index 2414c5b77233..16d834f3153d 100644
--- a/sound/soc/mediatek/mt8186/mt8186-mt6366-rt1019-rt5682s.c
+++ b/sound/soc/mediatek/mt8186/mt8186-mt6366-rt1019-rt5682s.c
@@ -7,6 +7,8 @@
 // Author: Jiaxin Yu <jiaxin.yu@mediatek.com>
 //
 
+#include <linux/gpio.h>
+#include <linux/gpio/consumer.h>
 #include <linux/input.h>
 #include <linux/module.h>
 #include <linux/of_device.h>
@@ -39,6 +41,8 @@
 
 struct mt8186_mt6366_rt1019_rt5682s_priv {
 	struct snd_soc_jack headset_jack, hdmi_jack;
+	struct gpio_desc *dmic_sel;
+	int dmic_switch;
 };
 
 /* Headset jack detection DAPM pins */
@@ -68,6 +72,94 @@ static struct snd_soc_codec_conf mt8186_mt6366_rt1019_rt5682s_codec_conf[] = {
 	},
 };
 
+static int dmic_get(struct snd_kcontrol *kcontrol,
+		    struct snd_ctl_elem_value *ucontrol)
+{
+	struct snd_soc_dapm_context *dapm = snd_soc_dapm_kcontrol_dapm(kcontrol);
+	struct mtk_soc_card_data *soc_card_data =
+		snd_soc_card_get_drvdata(dapm->card);
+	struct mt8186_mt6366_rt1019_rt5682s_priv *priv = soc_card_data->mach_priv;
+
+	ucontrol->value.integer.value[0] = priv->dmic_switch;
+	return 0;
+}
+
+static int dmic_set(struct snd_kcontrol *kcontrol,
+		    struct snd_ctl_elem_value *ucontrol)
+{
+	struct snd_soc_dapm_context *dapm = snd_soc_dapm_kcontrol_dapm(kcontrol);
+	struct mtk_soc_card_data *soc_card_data =
+		snd_soc_card_get_drvdata(dapm->card);
+	struct mt8186_mt6366_rt1019_rt5682s_priv *priv = soc_card_data->mach_priv;
+
+	priv->dmic_switch = ucontrol->value.integer.value[0];
+	if (priv->dmic_sel) {
+		gpiod_set_value(priv->dmic_sel, priv->dmic_switch);
+		dev_info(dapm->card->dev, "dmic_set_value %d\n",
+			 priv->dmic_switch);
+	}
+	return 0;
+}
+
+static const char * const dmic_mux_text[] = {
+	"Front Mic",
+	"Rear Mic",
+};
+
+static SOC_ENUM_SINGLE_DECL(mt8186_dmic_enum,
+			    SND_SOC_NOPM, 0, dmic_mux_text);
+
+static const struct snd_kcontrol_new mt8186_dmic_mux_control =
+	SOC_DAPM_ENUM_EXT("DMIC Select Mux", mt8186_dmic_enum,
+			  dmic_get, dmic_set);
+
+static const struct snd_soc_dapm_widget dmic_widgets[] = {
+	SND_SOC_DAPM_MIC("DMIC", NULL),
+	SND_SOC_DAPM_MUX("Dmic Mux", SND_SOC_NOPM, 0, 0, &mt8186_dmic_mux_control),
+};
+
+static const struct snd_soc_dapm_route dmic_map[] = {
+	/* digital mics */
+	{"Dmic Mux", "Front Mic", "DMIC"},
+	{"Dmic Mux", "Rear Mic", "DMIC"},
+};
+
+static int primary_codec_init(struct snd_soc_pcm_runtime *rtd)
+{
+	struct snd_soc_card *card = rtd->card;
+	struct mtk_soc_card_data *soc_card_data = snd_soc_card_get_drvdata(card);
+	struct mt8186_mt6366_rt1019_rt5682s_priv *priv = soc_card_data->mach_priv;
+	int ret;
+
+	ret = mt8186_mt6366_init(rtd);
+
+	if (ret) {
+		dev_err(card->dev, "mt8186_mt6366_init failed: %d\n", ret);
+		return ret;
+	}
+
+	if (!priv->dmic_sel) {
+		dev_info(card->dev, "dmic_sel is null\n");
+		return ret;
+	}
+
+	ret = snd_soc_dapm_new_controls(&card->dapm, dmic_widgets,
+					ARRAY_SIZE(dmic_widgets));
+	if (ret) {
+		dev_err(card->dev, "DMic widget addition failed: %d\n", ret);
+		/* Don't need to add routes if widget addition failed */
+		return ret;
+	}
+
+	ret = snd_soc_dapm_add_routes(&card->dapm, dmic_map,
+				      ARRAY_SIZE(dmic_map));
+
+	if (ret)
+		dev_err(card->dev, "DMic map addition failed: %d\n", ret);
+
+	return ret;
+}
+
 static int mt8186_rt5682s_init(struct snd_soc_pcm_runtime *rtd)
 {
 	struct snd_soc_component *cmpnt_afe =
@@ -775,7 +867,7 @@ static struct snd_soc_dai_link mt8186_mt6366_rt1019_rt5682s_dai_links[] = {
 		.dpcm_playback = 1,
 		.dpcm_capture = 1,
 		.ignore_suspend = 1,
-		.init = mt8186_mt6366_init,
+		.init = primary_codec_init,
 		SND_SOC_DAILINK_REG(adda),
 	},
 	{
@@ -1015,6 +1107,14 @@ static int mt8186_mt6366_rt1019_rt5682s_dev_probe(struct platform_device *pdev)
 
 	soc_card_data->mach_priv = mach_priv;
 
+	mach_priv->dmic_sel = devm_gpiod_get_optional(&pdev->dev,
+						      "dmic", GPIOD_OUT_LOW);
+	if (IS_ERR(mach_priv->dmic_sel)) {
+		dev_err(&pdev->dev, "DMIC gpio failed err=%ld\n",
+			PTR_ERR(mach_priv->dmic_sel));
+		return PTR_ERR(mach_priv->dmic_sel);
+	}
+
 	adsp_node = of_parse_phandle(pdev->dev.of_node, "mediatek,adsp", 0);
 	if (adsp_node) {
 		struct mtk_sof_priv *sof_priv;
-- 
2.25.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 24+ messages in thread

* Re: [PATCH v6 2/2] ASoC: mediatek: mt8186-rt5682: Modify machine driver for two DMICs case
  2022-11-02 12:59   ` Ajye Huang
  (?)
@ 2022-11-03  8:59     ` AngeloGioacchino Del Regno
  -1 siblings, 0 replies; 24+ messages in thread
From: AngeloGioacchino Del Regno @ 2022-11-03  8:59 UTC (permalink / raw)
  To: Ajye Huang, linux-kernel
  Cc: Mark Brown, Liam Girdwood, Krzysztof Kozlowski, Rob Herring,
	linux-mediatek, chunxu . li, Takashi Iwai, Jaroslav Kysela,
	Jiaxin Yu, Matthias Brugger, Nícolas F . R . A . Prado,
	linux-arm-kernel, devicetree, alsa-devel

Il 02/11/22 13:59, Ajye Huang ha scritto:
> 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-gpios" property is used for a mixer control to switch
> the dmic signal source between the Front and Rear Dmic.
> 
> Refer to this one as an example,
> commit 3cfbf07c6d27
> ("ASoC: qcom: sc7180: Modify machine driver for 2mic")
> 
> Signed-off-by: Ajye Huang <ajye_huang@compal.corp-partner.google.com>

Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>


^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH v6 2/2] ASoC: mediatek: mt8186-rt5682: Modify machine driver for two DMICs case
@ 2022-11-03  8:59     ` AngeloGioacchino Del Regno
  0 siblings, 0 replies; 24+ messages in thread
From: AngeloGioacchino Del Regno @ 2022-11-03  8:59 UTC (permalink / raw)
  To: Ajye Huang, linux-kernel
  Cc: devicetree, alsa-devel, chunxu . li,
	Nícolas F . R . A . Prado, Mark Brown, Liam Girdwood,
	Jiaxin Yu, Takashi Iwai, Rob Herring, linux-mediatek,
	Krzysztof Kozlowski, Matthias Brugger, linux-arm-kernel

Il 02/11/22 13:59, Ajye Huang ha scritto:
> 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-gpios" property is used for a mixer control to switch
> the dmic signal source between the Front and Rear Dmic.
> 
> Refer to this one as an example,
> commit 3cfbf07c6d27
> ("ASoC: qcom: sc7180: Modify machine driver for 2mic")
> 
> Signed-off-by: Ajye Huang <ajye_huang@compal.corp-partner.google.com>

Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>


^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH v6 2/2] ASoC: mediatek: mt8186-rt5682: Modify machine driver for two DMICs case
@ 2022-11-03  8:59     ` AngeloGioacchino Del Regno
  0 siblings, 0 replies; 24+ messages in thread
From: AngeloGioacchino Del Regno @ 2022-11-03  8:59 UTC (permalink / raw)
  To: Ajye Huang, linux-kernel
  Cc: Mark Brown, Liam Girdwood, Krzysztof Kozlowski, Rob Herring,
	linux-mediatek, chunxu . li, Takashi Iwai, Jaroslav Kysela,
	Jiaxin Yu, Matthias Brugger, Nícolas F . R . A . Prado,
	linux-arm-kernel, devicetree, alsa-devel

Il 02/11/22 13:59, Ajye Huang ha scritto:
> 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-gpios" property is used for a mixer control to switch
> the dmic signal source between the Front and Rear Dmic.
> 
> Refer to this one as an example,
> commit 3cfbf07c6d27
> ("ASoC: qcom: sc7180: Modify machine driver for 2mic")
> 
> Signed-off-by: Ajye Huang <ajye_huang@compal.corp-partner.google.com>

Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH v6 1/2] ASoC: mediatek: dt-bindings: modify machine bindings for two MICs case
  2022-11-02 12:59   ` Ajye Huang
  (?)
@ 2022-11-03  9:02     ` AngeloGioacchino Del Regno
  -1 siblings, 0 replies; 24+ messages in thread
From: AngeloGioacchino Del Regno @ 2022-11-03  9:02 UTC (permalink / raw)
  To: Ajye Huang, linux-kernel
  Cc: Mark Brown, Liam Girdwood, Krzysztof Kozlowski, Rob Herring,
	linux-mediatek, chunxu . li, Takashi Iwai, Jaroslav Kysela,
	Jiaxin Yu, Matthias Brugger, Nícolas F . R . A . Prado,
	linux-arm-kernel, devicetree, alsa-devel

Il 02/11/22 13:59, Ajye Huang ha scritto:
> Add a property "dmic-gpios" for switching between two MICs.
> 
> Signed-off-by: Ajye Huang <ajye_huang@compal.corp-partner.google.com>

Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>



^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH v6 1/2] ASoC: mediatek: dt-bindings: modify machine bindings for two MICs case
@ 2022-11-03  9:02     ` AngeloGioacchino Del Regno
  0 siblings, 0 replies; 24+ messages in thread
From: AngeloGioacchino Del Regno @ 2022-11-03  9:02 UTC (permalink / raw)
  To: Ajye Huang, linux-kernel
  Cc: devicetree, alsa-devel, chunxu . li,
	Nícolas F . R . A . Prado, Mark Brown, Liam Girdwood,
	Jiaxin Yu, Takashi Iwai, Rob Herring, linux-mediatek,
	Krzysztof Kozlowski, Matthias Brugger, linux-arm-kernel

Il 02/11/22 13:59, Ajye Huang ha scritto:
> Add a property "dmic-gpios" for switching between two MICs.
> 
> Signed-off-by: Ajye Huang <ajye_huang@compal.corp-partner.google.com>

Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>



^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH v6 1/2] ASoC: mediatek: dt-bindings: modify machine bindings for two MICs case
@ 2022-11-03  9:02     ` AngeloGioacchino Del Regno
  0 siblings, 0 replies; 24+ messages in thread
From: AngeloGioacchino Del Regno @ 2022-11-03  9:02 UTC (permalink / raw)
  To: Ajye Huang, linux-kernel
  Cc: Mark Brown, Liam Girdwood, Krzysztof Kozlowski, Rob Herring,
	linux-mediatek, chunxu . li, Takashi Iwai, Jaroslav Kysela,
	Jiaxin Yu, Matthias Brugger, Nícolas F . R . A . Prado,
	linux-arm-kernel, devicetree, alsa-devel

Il 02/11/22 13:59, Ajye Huang ha scritto:
> Add a property "dmic-gpios" for switching between two MICs.
> 
> Signed-off-by: Ajye Huang <ajye_huang@compal.corp-partner.google.com>

Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>



_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH v6 0/2] Modify documentation and machine driver for mt8186_rt1019_rt5682s sound card
  2022-11-02 12:59 ` Ajye Huang
  (?)
@ 2022-11-03 16:34   ` Mark Brown
  -1 siblings, 0 replies; 24+ messages in thread
From: Mark Brown @ 2022-11-03 16:34 UTC (permalink / raw)
  To: linux-kernel, Ajye Huang
  Cc: devicetree, alsa-devel, chunxu . li,
	Nícolas F . R . A . Prado, Takashi Iwai, Liam Girdwood,
	Jiaxin Yu, Rob Herring, linux-mediatek, Krzysztof Kozlowski,
	Matthias Brugger, linux-arm-kernel, AngeloGioacchino Del Regno

On Wed, 2 Nov 2022 20:59:34 +0800, Ajye Huang wrote:
> v6:
> - dmic codec driver:
>   - Modify "FrontMic" to "Front Mic" and "RearMic" to "Rear Mic"
>     to consisit with commit 3cfbf07c6d27 mentioned in description.
> 
> v5:
> - Documentation:
>   - Add #include <dt-bindings/gpio/gpio.h> in order to use
>     GPIO_ACTIVE_HIGH.
>   - Remove the change-id in message.
> 
> [...]

Applied to

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next

Thanks!

[1/2] ASoC: mediatek: dt-bindings: modify machine bindings for two MICs case
      commit: f8639c385f7e8325b73c83a6ec0865f8c036e1ad
[2/2] ASoC: mediatek: mt8186-rt5682: Modify machine driver for two DMICs case
      commit: e14657c0f0022e02c8f25fa9c56afae3d3db9e77

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH v6 0/2] Modify documentation and machine driver for mt8186_rt1019_rt5682s sound card
@ 2022-11-03 16:34   ` Mark Brown
  0 siblings, 0 replies; 24+ messages in thread
From: Mark Brown @ 2022-11-03 16:34 UTC (permalink / raw)
  To: linux-kernel, Ajye Huang
  Cc: Jaroslav Kysela, devicetree, AngeloGioacchino Del Regno,
	Krzysztof Kozlowski, Rob Herring, chunxu . li, Liam Girdwood,
	alsa-devel, Nícolas F . R . A . Prado, Takashi Iwai,
	linux-mediatek, Jiaxin Yu, Matthias Brugger, linux-arm-kernel

On Wed, 2 Nov 2022 20:59:34 +0800, Ajye Huang wrote:
> v6:
> - dmic codec driver:
>   - Modify "FrontMic" to "Front Mic" and "RearMic" to "Rear Mic"
>     to consisit with commit 3cfbf07c6d27 mentioned in description.
> 
> v5:
> - Documentation:
>   - Add #include <dt-bindings/gpio/gpio.h> in order to use
>     GPIO_ACTIVE_HIGH.
>   - Remove the change-id in message.
> 
> [...]

Applied to

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next

Thanks!

[1/2] ASoC: mediatek: dt-bindings: modify machine bindings for two MICs case
      commit: f8639c385f7e8325b73c83a6ec0865f8c036e1ad
[2/2] ASoC: mediatek: mt8186-rt5682: Modify machine driver for two DMICs case
      commit: e14657c0f0022e02c8f25fa9c56afae3d3db9e77

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark


^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH v6 0/2] Modify documentation and machine driver for mt8186_rt1019_rt5682s sound card
@ 2022-11-03 16:34   ` Mark Brown
  0 siblings, 0 replies; 24+ messages in thread
From: Mark Brown @ 2022-11-03 16:34 UTC (permalink / raw)
  To: linux-kernel, Ajye Huang
  Cc: Jaroslav Kysela, devicetree, AngeloGioacchino Del Regno,
	Krzysztof Kozlowski, Rob Herring, chunxu . li, Liam Girdwood,
	alsa-devel, Nícolas F . R . A . Prado, Takashi Iwai,
	linux-mediatek, Jiaxin Yu, Matthias Brugger, linux-arm-kernel

On Wed, 2 Nov 2022 20:59:34 +0800, Ajye Huang wrote:
> v6:
> - dmic codec driver:
>   - Modify "FrontMic" to "Front Mic" and "RearMic" to "Rear Mic"
>     to consisit with commit 3cfbf07c6d27 mentioned in description.
> 
> v5:
> - Documentation:
>   - Add #include <dt-bindings/gpio/gpio.h> in order to use
>     GPIO_ACTIVE_HIGH.
>   - Remove the change-id in message.
> 
> [...]

Applied to

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next

Thanks!

[1/2] ASoC: mediatek: dt-bindings: modify machine bindings for two MICs case
      commit: f8639c385f7e8325b73c83a6ec0865f8c036e1ad
[2/2] ASoC: mediatek: mt8186-rt5682: Modify machine driver for two DMICs case
      commit: e14657c0f0022e02c8f25fa9c56afae3d3db9e77

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH v6 1/2] ASoC: mediatek: dt-bindings: modify machine bindings for two MICs case
  2022-11-02 12:59   ` Ajye Huang
  (?)
@ 2022-11-04 21:39     ` Rob Herring
  -1 siblings, 0 replies; 24+ messages in thread
From: Rob Herring @ 2022-11-04 21:39 UTC (permalink / raw)
  To: Ajye Huang
  Cc: Rob Herring, Nícolas F . R . A . Prado, linux-kernel,
	Takashi Iwai, Jaroslav Kysela, alsa-devel, Matthias Brugger,
	chunxu . li, Liam Girdwood, linux-mediatek,
	AngeloGioacchino Del Regno, Jiaxin Yu, linux-arm-kernel,
	Krzysztof Kozlowski, Mark Brown, devicetree


On Wed, 02 Nov 2022 20:59:35 +0800, Ajye Huang wrote:
> Add a property "dmic-gpios" for switching between two MICs.
> 
> Signed-off-by: Ajye Huang <ajye_huang@compal.corp-partner.google.com>
> ---
>  .../sound/mt8186-mt6366-rt1019-rt5682s.yaml        | 14 +++++++++++++-
>  1 file changed, 13 insertions(+), 1 deletion(-)
> 


Please add Acked-by/Reviewed-by tags when posting new versions. However,
there's no need to repost patches *only* to add the tags. The upstream
maintainer will do that for acks received on the version they apply.

If a tag was not added on purpose, please state why and what changed.


^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH v6 1/2] ASoC: mediatek: dt-bindings: modify machine bindings for two MICs case
@ 2022-11-04 21:39     ` Rob Herring
  0 siblings, 0 replies; 24+ messages in thread
From: Rob Herring @ 2022-11-04 21:39 UTC (permalink / raw)
  To: Ajye Huang
  Cc: devicetree, alsa-devel, chunxu . li,
	Nícolas F . R . A . Prado, Liam Girdwood, Mark Brown,
	Takashi Iwai, linux-kernel, Jiaxin Yu, Rob Herring,
	linux-mediatek, Krzysztof Kozlowski, Matthias Brugger,
	linux-arm-kernel, AngeloGioacchino Del Regno


On Wed, 02 Nov 2022 20:59:35 +0800, Ajye Huang wrote:
> Add a property "dmic-gpios" for switching between two MICs.
> 
> Signed-off-by: Ajye Huang <ajye_huang@compal.corp-partner.google.com>
> ---
>  .../sound/mt8186-mt6366-rt1019-rt5682s.yaml        | 14 +++++++++++++-
>  1 file changed, 13 insertions(+), 1 deletion(-)
> 


Please add Acked-by/Reviewed-by tags when posting new versions. However,
there's no need to repost patches *only* to add the tags. The upstream
maintainer will do that for acks received on the version they apply.

If a tag was not added on purpose, please state why and what changed.


^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH v6 1/2] ASoC: mediatek: dt-bindings: modify machine bindings for two MICs case
@ 2022-11-04 21:39     ` Rob Herring
  0 siblings, 0 replies; 24+ messages in thread
From: Rob Herring @ 2022-11-04 21:39 UTC (permalink / raw)
  To: Ajye Huang
  Cc: Rob Herring, Nícolas F . R . A . Prado, linux-kernel,
	Takashi Iwai, Jaroslav Kysela, alsa-devel, Matthias Brugger,
	chunxu . li, Liam Girdwood, linux-mediatek,
	AngeloGioacchino Del Regno, Jiaxin Yu, linux-arm-kernel,
	Krzysztof Kozlowski, Mark Brown, devicetree


On Wed, 02 Nov 2022 20:59:35 +0800, Ajye Huang wrote:
> Add a property "dmic-gpios" for switching between two MICs.
> 
> Signed-off-by: Ajye Huang <ajye_huang@compal.corp-partner.google.com>
> ---
>  .../sound/mt8186-mt6366-rt1019-rt5682s.yaml        | 14 +++++++++++++-
>  1 file changed, 13 insertions(+), 1 deletion(-)
> 


Please add Acked-by/Reviewed-by tags when posting new versions. However,
there's no need to repost patches *only* to add the tags. The upstream
maintainer will do that for acks received on the version they apply.

If a tag was not added on purpose, please state why and what changed.


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH v6 1/2] ASoC: mediatek: dt-bindings: modify machine bindings for two MICs case
  2022-11-04 21:39     ` Rob Herring
  (?)
@ 2022-11-05  3:06       ` Ajye Huang
  -1 siblings, 0 replies; 24+ messages in thread
From: Ajye Huang @ 2022-11-05  3:06 UTC (permalink / raw)
  To: Rob Herring
  Cc: Rob Herring, Nícolas F . R . A . Prado, linux-kernel,
	Takashi Iwai, Jaroslav Kysela, alsa-devel, Matthias Brugger,
	chunxu . li, Liam Girdwood, linux-mediatek,
	AngeloGioacchino Del Regno, Jiaxin Yu, linux-arm-kernel,
	Krzysztof Kozlowski, Mark Brown, devicetree

Hi Rob,

On Sat, Nov 5, 2022 at 5:39 AM Rob Herring <robh@kernel.org> wrote:
>

> Please add Acked-by/Reviewed-by tags when posting new versions. However,
> there's no need to repost patches *only* to add the tags. The upstream
> maintainer will do that for acks received on the version they apply.
>
> If a tag was not added on purpose, please state why and what changed.
>

I Got it.  Thanks.

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH v6 1/2] ASoC: mediatek: dt-bindings: modify machine bindings for two MICs case
@ 2022-11-05  3:06       ` Ajye Huang
  0 siblings, 0 replies; 24+ messages in thread
From: Ajye Huang @ 2022-11-05  3:06 UTC (permalink / raw)
  To: Rob Herring
  Cc: devicetree, alsa-devel, chunxu . li,
	Nícolas F . R . A . Prado, Liam Girdwood, Mark Brown,
	Takashi Iwai, linux-kernel, Jiaxin Yu, Rob Herring,
	linux-mediatek, Krzysztof Kozlowski, Matthias Brugger,
	linux-arm-kernel, AngeloGioacchino Del Regno

Hi Rob,

On Sat, Nov 5, 2022 at 5:39 AM Rob Herring <robh@kernel.org> wrote:
>

> Please add Acked-by/Reviewed-by tags when posting new versions. However,
> there's no need to repost patches *only* to add the tags. The upstream
> maintainer will do that for acks received on the version they apply.
>
> If a tag was not added on purpose, please state why and what changed.
>

I Got it.  Thanks.

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH v6 1/2] ASoC: mediatek: dt-bindings: modify machine bindings for two MICs case
@ 2022-11-05  3:06       ` Ajye Huang
  0 siblings, 0 replies; 24+ messages in thread
From: Ajye Huang @ 2022-11-05  3:06 UTC (permalink / raw)
  To: Rob Herring
  Cc: Rob Herring, Nícolas F . R . A . Prado, linux-kernel,
	Takashi Iwai, Jaroslav Kysela, alsa-devel, Matthias Brugger,
	chunxu . li, Liam Girdwood, linux-mediatek,
	AngeloGioacchino Del Regno, Jiaxin Yu, linux-arm-kernel,
	Krzysztof Kozlowski, Mark Brown, devicetree

Hi Rob,

On Sat, Nov 5, 2022 at 5:39 AM Rob Herring <robh@kernel.org> wrote:
>

> Please add Acked-by/Reviewed-by tags when posting new versions. However,
> there's no need to repost patches *only* to add the tags. The upstream
> maintainer will do that for acks received on the version they apply.
>
> If a tag was not added on purpose, please state why and what changed.
>

I Got it.  Thanks.

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 24+ messages in thread

end of thread, other threads:[~2022-11-05  3:07 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-02 12:59 [PATCH v6 0/2] Modify documentation and machine driver for mt8186_rt1019_rt5682s sound card Ajye Huang
2022-11-02 12:59 ` Ajye Huang
2022-11-02 12:59 ` Ajye Huang
2022-11-02 12:59 ` [PATCH v6 1/2] ASoC: mediatek: dt-bindings: modify machine bindings for two MICs case Ajye Huang
2022-11-02 12:59   ` Ajye Huang
2022-11-02 12:59   ` Ajye Huang
2022-11-03  9:02   ` AngeloGioacchino Del Regno
2022-11-03  9:02     ` AngeloGioacchino Del Regno
2022-11-03  9:02     ` AngeloGioacchino Del Regno
2022-11-04 21:39   ` Rob Herring
2022-11-04 21:39     ` Rob Herring
2022-11-04 21:39     ` Rob Herring
2022-11-05  3:06     ` Ajye Huang
2022-11-05  3:06       ` Ajye Huang
2022-11-05  3:06       ` Ajye Huang
2022-11-02 12:59 ` [PATCH v6 2/2] ASoC: mediatek: mt8186-rt5682: Modify machine driver for two DMICs case Ajye Huang
2022-11-02 12:59   ` Ajye Huang
2022-11-02 12:59   ` Ajye Huang
2022-11-03  8:59   ` AngeloGioacchino Del Regno
2022-11-03  8:59     ` AngeloGioacchino Del Regno
2022-11-03  8:59     ` AngeloGioacchino Del Regno
2022-11-03 16:34 ` [PATCH v6 0/2] Modify documentation and machine driver for mt8186_rt1019_rt5682s sound card Mark Brown
2022-11-03 16:34   ` Mark Brown
2022-11-03 16:34   ` Mark Brown

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.