Asking for information about ALSA's kselftest
[RESENDING BECAUSE BOUNCED BY SPAMASSASSIN]
Greetings Mr. Brown and users of the alsa-devel mailing list,
I’m a student at the University of Modena and Reggio Emilia. I am working on the Kernel Hacking course’s exam, a course kept by Paolo Valente which introduces students to the world of the Linux kernel and its magics. I was taking a look at the kernel’s kselftests from Linus Torvald’s repository to find some test to fix for the exam and I stumbled upon the ALSA’s selftest, which I’ve passed the last few days on, debugging and exploring. During the execution the test goes as it should except for two or three tests. Until now I’ve tried understanding test 71, which sometimes succeeds and sometimes fails, and test 72. I have no previous knowledge of how ALSA works and I’m completely new to the kselftests and the kernel in general. Test 71 gives the following output:
# Surround Playback Volume.0 expected 0 but read 1, is_volatile 0 # Surround Playback Volume.1 expected 1 but read 0, is_volatile 0 not ok 71 write_default.0.22
I wanted to ask you if it is normal or not that this test fails on my hardware, and if not, what I could do to debug the problem and give you useful information to help understand what the issue is. I am currently testing on an Ubuntu Desktop VirtualBox VM on kernel 5.17.0-rc3. The audio hardware (as the output of the lshw command, multimedia section) is:
description: Multimedia audio controller product: 82801AA AC'97 Audio Controller vendor: Intel Corporation physical id: 5 bus info: pci@0000:00:05.0 version: 01 width: 32 bits clock: 33MHz capabilities: bus_master configuration: driver=snd_intel8x0 latency=64 resources: irq:21 ioport:d100(size=256) ioport:d200(size=64)
From what I have seen until now it doesn’t look like a bug from the test nor an issue from the kernel, so I’m not really sure where to look at: I have compiled alsalib’s source code from the Git repo with debug symbols and I’ve followed the execution of the test until I reached a call to the ioctl syscall, which doesn’t return an error code so it doesn’t look like the problem relies in the kernel; I’m no expert though, I’ll let you confirm this or not.
I am at your complete disposal to give you any further useful information as I can’t do much more from my side alone.
Thank you in advance, looking forward to your kind response.
Best Regards,
Giacomo Guiduzzi
On Tue, Feb 22, 2022 at 01:44:27PM +0100, Giacomo Guiduzzi wrote:
fails, and test 72. I have no previous knowledge of how ALSA works and I’m completely new to the kselftests and the kernel in general. Test 71 gives the following output:
# Surround Playback Volume.0 expected 0 but read 1, is_volatile 0 # Surround Playback Volume.1 expected 1 but read 0, is_volatile 0 not ok 71 write_default.0.22
I wanted to ask you if it is normal or not that this test fails on my hardware, and if not, what I could do to debug the problem and give you useful information to help understand what the issue is. I am currently testing on an Ubuntu Desktop VirtualBox VM on kernel 5.17.0-rc3. The audio hardware (as the output of the lshw command, multimedia section) is:
That shouldn't happen - it will be a driver specific issue of some kind, either a bug in the driver itself or needing to work around some issue with the hardware (emulated hardware in your case). The core ALSA code pretty much just passes these operations straight through to the drivers.
From what I have seen until now it doesn’t look like a bug from the test nor an issue from the kernel, so I’m not really sure where to look at: I have
As far as I can see it's a kernel or lower issue - userspace wrote a value that's valid for the control but read back a different value (if I had to guess I'd say the left and right channels are getting confused on either the read or the write).
participants (2)
-
Giacomo Guiduzzi
-
Mark Brown