Merge "audio_alsaops: fix format conversion error handling bug" am: 9a2cf9a818 am: 53ead60966

Original change: https://android-review.googlesource.com/c/platform/hardware/libhardware/+/1323975

Change-Id: If3b86f025a61e3151da8e45c6dac1d221c8f3a5c
This commit is contained in:
Andy Hung 2020-06-08 17:17:51 +00:00 committed by Automerger Merge Worker
commit bb2bf2d62d

View file

@ -60,7 +60,7 @@ static inline enum pcm_format pcm_format_from_audio_format(audio_format_t format
case AUDIO_FORMAT_PCM_FLOAT: /* there is no equivalent for float */
default:
LOG_ALWAYS_FATAL("pcm_format_from_audio_format: invalid audio format %#x", format);
return 0;
return PCM_FORMAT_INVALID; /* doesn't get here, assert called above */
}
}
@ -94,7 +94,7 @@ static inline audio_format_t audio_format_from_pcm_format(enum pcm_format format
#endif
default:
LOG_ALWAYS_FATAL("audio_format_from_pcm_format: invalid pcm format %#x", format);
return 0;
return AUDIO_FORMAT_INVALID; /* doesn't get here, assert called above */
}
}