HomeFreeBSD

sound: Refactor the format conversion framework

Description

sound: Refactor the format conversion framework

Merge the PCM_READ|WRITE_* macros defined in pcm/pcm.h, as well as the
intpcm_read|write_* macros defined in pcm/feeder_format.c, into six
inline functions: pcm_sample_read|write[_norm|calc](). The absence of
macro magic makes the code significantly easier to read, use and modify.

Since these functions take the input/output format as a parameter, get
rid of the read() and write() function pointers defined in struct
feed_format_info, as well as the feeder_format_read|write_op()
functions, and use the new read/write functions directly.

Sponsored by: The FreeBSD Fondation
MFC after: 1 week
Reviewed by: markj
Differential Revision: https://reviews.freebsd.org/D47932

Details

Provenance
christosAuthored on Mon, Mar 10, 8:19 PM
Reviewer
markj
Differential Revision
D47932: sound: Refactor the format conversion framework
Parents
rG394605c057ad: ip_output(): style
Branches
Unknown
Tags
Unknown