No description
Find a file
Giacomo Guiduzzi a2368d10b7 ALSA: pci: fix reading of swapped values from pcmreg in AC97 codec
commit 17aaf01933 upstream.

Tests 72 and 78 for ALSA in kselftest fail due to reading
inconsistent values from some devices on a VirtualBox
Virtual Machine using the snd_intel8x0 driver for the AC'97
Audio Controller device.
Taking for example test number 72, this is what the test reports:
"Surround Playback Volume.0 expected 1 but read 0, is_volatile 0"
"Surround Playback Volume.1 expected 0 but read 1, is_volatile 0"
These errors repeat for each value from 0 to 31.

Taking a look at these error messages it is possible to notice
that the written values are read back swapped.
When the write is performed, these values are initially stored in
an array used to sanity-check them and write them in the pcmreg
array. To write them, the two one-byte values are packed together
in a two-byte variable through bitwise operations: the first
value is shifted left by one byte and the second value is stored in the
right byte through a bitwise OR. When reading the values back,
right shifts are performed to retrieve the previously stored
bytes. These shifts are executed in the wrong order, thus
reporting the values swapped as shown above.

This patch fixes this mistake by reversing the read
operations' order.

Signed-off-by: Giacomo Guiduzzi <guiduzzi.giacomo@gmail.com>
Signed-off-by: Paolo Valente <paolo.valente@linaro.org>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20220322200653.15862-1-guiduzzi.giacomo@gmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-03-28 09:57:09 +02:00
arch arm64: fix clang warning about TRAMP_VALIAS 2022-03-23 09:13:28 +01:00
block block/wbt: fix negative inflight counter when remove scsi device 2022-02-23 12:01:04 +01:00
certs certs: Trigger creation of RSA module signing key if it's not an RSA key 2021-09-15 09:50:29 +02:00
crypto crypto: api - Move cryptomgr soft dependency into algapi 2022-02-11 09:09:03 +01:00
Documentation arm64: cpufeature: add HWCAP for FEAT_RPRES 2022-03-11 12:11:51 +01:00
drivers staging: fbtft: fb_st7789v: reset display before initialization 2022-03-28 09:57:08 +02:00
fs exfat: avoid incorrectly releasing for root inode 2022-03-28 09:57:07 +02:00
include ALSA: pcm: Fix races among concurrent hw_params and hw_free calls 2022-03-28 09:57:09 +02:00
init bpf: Add kconfig knob for disabling unpriv bpf by default 2022-01-05 12:40:34 +01:00
ipc shm: extend forced shm destroy to support objects from several IPC nses 2021-12-01 09:19:10 +01:00
kernel cgroup-v1: Correct privileges check in release_agent writes 2022-03-28 09:57:08 +02:00
lib ARM: 9178/1: fix unmet dependency on BITREVERSE for HAVE_ARCH_BITREVERSE 2022-03-19 13:44:44 +01:00
LICENSES LICENSES/deprecated: add Zlib license text 2020-09-16 14:33:49 +02:00
mm mm: swap: get rid of livelock in swapin readahead 2022-03-23 09:13:27 +01:00
net llc: fix netdevice reference leaks in llc_ui_bind() 2022-03-28 09:57:08 +02:00
samples ftrace/samples: Add missing prototypes direct functions 2022-01-11 15:25:00 +01:00
scripts kconfig: fix failing to generate auto.conf 2022-02-23 12:01:07 +01:00
security ima: Do not print policy rule with inactive LSM labels 2022-02-16 12:54:16 +01:00
sound ALSA: pci: fix reading of swapped values from pcmreg in AC97 codec 2022-03-28 09:57:09 +02:00
tools Revert "selftests/bpf: Add test for bpf_timer overwriting crash" 2022-03-23 09:13:30 +01:00
usr usr/include/Makefile: add linux/nfc.h to the compile-test coverage 2022-02-01 17:25:48 +01:00
virt KVM: eventfd: Fix false positive RCU usage warning 2022-02-16 12:54:20 +01:00
.clang-format RDMA 5.10 pull request 2020-10-17 11:18:18 -07:00
.cocciconfig
.get_maintainer.ignore
.gitattributes .gitattributes: use 'dts' diff driver for dts files 2019-12-04 19:44:11 -08:00
.gitignore kbuild: generate Module.symvers only when vmlinux exists 2021-05-19 10:12:59 +02:00
.mailmap mailmap: add two more addresses of Uwe Kleine-König 2020-12-06 10:19:07 -08:00
COPYING COPYING: state that all contributions really are covered by this file 2020-02-10 13:32:20 -08:00
CREDITS MAINTAINERS: Move Jason Cooper to CREDITS 2020-11-30 10:20:34 +01:00
Kbuild kbuild: rename hostprogs-y/always to hostprogs/always-y 2020-02-04 01:53:07 +09:00
Kconfig kbuild: ensure full rebuild when the compiler is updated 2020-05-12 13:28:33 +09:00
MAINTAINERS MAINTAINERS: adjust GCC PLUGINS after gcc-plugin.sh removal 2021-12-14 11:32:46 +01:00
Makefile Linux 5.10.108 2022-03-23 09:13:30 +01:00
README

Linux kernel
============

There are several guides for kernel developers and users. These guides can
be rendered in a number of formats, like HTML and PDF. Please read
Documentation/admin-guide/README.rst first.

In order to build the documentation, use ``make htmldocs`` or
``make pdfdocs``.  The formatted documentation can also be read online at:

    https://www.kernel.org/doc/html/latest/

There are various text files in the Documentation/ subdirectory,
several of them using the Restructured Text markup notation.

Please read the Documentation/process/changes.rst file, as it contains the
requirements for building and running the kernel, and information about
the problems which may result by upgrading your kernel.