https://git.kernel.org/cgit/linux/kernel/git/tiwai/sound.git/patch/sound/pci/hda?id=b016951e897b5bd06abfb732012f67b461fb1e2e
if none of those headset model work, you have to compile the driver in debug mode since only the debug version show headset type
static void alc_determine_headset_type(struct hda_codec *codec) { int val; bool is_ctia = false; struct alc_spec *spec = codec->spec;
switch (codec->core.vendor_id) {
case 0x10ec0233: case 0x10ec0283: alc_write_coef_idx(codec, 0x45, 0xd029); msleep(300); val = alc_read_coef_idx(codec, 0x46); is_ctia = (val & 0x0070) == 0x0070; break;
}
codec_dbg(codec, "Headset jack detected iPhone-style headset: %s\n", is_ctia ? "yes" : "no"); spec->current_headset_type = is_ctia ? ALC_HEADSET_TYPE_CTIA : ALC_HEADSET_TYPE_OMTP; }
https:/ /git.kernel. org/cgit/ linux/kernel/ git/tiwai/ sound.git/ patch/sound/ pci/hda? id=b016951e897b 5bd06abfb732012 f67b461fb1e2e
if none of those headset model work, you have to compile the driver in debug mode since only the debug version show headset type
static void alc_determine_ headset_ type(struct hda_codec *codec)
{
int val;
bool is_ctia = false;
struct alc_spec *spec = codec->spec;
switch (codec- >core.vendor_ id) {
case 0x10ec0233: coef_idx( codec, 0x45, 0xd029); coef_idx( codec, 0x46);
case 0x10ec0283:
alc_write_
msleep(300);
val = alc_read_
is_ctia = (val & 0x0070) == 0x0070;
break;
}
codec_dbg(codec, "Headset jack detected iPhone-style headset: %s\n", current_ headset_ type = is_ctia ? ALC_HEADSET_ TYPE_CTIA : ALC_HEADSET_ TYPE_OMTP;
is_ctia ? "yes" : "no");
spec->
}