Skip to contentSkip to conversation

ASoC: mediatek: mt8183-mt6358-ts3a227-max98357: support WoV

PATCH Superseded Tzung-Bi Shih 2 participants 12 messages Oct 5, 2019

Subsystems (7)

v1 of 5 Superseded Latest is v5 →

lore
Share & tools
lore
#0 lore raw

cover ASoC: mediatek: mt8183-mt6358-ts3a227-max98357: support WoV

This series makes mt6358, cros_ec_codec, and mt8183-mt6358-ts3a227-max98357 support WoV (wake on voice).

The first 3 commits are some cleanups and refactors. It looks like breaking the existing interface. But please be noticed that, the cros_ec_codec has not used by any real device yet. The refactor is very necessary to keep the style consistent and for easier to further extend and maintain.
platform/chrome: cros_ec: remove unused EC feature
ASoC: cros_ec_codec: refactor I2S RX
ASoC: cros_ec_codec: extract DMIC EC command from I2S RX

The 4th commit extends the feature offered from EC codec.
platform/chrome: cros_ec: add common commands for EC codec

The 5th commit changes the behavior of setting and getting DMIC gains.
ASoC: cros_ec_codec: read max DMIC gain from EC codec

The 6th and 7th commit make cros_ec_codec support WoV.
ASoC: dt-bindings: cros_ec_codec: add SHM bindings
ASoC: cros_ec_codec: support WoV

The 8th commit sets necessary registers on mt6358 to support WoV.
ASoC: mediatek: mt6358: support WoV

The last 2 commit make machine driver mt8183-mt6358-ts3a227-max98357 support WoV if ec-codec is in DTS.
ASoC: dt-bindings: mt8183: add ec-codec
ASoC: mediatek: mt8183: support WoV

Tzung-Bi Shih (10):
platform/chrome: cros_ec: remove unused EC feature
ASoC: cros_ec_codec: refactor I2S RX
ASoC: cros_ec_codec: extract DMIC EC command from I2S RX platform/chrome: cros_ec: add common commands for EC codec
ASoC: cros_ec_codec: read max DMIC gain from EC codec
ASoC: dt-bindings: cros_ec_codec: add SHM bindings
ASoC: cros_ec_codec: support WoV
ASoC: mediatek: mt6358: support WoV
ASoC: dt-bindings: mt8183: add ec-codec
ASoC: mediatek: mt8183: support WoV

 .../bindings/sound/google,cros-ec-codec.txt   |   24 +-
 .../sound/mt8183-mt6358-ts3a227-max98357.txt  |    3 +
 drivers/platform/chrome/cros_ec_trace.c       |    5 +-
 .../linux/platform_data/cros_ec_commands.h    |  285 ++++-
 sound/soc/codecs/cros_ec_codec.c              | 1125 +++++++++++++----
 sound/soc/codecs/mt6358.c                     |  105 ++
 sound/soc/mediatek/Kconfig                    |    1 +
 .../mt8183/mt8183-mt6358-ts3a227-max98357.c   |   70 +-
 8 files changed, 1292 insertions(+), 326 deletions(-)
Signature · 1 line
2.23.0.581.g78d2f28ef7-goog
#1 lore raw

PATCH 1/10 platform/chrome: cros_ec: remove unused EC feature

Remove unused EC_FEATURE_AUDIO_CODEC.

---
 include/linux/platform_data/cros_ec_commands.h | 2 --
 1 file changed, 2 deletions(-)
include/linux/platform_data/cros_ec_commands.h +0 -2
index 98415686cbfa..43b8f7dae4cc 100644
@@ -1277,8 +1277,6 @@ enum ec_feature_code {
 	 * MOTIONSENSE_CMD_TABLET_MODE_LID_ANGLE.
 	 */
 	EC_FEATURE_REFINED_TABLET_MODE_HYSTERESIS = 37,
-	/* EC supports audio codec. */
-	EC_FEATURE_AUDIO_CODEC = 38,
 	/* The MCU is a System Companion Processor (SCP). */
 	EC_FEATURE_SCP = 39,
 	/* The MCU is an Integrated Sensor Hub */
Signature · 1 line
2.23.0.581.g78d2f28ef7-goog
#2 lore raw

PATCH 2/10 ASoC: cros_ec_codec: refactor I2S RX

In reply to Tzung-Bi Shih

Refactor by the following items:
- reformat copyright declaration
- use more specific name "i2s rx"
- use verbose symbol names to separate namespaces
- make some short functions inline
- remove unused TDM-related code

---
 drivers/platform/chrome/cros_ec_trace.c       |   2 +-
 .../linux/platform_data/cros_ec_commands.h    | 120 ++---
 sound/soc/codecs/cros_ec_codec.c              | 502 +++++++-----------
 3 files changed, 251 insertions(+), 373 deletions(-)
drivers/platform/chrome/cros_ec_trace.c +1 -1
index 6f80ff4532ae..901850004b2b 100644
@@ -98,7 +98,7 @@
 	TRACE_SYMBOL(EC_CMD_SB_READ_BLOCK), \
 	TRACE_SYMBOL(EC_CMD_SB_WRITE_BLOCK), \
 	TRACE_SYMBOL(EC_CMD_BATTERY_VENDOR_PARAM), \
-	TRACE_SYMBOL(EC_CMD_CODEC_I2S), \
+	TRACE_SYMBOL(EC_CMD_EC_CODEC_I2S_RX), \
 	TRACE_SYMBOL(EC_CMD_REBOOT_EC), \
 	TRACE_SYMBOL(EC_CMD_GET_PANIC_INFO), \
 	TRACE_SYMBOL(EC_CMD_ACPI_READ), \
include/linux/platform_data/cros_ec_commands.h +51 -69

143 lines not on this page · raw message

sound/soc/codecs/cros_ec_codec.c +199 -303

619 lines not on this page · raw message

Signature · 1 line
2.23.0.581.g78d2f28ef7-goog
#3 lore raw

PATCH 3/10 ASoC: cros_ec_codec: extract DMIC EC command from I2S RX

In reply to Tzung-Bi Shih

Extract DMIC EC command from I2S RX. Setting and getting microphone gains is common features.

---
 drivers/platform/chrome/cros_ec_trace.c       |  1 +
 .../linux/platform_data/cros_ec_commands.h    | 49 +++++++++++-----
 sound/soc/codecs/cros_ec_codec.c              | 57 ++++++++++---------
 3 files changed, 68 insertions(+), 39 deletions(-)
drivers/platform/chrome/cros_ec_trace.c +1 -0
index 901850004b2b..e73bb6a8b00e 100644
@@ -98,6 +98,7 @@
 	TRACE_SYMBOL(EC_CMD_SB_READ_BLOCK), \
 	TRACE_SYMBOL(EC_CMD_SB_WRITE_BLOCK), \
 	TRACE_SYMBOL(EC_CMD_BATTERY_VENDOR_PARAM), \
+	TRACE_SYMBOL(EC_CMD_EC_CODEC_DMIC), \
 	TRACE_SYMBOL(EC_CMD_EC_CODEC_I2S_RX), \
 	TRACE_SYMBOL(EC_CMD_REBOOT_EC), \
 	TRACE_SYMBOL(EC_CMD_GET_PANIC_INFO), \
include/linux/platform_data/cros_ec_commands.h +36 -13

73 lines not on this page · raw message

sound/soc/codecs/cros_ec_codec.c +31 -26

91 lines not on this page · raw message

Signature · 1 line
2.23.0.581.g78d2f28ef7-goog
#4 lore raw

PATCH 4/10 platform/chrome: cros_ec: add common commands for EC codec

In reply to Tzung-Bi Shih

Add the following common commands:
- GET_CAPABILITIES
- GET_SHM_ADDR
- SET_SHM_ADDR

---
 drivers/platform/chrome/cros_ec_trace.c       |  1 +
 .../linux/platform_data/cros_ec_commands.h    | 64 ++++++++++++++++++-
 2 files changed, 63 insertions(+), 2 deletions(-)
drivers/platform/chrome/cros_ec_trace.c +1 -0
index e73bb6a8b00e..2ea0d4e0d54d 100644
@@ -98,6 +98,7 @@
 	TRACE_SYMBOL(EC_CMD_SB_READ_BLOCK), \
 	TRACE_SYMBOL(EC_CMD_SB_WRITE_BLOCK), \
 	TRACE_SYMBOL(EC_CMD_BATTERY_VENDOR_PARAM), \
+	TRACE_SYMBOL(EC_CMD_EC_CODEC), \
 	TRACE_SYMBOL(EC_CMD_EC_CODEC_DMIC), \
 	TRACE_SYMBOL(EC_CMD_EC_CODEC_I2S_RX), \
 	TRACE_SYMBOL(EC_CMD_REBOOT_EC), \
include/linux/platform_data/cros_ec_commands.h +62 -2

77 lines not on this page · raw message

Signature · 1 line
2.23.0.581.g78d2f28ef7-goog
#5 lore raw

PATCH 5/10 ASoC: cros_ec_codec: read max DMIC gain from EC codec

In reply to Tzung-Bi Shih

Read max DMIC gain from EC codec instead of DTS. Also removes the dt-binding of max-dmic-gain.

---
 .../bindings/sound/google,cros-ec-codec.txt   |  4 +-
 .../linux/platform_data/cros_ec_commands.h    | 43 +++++++++++----
 sound/soc/codecs/cros_ec_codec.c              | 53 ++++++++++++++-----
 3 files changed, 73 insertions(+), 27 deletions(-)
Documentation/devicetree/bindings/sound/google,cros-ec-codec.txt +1 -3
index 1084f7f22eea..0ce9fafc78e2 100644
@@ -1,4 +1,4 @@
-* Audio codec controlled by ChromeOS EC
+Audio codec controlled by ChromeOS EC
 
 Google's ChromeOS EC codec is a digital mic codec provided by the
 Embedded Controller (EC) and is controlled via a host-command interface.
@@ -9,7 +9,6 @@ Documentation/devicetree/bindings/mfd/cros-ec.txt).
 Required properties:
 - compatible: Must contain "google,cros-ec-codec"
 - #sound-dai-cells: Should be 1. The cell specifies number of DAIs.
-- max-dmic-gain: A number for maximum gain in dB on digital microphone.
 
 Example:
 
@@ -21,6 +20,5 @@ cros-ec@0 {
 	cros_ec_codec: ec-codec {
 		compatible = "google,cros-ec-codec";
 		#sound-dai-cells = <1>;
-		max-dmic-gain = <43>;
 	};
 };
include/linux/platform_data/cros_ec_commands.h +33 -10

63 lines not on this page · raw message

sound/soc/codecs/cros_ec_codec.c +39 -14

91 lines not on this page · raw message

Signature · 1 line
2.23.0.581.g78d2f28ef7-goog
#6 lore raw

PATCH 6/10 ASoC: dt-bindings: cros_ec_codec: add SHM bindings

In reply to Tzung-Bi Shih

- Add "ec-shm" for binding to shared memory exposed by EC.
- Add "memory-region" for binding to memory region shared by AP.

---
 .../bindings/sound/google,cros-ec-codec.txt   | 20 +++++++++++++++++++
 1 file changed, 20 insertions(+)
Documentation/devicetree/bindings/sound/google,cros-ec-codec.txt +20 -0
index 0ce9fafc78e2..cb46bc082b4b 100644
@@ -10,8 +10,26 @@ Required properties:
 - compatible: Must contain "google,cros-ec-codec"
 - #sound-dai-cells: Should be 1. The cell specifies number of DAIs.
 
+Optional properties:
+- ec-shm: Shared memory region from EC.  It contains 3 unsigned 32-bit
+          integer.  The first 2 integers combine to become an unsigned
+	  64-bit address.  The last one integer is length of the shared
+	  memory.
+- memory-region: Shared memory region to EC.  A "shared-dma-pool".  See
+                 ../reserved-memory/reserved-memory.txt for details.
+
 Example:
 
+{
+	...
+
+	reserved_mem: reserved_mem {
+		compatible = "shared-dma-pool";
+		reg = <0 0x52800000 0 0x100000>;
+		no-map;
+	};
+}
+
 cros-ec@0 {
 	compatible = "google,cros-ec-spi";
 
@@ -20,5 +38,7 @@ cros-ec@0 {
 	cros_ec_codec: ec-codec {
 		compatible = "google,cros-ec-codec";
 		#sound-dai-cells = <1>;
+		ec-shm = <0x0 0x10500000 0x80000>;
+		memory-region = <&reserved_mem>;
 	};
 };
Signature · 1 line
2.23.0.581.g78d2f28ef7-goog
#7 lore raw

PATCH 7/10 ASoC: cros_ec_codec: support WoV

In reply to Tzung-Bi Shih

1. Get EC codec's capabilities.
2. Get and set SHM address if any.
3. Transmit language model to EC codec if needed.
4. Start to read audio data from EC codec if receives host event.

---
 drivers/platform/chrome/cros_ec_trace.c       |   1 +
 .../linux/platform_data/cros_ec_commands.h    |  69 ++
 sound/soc/codecs/cros_ec_codec.c              | 695 +++++++++++++++++-
 3 files changed, 763 insertions(+), 2 deletions(-)
drivers/platform/chrome/cros_ec_trace.c +1 -0
index 2ea0d4e0d54d..5af1d66d9eca 100644
@@ -101,6 +101,7 @@
 	TRACE_SYMBOL(EC_CMD_EC_CODEC), \
 	TRACE_SYMBOL(EC_CMD_EC_CODEC_DMIC), \
 	TRACE_SYMBOL(EC_CMD_EC_CODEC_I2S_RX), \
+	TRACE_SYMBOL(EC_CMD_EC_CODEC_WOV), \
 	TRACE_SYMBOL(EC_CMD_REBOOT_EC), \
 	TRACE_SYMBOL(EC_CMD_GET_PANIC_INFO), \
 	TRACE_SYMBOL(EC_CMD_ACPI_READ), \
include/linux/platform_data/cros_ec_commands.h +69 -0

91 lines not on this page · raw message

sound/soc/codecs/cros_ec_codec.c +693 -2

746 lines not on this page · raw message

Signature · 1 line
2.23.0.581.g78d2f28ef7-goog
#8 lore raw

Re: [alsa-devel] [PATCH 07/10] ASoC: cros_ec_codec: support WoV

Thank you for the patch! Yet something to improve:

Hi Tzung-Bi,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on asoc/for-next]
[cannot apply to v5.4-rc1 next-20191004]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system. BTW, we also suggest to use '--base' option to specify the base tree in git format-patch, please see https://stackoverflow.com/a/37406982]

url:    https://github.com/0day-ci/linux/commits/Tzung-Bi-Shih/ASoC-mediatek-mt8183-mt6358-ts3a227-max98357-support-WoV/20191005-142224
base:   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next
config: m68k-allyesconfig (attached as .config)
compiler: m68k-linux-gcc (GCC) 7.4.0

reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
GCC_VERSION=7.4.0 make.cross ARCH=m68k

If you fix the issue, kindly add following tag

All error/warnings (new ones prefixed by >>):

sound/soc/codecs/cros_ec_codec.c: In function 'calculate_sha256':

>> sound/soc/codecs/cros_ec_codec.c:117:7: error: 'struct shash_desc' has no member named 'flags'
      desc->flags = 0x0;
          ^~
   sound/soc/codecs/cros_ec_codec.c: In function 'wov_map_shm':
>> sound/soc/codecs/cros_ec_codec.c:469:10: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
      return (void *)(priv->ap_shm_addr + offset);
             ^
   sound/soc/codecs/cros_ec_codec.c: In function 'cros_ec_codec_platform_probe':
>> sound/soc/codecs/cros_ec_codec.c:1002:24: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
       priv->ap_shm_addr = (uint64_t)devm_ioremap_wc(
                           ^

vim +117 sound/soc/codecs/cros_ec_codec.c

101
102 static int calculate_sha256(struct cros_ec_codec_priv *priv,
103 uint8_t *buf, uint32_t size, uint8_t *digest)
104 {
105 struct crypto_shash *tfm;
106
107 tfm = crypto_alloc_shash("sha256", CRYPTO_ALG_TYPE_SHASH, 0);
108 if (IS_ERR(tfm)) {
109 dev_err(priv->dev, "can't alloc shash\n");
110 return PTR_ERR(tfm);
111 }
112
113 {
114 SHASH_DESC_ON_STACK(desc, tfm);
115
116 desc->tfm = tfm;

 > 117			desc->flags = 0x0;

118
119 crypto_shash_digest(desc, buf, size, digest);
120 shash_desc_zero(desc);
121 }
122
123 crypto_free_shash(tfm);
124

---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation

#9 lore raw

PATCH 8/10 ASoC: mediatek: mt6358: support WoV

In reply to Tzung-Bi Shih

Switch mono DMIC on to support wake-on-voice.

---
 sound/soc/codecs/mt6358.c | 105 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 105 insertions(+)
sound/soc/codecs/mt6358.c +105 -0
index bb737fd678cc..1b830ea4f6ed 100644
@@ -93,6 +93,8 @@ struct mt6358_priv {
 	int mtkaif_protocol;
 
 	struct regulator *avdd_reg;
+
+	int wov_enabled;
 };
 
 int mt6358_set_mtkaif_protocol(struct snd_soc_component *cmpnt,
@@ -464,6 +466,106 @@ static int mt6358_put_volsw(struct snd_kcontrol *kcontrol,
 	return ret;
 }
 
+static void mt6358_restore_pga(struct mt6358_priv *priv);
+
+static int mt6358_enable_wov_phase2(struct mt6358_priv *priv)
+{
+	/* analog */
+	regmap_update_bits(priv->regmap, MT6358_AUDDEC_ANA_CON13,
+			   0xffff, 0x0000);
+	regmap_update_bits(priv->regmap, MT6358_DCXO_CW14, 0xffff, 0xa2b5);
+	regmap_update_bits(priv->regmap, MT6358_AUDENC_ANA_CON1,
+			   0xffff, 0x0800);
+	mt6358_restore_pga(priv);
+
+	regmap_update_bits(priv->regmap, MT6358_DCXO_CW13, 0xffff, 0x9929);
+	regmap_update_bits(priv->regmap, MT6358_AUDENC_ANA_CON9,
+			   0xffff, 0x0025);
+	regmap_update_bits(priv->regmap, MT6358_AUDENC_ANA_CON8,
+			   0xffff, 0x0005);
+
+	/* digital */
+	regmap_update_bits(priv->regmap, MT6358_AUD_TOP_CKPDN_CON0,
+			   0xffff, 0x0000);
+	regmap_update_bits(priv->regmap, MT6358_GPIO_MODE3, 0xffff, 0x0120);
+	regmap_update_bits(priv->regmap, MT6358_AFE_VOW_CFG0, 0xffff, 0xffff);
+	regmap_update_bits(priv->regmap, MT6358_AFE_VOW_CFG1, 0xffff, 0x0200);
+	regmap_update_bits(priv->regmap, MT6358_AFE_VOW_CFG2, 0xffff, 0x2424);
+	regmap_update_bits(priv->regmap, MT6358_AFE_VOW_CFG3, 0xffff, 0xdbac);
+	regmap_update_bits(priv->regmap, MT6358_AFE_VOW_CFG4, 0xffff, 0x029e);
+	regmap_update_bits(priv->regmap, MT6358_AFE_VOW_CFG5, 0xffff, 0x0000);
+	regmap_update_bits(priv->regmap, MT6358_AFE_VOW_POSDIV_CFG0,
+			   0xffff, 0x0000);
+	regmap_update_bits(priv->regmap, MT6358_AFE_VOW_HPF_CFG0,
+			   0xffff, 0x0451);
+	regmap_update_bits(priv->regmap, MT6358_AFE_VOW_TOP, 0xffff, 0x68d1);
+
+	return 0;
+}
+
+static int mt6358_disable_wov_phase2(struct mt6358_priv *priv)
+{
+	/* digital */
+	regmap_update_bits(priv->regmap, MT6358_AFE_VOW_TOP, 0xffff, 0xc000);
+	regmap_update_bits(priv->regmap, MT6358_AFE_VOW_HPF_CFG0,
+			   0xffff, 0x0450);
+	regmap_update_bits(priv->regmap, MT6358_AFE_VOW_POSDIV_CFG0,
+			   0xffff, 0x0c00);
+	regmap_update_bits(priv->regmap, MT6358_AFE_VOW_CFG5, 0xffff, 0x0100);
+	regmap_update_bits(priv->regmap, MT6358_AFE_VOW_CFG4, 0xffff, 0x006c);
+	regmap_update_bits(priv->regmap, MT6358_AFE_VOW_CFG3, 0xffff, 0xa879);
+	regmap_update_bits(priv->regmap, MT6358_AFE_VOW_CFG2, 0xffff, 0x2323);
+	regmap_update_bits(priv->regmap, MT6358_AFE_VOW_CFG1, 0xffff, 0x0400);
+	regmap_update_bits(priv->regmap, MT6358_AFE_VOW_CFG0, 0xffff, 0x0000);
+	regmap_update_bits(priv->regmap, MT6358_GPIO_MODE3, 0xffff, 0x02d8);
+	regmap_update_bits(priv->regmap, MT6358_AUD_TOP_CKPDN_CON0,
+			   0xffff, 0x0000);
+
+	/* analog */
+	regmap_update_bits(priv->regmap, MT6358_AUDENC_ANA_CON8,
+			   0xffff, 0x0004);
+	regmap_update_bits(priv->regmap, MT6358_AUDENC_ANA_CON9,
+			   0xffff, 0x0000);
+	regmap_update_bits(priv->regmap, MT6358_DCXO_CW13, 0xffff, 0x9829);
+	regmap_update_bits(priv->regmap, MT6358_AUDENC_ANA_CON1,
+			   0xffff, 0x0000);
+	mt6358_restore_pga(priv);
+	regmap_update_bits(priv->regmap, MT6358_DCXO_CW14, 0xffff, 0xa2b5);
+	regmap_update_bits(priv->regmap, MT6358_AUDDEC_ANA_CON13,
+			   0xffff, 0x0010);
+
+	return 0;
+}
+
+static int mt6358_get_wov(struct snd_kcontrol *kcontrol,
+			  struct snd_ctl_elem_value *ucontrol)
+{
+	struct snd_soc_component *c = snd_soc_kcontrol_component(kcontrol);
+	struct mt6358_priv *priv = snd_soc_component_get_drvdata(c);
+
+	ucontrol->value.integer.value[0] = priv->wov_enabled;
+	return 0;
+}
+
+static int mt6358_put_wov(struct snd_kcontrol *kcontrol,
+			  struct snd_ctl_elem_value *ucontrol)
+{
+	struct snd_soc_component *c = snd_soc_kcontrol_component(kcontrol);
+	struct mt6358_priv *priv = snd_soc_component_get_drvdata(c);
+	int enabled = ucontrol->value.integer.value[0];
+
+	if (priv->wov_enabled != enabled) {
+		if (enabled)
+			mt6358_enable_wov_phase2(priv);
+		else
+			mt6358_disable_wov_phase2(priv);
+
+		priv->wov_enabled = enabled;
+	}
+
+	return 0;
+}
+
 static const DECLARE_TLV_DB_SCALE(playback_tlv, -1000, 100, 0);
 static const DECLARE_TLV_DB_SCALE(pga_tlv, 0, 600, 0);
 
@@ -483,6 +585,9 @@ static const struct snd_kcontrol_new mt6358_snd_controls[] = {
 			     MT6358_AUDENC_ANA_CON0, MT6358_AUDENC_ANA_CON1,
 			     8, 4, 0,
 			     snd_soc_get_volsw, mt6358_put_volsw, pga_tlv),
+
+	SOC_SINGLE_BOOL_EXT("Wake-on-Voice Phase2 Switch", 0,
+			    mt6358_get_wov, mt6358_put_wov),
 };
 
 /* MUX */
Signature · 1 line
2.23.0.581.g78d2f28ef7-goog
#10 lore raw

PATCH 9/10 ASoC: dt-bindings: mt8183: add ec-codec

In reply to Tzung-Bi Shih

Add an optional property "ec-codec". If specified, mt8183 could use the "wake on voice" feature offered by EC codec.

---
 .../bindings/sound/mt8183-mt6358-ts3a227-max98357.txt          | 3 +++
 1 file changed, 3 insertions(+)
Documentation/devicetree/bindings/sound/mt8183-mt6358-ts3a227-max98357.txt +3 -0
index 17ff3892f439..decaa013a07e 100644
@@ -6,12 +6,15 @@ Required properties:
 
 Optional properties:
 - mediatek,headset-codec: the phandles of ts3a227 codecs
+- mediatek,ec-codec: the phandle of EC codecs.
+                     See google,cros-ec-codec.txt for more details.
 
 Example:
 
 	sound {
 		compatible = "mediatek,mt8183_mt6358_ts3a227_max98357";
 		mediatek,headset-codec = <&ts3a227>;
+		mediatek,ec-codec = <&ec_codec>;
 		mediatek,platform = <&afe>;
 	};
 
Signature · 1 line
2.23.0.581.g78d2f28ef7-goog
#11 lore raw

PATCH 10/10 ASoC: mediatek: mt8183: support WoV

In reply to Tzung-Bi Shih

Add DAI link and pin muxing for wake on voice.

---
 sound/soc/mediatek/Kconfig                    |  1 +
 .../mt8183/mt8183-mt6358-ts3a227-max98357.c   | 70 ++++++++++++++++++-
 2 files changed, 68 insertions(+), 3 deletions(-)
sound/soc/mediatek/Kconfig +1 -0
index 111e44b64b38..8b29f3979899 100644
@@ -125,6 +125,7 @@ config SND_SOC_MT8183_MT6358_TS3A227E_MAX98357A
 	select SND_SOC_MAX98357A
 	select SND_SOC_BT_SCO
 	select SND_SOC_TS3A227E
+	select SND_SOC_CROS_EC_CODEC
 	help
 	  This adds ASoC driver for Mediatek MT8183 boards
 	  with the MT6358 TS3A227E MAX98357A audio codec.
sound/soc/mediatek/mt8183/mt8183-mt6358-ts3a227-max98357.c +67 -3

113 lines not on this page · raw message

Signature · 1 line
2.23.0.581.g78d2f28ef7-goog