HomeFreeBSD

virtual_oss(8): Remove floating point formats from preference list

Description

virtual_oss(8): Remove floating point formats from preference list

virtual_oss(8) chooses formats based on preference lists (see
VPREFERRED_*) for each sample depth (-b option). However, if we, for
example, use 32 bits LE for the sample depth, what will end up happening
is that the format chosen will be 0x10001000, which corresponds to
AFMT_S32_LE *and* AFMT_F32_LE OR'd together. This happens because the
preference lists include both AFMT_S32_* and AFMT_F32_* in the 32-bit
cases.

Because we essentially end up using an invalid format, sound(4) will
eventually reach pcm_sample_write()'s (sys/dev/sound/pcm/pcm.h)
__assert_unreachable() case.

This patch is a temporary fix to address the panic, until a proper
solution for using floating point formats is found.

PR: 289904
Sponsored by: The FreeBSD Foundation
MFC after: 2 days

Details

Provenance
christosAuthored on Tue, Sep 30, 1:13 PM
Parents
rGbe8830612314: libc: Add missing MLINK for tzname(3)
Branches
Unknown
Tags
Unknown