Hi Takashi,
On Thu, Aug 22, 2019 at 04:17:51PM +0200, Takashi Iwai wrote:
I am going at a slow pace, but I did not give up and I'd be happy if you or anyone else from the list would find the time to answer some questions from time to time.
Right now I am mostly studying patch_realtek.c, as a first step I want to make sure that at least my known pins get set up by the driver without having to go via hdajackretask.
I got my build set up, I also dug up hda-decode-pincfg from the hda-emu sources and made it compile (very useful if one wants to understand and compare the pin configurations in patch_realtek.c), so now I am trying things out every other evening.
One part that is not quite clear to me: what the heck is ALC669X?
It's just a name string :) Realtek seems to give a different chip name for the certain variant for Dell or whatever big vendors. AFAIK, basically it's the very same chip as ALC670, which is almost compatible with ALC662 variant.
Oh, OK, that explains why I was not able to find any real "connection" to this entry in the code, I was searching for a deeper meaning there :)
Could someone please explain the meaning of alc_codec_rename_pci_table ?
Entry for my vendor id looks like this: { 0x10ec0670, 0x1025, 0, "ALC669X" },
If I search for that vendor id further in the code, I see that it gets patched as ALC662?
HDA_CODEC_ENTRY(0x10ec0670, "ALC670", patch_alc662),
At the same time the documentation in models.rst lists those numbers together:
ALC66x/67x/892
I already looked at the hda-audio specification from Intel to get a general understanding, but I was also pulling some Realtek specs which do describe implemented verbs and things like that (my hope was to see something vendor related which could hint me how to enable the subwoofer).
I was not able to find any 669 Realtek datasheets, I did however find the ones for ALC665 and ALC892. How specific is all of this, i.e. should I keep looking for the exact one or am I on the wrong path here?
The datasheet of ALC662 and similar chips should be available. In general, there is no big difference among Realtek chips; one has more I/O pins available, while one has less.
The vendor-specific stuff like COEF isn't found in the datasheet in details, unfortunately. Also, the GPIO pin connection isn't covered by the codec datasheet, as it's rather device-specific, of course.
Doh... there go my hopes for finding an easy answer... thank you for clarifying that.
As mentioned earlier, I will leave the "subwoofer battle" for the very end.
For starters I added the pin configuration for the Acer Aspire 8951G Ethos to enable surround speakers (without the subwoofer for now).
Not sure how it happened, but since yesterday I lost the ability to unload the module at runtime and I was not able to find out what is using it, so debugging has become a pain now :P
Next thing I am looking at is the problem with automute when HP are plugged in, I hope you can point me in the right direction here.
As described in one of my earlier posts, rear speakers share the pin with the headphones jack and they get correctly muted when headphones are plugged in.
However, all other speakers (front, center) remain unmuted.
I was trying to figure out how to approach this, but did not really get anywhere.
My first idea was to go with the automute hook, however it did not behave the way I would expect it: for some reason it is not triggering on the HP jack, it is however triggering on mic-in and line-out jacks.
I kept the "misc" bit on zero, which means jack-detect is possible, and I set port connectivity to 11b (Both a jack and an internal device are attached).
So if I understood the spec correctly, then this configuration should be appropriate: 0xd1130012 ?
Its worth mentioning, that hdajacksensetest -a will show presence detection correctly.
Assuming that I figure out how to get the auto mute hook to trigger on the HP jack, next question would be: what to do in the hook?
I tried to understand existing hooks, but did not really get anywhere. A lot of them are doing something with VREF80, which seems to be some voltage setting.. but how would that be related to muting?
Could you please hint how to approach this? Am I supposed to mute/unmute the remaining speakers (pins) individually?
I am attaching what I have so far as reference, currently I am hacking vs a Fedora 29 5.2.7-100.fc29.x86_64 kernel (it's just easier to get started like that), I will submit a proper patch when we get this to work properly :>
Kind regards, Jin