Preference exact audio profile for record
The current checkCompatibleAudioProfile routine preferences higher bit
depth over sample rate and channel count, and considers a request
compatible even if the number of channels in the profile is less than
the number of channels requested (see checkCompatibleChannelMask match
score). As a result, if a client requests 16-bit/48kHz/8-ch, and the
mixPorts support both 16-bit/48kHz/8-ch and 32-bit/16kHz/2-ch, the
32-bit lower channel count mixPort will be picked, resulting in missing
audio channels in the capture. For now, check if an exact audio profile
exists and prefer that over the compatible audio profile match; later
CLs may update checkCompatibleProfile to preference better channel
matching over preferring higher format bit depth.
Test: 16-bit/48kHz/8-ch exact match profile is picked even if a
compatible 32-bit/16kHz/2-ch profile exists.
Bug: 282877240
Change-Id: I3dd0876d971f77dc358d6628e28472a231b235e4
Loading
Please register or sign in to comment