audio_codec: extract DMIC from I2S RX
DMIC feature is independent.  Extract DMIC from I2S RX.
BRANCH=none
TEST=make BOARD=kukui_scp -j
@@ -4659,18 +4659,48 @@ enum mkbp_cec_event {
/*****************************************************************************/
+/* Commands for DMIC on audio codec. */
+#define EC_CMD_EC_CODEC_DMIC 0x00BC
+
+enum ec_codec_dmic_subcmd {
+ EC_CODEC_DMIC_SET_GAIN = 0x0,
+ EC_CODEC_DMIC_GET_GAIN = 0x1,
+ EC_CODEC_DMIC_SUBCMD_COUNT,
+};
+
+struct __ec_align1 ec_param_ec_codec_dmic_set_gain {
+ uint8_t left;
+ uint8_t right;
+ uint8_t reserved[2];
+};
+
+struct __ec_align4 ec_param_ec_codec_dmic {
+ uint8_t cmd; /* enum ec_codec_dmic_subcmd */
+ uint8_t reserved[3];
+
+ union {
+ struct ec_param_ec_codec_dmic_set_gain
+ set_gain_param;
+ };
+};
+
+struct __ec_align1 ec_response_ec_codec_dmic_get_gain {
+ uint8_t left;
+ uint8_t right;
+};
+
+/*****************************************************************************/
+
/* Commands for I2S RX on audio codec. */
-#define EC_CMD_EC_CODEC_I2S_RX 0x00BC
+#define EC_CMD_EC_CODEC_I2S_RX 0x00BD
enum ec_codec_i2s_rx_subcmd {
EC_CODEC_I2S_RX_ENABLE = 0x0,
EC_CODEC_I2S_RX_DISABLE = 0x1,
- EC_CODEC_I2S_RX_SET_GAIN = 0x2,
- EC_CODEC_I2S_RX_GET_GAIN = 0x3,
- EC_CODEC_I2S_RX_SET_SAMPLE_DEPTH = 0x4,
- EC_CODEC_I2S_RX_SET_DAIFMT = 0x5,
- EC_CODEC_I2S_RX_SET_BCLK = 0x6,
+ EC_CODEC_I2S_RX_SET_SAMPLE_DEPTH = 0x2,
+ EC_CODEC_I2S_RX_SET_DAIFMT = 0x3,
+ EC_CODEC_I2S_RX_SET_BCLK = 0x4,
EC_CODEC_I2S_RX_SUBCMD_COUNT,
};
@@ -4714,8 +4744,6 @@ struct __ec_align4 ec_param_ec_codec_i2s_rx {
union {
struct ec_param_ec_codec_i2s_rx_set_sample_depth
set_sample_depth_param;
- struct ec_param_ec_codec_i2s_rx_set_gain
- set_gain_param;
struct ec_param_ec_codec_i2s_rx_set_daifmt
set_daifmt_param;
struct ec_param_ec_codec_i2s_rx_set_bclk
@@ -4723,11 +4751,6 @@ struct __ec_align4 ec_param_ec_codec_i2s_rx {
};
};
-struct __ec_align1 ec_response_ec_codec_i2s_rx_get_gain {
- uint8_t left;
- uint8_t right;
-};
-
/*****************************************************************************/
/* System commands */
