Bug 205755 - limited sound on Lenovo Yoga C940
Summary: limited sound on Lenovo Yoga C940
Status: NEW
Alias: None
Product: Drivers
Classification: Unclassified
Component: Sound(ALSA) (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: Jaroslav Kysela
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-12-03 17:12 UTC by Peter F. Patel-Schneider
Modified: 2022-09-29 22:30 UTC (History)
32 users (show)

See Also:
Kernel Version: 5.3.12
Subsystem:
Regression: No
Bisected commit-id:


Attachments
output of alsa-output.sh (50.22 KB, text/plain)
2019-12-03 17:12 UTC, Peter F. Patel-Schneider
Details
RtHDDump output for C940 on Windows (67.84 KB, application/zip)
2020-10-15 22:24 UTC, toastbutteringmachine
Details
Testing 0x20 windows/linux coefficients (1.34 KB, application/x-shellscript)
2020-11-08 19:24 UTC, Dimitrios Liappis
Details
HDA I/O log (Windows inside qemu on Linux) (742.71 KB, text/plain)
2020-11-09 22:32 UTC, toastbutteringmachine
Details
acpidump output (1.48 MB, text/plain)
2022-09-29 10:30 UTC, Peter F. Patel-Schneider
Details

Description Peter F. Patel-Schneider 2019-12-03 17:12:38 UTC
Created attachment 286165 [details]
output of alsa-output.sh

The Lenovo Yoga C940 has five speakers (three in a sound bar and two on the bottom front).  Only two or maybe three of these speakers work out of the box.  

The hda sound card is an ALC298.  Probably some quirk is needed to get the extra speakers to work.

I've attached the output of alsa-info.sh

Using hda-analyzer I can confirm that
the speaker path is output 0x03 to mixer 0x0d to soundbar speakers 0x14
and that
the headphone path is output 0x02 to mixer 0x0c to headphones 0x21.

The other output pin complexes are 0x17, 0x1a, and 0x1e.  0x1e can only be connected to output 0x06 which is not amplified so this looks like an unconnected modem path.  I tried to enable 0x17 and 0x1a by connecting them to mixer 0x0d and unmuting them but no sound comes out.

So I'm stumped.  How could the other three (or two) speakers be connected?  Is there anything else I can try with HDA audio?  Or is it that the other speakers are only connected some other capability of the laptop?  (The mic appears to not be connected via HDA audio.)
Comment 1 Peter F. Patel-Schneider 2019-12-03 17:14:40 UTC
This problem probably affects other recent Lenovo laptops such as the Lenovo Yoga C930.  See https://bugzilla.kernel.org/show_bug.cgi?id=203409
Comment 2 Jaroslav Kysela 2019-12-11 16:19:56 UTC
A little info for Lenovo users (Yoga X1, C940): There are some I2S amplifiers on the path to buildin speakers and while they are initialized with some basic values for Carbon X1 in BIOS, the Yoga X1 and C940 has initialization only for two speakers there. I am trying to gather the necessary information to improve the kernel driver to support all speakers and the sound quality.
Comment 3 Peter F. Patel-Schneider 2019-12-11 22:06:30 UTC
Hah!  Finally a cause.  Great work!

Would it be useful to copy the Carbon X1 values over for the other laptops?  Also, I can run my C940 under Windows.  Is there a way to extract the necessary information there?
Comment 4 Jaroslav Kysela 2020-01-08 10:29:34 UTC
Another piece of information: C940 has Ti (Texas Instruments) I2S amplifiers which are different than Realtek amplifers in X1 7th / Yoga X1 7th. The amplifiers for X1 / Yoga X1 are initialized in EC (embedded controller). This initialization is missing for the Ti chip.

Because Windows works on those platforms and I have some little information that the Windows driver is more "brave" and sets those chips also according the usage (profiles), the Windows driver must have the initialization sequence build-in.

The amplifier chips communicate through I2C with the HDA codec, which has the master I2C interface controlled through HDA verbs. Most probably, it's a hidden, undocumented function for the "coefficient" HDA node 0x20 for the Realtek codecs (the node address might differ per the codec variant).

That's everything I have for now.
Comment 5 Peter Vaňušanik 2020-03-31 13:02:43 UTC
Any progress on this issue? I will be getting this laptop soon and it would be awesome if this was fixed :)
Comment 6 Jaroslav Kysela 2020-03-31 13:37:37 UTC
No, it's a bit impossible to get the right information from Lenovo. Many people involved (ThinkPad hardware team is different from the "game" hardware), no real answers. They should fix the BIOS to get things working properly on Linux unless they uncover the full chip specifications, so we can do the proper support.

Another way may be to reverse engineer the Windows driver using qemu (trace PCI I/O) or so. A nice project for an student.
Comment 7 AleksF 2020-04-02 05:46:56 UTC
Any chance that this fix might work?
It's for the yoga c930.

https://github.com/droserasprout/lenovo-yoga-c930-linux
Comment 8 AleksF 2020-04-02 05:48:44 UTC
(In reply to AleksF from comment #7)
> Any chance that this fix might work?
> It's for the yoga c930.
> 
> https://github.com/droserasprout/lenovo-yoga-c930-linux

for comparison, this is the c930 bug report which also has a problem in initialization of the speakers apparently.

https://bugzilla.kernel.org/show_bug.cgi?id=203409
Comment 9 daniel 2020-04-02 12:32:35 UTC
This is a more relevant link for the c940

https://wiki.archlinux.org/index.php/Lenovo_Yoga_c940
Comment 10 AleksF 2020-04-02 20:48:08 UTC
Yes, I actually came to this page from the arch wiki link you posted. In fact, the author says he didn't try to activate the speakers as suggested in the link I posted before, which worked for the C930 and could be working for the c940. 

I don't understand enough to give the following method a try, but it could potentially work.

So the initialization method we need for the c940 should stem from the one that worked for the c930 here:

https://bugzilla.kernel.org/show_bug.cgi?id=203409


If it works, I will update the arch wiki accordingly. Currently the arch wiki is linking to here.
Comment 11 kxchan 2020-04-03 03:56:33 UTC
I don't know if contacting Lenovo after-sales will help, I'm from China. I'll try it this weekend.
Comment 12 Peter Vaňušanik 2020-04-04 08:53:10 UTC
AleksF: I tried that pin override but it did nothing, which is a shame, since with only 2 speakers out of 5 laptop is really quiet
Comment 13 Peter Vaňušanik 2020-04-05 19:27:30 UTC
J. Kysela:

I tried to determine the windows driver process but audio is grouped with southbridge and smbus:

IOMMU Group 11:
	00:1f.0 ISA bridge [0601]: Intel Corporation Ice Lake-LP LPC Controller [8086:3482] (rev 30)
	00:1f.3 Multimedia audio controller [0401]: Intel Corporation Smart Sound Technology Audio Controller [8086:34c8] (rev 30)
	00:1f.4 SMBus [0c05]: Intel Corporation Ice Lake-LP SMBus Controller [8086:34a3] (rev 30)
	00:1f.5 Serial bus controller [0c80]: Intel Corporation Ice Lake-LP SPI Controller [8086:34a4] (rev 30)
Comment 14 Peter Vaňušanik 2020-04-05 19:52:23 UTC
Okay never mind, I lied. I managed to get perfect audio in windows virtualization. Here is the log out of qemu, no idea how to read it though:

https://gist.github.com/Enerccio/57c9b38e2096a87e4f1a67d25952c391

Tell me if you need anything more, Jaroslave ;)
Comment 15 Peter F. Patel-Schneider 2020-04-05 20:09:21 UTC
Wow!  That's a lot of activity.  What are the steps to getting this output?
Comment 16 Peter Vaňušanik 2020-04-05 20:21:34 UTC
Log is bigger because i included playback of youtube audio just to be sure. 

I followed this tutorial: https://digriz.org.uk/tutorials/reversing-pci-drivers
with some changes, ie paths and such. 

For qemu install I followed https://github.com/qemu/qemu/blob/master/docs/devel/tracing.txt simple variant. 

My commands were: for installing windows

sudo qemu-system-x86_64 \
    -machine accel=kvm \
    -cpu host -smp 2 -m 2G \
    -bios /usr/share/ovmf/x64/OVMF_CODE.fd \
    -drive file=/storage/tmp/qemu/mswin10.qcow2,if=virtio,snapshot=off \
    -nic user \
    -device usb-ehci,id=ehci -usbdevice tablet \
    -soundhw hda \
    -rtc base=localtime \
    -drive file=/storage/tmp/Win10_1909_English_x64.iso,media=cdrom \
    -drive file=/usr/share/virtio/virtio-win.iso,media=cdrom \
    -boot once=d

Modprobes:

sudo modprobe -r snd_sof_pci
sudo modprobe -r i2c_i801
sudo modprobe vfio-pci ids=8086:34c8,8086:3482,8086:34a3,8086:34a4

For actual runtime (this was compiled qemu from git): 

sudo qemu/x86_64-softmmu/qemu-system-x86_64 \
    -machine accel=kvm \
    -cpu host -smp 2 -m 2G \
    -bios /usr/share/ovmf/x64/OVMF_CODE.fd \
    -drive file=/storage/tmp/qemu/mswin10.qcow2,if=virtio,snapshot=off \
    -nic user \
    -device usb-ehci,id=ehci -usbdevice tablet \
    -soundhw hda \
    -rtc base=localtime \
    -drive file=/storage/tmp/Win10_1909_English_x64.iso,media=cdrom \
    -drive file=/usr/share/virtio/virtio-win.iso,media=cdrom \
    -device vfio-pci,host=00:1f.3,x-no-mmap=on \
    -trace events=events 2>&1 | tee trace

This was all done on latest manjaro xfce fwiw.
Comment 17 Peter Vaňušanik 2020-04-05 20:23:09 UTC
Also I installed lenovo audio drivers in guest windows 10. It picked it up immediately and playback was great, every speaker worked.
Comment 18 Peter Vaňušanik 2020-04-05 20:25:01 UTC
I forgot the event file which was generated from all events with the sid in the tutorial (tutorial tells to use different file): https://gist.github.com/Enerccio/663c6a1fdba122aa15c5eac497a5b72f
Comment 19 Peter Vaňušanik 2020-04-05 20:35:05 UTC
And just to be extra sure, this is log of only booting the windows and logging in the account, nothing else 

https://gist.github.com/Enerccio/8405ade9b7e9cf03b6673c5dac4eacfa
Comment 20 Peter F. Patel-Schneider 2020-04-09 22:01:27 UTC
Thanks, that at least is shorter.
But I can't see any way of determining which of the writes are to the nodes in the ALC298, so that I can try to figure out what is going on, at least without some documentation, which I don't know how to get.  Does anyone have this documentation?
Comment 21 Peter Vaňušanik 2020-04-10 06:19:45 UTC
I only found this: https://www.hardwaresecrets.com/datasheets/alc269.pdf
Comment 22 Jaroslav Kysela 2020-04-10 08:37:17 UTC
Have you tried something like this to decode this contents?  https://github.com/Conmanx360/QemuHDADump/wiki/Setup-and-usage-of-the-program

We need to collect the HDA verb read/write calls and add missing parts to the Linux driver.

The public codec documentation is incomplete. Realtek codecs have hidden registers (masked as coefficient node). Also it appears that some Realtek codecs has integrated I2C bus controller which can attach and control additional chips like amplifiers.
Comment 23 Peter Vaňušanik 2020-04-10 09:15:32 UTC
I have the raw dumps from those runs, I can upload them somewhere. I will later check more the link you provided.
Comment 24 Peter Vaňušanik 2020-04-10 10:33:53 UTC
@Jaroslav Kysela: Here are the dumps:

https://github.com/Enerccio/lenovo-c940-dumps
Comment 25 Peter Vaňušanik 2020-04-10 10:45:49 UTC
Just to clarify, these are the frame dumps from the link you posted, not my old trace dumps
Comment 26 Peter Vaňušanik 2020-04-21 08:12:06 UTC
Anything else I can do?
Comment 27 Tim Ryder 2020-05-07 22:30:17 UTC
I have the C940, same issue.  Anything that would be helpful from my system?
Also now that Lenovo will be releasing laptops with fedora, any chance fedora can get them to help?
Comment 28 AleksF 2020-05-08 00:05:16 UTC
I also tried connecting the pins with Hda-Jack-retask but had no luck, although I'm not sure I'm doing it right.
Comment 29 Peter F. Patel-Schneider 2020-05-08 00:14:26 UTC
It seems that what is needed is to turn on some amplifiers.   However, there is no documentation on this and the dumps (above) need to be interpreted by someone who knows how to decode them or someone needs to point to a document on how to interpret them.

I expect that Lenovo will only be releasing ThinkPads with Fedora (same as they have done for other Linux distributions) so this IdeaPad will not be covered.

It may even be that no one in Lenovo knows how to turn on the amplifiers as it is very likely that they are turned on by a driver provided by RealTek.
Comment 30 Peter Vaňušanik 2020-05-08 05:34:19 UTC
Maybe we can ask realtek to give us the info?
Comment 31 Jaroslav Kysela 2020-05-08 07:46:25 UTC
(In reply to Tim Ryder from comment #27)
> I have the C940, same issue.  Anything that would be helpful from my system?
> Also now that Lenovo will be releasing laptops with fedora, any chance
> fedora can get them to help?

I am the Fedora guy. It seems that the gaming laptops are developed in another ground than ThinkPads (I was not able to gather the correct information in the two week discussion with various Lenovo people). Also, appearently, the Windows driver code is developed by the chip vendor (Texas Instruments for amplifiers), thus Realtek might not have this info (amplifiers). Lenovo just puts those driver pieces together (Realtek, Texas Instruments).

(In reply to Peter F. Patel-Schneider from comment #29)
> It seems that what is needed is to turn on some amplifiers.   However, there
> is no documentation on this and the dumps (above) need to be interpreted by
> someone who knows how to decode them or someone needs to point to a document
> on how to interpret them.

Right. From the first glance, we may extract something from the dumps and try to reproduce the Windows settings, but it requires a time (and I am working on another things - sorry). It might be a nice project for a student.
Comment 32 Jaroslav Kysela 2020-05-08 07:48:53 UTC
Sorry typo "in another ground than ThinkPads" should be "in another group than ThinkPads".
Comment 33 Nate Graham 2020-05-21 19:42:43 UTC
I got in touch with a Lenovo Linux kernel engineer about this issue and received permission to post the following:




Here is the Ti amp Initial code which may help

w 82 00 00 # Page-0
w 82 7f 00 # Book-0
w 82 01 01 # Software Reset

w 84 00 00 # Page-0
w 84 7f 00 # Book-0
w 84 01 01 # Software Reset

d 01 # 1mS Delay

w 82 00 01 #page 1
w 82 32 e8 # Disable clock halt detection, after clock error is 
detected w 82 00 00 # w 82 3c 11 w 82 0f 42 # TDM TX voltage sense 
transmit enable with slot 2, w 82 10 40 # TDM TX current sense 
transmit enable with slot 0 w 82 03 00 # 11 dB gain w 82 02 00 # power 
up audio playback with I,V enabled

w 84 00 01 #page 1
w 84 32 e8 # Disable clock halt detection, after clock error is 
detected w 84 00 00 # w 84 3c 11 w 84 0f 46 # TDM TX voltage sense 
transmit enable with slot 6, w 84 10 44 # TDM TX current sense 
transmit enable with slot 4 w 84 03 00 # 11 dB gain w 84 02 00 # power 
up audio playback with I,V enabled



Does that help at all?
Comment 34 Tim Ryder 2020-06-16 23:59:48 UTC
Would love to see if there is anyway to use the TI amp Initial code to get this to work, just not sure how to do that.  My son is a programmer and I'm a Linux admin.  Thought maybe the 2 of us together could figure it out if someone could point us in the right direction to start.
Comment 35 Ivan Anishchuk 2020-07-16 18:52:24 UTC
I recently bought a c940 too and would love to help resolving this any way I can.
Comment 36 Rotekoppen 2020-08-14 19:08:48 UTC
Would happily contribute with anything I can!
Comment 37 AleksF 2020-08-30 05:21:40 UTC
(In reply to Jaroslav Kysela from comment #31)
> (In reply to Tim Ryder from comment #27)
> > I have the C940, same issue.  Anything that would be helpful from my
> system?
> > Also now that Lenovo will be releasing laptops with fedora, any chance
> > fedora can get them to help?
> 
> I am the Fedora guy. It seems that the gaming laptops are developed in
> another ground than ThinkPads (I was not able to gather the correct
> information in the two week discussion with various Lenovo people). Also,
> appearently, the Windows driver code is developed by the chip vendor (Texas
> Instruments for amplifiers), thus Realtek might not have this info
> (amplifiers). Lenovo just puts those driver pieces together (Realtek, Texas
> Instruments).
> 
> (In reply to Peter F. Patel-Schneider from comment #29)
> > It seems that what is needed is to turn on some amplifiers.   However,
> there
> > is no documentation on this and the dumps (above) need to be interpreted by
> > someone who knows how to decode them or someone needs to point to a
> document
> > on how to interpret them.
> 
> Right. From the first glance, we may extract something from the dumps and
> try to reproduce the Windows settings, but it requires a time (and I am
> working on another things - sorry). It might be a nice project for a student.

Hello Jaroslav, is there anything we can do to get the sound working on the Lenovo c940? Do you accept donations?
Comment 38 toastbutteringmachine 2020-10-15 22:24:18 UTC
Created attachment 293001 [details]
RtHDDump output for C940 on Windows

Here are the outputs of RtHDDump.exe for the Lenovo C940 when the volume is set to Mute, 37%, and 100% respectively in Windows. This shows the values of the vendor registers (as coefficients of node 0x20). Someone may be able to use this to deduce the correct verbs to initialize the amplifiers.
Comment 39 Anders 2020-11-03 17:15:44 UTC
Just bought the Lenovo S940-14IIL and I can confirm that the issue is the same for this laptop. I am running Pop Os 20.10 with kernel 5.8.0-7625-generic.

Is there some way I could help on this issue?

From what I understand there are two I2C amplifiers that needs to be turned on. But does anyone know if there is something more that needs to be done?
Comment 40 Peter F. Patel-Schneider 2020-11-03 17:30:09 UTC
It appears to me that what needs to be done is to turn the amplifiers on and also ensure that the connections are set up correctly so that the sound bits get to the amplifiers (presumably nodde 0x20).


I know something about setting up connections but I don't know how to determine what the commands to turn the amplifiers on are.  Comment 33 may have all the information needed for this.
Comment 41 Anders 2020-11-03 17:50:15 UTC
@Peter: Do we know which Texas Instruments I2C amplifier it is? If we knew then we could perhaps have a look the the datasheet.

From reading comment 33 I could only guess that 82 corresponds to the address of amplifier 1 and 84 to the address of amplifier 2. I will see if I can make some more sense about those commands.
Comment 42 Peter F. Patel-Schneider 2020-11-03 17:57:25 UTC
@Anders: I don't know whether the amplifier model is known.  Nate Graham may be able to find out.
Comment 43 Nate Graham 2020-11-03 18:15:51 UTC
I don't think so, but I can share my Lenovo contact: David Ober <dober@lenovo.com>. Please feel free to politely reach out to him, referencing this issue.
Comment 44 Anders 2020-11-03 22:41:23 UTC
Thank you Peter and Nate. I have sent an email David. Maybe we will get a reply. :)
Comment 45 AleksF 2020-11-04 00:48:10 UTC
(In reply to Anders from comment #44)
> Thank you Peter and Nate. I have sent an email David. Maybe we will get a
> reply. :)

Thank you Anders! Awesome work. Crossing our fingers...
Comment 46 Dimitrios Liappis 2020-11-08 19:24:30 UTC
Created attachment 293575 [details]
Testing 0x20 windows/linux coefficients

I couldn't figure out how to use comment 33, however, the RhHDdump from comment 38 might be useful, as it lists the values from Windows for the widget 0x20 when audio is muted, at 37% and at 100% volume.

I (rather naively) thought that perhaps we can utilize the hda-verb tool (https://fossies.org/linux/alsa-tools/hda-verb/README) to set the values for the various coefficients to that of Windows. I got inspiration for this from https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1851518/comments/10, but it's possible that the necessary commands need to be done during startup as shown in https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1851518/comments/30.

At any rate, on my C940 with only 2 speakers working on Linux Manjaro Kernel 5.9.3-1 I tried pulling the current settings for widget 0x20 using the alsa-info (http://www.alsa-project.org/db/?f=5a7e986d7cad81213d2ef64f02ae478c7994c4d7
) tool.

Then I compared those with the dump from comment #33 (with volume at 100) and recorded the differences shown below.

Then using the simple attached script, I tried seeing what happens by setting the differing Windows values; unfortunately no audio could be heard. By replacing the values to Linux ones the sound restores fine.

I am not familiar with sound connections, so, unsure if this caused the amp to turn and just mess out the sound routing (I doubt it).

At any rate, just thought I'd share what I've experimented with so far despite no success.


> linux vs windows settings for 0x20: (left is linux, 2 speakers only)

$ diff --side-by-side --suppress-common-lines linux-coeff-0x20-defaults.txt windows-vol-100-coeff-20.txt
coeff 0x03 0x0002  |	coeff 0x03 0x0042
coeff 0x05 0x2fe0  |	coeff 0x05 0x2be0
coeff 0x08 0x200f  |	coeff 0x08 0x0fcf
coeff 0x0f 0x0022  |	coeff 0x0f 0x0062
coeff 0x10 0x0c20  |	coeff 0x10 0x0e21
coeff 0x22 0x0000  |	coeff 0x22 0x0046
coeff 0x23 0x0000  |	coeff 0x23 0x0002
coeff 0x25 0x0000  |	coeff 0x25 0x0002
coeff 0x26 0x3000  |	coeff 0x26 0xb000
coeff 0x27 0x0000  |	coeff 0x27 0xffff
coeff 0x28 0x0000  |	coeff 0x28 0xffff
coeff 0x2e 0x0250  |	coeff 0x2e 0x0350
coeff 0x54 0x00c0  |	coeff 0x54 0xcf00
coeff 0x55 0x0000  |	coeff 0x55 0xc141
coeff 0x5b 0x0000  |	coeff 0x5b 0x4141
coeff 0x67 0x1110  |	coeff 0x67 0x1111
coeff 0x80 0x5c52  |	coeff 0x80 0x5c53
coeff 0x82 0x0080  |	coeff 0x82 0x4408
coeff 0x84 0x00c0  |	coeff 0x84 0x31bb
coeff 0x89 0x0000  |	coeff 0x89 0x000f
Comment 47 Anders 2020-11-09 22:21:58 UTC
Thank you Dimitrios. I tried to understand the data you have gathered but I do not know how to interpret it.

Regarding comment 33, I have tried to clear it up a bit. However I have not figured out how and where to write this data. The 'w' should probably mean to write commands, the '82' and '84' would be addresses, the 'd' would be to delay.

If someone wants to chat with me on how to proceed with this just let me know.

Just thinking out loud here. Could booting up Windows 10 in a virtual machine on the host enable the speakers to work? If so then maybe it would be possible to capture all the hardware communication between the virtual machine and the laptop hardware.

w 82 00 00 # Page-0
w 82 7f 00 # Book-0
w 82 01 01 # Software Reset

w 84 00 00 # Page-0
w 84 7f 00 # Book-0
w 84 01 01 # Software Reset

d 01 # 1mS Delay

w 82 00 01 # Page 1
w 82 32 e8 # Disable clock halt detection, after clock error is detected
w 82 00 00 #
w 82 3c 11
w 82 0f 42 # TDM TX voltage sense transmit enable with slot 2,
w 82 10 40 # TDM TX current sense transmit enable with slot 0
w 82 03 00 # 11 dB gain
w 82 02 00 # power up audio playback with I,V enabled

w 84 00 01 # Page 1
w 84 32 e8 # Disable clock halt detection, after clock error is detected
w 84 00 00 #
w 84 3c 11
w 84 0f 46 # TDM TX voltage sense transmit enable with slot 6,
w 84 10 44 # TDM TX current sense transmit enable with slot 4
w 84 03 00 # 11 dB gain
w 84 02 00 # power up audio playback with I,V enabled
Comment 48 toastbutteringmachine 2020-11-09 22:29:13 UTC
(In reply to Anders from comment #47)
> 
> Just thinking out loud here. Could booting up Windows 10 in a virtual
> machine on the host enable the speakers to work? If so then maybe it would
> be possible to capture all the hardware communication between the virtual
> machine and the laptop hardware.
> 

I had done this with limited success. It is possible to use qemu to boot Windows and give it direct control of the sound device. Doing so did cause the amplifiers to to turn on, but the effective volume was locked at maximum. Lowering the volume in Windows had no effect on the actual volume heard. I was able to capture all the HDA verbs sent during Windows startup. I've pasted them below; I didn't share this information originally because as I said the result was not entirely successful; however this may still be helpful.

VERB: codec 0x0, indirect 0, nid 0x20, payload 0x50007
VERB: codec 0x0, indirect 0, nid 0x20, payload 0xc0000
VERB: codec 0x0, indirect 0, nid 0x00, payload 0x07fff
VERB: codec 0x0, indirect 0, nid 0x01, payload 0xf000f
VERB: codec 0x0, indirect 0, nid 0x00, payload 0x00000
VERB: codec 0x11, indirect 1, nid 0x1a, payload 0x38520
VERB: codec 0x0, indirect 0, nid 0x20, payload 0x50010
VERB: codec 0x0, indirect 0, nid 0x20, payload 0xc0000
VERB: codec 0x0, indirect 0, nid 0x00, payload 0x00000
VERB: codec 0x0, indirect 0, nid 0x01, payload 0xf0500
VERB: codec 0x0, indirect 0, nid 0x20, payload 0x50010
VERB: codec 0x0, indirect 0, nid 0x20, payload 0x40e21
VERB: codec 0x0, indirect 0, nid 0x21, payload 0xf0900
VERB: codec 0x0, indirect 0, nid 0x01, payload 0x71700
VERB: codec 0x0, indirect 0, nid 0x00, payload 0x00000
VERB: codec 0x0, indirect 0, nid 0x18, payload 0xf0900
VERB: codec 0x0, indirect 0, nid 0x00, payload 0x00000
VERB: codec 0x0, indirect 0, nid 0x01, payload 0x71500
VERB: codec 0x0, indirect 0, nid 0x01, payload 0x70500
VERB: codec 0x11, indirect 1, nid 0x1a, payload 0x8f4f8
VERB: codec 0x0, indirect 0, nid 0x00, payload 0x07f26
VERB: codec 0x0, indirect 0, nid 0x01, payload 0x71600
VERB: codec 0x0, indirect 0, nid 0x00, payload 0x07fff
VERB: codec 0x11, indirect 1, nid 0x1a, payload 0x609c1
VERB: codec 0x0, indirect 0, nid 0x21, payload 0xf0900
VERB: codec 0x11, indirect 0, nid 0x0e, payload 0x558c0
VERB: codec 0x0, indirect 0, nid 0x19, payload 0x71cf0
VERB: codec 0x0, indirect 0, nid 0x18, payload 0xf0900
VERB: codec 0x0, indirect 0, nid 0x00, payload 0x07fff
VERB: codec 0x0, indirect 0, nid 0x19, payload 0x71d11
VERB: codec 0x0, indirect 0, nid 0x00, payload 0x07f26
VERB: codec 0x0, indirect 0, nid 0x20, payload 0x50044
VERB: codec 0x0, indirect 0, nid 0x20, payload 0xc0000
VERB: codec 0x0, indirect 0, nid 0x19, payload 0x71e11
VERB: codec 0x0, indirect 0, nid 0x20, payload 0x50044
VERB: codec 0x0, indirect 0, nid 0x20, payload 0x4020e
VERB: codec 0x0, indirect 0, nid 0x19, payload 0x71f81
VERB: codec 0x0, indirect 0, nid 0x00, payload 0x00000
VERB: codec 0x0, indirect 0, nid 0x17, payload 0x71f90
VERB: codec 0x0, indirect 0, nid 0x14, payload 0xf0700
VERB: codec 0x0, indirect 0, nid 0x00, payload 0x00000
VERB: codec 0x0, indirect 0, nid 0x14, payload 0x70740
VERB: codec 0x0, indirect 0, nid 0x00, payload 0x07f26
VERB: codec 0x0, indirect 0, nid 0x14, payload 0xf0700
VERB: codec 0x0, indirect 0, nid 0x00, payload 0x07fff
VERB: codec 0x0, indirect 0, nid 0x14, payload 0x70100
VERB: codec 0x0, indirect 0, nid 0x14, payload 0xf0100
VERB: codec 0x0, indirect 0, nid 0x14, payload 0x70100
VERB: codec 0x0, indirect 0, nid 0x00, payload 0x07f26
VERB: codec 0x0, indirect 0, nid 0x14, payload 0xf0100
VERB: codec 0x0, indirect 0, nid 0x00, payload 0x07f26
VERB: codec 0x0, indirect 0, nid 0x17, payload 0xf0700
VERB: codec 0x0, indirect 0, nid 0x00, payload 0x00000
VERB: codec 0x0, indirect 0, nid 0x17, payload 0x70740
VERB: codec 0x0, indirect 0, nid 0x17, payload 0xf0700
VERB: codec 0x11, indirect 1, nid 0x1a, payload 0x852bf
VERB: codec 0x0, indirect 0, nid 0x17, payload 0x70102
VERB: codec 0x0, indirect 0, nid 0x00, payload 0x00001
VERB: codec 0x0, indirect 0, nid 0x17, payload 0xf0100
VERB: codec 0x0, indirect 0, nid 0x17, payload 0x70102
VERB: codec 0x0, indirect 0, nid 0x00, payload 0x00000
VERB: codec 0x0, indirect 0, nid 0x17, payload 0xf0100
VERB: codec 0x0, indirect 0, nid 0x00, payload 0x07fff
VERB: codec 0x0, indirect 0, nid 0x02, payload 0x70500
VERB: codec 0x0, indirect 0, nid 0x02, payload 0xf0500
VERB: codec 0x11, indirect 1, nid 0x1a, payload 0x38000
VERB: codec 0x0, indirect 0, nid 0x03, payload 0x70500
VERB: codec 0x0, indirect 0, nid 0x03, payload 0xf0500
VERB: codec 0x0, indirect 0, nid 0x00, payload 0x07fff
VERB: codec 0x0, indirect 0, nid 0x06, payload 0x70500
VERB: codec 0x0, indirect 0, nid 0x00, payload 0x07fff
VERB: codec 0x0, indirect 0, nid 0x06, payload 0xf0500
VERB: codec 0x0, indirect 0, nid 0x08, payload 0x70500
VERB: codec 0x11, indirect 1, nid 0x1a, payload 0x70cbb
VERB: codec 0x0, indirect 0, nid 0x08, payload 0xf0500
VERB: codec 0x11, indirect 1, nid 0x1a, payload 0x8d739
VERB: codec 0x0, indirect 0, nid 0x09, payload 0x70500
VERB: codec 0x0, indirect 0, nid 0x09, payload 0xf0500
VERB: codec 0x0, indirect 0, nid 0x00, payload 0x07f26
VERB: codec 0x0, indirect 0, nid 0x0a, payload 0x70500
VERB: codec 0x0, indirect 0, nid 0x0a, payload 0xf0500
VERB: codec 0x11, indirect 1, nid 0x1a, payload 0x60fb0
VERB: codec 0x0, indirect 0, nid 0x00, payload 0x07f26
VERB: codec 0x11, indirect 0, nid 0x0e, payload 0x55a60
VERB: codec 0x0, indirect 0, nid 0x11, payload 0x70500
VERB: codec 0x0, indirect 0, nid 0x00, payload 0x00007
VERB: codec 0x0, indirect 0, nid 0x00, payload 0x00000
VERB: codec 0x0, indirect 0, nid 0x00, payload 0x00007
VERB: codec 0x0, indirect 0, nid 0x11, payload 0xf0500
VERB: codec 0x11, indirect 1, nid 0x1a, payload 0x60580
VERB: codec 0x0, indirect 0, nid 0x12, payload 0xf0700
VERB: codec 0x11, indirect 1, nid 0x1a, payload 0x8e9e8
VERB: codec 0x0, indirect 0, nid 0x00, payload 0x07f26
VERB: codec 0x11, indirect 1, nid 0x1a, payload 0x6df14
VERB: codec 0x0, indirect 0, nid 0x12, payload 0x70500
VERB: codec 0x7, indirect 0, nid 0x52, payload 0x8739f
VERB: codec 0x0, indirect 0, nid 0x00, payload 0x055e5
VERB: codec 0x7, indirect 0, nid 0x52, payload 0x87453
VERB: codec 0x0, indirect 0, nid 0x12, payload 0xf0500
VERB: codec 0x7, indirect 0, nid 0x52, payload 0x873db
VERB: codec 0x0, indirect 0, nid 0x13, payload 0xf0700
VERB: codec 0x7, indirect 0, nid 0x52, payload 0x873ef
VERB: codec 0x0, indirect 0, nid 0x13, payload 0x70500
VERB: codec 0x11, indirect 0, nid 0x0e, payload 0x559e0
VERB: codec 0x0, indirect 0, nid 0x00, payload 0x07fff
VERB: codec 0x1, indirect 1, nid 0x12, payload 0xce100
VERB: codec 0x0, indirect 0, nid 0x13, payload 0xf0500
VERB: codec 0x7, indirect 0, nid 0x52, payload 0x873bb
VERB: codec 0x0, indirect 0, nid 0x14, payload 0x70500
VERB: codec 0x11, indirect 0, nid 0x0e, payload 0x55c50
VERB: codec 0x0, indirect 0, nid 0x14, payload 0xf0500
VERB: codec 0x7, indirect 0, nid 0x3b, payload 0x5a048
VERB: codec 0x0, indirect 0, nid 0x00, payload 0x055e5
VERB: codec 0x7, indirect 0, nid 0x52, payload 0x87407
VERB: codec 0x0, indirect 0, nid 0x17, payload 0x70500
VERB: codec 0x11, indirect 0, nid 0x0e, payload 0x55c58
VERB: codec 0x0, indirect 0, nid 0x17, payload 0xf0500
VERB: codec 0x11, indirect 0, nid 0x0e, payload 0x55c54
VERB: codec 0x0, indirect 0, nid 0x00, payload 0x07fff
VERB: codec 0x11, indirect 0, nid 0x0e, payload 0x559e0
VERB: codec 0x0, indirect 0, nid 0x18, payload 0x70500
VERB: codec 0x11, indirect 1, nid 0x18, payload 0xac502
VERB: codec 0x0, indirect 0, nid 0x18, payload 0xf0500
VERB: codec 0x11, indirect 0, nid 0x0e, payload 0x559f0
VERB: codec 0x0, indirect 0, nid 0x19, payload 0x70500
VERB: codec 0x0, indirect 0, nid 0x00, payload 0x00010
VERB: codec 0x0, indirect 0, nid 0x00, payload 0x00030
VERB: codec 0x11, indirect 0, nid 0x0e, payload 0x55bb0
VERB: codec 0x0, indirect 0, nid 0x19, payload 0xf0500
VERB: codec 0x11, indirect 0, nid 0x0e, payload 0x55ae0
VERB: codec 0x0, indirect 0, nid 0x1a, payload 0xf0700
VERB: codec 0x15, indirect 1, nid 0x3a, payload 0xd8001
VERB: codec 0x0, indirect 0, nid 0x00, payload 0x07fff
VERB: codec 0x7, indirect 0, nid 0x52, payload 0x8743e
VERB: codec 0x0, indirect 0, nid 0x1a, payload 0x70500
VERB: codec 0x7, indirect 0, nid 0x52, payload 0x873f7
VERB: codec 0x0, indirect 0, nid 0x1a, payload 0xf0500
VERB: codec 0x7, indirect 0, nid 0x52, payload 0x87383
VERB: codec 0x0, indirect 0, nid 0x00, payload 0x055e5
VERB: codec 0x7, indirect 0, nid 0x52, payload 0x87413
VERB: codec 0x0, indirect 0, nid 0x1d, payload 0x70500
VERB: codec 0x7, indirect 0, nid 0x52, payload 0x87403
VERB: codec 0x0, indirect 0, nid 0x1d, payload 0xf0500
VERB: codec 0x0, indirect 0, nid 0x1e, payload 0xf0700
VERB: codec 0x0, indirect 0, nid 0x00, payload 0x055e5
VERB: codec 0x0, indirect 0, nid 0x1e, payload 0x70500
VERB: codec 0x0, indirect 0, nid 0x1e, payload 0xf0500
VERB: codec 0x7, indirect 0, nid 0x52, payload 0x8744f
VERB: codec 0x0, indirect 0, nid 0x1f, payload 0xf0700
VERB: codec 0x0, indirect 0, nid 0x1f, payload 0x70500
VERB: codec 0x0, indirect 0, nid 0x1f, payload 0xf0500
VERB: codec 0x0, indirect 0, nid 0x00, payload 0x00000
VERB: codec 0x0, indirect 0, nid 0x21, payload 0x70500
VERB: codec 0x0, indirect 0, nid 0x21, payload 0xf0500
VERB: codec 0x0, indirect 0, nid 0x00, payload 0x00000
VERB: codec 0x0, indirect 0, nid 0x20, payload 0x5000e
VERB: codec 0x0, indirect 0, nid 0x20, payload 0xc0000
VERB: codec 0x0, indirect 0, nid 0x20, payload 0x5000e
VERB: codec 0x0, indirect 0, nid 0x20, payload 0x46f80
VERB: codec 0x0, indirect 0, nid 0x20, payload 0x50010
VERB: codec 0x0, indirect 0, nid 0x20, payload 0xc0000
VERB: codec 0x0, indirect 0, nid 0x20, payload 0x50010
VERB: codec 0x0, indirect 0, nid 0x20, payload 0x40e21
VERB: codec 0x0, indirect 0, nid 0x20, payload 0x50010
VERB: codec 0x0, indirect 0, nid 0x20, payload 0xc0000
VERB: codec 0x0, indirect 0, nid 0x20, payload 0x50010
VERB: codec 0x0, indirect 0, nid 0x20, payload 0x40e21
VERB: codec 0x0, indirect 0, nid 0x20, payload 0x50003
VERB: codec 0x0, indirect 0, nid 0x20, payload 0xc0000
VERB: codec 0x0, indirect 0, nid 0x20, payload 0x50085
VERB: codec 0x0, indirect 0, nid 0x20, payload 0xc0000
VERB: codec 0x0, indirect 0, nid 0x20, payload 0x50055
VERB: codec 0x0, indirect 0, nid 0x20, payload 0x4c141
VERB: codec 0x0, indirect 0, nid 0x20, payload 0x50008
VERB: codec 0x0, indirect 0, nid 0x20, payload 0xc0000
VERB: codec 0x0, indirect 0, nid 0x20, payload 0x50008
VERB: codec 0x0, indirect 0, nid 0x20, payload 0x40fcf
VERB: codec 0x0, indirect 0, nid 0x20, payload 0x50008
VERB: codec 0x0, indirect 0, nid 0x20, payload 0xc0000
VERB: codec 0x0, indirect 0, nid 0x20, payload 0x50008
VERB: codec 0x0, indirect 0, nid 0x20, payload 0x40fcf
VERB: codec 0x0, indirect 0, nid 0x20, payload 0x5002d
VERB: codec 0x0, indirect 0, nid 0x20, payload 0xc0000
VERB: codec 0x0, indirect 0, nid 0x20, payload 0x5002d
VERB: codec 0x0, indirect 0, nid 0x20, payload 0x44020
VERB: codec 0x0, indirect 0, nid 0x20, payload 0x50063
VERB: codec 0x0, indirect 0, nid 0x20, payload 0xc0000
VERB: codec 0x0, indirect 0, nid 0x20, payload 0x5004f
VERB: codec 0x0, indirect 0, nid 0x20, payload 0xc0000
VERB: codec 0x0, indirect 0, nid 0x20, payload 0x50019
VERB: codec 0x0, indirect 0, nid 0x20, payload 0xc0000
VERB: codec 0x0, indirect 0, nid 0x20, payload 0x50019
VERB: codec 0x0, indirect 0, nid 0x20, payload 0x40017
VERB: codec 0x0, indirect 0, nid 0x20, payload 0x50050
VERB: codec 0x0, indirect 0, nid 0x20, payload 0xc0000
VERB: codec 0x0, indirect 0, nid 0x20, payload 0x50050
VERB: codec 0x0, indirect 0, nid 0x20, payload 0x40000
VERB: codec 0x0, indirect 0, nid 0x20, payload 0x5000e
VERB: codec 0x0, indirect 0, nid 0x20, payload 0xc0000
VERB: codec 0x0, indirect 0, nid 0x20, payload 0x5000e
VERB: codec 0x0, indirect 0, nid 0x20, payload 0x46f80
VERB: codec 0x0, indirect 0, nid 0x20, payload 0x50008
VERB: codec 0x0, indirect 0, nid 0x20, payload 0xc0000
VERB: codec 0x0, indirect 0, nid 0x20, payload 0x50008
VERB: codec 0x0, indirect 0, nid 0x20, payload 0x40fcf
VERB: codec 0x0, indirect 0, nid 0x20, payload 0x50008
VERB: codec 0x0, indirect 0, nid 0x20, payload 0xc0000
VERB: codec 0x0, indirect 0, nid 0x20, payload 0x50003
VERB: codec 0x0, indirect 0, nid 0x20, payload 0xc0000
VERB: codec 0x0, indirect 0, nid 0x20, payload 0x50080
VERB: codec 0x0, indirect 0, nid 0x20, payload 0xc0000
VERB: codec 0x0, indirect 0, nid 0x20, payload 0x50080
VERB: codec 0x0, indirect 0, nid 0x20, payload 0x45c53
VERB: codec 0x0, indirect 0, nid 0x20, payload 0x5002b
VERB: codec 0x0, indirect 0, nid 0x20, payload 0xc0000
VERB: codec 0x0, indirect 0, nid 0x20, payload 0x5002b
VERB: codec 0x0, indirect 0, nid 0x20, payload 0x40d10
VERB: codec 0x0, indirect 0, nid 0x02, payload 0x3b080
VERB: codec 0x0, indirect 0, nid 0x02, payload 0x20031
VERB: codec 0x0, indirect 0, nid 0x02, payload 0x70500
VERB: codec 0x0, indirect 0, nid 0x02, payload 0x70600
VERB: codec 0x0, indirect 0, nid 0x02, payload 0x70400
VERB: codec 0x0, indirect 0, nid 0x02, payload 0x3b07f
VERB: codec 0x0, indirect 0, nid 0x03, payload 0x3b080
VERB: codec 0x0, indirect 0, nid 0x03, payload 0x20031
VERB: codec 0x0, indirect 0, nid 0x03, payload 0x70500
VERB: codec 0x0, indirect 0, nid 0x03, payload 0x70600
VERB: codec 0x0, indirect 0, nid 0x03, payload 0x70400
VERB: codec 0x0, indirect 0, nid 0x03, payload 0x3b064
VERB: codec 0x0, indirect 0, nid 0x06, payload 0x70d00
VERB: codec 0x0, indirect 0, nid 0x06, payload 0x70e00
VERB: codec 0x0, indirect 0, nid 0x06, payload 0x20031
VERB: codec 0x0, indirect 0, nid 0x06, payload 0x70500
VERB: codec 0x0, indirect 0, nid 0x06, payload 0x70600
VERB: codec 0x0, indirect 0, nid 0x00, payload 0x00000
VERB: codec 0x0, indirect 0, nid 0x06, payload 0x70400
VERB: codec 0x0, indirect 0, nid 0x06, payload 0x70d01
VERB: codec 0x7, indirect 0, nid 0x3b, payload 0x5a2d7
VERB: codec 0x0, indirect 0, nid 0x06, payload 0x70e00
VERB: codec 0x0, indirect 0, nid 0x08, payload 0x37080
VERB: codec 0x0, indirect 0, nid 0x00, payload 0x07fff
VERB: codec 0x0, indirect 0, nid 0x09, payload 0x37080
VERB: codec 0x0, indirect 0, nid 0x00, payload 0x00000
VERB: codec 0x0, indirect 0, nid 0x0b, payload 0x37080
VERB: codec 0x0, indirect 0, nid 0x0b, payload 0x37180
VERB: codec 0x0, indirect 0, nid 0x0b, payload 0x37280
VERB: codec 0x0, indirect 0, nid 0x0b, payload 0x37380
VERB: codec 0x0, indirect 0, nid 0x0c, payload 0x37080
VERB: codec 0x0, indirect 0, nid 0x0c, payload 0x37180
VERB: codec 0x0, indirect 0, nid 0x0d, payload 0x37080
VERB: codec 0x0, indirect 0, nid 0x11, payload 0x37080
VERB: codec 0x0, indirect 0, nid 0x12, payload 0x37080
VERB: codec 0x0, indirect 0, nid 0x13, payload 0x37080
VERB: codec 0x0, indirect 0, nid 0x14, payload 0x3b080
VERB: codec 0x0, indirect 0, nid 0x17, payload 0x3b080
VERB: codec 0x0, indirect 0, nid 0x18, payload 0x37080
VERB: codec 0x0, indirect 0, nid 0x20, payload 0x50007
VERB: codec 0x0, indirect 0, nid 0x19, payload 0x37080
VERB: codec 0x0, indirect 0, nid 0x1a, payload 0x37080
VERB: codec 0x0, indirect 0, nid 0x1a, payload 0x37180
VERB: codec 0x0, indirect 0, nid 0x1a, payload 0x3b080
VERB: codec 0x0, indirect 0, nid 0x21, payload 0x3b080
VERB: codec 0x0, indirect 0, nid 0x12, payload 0x70500
VERB: codec 0x0, indirect 0, nid 0x12, payload 0x70700
VERB: codec 0x0, indirect 0, nid 0x00, payload 0x00000
VERB: codec 0x0, indirect 0, nid 0x12, payload 0x37000
VERB: codec 0x0, indirect 0, nid 0x12, payload 0x70700
VERB: codec 0x0, indirect 0, nid 0x20, payload 0x40e21
VERB: codec 0x0, indirect 0, nid 0x13, payload 0x70500
VERB: codec 0x0, indirect 0, nid 0x13, payload 0x70700
VERB: codec 0x0, indirect 0, nid 0x00, payload 0x00000
VERB: codec 0x0, indirect 0, nid 0x13, payload 0x37000
VERB: codec 0x0, indirect 0, nid 0x13, payload 0x70700
VERB: codec 0x0, indirect 0, nid 0x01, payload 0x71500
VERB: codec 0x0, indirect 0, nid 0x14, payload 0x70100
VERB: codec 0x11, indirect 1, nid 0x1a, payload 0x8f4f8
VERB: codec 0x0, indirect 0, nid 0x14, payload 0x70500
VERB: codec 0x0, indirect 0, nid 0x14, payload 0x70740
VERB: codec 0x0, indirect 0, nid 0x14, payload 0x70740
VERB: codec 0x11, indirect 1, nid 0x1a, payload 0x609c1
VERB: codec 0x0, indirect 0, nid 0x14, payload 0x3b000
VERB: codec 0x11, indirect 0, nid 0x0e, payload 0x558c0
VERB: codec 0x0, indirect 0, nid 0x17, payload 0x70102
VERB: codec 0x0, indirect 0, nid 0x17, payload 0x70500
VERB: codec 0x0, indirect 0, nid 0x00, payload 0x07fff
VERB: codec 0x0, indirect 0, nid 0x17, payload 0x70740
VERB: codec 0x0, indirect 0, nid 0x17, payload 0x70800
VERB: codec 0x0, indirect 0, nid 0x20, payload 0x50044
VERB: codec 0x0, indirect 0, nid 0x17, payload 0x70740
VERB: codec 0x0, indirect 0, nid 0x19, payload 0x71e11
VERB: codec 0x0, indirect 0, nid 0x20, payload 0x50044
VERB: codec 0x0, indirect 0, nid 0x20, payload 0x4020e
VERB: codec 0x0, indirect 0, nid 0x17, payload 0x3b000
VERB: codec 0x0, indirect 0, nid 0x00, payload 0x00000
VERB: codec 0x0, indirect 0, nid 0x18, payload 0x70881
VERB: codec 0x0, indirect 0, nid 0x14, payload 0xf0700
VERB: codec 0x0, indirect 0, nid 0x00, payload 0x00000
VERB: codec 0x0, indirect 0, nid 0x14, payload 0x70740
VERB: codec 0x0, indirect 0, nid 0x18, payload 0xf0800
VERB: codec 0x0, indirect 0, nid 0x14, payload 0xf0700
VERB: codec 0x0, indirect 0, nid 0x18, payload 0x70500
VERB: codec 0x0, indirect 0, nid 0x14, payload 0x70100
VERB: codec 0x0, indirect 0, nid 0x18, payload 0x70700
VERB: codec 0x0, indirect 0, nid 0x14, payload 0x70100
VERB: codec 0x0, indirect 0, nid 0x00, payload 0x07f26
VERB: codec 0x0, indirect 0, nid 0x14, payload 0xf0100
VERB: codec 0x0, indirect 0, nid 0x18, payload 0x70881
VERB: codec 0x0, indirect 0, nid 0x17, payload 0xf0700
VERB: codec 0x0, indirect 0, nid 0x18, payload 0x37000
VERB: codec 0x0, indirect 0, nid 0x17, payload 0x70740
VERB: codec 0x0, indirect 0, nid 0x17, payload 0xf0700
VERB: codec 0x11, indirect 1, nid 0x1a, payload 0x852bf
VERB: codec 0x0, indirect 0, nid 0x18, payload 0x70700
VERB: codec 0x0, indirect 0, nid 0x00, payload 0x00001
VERB: codec 0x0, indirect 0, nid 0x19, payload 0x70500
VERB: codec 0x0, indirect 0, nid 0x17, payload 0x70102
VERB: codec 0x0, indirect 0, nid 0x00, payload 0x00000
VERB: codec 0x0, indirect 0, nid 0x17, payload 0xf0100
VERB: codec 0x0, indirect 0, nid 0x19, payload 0x70700
VERB: codec 0x0, indirect 0, nid 0x02, payload 0x70500
VERB: codec 0x0, indirect 0, nid 0x02, payload 0xf0500
VERB: codec 0x11, indirect 1, nid 0x1a, payload 0x38000
VERB: codec 0x0, indirect 0, nid 0x19, payload 0x70800
VERB: codec 0x0, indirect 0, nid 0x03, payload 0xf0500
VERB: codec 0x0, indirect 0, nid 0x19, payload 0x37000
VERB: codec 0x0, indirect 0, nid 0x06, payload 0x70500
VERB: codec 0x0, indirect 0, nid 0x00, payload 0x07fff
VERB: codec 0x0, indirect 0, nid 0x06, payload 0xf0500
VERB: codec 0x0, indirect 0, nid 0x19, payload 0x70700
VERB: codec 0x11, indirect 1, nid 0x1a, payload 0x70cbb
VERB: codec 0x0, indirect 0, nid 0x1a, payload 0x70100
VERB: codec 0x11, indirect 1, nid 0x1a, payload 0x8d739
VERB: codec 0x0, indirect 0, nid 0x1a, payload 0x70500
VERB: codec 0x0, indirect 0, nid 0x1a, payload 0x70700
VERB: codec 0x0, indirect 0, nid 0x00, payload 0x07f26
VERB: codec 0x0, indirect 0, nid 0x1a, payload 0x70800
VERB: codec 0x0, indirect 0, nid 0x1a, payload 0x37000
VERB: codec 0x11, indirect 1, nid 0x1a, payload 0x60fb0
VERB: codec 0x0, indirect 0, nid 0x1a, payload 0x37100
VERB: codec 0x0, indirect 0, nid 0x1a, payload 0x70700
VERB: codec 0x0, indirect 0, nid 0x11, payload 0x70500
VERB: codec 0x0, indirect 0, nid 0x1a, payload 0x3b080
VERB: codec 0x0, indirect 0, nid 0x1d, payload 0x70500
VERB: codec 0x0, indirect 0, nid 0x1d, payload 0x70700
VERB: codec 0x0, indirect 0, nid 0x11, payload 0xf0500
VERB: codec 0x0, indirect 0, nid 0x1d, payload 0x70700
VERB: codec 0x0, indirect 0, nid 0x12, payload 0xf0700
VERB: codec 0x0, indirect 0, nid 0x1e, payload 0x70500
VERB: codec 0x0, indirect 0, nid 0x00, payload 0x07f26
VERB: codec 0x11, indirect 1, nid 0x1a, payload 0x6df14
VERB: codec 0x0, indirect 0, nid 0x12, payload 0x70500
VERB: codec 0x0, indirect 0, nid 0x1e, payload 0x70700
VERB: codec 0x0, indirect 0, nid 0x00, payload 0x055e5
VERB: codec 0x0, indirect 0, nid 0x1e, payload 0x70700
VERB: codec 0x0, indirect 0, nid 0x00, payload 0x055e5
VERB: codec 0x7, indirect 0, nid 0x52, payload 0x873f7
VERB: codec 0x0, indirect 0, nid 0x00, payload 0x055e5
VERB: codec 0x0, indirect 0, nid 0x1f, payload 0x70500
VERB: codec 0x0, indirect 0, nid 0x1f, payload 0x70700
VERB: codec 0x11, indirect 0, nid 0x0e, payload 0x559e0
VERB: codec 0x0, indirect 0, nid 0x00, payload 0x07fff
VERB: codec 0x0, indirect 0, nid 0x1f, payload 0x70700
VERB: codec 0x10, indirect 1, nid 0x32, payload 0xb9e13
VERB: codec 0x0, indirect 0, nid 0x21, payload 0x70882
VERB: codec 0x0, indirect 0, nid 0x00, payload 0x055e5
VERB: codec 0x0, indirect 0, nid 0x21, payload 0xf0800
VERB: codec 0x0, indirect 0, nid 0x00, payload 0x07fff
VERB: codec 0x7, indirect 0, nid 0x3b, payload 0x5a048
VERB: codec 0x0, indirect 0, nid 0x00, payload 0x055e5
VERB: codec 0x0, indirect 0, nid 0x21, payload 0x70702
VERB: codec 0x0, indirect 0, nid 0x00, payload 0x055e5
VERB: codec 0x0, indirect 0, nid 0x21, payload 0x70702
VERB: codec 0x0, indirect 0, nid 0x00, payload 0x07fff
VERB: codec 0x0, indirect 0, nid 0x21, payload 0x3b080
VERB: codec 0x0, indirect 0, nid 0x02, payload 0x20031
VERB: codec 0x0, indirect 0, nid 0x02, payload 0x70500
VERB: codec 0x0, indirect 0, nid 0x02, payload 0x70600
VERB: codec 0x0, indirect 0, nid 0x02, payload 0x70400
VERB: codec 0x0, indirect 0, nid 0x02, payload 0x3b07f
VERB: codec 0x0, indirect 0, nid 0x03, payload 0x20031
VERB: codec 0x0, indirect 0, nid 0x03, payload 0x70500
VERB: codec 0x0, indirect 0, nid 0x03, payload 0x70600
VERB: codec 0x0, indirect 0, nid 0x03, payload 0x70400
VERB: codec 0x0, indirect 0, nid 0x03, payload 0x3b064
VERB: codec 0x0, indirect 0, nid 0x06, payload 0x70d00
VERB: codec 0x0, indirect 0, nid 0x06, payload 0x70e00
VERB: codec 0x0, indirect 0, nid 0x06, payload 0x20031
VERB: codec 0x0, indirect 0, nid 0x06, payload 0x70500
VERB: codec 0x0, indirect 0, nid 0x06, payload 0x70600
VERB: codec 0x0, indirect 0, nid 0x06, payload 0x70400
VERB: codec 0x0, indirect 0, nid 0x06, payload 0x70d01
VERB: codec 0x0, indirect 0, nid 0x06, payload 0x70e00
VERB: codec 0x0, indirect 0, nid 0x08, payload 0x20031
VERB: codec 0x0, indirect 0, nid 0x08, payload 0x70500
VERB: codec 0x0, indirect 0, nid 0x08, payload 0x70600
VERB: codec 0x0, indirect 0, nid 0x08, payload 0x70400
VERB: codec 0x0, indirect 0, nid 0x08, payload 0x37043
VERB: codec 0x0, indirect 0, nid 0x09, payload 0x20031
VERB: codec 0x0, indirect 0, nid 0x09, payload 0x70500
Comment 49 toastbutteringmachine 2020-11-09 22:32:57 UTC
Created attachment 293601 [details]
HDA I/O log (Windows inside qemu on Linux)
Comment 50 toastbutteringmachine 2020-11-09 22:35:23 UTC
(In reply to toastbutteringmachine from comment #48)
> 
> I was able to capture all the HDA verbs sent during Windows startup.
>

My latest attachment (#293601) puts these verbs in context of all I/O reads and writes between Windows and the sound card.
Comment 51 pperanich 2020-11-30 21:28:58 UTC
Hi, I have been keeping up with the progress in this forum for a while. Excited to see the progress made thus far, and I recently came across a forum on Lenovo's site addressing this issue. Just wanted to link it here in case you haven't seen it:

https://forums.lenovo.com/t5/Other-Linux-Discussions/Yoga-C930-audio-on-Linux/m-p/5042057?
Comment 52 MP 2020-12-23 22:57:00 UTC
Thanks! pperanich 

A test BIOS from Lenovo from the above thread seems to initialize all speakers and the mic.  If there are any C940 users on this forum that have a ch341a and know how to do a BIOS dump and would be able to provide a set of before and after .bin files (current BIOS and new Lenovo test update), I think that could be used to make similar fixes to the C930 BIOS as well.  If anyone out there has the know-how and is willing to do this, let me know!
Comment 53 Tim Ryder 2020-12-24 00:43:27 UTC
I applied the bios and that part went well.  Anyone know the where to get the source for the kernel patch, I'm on Fedora so can't use the ubuntu kernel.
Comment 54 MP 2020-12-24 01:17:42 UTC
(In reply to Tim Ryder from comment #53)
> I applied the bios and that part went well.  Anyone know the where to get
> the source for the kernel patch, I'm on Fedora so can't use the ubuntu
> kernel.

Lenovo only recently became responsive on this issue and seem to just be looking for people to test at the moment.  I imagine that source for the kernel will be provided once the official BIOS update is rolled out but you could try commenting on the thread to enquire.
Comment 55 Mehdi Khawari 2021-02-02 12:09:01 UTC
It seems that this problem is solved.
The changes for Lenovo C940 in realtek_patch.c are now upstreamed.

https://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound.git/commit/?id=f86de9b1c0663b0a3ca2dcddec9aa910ff0fbf2c

I have a Lenovo S940-14IIL  and I was able to update the bios of this machine today.
But I dont have Linux installed on this machine at this moment.
Did anyone try these recent changes?
Comment 56 Peter F. Patel-Schneider 2021-02-02 13:51:55 UTC
I am running Fedora 33 and kernel 5.10.11, which has the patches from December installed.   I haven't installed the new BIOS, though, and only two speakers appear to be working.   I'll try to install the new BIOS and see what happens.
Comment 57 Mehdi Khawari 2021-02-02 14:53:26 UTC
Did you add 
options snd-hda-intel model=Lenovo C940
in /etc/modprobe.d/alsa-base.conf  ?
Comment 58 Rotekoppen 2021-02-02 20:44:53 UTC
I've updated my bios to the latest driver from Lenovo and i am running 5.10.11-arch1-1

(In reply to Mehdi Khawari from comment #57)
> Did you add 
> options snd-hda-intel model=Lenovo C940
> in /etc/modprobe.d/alsa-base.conf  ?

adding this and rebooting doesn't seem to work, however i do not require blacklisting snd-hda-intel to get sound working
Comment 59 Peter F. Patel-Schneider 2021-02-02 23:29:44 UTC
(In reply to Mehdi Khawari from comment #55)

I managed to get the BIOS updated and with no further changes in Fedora 33 the speakers work.  The instructions were rather hard to understand, so I'm putting a revised version here.


1/ Set up a USB stick with a single FAT 32 partition

2/ Download the file `shell file.zip` from 
https://drive.google.com/file/d/1Z5K3ARVYSQLSenD6EBElf6foEtLQQGoM/view?usp=sharing
This archive has the necessary files to boot your Lenovo C940 to a state that it can load the BIOS file.

3/ Unzip the zip archive.

4/ Copy the resulting files and directories to the USB stick

5/ Download the file `C940AudioTest.7z` from 
https://drive.google.com/file/d/1HHY928tMwwndp0ak2MdbsOlxuK0OJMWA/view
The BIOS itself is in this archive.

6/ Use `7z x C940AudioTest.7z` to unpack this archive.

7/ Copy AUCN57WW.efi to the USB stick.

8/ Turn off your C940.

9/ Use Fn + Power Button to boot in to the NOLO (sp?) interface.

10/ Press ESC to skip startup.nsh. (You only have about three seconds.)

11/ Input `fs0:` to go to the USB stick directory.

12/ Input `AUCN57WW.efi` to flash the new BIOS.


I was upgrading from version 54 of the BIOS.  It may be that if you have already flashed a version 57 BIOS that you may have to do something extra to replace the same "version" BIOS.
Comment 60 torotil 2021-02-03 08:36:48 UTC
I’ve applied the BIOS update according to #59 (thanks for writing down the instructions!).

All speakers are working for me now as well (using gentoo with a 5.10.10-gentoo kernel) without additional settings. An additional sound problem was fixed as well: Sound coming from the headphone jack sounded like it went through some high pass filter).

I ran into two problems after applying the update:

1. My system didn’t boot anymore. I had to boot from a live USB key in order to rerun `grub-install --efi-directory=/boot/EFI`.
2. It seems that other BIOS settings were lost as well (eg. the hotkey configuration).
Comment 61 Peter F. Patel-Schneider 2021-02-03 09:03:24 UTC
My system didn't boot the first time after the BIOS update, but I powered it off and the next time it booted fine.  I wasn't sure if this was a real problem, but maybe there is some boot information that is retained until a complete power down happens.
Comment 62 Ivan Anishchuk 2021-02-04 09:10:43 UTC
Same story. Had to fix grub and bios settings but otherwise everything seems to be fine. Working sound on 5.10.10 (Gentoo) with no special settings, finally. Thanks everyone!
Comment 63 Rotekoppen 2021-02-05 09:07:40 UTC
(In reply to Peter F. Patel-Schneider from comment #59)
> 2/ Download the file `shell file.zip` from 
> https://drive.google.com/file/d/1Z5K3ARVYSQLSenD6EBElf6foEtLQQGoM/
> view?usp=sharing
> This archive has the necessary files to boot your Lenovo C940 to a state
> that it can load the BIOS file.

> 5/ Download the file `C940AudioTest.7z` from 
> https://drive.google.com/file/d/1HHY928tMwwndp0ak2MdbsOlxuK0OJMWA/view
> The BIOS itself is in this archive.

Where are theese files from?
Comment 64 Lukas Langrock 2021-02-05 09:30:26 UTC
Someone from Lenovo posted them on their forums:
https://forums.lenovo.com/t5/Other-Linux-Discussions/Yoga-C930-audio-on-Linux/m-p/5042057?page=4
Comment 65 Lukas Langrock 2021-02-05 09:32:11 UTC
Created attachment 295075 [details]
attachment-2814-0.html

They are from Lenovo's forum, an employee who worked with their BIOS team on linux support posted them.
 

 
 https://forums.lenovo.com/t5/Other-Linux-Discussions/Yoga-C930-audio-on-Linux/m-p/5042057?page=4
 

 

 
 
 
 
>  
> On Feb 5, 2021 at 10:07, bugzilla-daemon 
> <bugzilla-daemon@bugzilla.kernel.org>  wrote:
>  
>  
>   https://bugzilla.kernel.org/show_bug.cgi?id=205755
>
> Where are theese files from?
Comment 66 Rotekoppen 2021-02-05 17:38:33 UTC
Trying to run AUCN57WW.efi yields in an error message.

On further inspection it seems this bios is only for the Yoga C940-14IIL (not the 14.6 inch version), as the newest bios for Yoga C940-15IRH (the 14.6 inch version) is called BSCN29WW

:(
Comment 67 daniel 2021-02-05 18:08:57 UTC
Created attachment 295081 [details]
attachment-7604-0.html

You shouldn’t be trying to install BIOS’s for things that are not exactly what you have.

From: bugzilla-daemon@bugzilla.kernel.org
Sent: Friday, 5 February 2021 6:38 PM
To: daniel@cherubini.casa
Subject: [Bug 205755] limited sound on Lenovo Yoga C940

https://bugzilla.kernel.org/show_bug.cgi?id=205755

--- Comment #66 from Rotekoppen (tobias@aarmo.com) ---
Trying to run AUCN57WW.efi yields in an error message.

On further inspection it seems this bios is only for the Yoga C940-14IIL (not
the 14.6 inch version), as the newest bios for Yoga C940-15IRH (the 14.6 inch
version) is called BSCN29WW

:(
Comment 68 Andrew Somerville 2021-02-15 20:26:33 UTC
The same problem appears to exist on the yoga 9i which is the successor to the C940. 

Is it safe to say that it does not make sense to open a separate bug report?
Comment 69 Peter F. Patel-Schneider 2021-02-15 20:58:23 UTC
It's unclear whether to file a separate bug report.

My understanding is that the problem is an amplifier that is turned off by default.  Ideally Lenovo would provide information on how to turn the amplifiers on, probably by sending commands through the audio chip.  What we have is a modified BIOS that turns the amplifiers on.   Aside from being specific to the 14" C940 there is probably some non-trivial energy cost involved in this solution.  It must be possible for a Linux driver to turn the amplifiers on (and off) because sound works under Windows.

There is some information available (from activity traces) on how the Windows driver works.  But so far no one who could turn these traces into driver code has taken a look.   Filing a separate bug report might get the attention of some such person but you should look through this (long) bug report, and elsewhere, and provide the relevant information for your device.
Comment 70 hugh.welles 2021-03-05 16:31:17 UTC
I can second Daniel's issue with the larger yoga (running BSCN27WW). If anyone hears of a BIOS release for the 14.6" model that can turn on the extra amps, I'd be glad to hear about it. If I can be helpful, I'm happy to test stuff, but I don't have the know how to pursue this on my own.
Comment 71 jpakkane 2021-05-19 14:32:01 UTC
On the Yoga 9i at least the bass speakers can be enabled with alsa-utils: https://bugs.launchpad.net/ubuntu/+source/alsa-driver/+bug/1926165
Comment 72 daniel 2021-05-26 15:18:23 UTC
So an update, I finally got to test the beta bios and it works perfectly....

... then I booted into windows and stupidly did the latest bios update (59WW) ...

WARNING! 

There is no bios rollback option in this bios, once you update to it, you cannot update backwards (that I can see) 

If someone knows a way around this please let me know.
Comment 73 grintionson 2021-06-01 20:15:40 UTC
(In reply to daniel from comment #72)
> So an update, I finally got to test the beta bios and it works perfectly....
> 
> ... then I booted into windows and stupidly did the latest bios update
> (59WW) ...
> 
> WARNING! 
> 
> There is no bios rollback option in this bios, once you update to it, you
> cannot update backwards (that I can see) 
> 
> If someone knows a way around this please let me know.

You can revert. I did.

https://files.gitter.im/608856266da03739847b2312/5dWe/Veyron.fd

I used that on a FAT16 formatted usb stick to recover from a bad bios flash. It's based on the previous BIOS. You plug it in, unplug pc from power. hold fn+R, plug power in, press power, then continue to hold FN+R for an additional 5-10 seconds. The bios is flashed and pc works again.  It takes 3-5 minutes so be patient.

Then you can flash the bios with advanced enabled.
Comment 74 daniel 2021-06-03 12:54:26 UTC
(In reply to grintionson from comment #73)
> (In reply to daniel from comment #72)
> > So an update, I finally got to test the beta bios and it works
> perfectly....
> > 
> > ... then I booted into windows and stupidly did the latest bios update
> > (59WW) ...
> > 
> > WARNING! 
> > 
> > There is no bios rollback option in this bios, once you update to it, you
> > cannot update backwards (that I can see) 
> > 
> > If someone knows a way around this please let me know.
> 
> You can revert. I did.
> 
> https://files.gitter.im/608856266da03739847b2312/5dWe/Veyron.fd
> 
> I used that on a FAT16 formatted usb stick to recover from a bad bios flash.
> It's based on the previous BIOS. You plug it in, unplug pc from power. hold
> fn+R, plug power in, press power, then continue to hold FN+R for an
> additional 5-10 seconds. The bios is flashed and pc works again.  It takes
> 3-5 minutes so be patient.
> 
> Then you can flash the bios with advanced enabled.

Confirming this works
Comment 75 Chris 2021-06-03 13:59:42 UTC
(In reply to daniel from comment #74)
> (In reply to grintionson from comment #73)
> > (In reply to daniel from comment #72)
> > > So an update, I finally got to test the beta bios and it works
> > perfectly....
> > > 
> > > ... then I booted into windows and stupidly did the latest bios update
> > > (59WW) ...
> > > 
> > > WARNING! 
> > > 
> > > There is no bios rollback option in this bios, once you update to it, you
> > > cannot update backwards (that I can see) 
> > > 
> > > If someone knows a way around this please let me know.
> > 
> > You can revert. I did.
> > 
> > https://files.gitter.im/608856266da03739847b2312/5dWe/Veyron.fd
> > 
> > I used that on a FAT16 formatted usb stick to recover from a bad bios
> flash.
> > It's based on the previous BIOS. You plug it in, unplug pc from power. hold
> > fn+R, plug power in, press power, then continue to hold FN+R for an
> > additional 5-10 seconds. The bios is flashed and pc works again.  It takes
> > 3-5 minutes so be patient.
> > 
> > Then you can flash the bios with advanced enabled.
> 
> Confirming this works

Can you please provide a bit more detail on the last step?

I can also confirm using the 'Veyron.fd' file to roll back from 59 to 57 works (thanks grintionson!), but when using the modified 57 from the forums I am getting a same version error from H2OFFT and can't see anywhere in the BIOS to enable backflashing.
Comment 76 daniel 2021-06-03 14:03:06 UTC
@Chris

If you updated to the 59WW firmware… there is no rollback option in the bios. So you’re stuck. 

If that happens do the steps in comment 72 and you will install a different bios. 

Then when that’s installed. Go into that bios and enable rollback. 

Then flash the modified bios. 

And you’re done.
Comment 77 Chris 2021-06-03 14:07:40 UTC
(In reply to daniel from comment #76)
> @Chris
> 
> If you updated to the 59WW firmware… there is no rollback option in the
> bios. So you’re stuck. 
> 
> If that happens do the steps in comment 72 and you will install a different
> bios. 
> 
> Then when that’s installed. Go into that bios and enable rollback. 
> 
> Then flash the modified bios. 
> 
> And you’re done.

Thanks for getting back so quickly!

I have followed those directions and have rolled back to 57WW.

I am not for the life of me seeing enable rollack in the 57WW BIOS though. Am I just being blind? :-/
Comment 78 Chris 2021-06-03 14:15:39 UTC
Totally blind! I just found it. Gah.

Thank you so much to everyone working on this.
Comment 79 Peter F. Patel-Schneider 2022-08-07 17:04:04 UTC
The patched BIOS referenced in https://bugzilla.kernel.org/show_bug.cgi?id=205755#c59 appears to be no longer available.  I might not be neeed if you update to the most recent BIOS.
Comment 80 Nicolas Derumigny 2022-08-13 05:55:00 UTC
(In reply to Peter F. Patel-Schneider from comment #79)
> The patched BIOS referenced in
> https://bugzilla.kernel.org/show_bug.cgi?id=205755#c59 appears to be no
> longer available.  I might not be needed if you update to the most recent
> BIOS.

I tried the latest BIOS without success (latest arch, kernel 5.17.4) ; looks like we should stick to the "beta" for now (and probably mirror it since the original link expired).
Comment 81 Lukas Langrock 2022-08-13 14:45:46 UTC
I still have a copy of the files: https://wiki.libre.moe/en/linux/drivers/yoga-c940-beta-bios
Comment 82 Gergo K 2022-09-29 10:12:04 UTC
I think we can find the TI amplifier i2c address from an acpidump. Anyone have one?
Comment 83 Peter F. Patel-Schneider 2022-09-29 10:30:55 UTC
Created attachment 301895 [details]
acpidump output
Comment 84 Peter F. Patel-Schneider 2022-09-29 10:31:34 UTC
I've attcheed the output of acpidump for my 14" C940.
Comment 85 Gergo K 2022-09-29 11:24:37 UTC
Thank you for the dump.
I found in the windows driver that there are TI TAS2770 amplifiers. https://www.ti.com/product/TAS2770
They can be enabled through I2C with the provided initializer code. But I didn't find in the acpidump which i2c bus they are on. Could you try reading some i2c bus?
i2cget -y 0 0x82 0x02
i2cget -y 1 0x82 0x02
i2cget -y 2 0x82 0x02
i2cget -y 3 0x82 0x02
i2cget -y 4 0x82 0x02
i2cget -y 5 0x82 0x02
i2cget -y 6 0x82 0x02
i2cget -y 7 0x82 0x02
i2cget -y 8 0x82 0x02
It reads the power on register.
Comment 86 Peter F. Patel-Schneider 2022-09-29 11:33:20 UTC
They all produce the same error:

idefix trails> i2cget -y 8 0x82 0x02
Error: Chip address out of range (0x08-0x77)!
Usage: i2cget [-f] [-y] [-a] I2CBUS CHIP-ADDRESS [DATA-ADDRESS [MODE [LENGTH]]]
  I2CBUS is an integer or an I2C bus name
  ADDRESS is an integer (0x08 - 0x77, or 0x00 - 0x7f if -a is given)
  MODE is one of:
    b (read byte data, default)
    w (read word data)
    c (write byte/read byte)
    s (read SMBus block data)
    i (read I2C block data)
    Append p for SMBus PEC
  LENGTH is the I2C block data length (between 1 and 32, default 32)
Comment 87 Gergo K 2022-09-29 11:38:27 UTC
And if you change the 0x82 to 0x1c or 0x12 or 0x10?
Comment 88 Peter F. Patel-Schneider 2022-09-29 11:46:16 UTC
All these produce an error:

idefix trails> sudo i2cget -y 5 0x10 0x02
Error: Read failed
Comment 89 Peter F. Patel-Schneider 2022-09-29 11:51:05 UTC
Could it be that the i2c bus is not set up to do reads?

https://stackoverflow.com/questions/44550692/i2c-tools-i2cdetect-and-i2cset-works-perfectly-but-i2cget-returns-read-failed

I can list the i2c busses:


idefix trails> sudo i2cdetect -l
i2c-0	i2c       	Synopsys DesignWare I2C adapter 	I2C adapter
i2c-1	i2c       	Synopsys DesignWare I2C adapter 	I2C adapter
i2c-2	i2c       	Synopsys DesignWare I2C adapter 	I2C adapter
i2c-3	i2c       	i915 gmbus dpa                  	I2C adapter
i2c-4	i2c       	i915 gmbus dpb                  	I2C adapter
i2c-5	i2c       	i915 gmbus dpc                  	I2C adapter
i2c-6	i2c       	i915 gmbus tc1                  	I2C adapter
i2c-7	i2c       	i915 gmbus tc2                  	I2C adapter
i2c-8	i2c       	i915 gmbus tc3                  	I2C adapter
i2c-9	i2c       	i915 gmbus tc4                  	I2C adapter
i2c-10	i2c       	i915 gmbus tc5                  	I2C adapter
i2c-11	i2c       	i915 gmbus tc6                  	I2C adapter
i2c-12	i2c       	AUX A/DDI A/PHY A               	I2C adapter
i2c-13	i2c       	AUX B/DDI B/PHY B               	I2C adapter
i2c-14	i2c       	AUX C/DDI C (TC)/PHY TC1        	I2C adapter
i2c-15	i2c       	AUX D/DDI D (TC)/PHY TC2        	I2C adapter
i2c-16	smbus     	SMBus I801 adapter at 3040      	SMBus adapter
Comment 90 Gergo K 2022-09-29 13:06:11 UTC
Reading the dsdt, I think it should be on the i2c-0.

What if you try to set the gain? Is that fail?
i2cset -y 0 0x10 0x03 0x00


The relevant part from the dsdt.dsl:
        Scope (_SB.PCI0.I2C0)
        {
            Device (HDAC)
            {
                Name (_HID, "INT0000")  // _HID: Hardware ID
                Name (_CID, "INT0000")  // _CID: Compatible ID
                Name (_DDN, "Intel(R) Smart Sound Technology Audio Codec")  // _DDN: DOS Device Name
                Name (_UID, One)  // _UID: Unique ID
                Name (CDIS, Zero)
                Method (_INI, 0, NotSerialized)  // _INI: Initialize
                {
                    If ((I2SC == One))
                    {
                        _HID = "INT34C2"
                        _CID = "INT34C2"
                        Return (Zero)
                    }
                }

                Method (_CRS, 0, Serialized)  // _CRS: Current Resource Settings
                {
                    Name (AL2D, ResourceTemplate ()
                    {
                        I2cSerialBusV2 (0x001C, ControllerInitiated, 0x00061A80,
                            AddressingMode7Bit, "\\_SB.PCI0.I2C0",
                            0x00, ResourceConsumer, , Exclusive,
                            )
                        I2cSerialBusV2 (0x0012, ControllerInitiated, 0x00061A80,
                            AddressingMode7Bit, "\\_SB.PCI0.I2C0",
                            0x00, ResourceConsumer, , Exclusive,
                            )
                        I2cSerialBusV2 (0x0010, ControllerInitiated, 0x00061A80,
                            AddressingMode7Bit, "\\_SB.PCI0.I2C0",
                            0x00, ResourceConsumer, , Exclusive,
                            )
                        Interrupt (ResourceConsumer, Level, ActiveLow, ExclusiveAndWake, ,, _Y53)
                        {
                            0x00000000,
                        }
                    })
                    CreateDWordField (AL2D, \_SB.PCI0.I2C0.HDAC._CRS._Y53._INT, AINT)  // _INT: Interrupts
                    AINT = INUM (I2SI)
                    Return (AL2D) /* \_SB_.PCI0.I2C0.HDAC._CRS.AL2D */
                }

                Method (_STA, 0, NotSerialized)  // _STA: Status
                {
                    If (((I2SC != Zero) && (CDIS != One)))
                    {
                        Return (0x0F)
                    }

                    If ((CDIS == One))
                    {
                        Return (0x0D)
                    }

                    Return (Zero)
                }

                Method (_SRS, 1, Serialized)  // _SRS: Set Resource Settings
                {
                    CDIS = Zero
                }

                Method (_DIS, 0, NotSerialized)  // _DIS: Disable Device
                {
                    CDIS = One
                }
            }
        }
Comment 91 Gergo K 2022-09-29 13:19:49 UTC
Or the clock is not properly configured and the device is in "software shutdown mode".

try to run the full init:

i2cset -y 0 0x10 00 00
i2cset -y 0 0x10 7f 00
i2cset -y 0 0x10 01 01
sleep 1e-06
i2cset -y 0 0x10 00 01
i2cset -y 0 0x10 32 e8
i2cset -y 0 0x10 00 00
i2cset -y 0 0x10 3c 11
i2cset -y 0 0x10 0f 42
i2cset -y 0 0x10 10 40
i2cset -y 0 0x10 03 00
i2cset -y 0 0x10 02 00
Comment 92 Peter F. Patel-Schneider 2022-09-29 13:52:38 UTC
sudo i2cset -y 0 0x10 0x03 0x00
Error: Write failed

sudo i2cset -y 0 0x10 00 00
Error: Write failed
Comment 93 Gergo K 2022-09-29 14:45:31 UTC
And with the address 0x41 or 0x42?
Comment 94 Peter F. Patel-Schneider 2022-09-29 18:54:39 UTC
idefix KMASS> sudo i2cset -y 0 0x41 00 00
Error: Write failed
idefix KMASS> sudo i2cset -y 0 0x42 00 00
Error: Write failed
Comment 95 Gergo K 2022-09-29 20:52:54 UTC
 i2cdetect -r 0
 i2cdetect -r 1
 i2cdetect -r 2
Comment 96 Peter F. Patel-Schneider 2022-09-29 21:29:44 UTC
idefix KMASS> sudo i2cdetect -r 1
WARNING! This program can confuse your I2C bus, cause data loss and worse!
I will probe file /dev/i2c-1 using receive byte commands.
I will probe address range 0x08-0x77.
Continue? [Y/n] Y
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:                         -- -- -- -- -- -- -- -- 
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
20: -- -- -- -- -- -- -- -- -- -- -- -- UU -- -- -- 
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
70: -- -- -- -- -- -- -- --                         
idefix KMASS> sudo i2cdetect -r 0
WARNING! This program can confuse your I2C bus, cause data loss and worse!
I will probe file /dev/i2c-0 using receive byte commands.
I will probe address range 0x08-0x77.
Continue? [Y/n] Y
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:                         -- -- UU -- -- -- -- -- 
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
70: -- -- -- -- -- -- -- --                         
idefix KMASS> sudo i2cdetect -r 2
WARNING! This program can confuse your I2C bus, cause data loss and worse!
I will probe file /dev/i2c-2 using receive byte commands.
I will probe address range 0x08-0x77.
Continue? [Y/n] Y
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:                         -- -- -- -- -- -- -- -- 
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
70: -- -- -- -- -- -- -- --
Comment 97 Gergo K 2022-09-29 22:25:21 UTC
i2cdetect -r 16
Comment 98 Peter F. Patel-Schneider 2022-09-29 22:30:47 UTC
idefix ~> sudo i2cdetect -r 16
WARNING! This program can confuse your I2C bus, cause data loss and worse!
I will probe file /dev/i2c-16 using receive byte commands.
I will probe address range 0x08-0x77.
Continue? [Y/n] y
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:                         -- -- -- -- -- -- -- -- 
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
40: -- -- -- -- 44 -- -- -- -- -- -- -- -- -- -- -- 
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
70: -- -- -- -- -- -- -- --                         

Potentially interesting busses

idefix ~> sudo i2cdetect -r 12
WARNING! This program can confuse your I2C bus, cause data loss and worse!
I will probe file /dev/i2c-12 using receive byte commands.
I will probe address range 0x08-0x77.
Continue? [Y/n] y
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:                         -- -- -- -- -- -- -- -- 
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
50: 50 51 52 53 54 55 56 57 58 59 5a 5b 5c 5d 5e 5f 
60: 60 61 62 63 64 65 66 67 68 69 6a 6b 6c 6d 6e 6f 
70: 70 71 72 73 74 75 76 77   

The others are all --

Note You need to log in before you can comment on or make changes to this bug.