Message ID | 20180521124251.10535-1-hdegoede@redhat.com (mailing list archive) |
---|---|
State | Accepted |
Commit | 5aff078ac81a3be58f7a2e2be0f33bc9ce062bac |
Headers | show |
On 5/21/2018 8:42 PM, Hans de Goede wrote: > The nau8824 codec can detect whether a headset or plain headphones is > inserted (as well as button presses on the headset) as such the jack_type > passed to snd_soc_card_jack_new() should include SND_JACK_MICROPHONE. > > Signed-off-by: Hans de Goede <hdegoede@redhat.com> > --- > sound/soc/intel/boards/cht_bsw_nau8824.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/sound/soc/intel/boards/cht_bsw_nau8824.c b/sound/soc/intel/boards/cht_bsw_nau8824.c > index 072e94b69e57..30c46977d53c 100644 > --- a/sound/soc/intel/boards/cht_bsw_nau8824.c > +++ b/sound/soc/intel/boards/cht_bsw_nau8824.c > @@ -120,7 +120,7 @@ static int cht_codec_init(struct snd_soc_pcm_runtime *runtime) > * KEY_VOLUMEUP > * KEY_VOLUMEDOWN > */ > - jack_type = SND_JACK_HEADPHONE | SND_JACK_BTN_0 | SND_JACK_BTN_1 | > + jack_type = SND_JACK_HEADSET | SND_JACK_BTN_0 | SND_JACK_BTN_1 | > SND_JACK_BTN_2 | SND_JACK_BTN_3; > ret = snd_soc_card_jack_new(runtime->card, "Headset", jack_type, jack, > cht_bsw_jack_pins, ARRAY_SIZE(cht_bsw_jack_pins)); It's good for me. =========================================================================================== The privileged confidential information contained in this email is intended for use only by the addressees as indicated by the original sender of this email. If you are not the addressee indicated in this email or are not responsible for delivery of the email to such a person, please kindly reply to the sender indicating this fact and delete all copies of it from your computer and network server immediately. Your cooperation is highly appreciated. It is advised that any unauthorized use of confidential information of Nuvoton is strictly prohibited; and any information in this email irrelevant to the official business of Nuvoton shall be deemed as neither given nor endorsed by Nuvoton.
diff --git a/sound/soc/intel/boards/cht_bsw_nau8824.c b/sound/soc/intel/boards/cht_bsw_nau8824.c index 072e94b69e57..30c46977d53c 100644 --- a/sound/soc/intel/boards/cht_bsw_nau8824.c +++ b/sound/soc/intel/boards/cht_bsw_nau8824.c @@ -120,7 +120,7 @@ static int cht_codec_init(struct snd_soc_pcm_runtime *runtime) * KEY_VOLUMEUP * KEY_VOLUMEDOWN */ - jack_type = SND_JACK_HEADPHONE | SND_JACK_BTN_0 | SND_JACK_BTN_1 | + jack_type = SND_JACK_HEADSET | SND_JACK_BTN_0 | SND_JACK_BTN_1 | SND_JACK_BTN_2 | SND_JACK_BTN_3; ret = snd_soc_card_jack_new(runtime->card, "Headset", jack_type, jack, cht_bsw_jack_pins, ARRAY_SIZE(cht_bsw_jack_pins));
The nau8824 codec can detect whether a headset or plain headphones is inserted (as well as button presses on the headset) as such the jack_type passed to snd_soc_card_jack_new() should include SND_JACK_MICROPHONE. Signed-off-by: Hans de Goede <hdegoede@redhat.com> --- sound/soc/intel/boards/cht_bsw_nau8824.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)