aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/intel/byt-max98090.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/soc/intel/byt-max98090.c')
-rw-r--r--sound/soc/intel/byt-max98090.c27
1 files changed, 8 insertions, 19 deletions
diff --git a/sound/soc/intel/byt-max98090.c b/sound/soc/intel/byt-max98090.c
index 5fc98c64a3f4..b8b8af571ef1 100644
--- a/sound/soc/intel/byt-max98090.c
+++ b/sound/soc/intel/byt-max98090.c
@@ -39,8 +39,7 @@ static const struct snd_soc_dapm_widget byt_max98090_widgets[] = {
39 39
40static const struct snd_soc_dapm_route byt_max98090_audio_map[] = { 40static const struct snd_soc_dapm_route byt_max98090_audio_map[] = {
41 {"IN34", NULL, "Headset Mic"}, 41 {"IN34", NULL, "Headset Mic"},
42 {"IN34", NULL, "MICBIAS"}, 42 {"Headset Mic", NULL, "MICBIAS"},
43 {"MICBIAS", NULL, "Headset Mic"},
44 {"DMICL", NULL, "Int Mic"}, 43 {"DMICL", NULL, "Int Mic"},
45 {"Headphone", NULL, "HPL"}, 44 {"Headphone", NULL, "HPL"},
46 {"Headphone", NULL, "HPR"}, 45 {"Headphone", NULL, "HPR"},
@@ -64,14 +63,6 @@ static struct snd_soc_jack_pin hs_jack_pins[] = {
64 .pin = "Headset Mic", 63 .pin = "Headset Mic",
65 .mask = SND_JACK_MICROPHONE, 64 .mask = SND_JACK_MICROPHONE,
66 }, 65 },
67 {
68 .pin = "Ext Spk",
69 .mask = SND_JACK_LINEOUT,
70 },
71 {
72 .pin = "Int Mic",
73 .mask = SND_JACK_LINEIN,
74 },
75}; 66};
76 67
77static struct snd_soc_jack_gpio hs_jack_gpios[] = { 68static struct snd_soc_jack_gpio hs_jack_gpios[] = {
@@ -84,7 +75,8 @@ static struct snd_soc_jack_gpio hs_jack_gpios[] = {
84 { 75 {
85 .name = "mic-gpio", 76 .name = "mic-gpio",
86 .idx = 1, 77 .idx = 1,
87 .report = SND_JACK_MICROPHONE | SND_JACK_LINEIN, 78 .invert = 1,
79 .report = SND_JACK_MICROPHONE,
88 .debounce_time = 200, 80 .debounce_time = 200,
89 }, 81 },
90}; 82};
@@ -108,7 +100,8 @@ static int byt_max98090_init(struct snd_soc_pcm_runtime *runtime)
108 } 100 }
109 101
110 /* Enable jack detection */ 102 /* Enable jack detection */
111 ret = snd_soc_jack_new(codec, "Headphone", SND_JACK_HEADPHONE, jack); 103 ret = snd_soc_jack_new(codec, "Headset",
104 SND_JACK_LINEOUT | SND_JACK_HEADSET, jack);
112 if (ret) 105 if (ret)
113 return ret; 106 return ret;
114 107
@@ -117,13 +110,9 @@ static int byt_max98090_init(struct snd_soc_pcm_runtime *runtime)
117 if (ret) 110 if (ret)
118 return ret; 111 return ret;
119 112
120 ret = snd_soc_jack_add_gpiods(card->dev->parent, jack, 113 return snd_soc_jack_add_gpiods(card->dev->parent, jack,
121 ARRAY_SIZE(hs_jack_gpios), 114 ARRAY_SIZE(hs_jack_gpios),
122 hs_jack_gpios); 115 hs_jack_gpios);
123 if (ret)
124 return ret;
125
126 return max98090_mic_detect(codec, jack);
127} 116}
128 117
129static struct snd_soc_dai_link byt_max98090_dais[] = { 118static struct snd_soc_dai_link byt_max98090_dais[] = {