},
 };
 
+static const
+struct snd_kcontrol_new mt8183_mt6358_ts3a227_max98357_snd_controls[] = {
+       SOC_DAPM_PIN_SWITCH("Headphone"),
+       SOC_DAPM_PIN_SWITCH("Headset Mic"),
+};
+
+static const
+struct snd_soc_dapm_widget mt8183_mt6358_ts3a227_max98357_dapm_widgets[] = {
+       SND_SOC_DAPM_HP("Headphone", NULL),
+       SND_SOC_DAPM_MIC("Headset Mic", NULL),
+};
+
+static struct snd_soc_jack_pin mt8183_mt6358_ts3a227_max98357_jack_pins[] = {
+       {
+               .pin    = "Headphone",
+               .mask   = SND_JACK_HEADPHONE,
+       },
+       {
+               .pin    = "Headset Mic",
+               .mask   = SND_JACK_MICROPHONE,
+       },
+};
+
 static struct snd_soc_card mt8183_mt6358_ts3a227_max98357_card = {
        .name = "mt8183_mt6358_ts3a227_max98357",
        .owner = THIS_MODULE,
        .dai_link = mt8183_mt6358_ts3a227_dai_links,
        .num_links = ARRAY_SIZE(mt8183_mt6358_ts3a227_dai_links),
+       .controls = mt8183_mt6358_ts3a227_max98357_snd_controls,
+       .num_controls = ARRAY_SIZE(mt8183_mt6358_ts3a227_max98357_snd_controls),
+       .dapm_widgets = mt8183_mt6358_ts3a227_max98357_dapm_widgets,
+       .num_dapm_widgets = ARRAY_SIZE(mt8183_mt6358_ts3a227_max98357_dapm_widgets),
 };
 
 static struct snd_soc_card mt8183_mt6358_ts3a227_max98357b_card = {
        .owner = THIS_MODULE,
        .dai_link = mt8183_mt6358_ts3a227_dai_links,
        .num_links = ARRAY_SIZE(mt8183_mt6358_ts3a227_dai_links),
+       .controls = mt8183_mt6358_ts3a227_max98357_snd_controls,
+       .num_controls = ARRAY_SIZE(mt8183_mt6358_ts3a227_max98357_snd_controls),
+       .dapm_widgets = mt8183_mt6358_ts3a227_max98357_dapm_widgets,
+       .num_dapm_widgets = ARRAY_SIZE(mt8183_mt6358_ts3a227_max98357_dapm_widgets),
 };
 
 static struct snd_soc_codec_conf mt8183_mt6358_ts3a227_rt1015_amp_conf[] = {
        .num_links = ARRAY_SIZE(mt8183_mt6358_ts3a227_dai_links),
        .codec_conf = mt8183_mt6358_ts3a227_rt1015_amp_conf,
        .num_configs = ARRAY_SIZE(mt8183_mt6358_ts3a227_rt1015_amp_conf),
+       .controls = mt8183_mt6358_ts3a227_max98357_snd_controls,
+       .num_controls = ARRAY_SIZE(mt8183_mt6358_ts3a227_max98357_snd_controls),
+       .dapm_widgets = mt8183_mt6358_ts3a227_max98357_dapm_widgets,
+       .num_dapm_widgets = ARRAY_SIZE(mt8183_mt6358_ts3a227_max98357_dapm_widgets),
 };
 
 static struct snd_soc_card mt8183_mt6358_ts3a227_rt1015p_card = {
        .owner = THIS_MODULE,
        .dai_link = mt8183_mt6358_ts3a227_dai_links,
        .num_links = ARRAY_SIZE(mt8183_mt6358_ts3a227_dai_links),
+       .controls = mt8183_mt6358_ts3a227_max98357_snd_controls,
+       .num_controls = ARRAY_SIZE(mt8183_mt6358_ts3a227_max98357_snd_controls),
+       .dapm_widgets = mt8183_mt6358_ts3a227_max98357_dapm_widgets,
+       .num_dapm_widgets = ARRAY_SIZE(mt8183_mt6358_ts3a227_max98357_dapm_widgets),
 };
 
 static int
                        snd_soc_card_get_drvdata(component->card);
 
        /* Enable Headset and 4 Buttons Jack detection */
-       ret = snd_soc_card_jack_new(component->card,
-                                   "Headset Jack",
-                                   SND_JACK_HEADSET |
-                                   SND_JACK_BTN_0 | SND_JACK_BTN_1 |
-                                   SND_JACK_BTN_2 | SND_JACK_BTN_3,
-                                   &priv->headset_jack);
+       ret = snd_soc_card_jack_new_pins(component->card,
+                                        "Headset Jack",
+                                        SND_JACK_HEADSET |
+                                        SND_JACK_BTN_0 | SND_JACK_BTN_1 |
+                                        SND_JACK_BTN_2 | SND_JACK_BTN_3,
+                                        &priv->headset_jack,
+                                        mt8183_mt6358_ts3a227_max98357_jack_pins,
+                                        ARRAY_SIZE(mt8183_mt6358_ts3a227_max98357_jack_pins));
        if (ret)
                return ret;