HomeFreeBSD

sound tests: Fix downshift calculation in pcm_read_write test

Description

sound tests: Fix downshift calculation in pcm_read_write test

In some situations the feeders in the sound module lower the pcm sample
resolution through a downshift of the sample value. The pcm_read_write
test implements this operation with an arithmetic division to avoid
implementation defined or architecture specific behavior. Due to
different rounding, the test produced marginally different sample
values, which made the test fail on 32 bit architectures. Correct this.

Reported by: CI
Fixes: 27ef5d48c729 ("sound: Unit test the pcm sample read and write macros")
MFC after: 1 week
Reviewed by: christos, markj
Differential revision: https://reviews.freebsd.org/D48926

Details

Provenance
dev_submerge.chAuthored on Tue, Feb 18, 7:35 PM
christosCommitted on Tue, Feb 18, 7:37 PM
Reviewer
christos
Differential Revision
D48926: sound tests: Fix downshift calculation in pcm_read_write test
Parents
rGd4176fdb1370: snd_hda: Fix typo (s/owerflow/overflow)
Branches
Unknown
Tags
Unknown