Lenovo X270 with HDA ALC298
Takashi Iwai
tiwai at suse.de
Mon Jul 27 20:06:13 CEST 2020
On Sat, 25 Jul 2020 12:20:41 +0200,
Yasushi SHOJI wrote:
>
> Hi all,
>
> I noticed that my 3 years old Lenovo X270 with Intel HDA & RealTek
> ALC298 doesn't work with 3.5 mm audio combo jack with 4 pole CTIA. A
> bit of googling showed me that `snd-hda-intel` module can take some
> options like `model` to run some fix ups. and I have found that
> `model=alc298-dell1` seems to at least work. But its gain is way too
> low. It's mostly just noise. It sounds like my mic is on the
> line-in.
>
> So, I opened `patch_realtek.c` to see what's going on. I found the
> following but not sure what the values for `.v.pins` are for.
>
> ```
> [ALC298_FIXUP_DELL1_MIC_NO_PRESENCE] = {
> .type = HDA_FIXUP_PINS,
> .v.pins = (const struct hda_pintbl[]) {
> { 0x18, 0x01a1913c }, /* use as headset mic, without its own jack detect */
> { 0x1a, 0x01a1913d }, /* use as headphone mic, without its own jack detect */
> { }
> },
> .chained = true,
> .chain_id = ALC269_FIXUP_HEADSET_MODE
> },
> ```
>
> In `apply_fix(), these `.v.pins` values are passed to
> `snd_hda_apply_pincfgs()` but I can't find what values mean. Would
> someone please enlighten me?
>
> My questions are
>
> 1) How can I found out which pin goes where. There is x270 schematics
> on the net but not sure it's correct.
It's often done by trial-and-error. Or sometimes the information can
be extracted from Windows driver *.INI file.
Or you can try hdajackretask program for figuring out those.
> 2) What does the value, ie, 0x01a1913d, represent?
At best take a look at HD-audio specification. You can find easily on
the web.
Those are "pin configuration" values where various attributes like the
jack type, the jack color, etc are embedded. The HD-audio driver
looks through those configurations and determine the set up based on
them.
HTH,
Takashi
More information about the Alsa-devel
mailing list