Use the correct API to check whether a codec is valid
Use the (new) A2D_IsPeerSinkCodecValid() API call as appropriate to check whether the codec information of a Sink peer is valid. Previously, A2D_IsSourceCodecSupported() was used, and that didn't match the original code (before the refactoring). A2D_IsSourceCodecSupported() has extra checks, including min/max bitpool oundaries, and those shouldn't be used for this initial check - the bitpool boundaries can be adjusted later. Similarly, use the new A2D_IsPeerSourceCodecValid() API call instead of A2D_IsSinkCodecSupported(). Also: * Replaced A2D_IsValidCodec() with A2D_IsSourceCodecValid(), A2D_IsSinkCodecValid() A2D_IsPeerSourceCodecValid(), A2D_IsPeerSinkCodecValid() and added the appropriate unit tests. * Added extra debug messages to help identify similar issues in the future Bug: 31749230 Test: manual test with a carkit, and unit tests Change-Id: Iafaeb82744df9758e686194c91624992a0c55bdf
Loading
Please register or sign in to comment